Nonce
In cryptocurrency, a nonce is a randomly generated number added to a block's data during the mining process. The word "nonce" stands for "number used once," and it is the variable that miners adjust repeatedly in their attempt to find a block hash that meets the network's current difficulty target. The goal is to find a nonce value that, when combined with the rest of the block data and hashed, produces an output that starts with a required number of leading zeros. The more leading zeros required, the harder it is to find a valid nonce.
The mining process is fundamentally a brute-force search for a valid nonce. Since the hash function produces unpredictable outputs, miners must try billions or even trillions of different nonce values per second before finding one that satisfies the difficulty requirement. When a miner finds a valid nonce, they broadcast the completed block to the network, other nodes verify its validity, and the miner collects the block reward. The difficulty of finding a valid nonce is what makes proof-of-work blockchains computationally expensive to attack.
Beyond mining, the term nonce is also used in cryptographic contexts outside of block validation. In Ethereum, for example, every account has a transaction nonce that increments with each outgoing transaction. This account nonce prevents replay attacks — where a signed transaction could be maliciously rebroadcast — and ensures that transactions from a given address are processed in order. Understanding both uses of the term nonce helps clarify how blockchain systems maintain both security and transaction ordering.