Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Nexus9090 on May 17, 2024, 12:58:22 PM



Title: How big is the total nonce range?
Post by: Nexus9090 on May 17, 2024, 12:58:22 PM
Hope someone can help answer a couple of noob questions...

How big is the total nonce range that a miner has to scan to create a valid hash

Am I correct to think that the total adjustment range a miner can make is to say (nonce + extranonce + timestamp), a total of (2^96)?

Or is there more to it?

I know nonce is (2^32) but what size is extranonce and timestamp are they also 32bit as I've suggested?

Also, what determines the starting nonce for each miner. I know there's a nonce provided in the block header, is this what gets used as the starting point or is that for something else?

Thanks for your help

G.



Title: Re: How big is the total nonce range?
Post by: Eleutheria on May 17, 2024, 01:48:22 PM
How big is the total nonce range that a miner has to scan to create a valid hash
32 bits

Am I correct to think that the total adjustment range a miner can make is to say (nonce + extranonce + timestamp), a total of (2^96)?
Changes to the timestamp or other parts of the candidate block gives the miner more nonce space to play around with.

Also, what determines the starting nonce for each miner. I know there's a nonce provided in the block header, is this what gets used as the starting point or is that for something else?
The miner decides which nonce to start at. If in a pool you can have a nonce range allocated to you.


Title: Re: How big is the total nonce range?
Post by: Nexus9090 on May 17, 2024, 02:29:41 PM
Thanks for your reply


Am I correct to think that the total adjustment range a miner can make is to say (nonce + extranonce + timestamp), a total of (2^96)?

Changes to the timestamp or other parts of the candidate block gives the miner more nonce space to play around with.

Understood. However the question is, how big are the extranonce and the timestamp, are they both 32 bit as well as I've assumed?

Thanks again.


Title: Re: How big is the total nonce range?
Post by: odolvlobo on May 17, 2024, 08:33:48 PM
Understood. However the question is, how big are the extranonce and the timestamp, are they both 32 bit as well as I've assumed?

This should answer your question:
Eight bytes of extra nonce, plus the 4 bytes of "standard" nonce allow miners to explore a total 296 (8 followed by 28 zeros) possibilities per second without having to modify the timestamp. If, in the future, miners could run through all these possibilities, they could then modify the timestamp. There is also more space in the coinbase script for future expansion of the extra nonce space.

Note that the extra nonce is not part of the protocol, so really it can be any size as long as it fits in the coinbase transaction. The time stamp is 32 bits.


Title: Re: How big is the total nonce range?
Post by: Nexus9090 on May 17, 2024, 08:59:44 PM
Understood. However the question is, how big are the extranonce and the timestamp, are they both 32 bit as well as I've assumed?

This should answer your question:
Eight bytes of extra nonce, plus the 4 bytes of "standard" nonce allow miners to explore a total 296 (8 followed by 28 zeros) possibilities per second without having to modify the timestamp. If, in the future, miners could run through all these possibilities, they could then modify the timestamp. There is also more space in the coinbase script for future expansion of the extra nonce space.

Note that the extra nonce is not part of the protocol, so really it can be any size as long as it fits in the coinbase transaction. The time stamp is 32 bits.

That's what I was looking for. Thank you for your help.