shuijian-xu / bitcoin

0 stars 0 forks source link

What miners can do when the nonce field is exhausted? #221

Open shuijian-xu opened 4 years ago

shuijian-xu commented 4 years ago

Where does the miner get new numerical dirt to process to see if it satisfies proof-of-work? This is where the nonce field comes in. The miners can change the nonce field at will to change the hash of the block header.

shuijian-xu commented 4 years ago

Unfortunately, the 4 bytes or 32 bits of the nonce field (or 232 possible nonces that a miner can try) is insufficient for the required proof-of-work. Modern ASIC equipment can calculate way more than 232 different hashes per second. The AntMiner S9, for example, calculates 12 terahashes per second (Th/s). That is approximately 243 hashes per second, which means that the entire nonce space can be consumed in just 0.0003 seconds.

shuijian-xu commented 4 years ago

What miners can do when the nonce field is exhausted is

  1. change the coinbase transaction, which then changes the Merkle root, giving miners a fresh nonce space each time.

  2. The other option is to roll the version field or use overt ASICBOOST.