<p>I am interested in what are the all consensus rules for block version number in a block header?</p>
<p>Found some answer <a href="https://bitcoin.stackexchange.com/a/114634/143602">here</a>.</p>
<p>Andrew Chow said that it can be whatever value we want except some specific values. What are these values?</p>
<p>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.</p>
<p>Murch in his <a href="https://bitcoin.stackexchange.com/questions/117530/what-restrictions-does-the-version-field-in-the-block-header-have">question/answer</a> was also talking about the need for block version to be above 3 (&gt;= 4) and about the fact that we must take care not to set the &quot;wrong&quot; bit (sign bit; top most bit) to 1. He also wrote that the top 3 bits must be <code>001</code> (according to BIP 9) to activate some &quot;signaling for soft fork&quot; 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 <code>001</code> without any desire for signaling.</p>
<p>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 <strong>x</strong>0000000) can't be 1. <strong>Any other value can be set for the version, and even, I would say, <code>001</code> for the most top 3 bits can be set because in that case we would signal something random with other bits (but who cares).</strong></p>
<p>So my question is, what are all the consensus rules for the block version field in the block header?</p>

CC BY-SA 4.0
2023-11-29T00:50:20.540Z
Hi Mudja, it seems to me that your question is answered in [What restrictions does the version field in the block header have?](https://bitcoin.stackexchange.com/q/117530/5406), which you link. Could you please explain how your question differs?
Murch
CC BY-SA 4.0
2023-11-29T01:05:33.107Z
@Murch Hi Murch. Yes, I saw that answer. I included it in my question (with some other answers).
Cosmos
CC BY-SA 4.0
2023-11-29T01:05:39.050Z
@Murch Well, the answers given by you, Pieter and Andrew match partially. They didn't mention sign bit nor talk about 001 for BIP9. Also, you wrote "*I'm aware of the following restrictions*" which does not guarantee me that you wrote all restrictions. Also, Poseidon and you talk about all values greater than 3 where the most top 3 bits are not 001 are valid. However, I believe even if they are set to 001 and with the desire NOT to signal anything, it is still allowed by consensus. And finally, I want to see if I understood correctly what all of you wrote.
Cosmos
CC BY-SA 4.0
2023-11-29T16:05:20.247Z
It seems to me that my answer clearly states that the only consensus rule is that the version has to be greater than three, so I don’t understand how my answer doesn’t answer this new question here.
Murch
CC BY-SA 4.0
2023-11-29T17:15:32.083Z
@Murch Okay, so we can set any value greater than 3 where we can also set the three most significant bits to `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
CC BY-SA 4.0
2023-11-29T18:06:19.323Z
Yes, the version has to be greater than three.
Murch
CC BY-SA 4.0
2023-11-29T21:42:58.630Z
@Murch Then everything is clear. Thanks for the help!
Cosmos
<block-header>
What are all the consensus rules for the block version value?
Cosmos
# What are all the consensus rules for the block version value?

(Asked by: username_0 on 2023-11-29)

I am interested in what are the all consensus rules for block version number in a block header?

Found some answer [here](https://bitcoin.stackexchange.com/a/114634/143602).

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.

username_1 in his [question/answer](https://bitcoin.stackexchange.com/questions/117530/what-restrictions-does-the-version-field-in-the-block-header-have) 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 **x**0000000) 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?

**Tags:** block-header

> **Comments:**
> **username_1**: Hi Mudja, it seems to me that your question is answered in [What restrictions does the version field in the block header have?](https://bitcoin.stackexchange.com/q/117530/5406), which you link. Could you please explain how your question differs?  
> **username_0**: @username_1 Hi username_1. Yes, I saw that answer. I included it in my question (with some other answers).  
> **username_0**: @username_1 Well, the answers given by you, Pieter and Andrew match partially. They didn't mention sign bit nor talk about 001 for BIP9. Also, you wrote "*I'm aware of the following restrictions*" which does not guarantee me that you wrote all restrictions. Also, Poseidon and you talk about all values greater than 3 where the most top 3 bits are not 001 are valid. However, I believe even if they are set to 001 and with the desire NOT to signal anything, it is still allowed by consensus. And finally, I want to see if I understood correctly what all of you wrote.  
> **username_1**: It seems to me that my answer clearly states that the only consensus rule is that the version has to be greater than three, so I don’t understand how my answer doesn’t answer this new question here.  
> **username_0**: @username_1 Okay, so we can set any value greater than 3 where we can also set the three most significant bits to `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?  
> **username_1**: Yes, the version has to be greater than three.  
> **username_0**: @username_1 Then everything is clear. Thanks for the help!  

---

## 0 answers

