Nonce
A 32-bit field in the block header that miners vary to find a hash below the network's difficulty target.
The nonce is a 32-bit field in the block header that miners change while searching for a valid block. "Nonce" is short for "number used once."
Mining at the lowest level looks like this:
loop:
set nonce to next value
hash = SHA-256(SHA-256(header))
if hash < target: broadcast block
else: try again
That's it. There's no shortcut, no algebra, no clever derivation. You just compute hashes until one happens to fall below the target. One mining machine released in 2024, packed with many ASIC chips, is rated at 234 trillion hashes per second.
The 32-bit nonce only has 2^32 = ~4.3 billion possible values, which a serious mining operation burns through in a fraction of a second. When it runs out, the miner changes another part of the block (typically the extranonce inside the coinbase transaction), which changes the Merkle root in the header, which gives them a fresh 4.3-billion-value nonce space to search. Repeat until something works.
The nonce is the most boring 4 bytes in Bitcoin and also the entire mechanism by which proof-of-work happens. See Hash for what's being computed, and the Mining rabbit hole for why finding a good one matters.
Key takeaways
- Central to the proof-of-work process in block hashing
- Only 4 bytes, so miners also tweak extranonce/other fields
- Finding a valid nonce verifies the block meets difficulty
Related chapters
Corrected
-
Was: The entry said modern mining ASICs compute about 100 trillion hashes per second per chip.
Now: Speeds like that belong to a whole mining machine, which is built from many ASIC chips. One machine released in 2024 is rated at 234 trillion hashes per second. Details
Sources (1)
External references (3)
Related terms (6)
Published . Revised . One correction logged for this page.
Edit this page on GitHub