Since nonce is a 32 bit number, the maximum value of nonce can only be 4,294,967,296. So, if a miner doesn't find the target hash within this number, what happens?
-
Note: Although a signed 32-bit integer's max value is 2^32 - 1 = 2,147,483,647, that's not really relevant: The miners will iterate through all 32-bit values, so they have 4,294,967,296 tries really. Put another way, think of that 32-bit number as an unsigned integer.– Alin TomescuCommented Jul 21, 2016 at 17:34
Add a comment
|
1 Answer
The miner can change the block header hash several different ways:
- Change the timestamp. This is the least intrusive, but works just fine. If you can do more than 4 Th/s, this starts to become a problem.
- Add transactions. Adding any new transaction changes the Merkle root, so this gives you entirely new nonce spaces.
- Change the coinbase transaction. This is the most common method. 32 bits are typically used to act as an additional nonce.
-
1How can a miner change the coinbase transaction? More specifically, does this changeable field mean anything?– galahadCommented Jul 20, 2016 at 21:25
-
The scriptSig field of the coinbase transaction's txin can contrain 96 bytes of freeform data. Commented Jul 20, 2016 at 23:00