Author

Topic: Nonce size - 2*32 bit !? (Read 660 times)

legendary
Activity: 3472
Merit: 4794
April 24, 2015, 12:19:08 PM
#4
aarrgghh...

2 to the power of 31 = 2147483648

2 to the power of 32 = 4294967296

silly me, should have double checked. The wiki link refers to 2^31.

Nothing to see here, keep on mining, please.

Glad to see you figured it out.

Note that the signed range of integer values that can be stored in 32 bits is -2,147,483,648 through 2,147,483,647

However the nonce is an unsigned integer, meaning it does not represent negative values. The unsigned range of integer values that can be stored in 32 bits is 0 through 4,294,967,295.
newbie
Activity: 22
Merit: 7
April 24, 2015, 11:46:04 AM
#3
aarrgghh...

2 to the power of 31 = 2147483648

2 to the power of 32 = 4294967296

silly me, should have double checked. The wiki link refers to 2^31.

Nothing to see here, keep on mining, please.
legendary
Activity: 3248
Merit: 1070
April 24, 2015, 11:28:56 AM
#2
i guess it is because of the extranonce that the miners add to the coinbase transaction, but i'm not entirely sure about this
newbie
Activity: 22
Merit: 7
April 24, 2015, 11:12:25 AM
#1
Hi all,

I've a question about the nonce size in the bitcoin header. The bitcoin documentation (https://bitcoin.org/en/developer-reference#block-headers) reads: "Nonce: An arbitrary number miners change to modify the header hash in order to produce a hash below the target threshold. If all 32-bit values are tested, the time can be updated or the coinbase transaction can be changed and the merkle root updated."

So far, so good, a nonce is a 32-bit value. Now, the maximum number in 32 bits is 2147483647 (http://en.wikipedia.org/wiki/2147483647). However, if I take a look at some nonces in the blockchain (for example: http://blockexplorer.com/b/3500 - Nonce: 4133247770) the number exceeds 32 bits. The largest nonce I found was 4294638616, which is almost 2*2147483647. However, I haven't been able to explain this phenomenon.

Anyone? Thanks.

Tom
Jump to: