What Is extraNonce? Nonce vs extraNonce in Bitcoin Mining
extraNonce is data a miner writes into the coinbase transaction, not a field of the block header. Changing it changes the coinbase hash and the merkle root, which gives the ASIC a new 80-byte header and a fresh 2³² (about 4.295 billion) header-nonce search space.
extraNonce is the mining term for extra data a miner changes inside the coinbase transaction to get new block headers to hash. It works together with the block-header nonce but is a different thing in a different place. In one sentence: the nonce is a standard 4-byte field in the Bitcoin block header that ASICs run through at high speed; extraNonce is usually written into the coinbase transaction, is not part of the header, and changes the merkle root, which gives the miner a new header and a new nonce search space.
Noun. Bitcoin mining term, also written ExtraNonce or extra nonce. In Stratum pool mining it is split into extranonce1 and extranonce2.
Arbitrary data a miner places in the coinbase transaction, usually in the coinbase script. Changing it changes the coinbase hash and the merkle root, and therefore the block header, opening a fresh 2³² nonce search space. It is not a field of the 80-byte block header.
The extraNonce space as divided by the Stratum protocol: extranonce1, assigned by the pool per connection or work session, and extranonce2, varied by the miner within the length the pool allows.
Why the header nonce is not enough
Bitcoin proof of work does not hash the whole block. It double-SHA-256-hashes a fixed 80-byte block header with six fields:
| Block header field | Size | Role |
|---|---|---|
| Version | 4 bytes | Indicates the rule version the block uses |
| Previous block hash | 32 bytes | Links the current block to the previous one |
| Merkle root | 32 bytes | Represents the set of transactions in the current block |
| Timestamp | 4 bytes | Represents the block time |
| Difficulty target | 4 bytes | Encodes the current proof-of-work target |
| Nonce | 4 bytes | The search variable the miner changes at high speed |
The ASIC repeatedly changes the nonce and computes SHA256(SHA256(Block Header)). If the hash is not below the target, it tries another nonce, until it finds a result that meets the pool's share difficulty or, very rarely, the Bitcoin network difficulty. The nonce is the ASIC's high-speed counter within the current header template: nonce = 0, 1, 2, … up to 4,294,967,295. The nonce entry covers the header and the search loop in detail.
That range is far too small for a modern ASIC. The nonce has only 2³², about 4.295 billion, possible values. A 200 TH/s miner can in theory perform about 200 trillion hashes per second, and today's ASICs routinely run at hundreds of TH/s. So the 32-bit nonce alone cannot keep a modern ASIC supplied with new search work. Miners keep changing extraNonce, the timestamp, version bits, and other data to create new work. In pool mining, extraNonce is one of the most important of these methods. The Bitcoin developer documentation says the same: once the header's 32-bit nonce has been fully tested, mining software can modify the coinbase transaction to produce a new merkle root and continue hashing.
Where extraNonce lives
The name suggests the header has a second field called extraNonce next to the nonce. It does not. The 80-byte block header defined by the Bitcoin protocol has a nonce and no extraNonce.
extraNonce is usually placed in the coinbase script of the coinbase transaction, the first transaction in the block. The coinbase transaction is not a transfer between users. The miner creates it to claim the block subsidy and transaction fees, and it has space where the miner can write extra data. The Bitcoin developer documentation notes that miners often add an extraNonce to the coinbase field so they can update the merkle root in the block header.
That gives the chain that defines extraNonce:
extraNonce changes → coinbase transaction changes → coinbase transaction hash changes → merkle root changes → block header changes → a new nonce search space
extraNonce is never hashed directly as part of the header. It changes the header indirectly, through the merkle root.
How a new extraNonce reopens 2³² nonces
Suppose the pool has prepared candidate block data and the merkle root is A. The header is:
Version + Previous Block Hash + Merkle Root A + Time + Bits + Nonce
The ASIC runs through the nonces. If all of about 4.295 billion values are used without a qualifying hash, starting again from 0 is pointless: the same header with the same nonce always produces the same hash. So the mining software changes the extraNonce, for example from extraNonce A to extraNonce B.
The coinbase transaction and its hash change. The coinbase is part of the merkle tree, so the merkle root changes from A to B, and the header becomes:
Version + Previous Block Hash + Merkle Root B + Time + Bits + Nonce
The ASIC starts again from nonce 0, but the 80-byte header is now different, so nonce 0 with merkle root A and nonce 0 with merkle root B give two unrelated hashes. Each new extraNonce reopens a full 2³² nonce search space. The Bitcoin developer documentation describes the same process: when the ASIC finishes the nonces in the current header without a result, mining software adds new extraNonce data to the coinbase, recomputes the merkle root, and sends the new header to the ASIC.

