I am interested in what are the all consensus rules for block version number in a block header?
Found some answer here.
Andrew Chow said that it can be whatever value we want except some specific values. What are these values?
Pieter Wuille in the same answer (comment section) gave a note that the version must be equal to/larger than 4 according to the BIP16, BIP65, BIP66. Thus, I would say that the version number of the block can't be 0, 1, 2, 3 and can be everything above it? Are these the specific values that Andrew was talking about? So, according to the consensus rules, the version number can be anything higher than 3? He also mentioned some rules from BIP 9, but as I understand, they are not consensus rules so they do not have to be respected.
Murch in his question/answer was also talking about the need for block version to be above 3 (>= 4) and about the fact that we must take care not to set the "wrong" bit (sign bit; top most bit) to 1. He also wrote that the top 3 bits must be 001
(according to BIP 9) to activate some "signaling for soft fork" rules from that BIP. However, it is not a consensus rule (as Pieter said), so we can ignore it and set these top 3 bits to 001
without any desire for signaling.
So for now I would say that the set of possible values is anything greater than 3 and that the most top bit (00000000 00000000 00000000 x0000000) can't be 1. Any other value can be set for the version, and even, I would say, 001
for the most top 3 bits can be set because in that case we would signal something random with other bits (but who cares).
So my question is, what are all the consensus rules for the block version field in the block header?
001
(even if we do not signal anything, but who caress its not consensus rule). The only additional restriction is to NOT set the most significant bit (sign bit) to 1 because by that we will get negative numbers and automatically it is therefore less than 4. Did I understand correctly? – Cosmos Nov 29 '23 at 17:15