Mining

Nonce

The nonce is a number the miner changes in the block header on every attempt, to get a hash that meets the network's target.

The word nonce comes from "number used once". In Bitcoin mining, it is a 32-bit field in the header of every candidate block. The header also contains the hash of the previous block, a summary of the transactions, the timestamp and the difficulty target: the nonce is the part the miner is free to change.

Mining consists of hashing the header, checking whether the result is below the target, then changing the nonce and starting again. Because the output of a hash function is unpredictable, there is no shortcut: the values are tried one by one. A 32-bit field only offers about 4.3 billion possibilities, which a modern ASIC runs through in a fraction of a second. The miner then changes other elements, such as the extranonce in the coinbase transaction, to get a new header and start again from zero.

A machine's hashrate is the number of attempts of this kind it makes every second. In an ASIC, the control board receives work from the pool and spreads it across the chips on the hashboards, each one exploring its own range of values. If a hashboard fails, that is that many fewer attempts every second, and therefore a lower hashrate.

Our 3D page dedicated to a hydro-cooled Antminer lets you take a close look at this type of machine.