Skip to content
Glossary

Nonce

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.

Nonce: Frequently Asked Questions

What role does the nonce play in mining?
To mine a block, a miner hashes the block's contents together with a nonce and checks whether the result meets the network's difficulty target. If it does not, they change the nonce and try again, often billions of times per second, until one qualifies. The winning nonce is stored in the block so anyone can verify the solution instantly.
Why is the nonce central to proof of work?
The nonce search is the actual work in proof of work. Because a valid hash is hard to find but trivial to check, the effort required secures the network: rewriting history would mean redoing enormous amounts of nonce-searching. The asymmetry between expensive discovery and instant verification is what makes the whole mechanism function.
Is the mining nonce the same as an account nonce?
No, they are different uses of the same general idea. The mining nonce is the value miners vary while searching for a valid block. A separate account nonce is used on account-based chains to order each address's transactions in sequence and prevent replay, ensuring the same transaction cannot be processed twice. Both rely on a value 'used once.'