Passer au contenu

Bitcoin accepté au paiement  |  Expédié depuis Laval, QC, Canada  |  Soutien expert depuis 2016

Nonce Space

Mining Basics

Definition

Nonce space — sometimes called the search space — is the full set of header values a miner is free to vary while hunting for a hash below target. The header's dedicated nonce is a single 32-bit field, giving about 4.3 billion combinations per otherwise-identical header. That sounds large but is trivially small for modern hardware: a single ASIC hashing at 200 TH/s burns through more than 46,000 complete 32-bit nonce ranges every second. If the nonce field were all a miner had, the machine would starve for work almost instantly, so real mining extends the effective search across several additional dimensions of the block header.

The three expansion dimensions

The workhorse is the extranonce — bytes embedded in the coinbase transaction. Under Stratum, the pool assigns a fixed extranonce1 per connection and grants the miner an extranonce2 field of a negotiated size (commonly 4 bytes or more). Every distinct extranonce2 value produces a different coinbase transaction, therefore a different merkle root, therefore a completely fresh 4.3-billion-nonce header to sweep — all without contacting the pool. Four bytes of extranonce2 alone multiply the search space by another factor of 4.3 billion. The second dimension is version rolling: the BIP320 general-purpose bits of the header's nVersion field (mask 0x1fffe000, 16 bits) can be varied per hash after negotiation with the pool, giving up to 65,536 more headers per extranonce2 value — and letting the ASIC roll work internally without recomputing the merkle root at all. Third, the timestamp can be nudged within consensus-allowed bounds ("nTime rolling"), though pools constrain this and it is used sparingly.

Why depth matters for job distribution

Nonce space is fundamentally a bandwidth problem. Without the expansion dimensions, a control board would need to fetch fresh jobs for each hashing chip tens of thousands of times per second, saturating its own buses and the pool connection. By rolling extranonce2 and version bits locally, a miner stretches one mining.notify job across an effectively unbounded search range, and the pool link stays quiet between block changes. This is precisely the problem Stratum's job format and BIP310's version-rolling negotiation were designed to solve, and it is why version rolling is essentially universal on modern ASICs: those 16 extra bits are the cheapest search space in the machine, requiring no merkle recomputation. The deeper the local nonce space, the fewer round-trips per unit of hashrate.

The hardware view: midstates

Version rolling has a hidden performance dividend inside the chip. SHA-256 processes the 80-byte header in two 64-byte chunks, and the first chunk — containing the version, previous-block hash, and part of the merkle root — can be hashed once into a midstate and reused across the entire nonce sweep. With version rolling active, the hardware precomputes one midstate per version-bit combination and grinds them in parallel, multiplying search space at almost no silicon cost. Timestamp rolling, by contrast, stays modest because pools bound how far nTime may drift from the template they issued, and shares outside that tolerance are rejected.

The small-miner angle

Nonce space also explains a subtlety of small-scale and solo mining. A Bitaxe at ~1 TH/s takes several milliseconds to exhaust one 32-bit range — leisurely by ASIC standards — while a farm's pool server must partition extranonce space carefully so no two machines ever grind the same headers. Duplicate search space is pure waste: two miners sweeping identical headers find identical shares. When you see extranonce2_size in a pool's subscribe response, that number is the pool telling you how much private search territory you have been allotted. Related concepts are covered in Version Rolling (BIP320) and Share Difficulty — the former expands the space, the latter decides how often a sweep through it produces something worth submitting.

In Simple Terms

Nonce space — sometimes called the search space — is the full set of header values a miner is free to vary while hunting for…

Explore the Full Glossary

Browse all Bitcoin mining terms from A to Z. Whether you are a beginner or expert, deepen your understanding of the mining ecosystem.

Glossaire du minage

ASIC Miner Database

Compare 500+ miners with real-time profitability data, home mining scores, and detailed specs.

Comparer les mineurs