Maximum # of hashes for finding a block?

3

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?

galahad

Posted 2016-07-20T20:43:36.897

Reputation: 181

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 Tomescu 2016-07-21T17:34:07.500

Answers

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.

Jimmy Song

Posted 2016-07-20T20:43:36.897

Reputation: 7 067

1How can a miner change the coinbase transaction? More specifically, does this changeable field mean anything?galahad 2016-07-20T21:25:39.173

The scriptSig field of the coinbase transaction's txin can contrain 96 bytes of freeform data.Pieter Wuille 2016-07-20T23:00:07.070