Nonce
- A nonce is a "number used once" that miners repeatedly change while searching for a hash that meets the network's difficulty target.
- Because the right nonce is hard to find but trivial to verify, the nonce search is the actual "work" that secures a proof-of-work blockchain.
- A separate kind of nonce is used on account-based chains to order each address's transactions and prevent replay.
A nonce (“number used once”) is a value that is varied to produce a different cryptographic result. In proof-of-work mining it is the number miners repeatedly change while searching for a valid block.
How it works
To mine a block, a miner hashes the block’s contents together with a nonce and checks whether the resulting hash meets the network’s difficulty target. If not, they change the nonce and try again, billions of times per second, until one produces a qualifying hash. The winning nonce is included in the block so anyone can verify the solution instantly.
Why it matters
The nonce search is the “work” in proof of work: it is hard to find but trivial to check, which is what secures the network. A separate kind of nonce is also used in account-based chains to order each address’s transactions and prevent replay.
Example
A miner that finds the right nonce earns the block reward; everyone else immediately verifies their answer and moves on.
What does a nonce actually do in mining?
Why is it called a "number used once"?
Is the mining nonce the same as a transaction nonce?
Other glossary terms connected to this one.
Go deeper than the definition — explainers, live data and free calculators.