This question helps identify the various components of the getwork "data" field, but I'm curious where the extraNonce comes from. My hunch is it's the first four bytes of the second half of the data, because I believe this is still part of the Merkle root (and yet, being in the second half of the data, it won't be part of the midstate). Is this correct? And if so, how does one increment the extraNonce, and what does it mean to do so?

Example getwork data: 00000001a10bacc7e639d1c69a01014bc5db6f2604b3477a3f273a4e019a232700000000a5942372cc60477c8a276e59c8f1a3f58654ea2f6c4402bf1b18e48455b5b8f64f10868b1c07475200000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000

Is the extraNonce (in little-endian, I know), 55b5b8f6?

2 Answers 2


extraNonce gets put into the input of the generation transaction. getwork clients can't see transactions, so they can't update extraNonce. Some miners instead modify nTime slightly to give them more nonce space.

extraNonce is used by bitcoind, but it's not part of the protocol. There is no extraNonce field in blocks or transactions.

  • Ah, interesting. And nTime is the same as the timestamp described here, correct? Oct 13, 2012 at 5:03
  • Yes, nTime is a field inside the block header. Oct 13, 2012 at 12:30

This really helped me understand it:

A solo miner increments Nonce until it overflows. Then it increments extraNonce and resets Nonce. extraNonce is located in the coinbase transaction, so changing it alters the Merkle root. extraNonce is reset based on the time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.