Nonce
Everything you need to know about the Nonce
Nonce
The nonce is a crucial element in the mining process. It is a 4-byte (32-bit) number that miners repeatedly modify and hash along with the blob to find a valid block hash. The nonce is located at a specific offset within the blob, known as the nonceOffset. In Monero and Etica the NonceOffset is at position 39bytes and has a size of 4bytes. Nonce is set between 39-42 bytes.
How it works
When miners receive the blob, their mining software iterates by replacing the bytes at the nonceOffset position. This process involves changing the nonce value, rehashing the blob, and checking if the resulting hash meets the network's difficulty target. Example of how and where the nonce is modified for a given blob
Note: When passing the Nonce to Ethereum related functions like Ethereum libraries it is often necessary to add 0x at the begining of the Nonce. For instance here it would beb 0x89abcdef and 0x5f6e7d8c.
Last updated