Skip to main content

should be used for questions related to the nonce used in bitcoin block

The "nonce" in a bitcoin block is a 32-bit (4-byte) field whose value is adjusted by miners so that the hash of the block will be less than or equal to the current target of the network.

The coinbase transaction is also updated during mining. The changes to the coinbase transaction form the "extranonce". This is needed since the 32-bit search space of the nonce is too little.

Any change to the block data (such as the nonce) will make the block hash completely different. Since it is believed infeasible to predict which combination of bits will result in the right hash, many different nonce values are tried, and the hash is recomputed for each value until a hash less than or equal to the current target of the network is found. The target required is also represented as the difficulty, where a higher difficulty represents a lower target. As this iterative calculation requires time and resources, the presentation of the block with the correct nonce value constitutes proof of work.

https://en.bitcoin.it/wiki/Nonce