4

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?

1
  • 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. Jul 21, 2016 at 17:34

1 Answer 1

6

The miner can change the block header hash several different ways:

  1. 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.
  2. Add transactions. Adding any new transaction changes the Merkle root, so this gives you entirely new nonce spaces.
  3. Change the coinbase transaction. This is the most common method. 32 bits are typically used to act as an additional nonce.
2
  • 1
    How can a miner change the coinbase transaction? More specifically, does this changeable field mean anything?
    – galahad
    Jul 20, 2016 at 21:25
  • The scriptSig field of the coinbase transaction's txin can contrain 96 bytes of freeform data. Jul 20, 2016 at 23:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.