Friday, May 24, 2024

What restrictions does the model subject within the block header have?


nVersion is a 4-byte little-endian signed integer. Little-endianness signifies that the least important byte is first. The order of bits in a byte stays the identical.

I’m conscious of the next restrictions:

  • BIP65 requires blocks to have at the least model 4.
  • Since nVersion is a signed integer, setting the highest bit would flip it adverse.

Subsequently, any bit sample that doesn’t set the highest bit and units at the least one bit amongst positions 2…30 can be permitted.

Be aware that within the context of BIP-9-style deployments, the highest three bits should be set to 001 and solely in that case the remaining bits are interpreted as a bit vector the place every place could sign readiness for a softfork proposal’s activation.

Let’s have a look at some examples in hexadecimal and binary:

Signal (topbit):

0b 00000000 00000000 00000000 ±0000000
                              ^
                              Signal (topbit)

Model 0, least and most important bytes:

0x 00       00       00       00
0b 00000000 00000000 00000000 00000000
   ^______^                   ^______^
     LSB                        MSB

Model 1:

0x 01       00       00       00
0b 00000001 00000000 00000000 00000000

Model 4:

0x 04       00       00       00
0b 00000100 00000000 00000000 00000000

BIP-9 (not signaling):

0x 00       00       00       20
0b 00000000 00000000 00000000 00100000

Signaling for Taproot on bit 2:

0x 04       00       00       20
0b 00000100 00000000 00000000 00100000

Model of Block 779,960 (instance for Overt ASICBoost):

0x 32       47       40       00
0b 00110010 01000111 01000000 00000000

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles