Bitcoin Forum
October 27, 2016, 06:53:42 PM *
News: Latest stable version of Bitcoin Core: 0.13.0  [Torrent].
   Home   Help Search Donate Login Register  
Pages: [1]
Author Topic: Mining algorithm  (Read 460 times)
Offline Offline

Activity: 2

View Profile
July 25, 2011, 02:19:56 PM

Hi, I read the entire wiki, also read some code in C and python. Here is what I understood about the mining algorithm:
 - GetWork using RPC call
 - Read the 'data' section in the result in JSON returned from the server. Decode it into binary and change the byte ordering so that reflects the little-endian format (should I rotate chunks of 4 byte or byte per byte?)
 - Read the 'nonce' value, which is stored in byte from '76' to '80'.
 - Try incrementing the nonce value in the data, and then hash the 'data' with the modified nonce, and re-hash the result.
 - Check if the generated hash's value (converted to a number) is less than that of the target (which is a number stored as HEX).
 - If that is true, send the modified header to the daemon.

Is that right? Thank you.
Pages: [1]
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!