Nonce vs extraNonce
| Comparison | Nonce | extraNonce |
|---|---|---|
| Part of the block header? | Yes | No |
| Location | 80-byte block header | Usually in coinbase transaction data |
| Standard Bitcoin block-header field? | Yes | No |
| Fixed size? | Fixed 4 bytes | No single fixed block-header length |
| Primary modifier | ASIC high-speed traversal | Mining software, pool protocol, and job systems |
| Direct effect of a change | Block header hash | Coinbase transaction and merkle root |
| Main purpose | Search for a valid hash in the current block header | Create a new block-header search space |
| Relationship to SHA-256 | Directly changes the hashed block header | First changes coinbase and merkle root, then indirectly the block header |
An analogy: think of the nonce as the numbers in one book of lottery tickets, which the ASIC tries one by one. The book holds only about 4.295 billion tickets. extraNonce does not add pages to the end of that book; it prints a completely different book. The nonce in the new book still runs from 0 to 2³²−1, but because the merkle root has changed, every combination hashes differently from the last book. The nonce searches inside a search space; extraNonce creates new search spaces.
Not a bigger nonce
A common misconception is that extraNonce extends the 32-bit nonce to 64 or 128 bits. It does not. The header nonce is always 4 bytes. The two sit at different layers:
- Nonce:
Block Header → Nonce - extraNonce:
Coinbase → extraNonce → Coinbase Hash → Merkle Root → Block Header
This is why a block explorer shows the nonce of a mined block but no standard "extraNonce" header field: under Bitcoin consensus rules it was never part of the header.
extranonce1 and extranonce2 in pool mining
Pool mining adds two more terms, extranonce1 and extranonce2. They come from how pools distribute jobs over the Stratum protocol. They are not two new fields in the Bitcoin block header.
A Stratum pool assigns work to many miners, machines, or proxy servers at the same time. If every device used the same coinbase and the same search range, they would duplicate each other's work. The pool therefore uses extraNonce to give each miner a different work space:
- extranonce1 is usually assigned by the pool to distinguish miner connections or work sessions.
- extranonce2 is varied by the miner, within the length the pool allows, to keep building new coinbase transactions.
The coinbase can be read roughly as:
Coinbase Part 1 + extranonce1 + extranonce2 + Coinbase Part 2
When extranonce2 changes, the coinbase transaction changes; the miner recomputes the coinbase hash and the merkle tree, gets a new merkle root, and builds a new header. The Bitcoin developer documentation on Stratum mining says the same: after updating the extraNonce in the coinbase, the miner must recompute the coinbase transaction and the merkle tree to produce a new merkle root and update the header.
From the job-distribution side, the search space is roughly extranonce1 × extranonce2 × nonce, not an isolated 32-bit nonce. This is how a pool can keep thousands of high-hashrate ASICs supplied with work that does not overlap, or overlaps as little as possible.
Timestamp and version rolling
extraNonce is the standard outer counter, but it is not the only way to reset the nonce range. Two header fields can also change:
The timestamp can advance within the window the consensus rules allow. Each new value gives another full nonce range.
Unused bits of the version field can be varied as extra search space. This is the mechanism standardised for ASICBoost and negotiated over Stratum.
The Bitcoin developer reference lists the same options when all 32-bit nonce values have been tested: update the time, or modify the coinbase transaction and recompute the merkle root.
How nonce and extraNonce work together on an ASIC
- The pool creates a mining job with the previous block hash, transaction information, the difficulty target, and the data needed to build the coinbase.
- Mining software uses the coinbase and transaction data to compute the merkle root, then builds an 80-byte header.
- The ASIC does not keep changing extraNonce. It runs through nonces at high speed inside the chip, and each nonce gives a different header hash.
- A result that meets the pool difficulty becomes a share submitted to the pool. If the hash is also below the Bitcoin network target, it is a valid new block.
- When the current job's nonce space runs out, mining software changes extraNonce; the coinbase changes, a new merkle root and header are built, and the ASIC starts the next nonce round.

