Extranonce is additional variable data that mining software commonly puts in the coinbase, the special first transaction of a block that assigns the mining reward. Changing this data changes the combined transaction fingerprint in the block header, creating more inputs to search through. The header’s separate nonce field does not get larger.
A header is a compact summary of a block’s data. A bit stores a zero or a one; eight bits make a byte. The header includes a 32-bit nonce field, offering 2^32 values when everything else stays fixed. Trying the same header with the same nonce again produces the same hash and therefore the same result. Extranonce does not lengthen this field: it changes other data from which a new header is prepared. Alena can picture a fresh assignment for which the counter can be tried again. In practice, other header fields may also vary within the applicable rules. [1] [5]
Here coinbase means the first transaction in each block, not the exchange. When software changes its extranonce, the transaction’s encoded data and TXID, its calculated identifier, change. A tree of progressively combined fingerprints leads from that identifier to the Merkle root, the combined transaction fingerprint stored in the header. Software must recalculate the affected branch. Other transactions can stay the same, but the old root cannot simply be retained. This chain of calculations gives the new header different inputs for mining. [1]
For a simple model, keep everything else fixed and allow two entirely free extranonce bytes. They offer 2^16 variations; together with the 32-bit nonce, that gives 2^48 input combinations. These are possible attempts, not a count of blocks found. Alena gets neither an easier requirement nor certainty of success within this set. The benefit is practical: there are more inputs to try. Adding free space does not itself speed up a machine that must actually perform the calculations. [1]
Extranonce space is not a blank form without rules. BIP 34, a specific Bitcoin rule, requires the correctly encoded block height, its position in the chain, at the start of the coinbase input data field called scriptSig. The 100-byte limit applies to the entire coinbase scriptSig, not just extranonce. Software must leave room for mandatory data and preserve the valid format. If Alena overwrote it, further calculations would be searching for a solution to an invalid block. [3] [4]
When miners cooperate in a pool, their machines should search different variations. Stratum V2, a protocol for distributing mining jobs, uses extranonce allocation to help achieve this. An upstream server assigns a fixed extranonce_prefix, the initial part of this data. A local intermediary can reserve another part for its clients and pass the remainder downstream. These directions are relative to the particular connection. An assigned prefix is not automatically available for the end miner to change; keeping it fixed helps separate other participants’ work. [2]
On an extended Stratum V2 channel, SubmitSharesExtended sends the varied bytes along with a result. The coinbase is assembled in this order: coinbase_tx_prefix, extranonce_prefix, extranonce and coinbase_tx_suffix. These names identify parts of the data exchanged by mining programs. The extranonce field must have the negotiated length. Even if a shorter representation looks like the same number, a different byte sequence can mean a different transaction. Computers compare exact data, not an approximate human interpretation. [2]
A Standard Job in Stratum V2 has a fixed Merkle root. The end device can change only the permitted parts of version, nonce and nTime: the header’s version, counter and time. It therefore does not submit its own extranonce in the way an extended channel does. Upstream software can prepare a new coinbase and root and supply another job. Alena may find no extranonce control on her device even though the wider setup uses this mechanism. [2]
Imagine a new prefix arriving while a result from earlier work is being processed. SetExtranoncePrefix in Stratum V2 applies to jobs sent afterwards on the given channel, the relevant mining session. A result must stay associated with the correct job_id, the job’s identifier, and its allocated space. Substituting the newest prefix everywhere could change the data underlying an older result. Extranonce is about creating distinct attempts and keeping track of them, not rewriting their assignments afterwards. [2]
For the clearest picture, read this entry together with Nonce, Merkle Tree, Mining Share, Block Template, Bitcoin. The reverse links also lead from ASIC Miner, Stratum V1, Stratum V2, Block Template.