Block 566687 nonce with extranonce, methods to interpret?

0
72


This might apply to any block, however I used to be checking this one out discovered by Slushpool.

I’ve appeared this up in Mastering Bitcoin and right here on StackExchange, however the most effective I can get up to now is: the coinbase tx is a script, the place the primary byte says “push three bytes on the stack”, which seems to be 9fa508 in hexadecimal. Reversing the byte order to 08a59f offers the block quantity (566687 decimal).

That is the place I get caught. The ebook says the following few bytes are used to encode the additional nonce.

Then it will get a bit extra detailed: “Eight bytes of additional nonce, plus the 4 bytes of “commonplace” nonce enable miners to discover a complete 2^96 (8 adopted by 28 zeros) potentialities per second with out having to change the timestamp.” p. 266 Chapter 10 within the newest version of Mastering Bitcoin.

I can not discover any code examples to try to discover the nonce for a block utilizing the additional nonce, slightly than the standard examples that go to a most 32-bit unsigned integer because the nonce.

Is it a concatenation of nonce + extranonce, merely 41678782744206783853? (With 4167878274 the nonce, then the extra 8 bytes interpreted as a big little-endian integer?)

I’ve additionally seen it is apparently a push of a timestamp then one other push of N bytes for the extranonce, however it’s getting laborious to seek out something to really take a look at.

I can not simply write one thing like this in Python:

 header = ( struct.pack("<L", version_) + prev_block.decode('hex')[::-1] +
      merkle_root.decode('hex')[::-1] + struct.pack("<LLQ", timetamp_, bits, nonce))

The nonce is means too large on this case to pack with Q after all.

What’s the right strategy to validate current blocks decoding the nonce and additional nonce? Subtracting a bit from the given nonce, so a loop solely goes for say a couple of thousand instances, including +1 as much as the nonce, then discovering a block hash decrease than the goal would not appear to work with the additional nonce, though it does with older blocks which have a nonce that matches inside an unsigned 32-bit integer.

The actual nonce a a lot bigger quantity, is not it? Whether it is, the place is it, and the way is it put along with the obvious nonce given on blockchain explorers so {that a} easy script can validate a current Bitcoin block?

Thanks!

LEAVE A REPLY

Please enter your comment!
Please enter your name here