In short, the nonce decides where the miner is searching now; extraNonce decides where it moves next to keep searching. That split is how a block header with only a 32-bit nonce still supports the proof-of-work output of today's global ASIC hashrate.
Why it matters for farm operations
Miners do not set nonce or extraNonce values by hand. The pool protocol, miner firmware, and ASIC handle that automatically. The concepts still explain why mining is not "machines guessing random numbers": behind each ASIC is a job generation and distribution stack. The pool creates jobs, mining software and protocols build the coinbase and merkle root, the ASIC receives the header and runs SHA-256 at scale, and qualifying shares go back to the pool. The nonce is the variable the chip changes most directly and most often; extraNonce lets the whole system keep creating new jobs.
For a large farm, operations rarely care about any specific nonce value. They watch whether miners keep receiving valid jobs, whether hashrate output is normal, whether the pool connection is stable, whether shares are submitted normally, and whether there are many rejects or disconnects. Nonce, the farm management platform, takes its name from this same concept: an ASIC's core work is searching a huge space of possibilities for a hash that meets the target.
Frequently asked questions
What is extraNonce in Bitcoin mining?
extraNonce is data a miner writes into the coinbase transaction, usually in the coinbase script. It is not a field of the 80-byte block header. Changing it changes the coinbase transaction and its hash, which changes the merkle root, which changes the block header. Each new extraNonce value therefore gives the ASIC a new header and a fresh 2³² (about 4.295 billion) nonce search space.
What is the difference between nonce and extraNonce?
The nonce is a standard 4-byte field in the Bitcoin block header that the ASIC changes at high speed, and it directly changes the hashed header. extraNonce sits in the coinbase transaction, has no fixed header length, and is changed by mining software, the pool protocol, and job systems. It reaches the header only indirectly, through the merkle root. The nonce searches inside one search space; extraNonce creates new search spaces.
Why do miners need extraNonce if the block header already has a nonce?
The 32-bit header nonce has only 2³², about 4.295 billion, possible values. A 200 TH/s miner performs about 200 trillion hashes per second, so it exhausts that range almost immediately. Restarting from nonce 0 with the same header is pointless, because the same header and the same nonce always give the same hash. Changing extraNonce produces a different merkle root and a different header, so the same nonce values now give different hashes.
What are extranonce1 and extranonce2?
They come from how pools distribute work over the Stratum protocol, not from new block-header fields. extranonce1 is usually assigned by the pool to tell miner connections or work sessions apart. extranonce2 is varied by the miner, within the length the pool allows, to build new coinbase transactions. The coinbase is roughly Coinbase Part 1 + extranonce1 + extranonce2 + Coinbase Part 2, so the search space is roughly extranonce1 × extranonce2 × nonce.
Is extraNonce just a bigger nonce?
No. extraNonce does not extend the 32-bit header nonce to 64 or 128 bits; the header nonce is always 4 bytes. extraNonce works at a different layer: it changes the coinbase transaction, then the merkle root, and only then the header. That is why a block explorer shows the nonce of a mined block but no standard extraNonce header field.
Besides extraNonce, how else do miners get new nonce search space?
Miners can also change the timestamp and version bits. The timestamp can advance within the window the consensus rules allow, and unused bits of the version field can be rolled, the mechanism standardised for ASICBoost and negotiated over Stratum. Each change produces a new header and another full nonce range. In pool mining, extraNonce is one of the most important of these methods.
Do mining farm operators need to manage extraNonce?
No. The pool protocol, miner firmware, and ASIC handle nonce and extraNonce changes automatically. Operators of large farms watch whether miners keep receiving valid jobs, whether hashrate is normal, whether the pool connection is stable, whether shares are submitted normally, and whether there are many rejects or disconnects.