<p>I am currently trying to learn what values miners can adjust in the block headers when hashing them. I see that the version number is routinely changed to some random bit string (which seems a bit odd if its intended use is to vote for proposals).</p>
<p>What I have gathered so far:</p>
<ul>
<li>The first bit cannot be 1 (to avoid negative version numbers) and the minimum decimal-converted version number must at least be equal to 4 [<a href="https://bitcoin.stackexchange.com/questions/117530/what-restrictions-does-the-version-field-in-the-block-header-have">prior question</a>].</li>
<li>From further reading [<a href="https://learnmeabitcoin.com/technical/block/version/" rel="nofollow noreferrer">link</a>] I also see that the first bit in every byte cannot be equal to 1? Is this correct?</li>
<li>From what I understand, to signal the version bits you have to set the first bits to 001. Would it still be permissible to change the other version bit numbers and have the first three bits set to any other permutation that does not set the first bit equal to 1 (e.g. 010, 011)?</li>
</ul>
<p>Does this mean all possible bit vectors that satisfy these constraints (if I understood them correctly) are valid? Ideally someone can sketch out the number of permissible bit vectors. Any references with further details are appreciated. Thanks!</p>

CC BY-SA 4.0
2024-05-01T13:00:34.320Z
Hi Luke, it seems to me that your question is fully answered in [What restrictions does the version field in the block header have?](https://bitcoin.stackexchange.com/q/117530/5406). Alternatively, you could take a look at https://bitcoin.stackexchange.com/q/90393/5406, and https://bitcoin.stackexchange.com/a/96442/5406, but I’m not quite sure why this question would not be fully resolved by the topic you link to yourself.
Murch
CC BY-SA 4.0
2024-05-01T13:16:33.963Z
Thanks Murch, I'm having a read. Is my understanding correct on points 2 and 3?
Luke Taylor
CC BY-SA 4.0
2024-05-01T13:34:32.757Z
Your post https://bitcoin.stackexchange.com/questions/96434/is-that-proved-that-for-each-block-there-is-always-nonce-value-which-will-make-b/96442#96442 has been very helpful! Do you know of any way to check if block header construction is valid?
Luke Taylor
CC BY-SA 4.0
2024-05-01T15:37:26.200Z
I would suggest you could start by taking a look at topics tagged [tag:block-validity] (75 questions) or [tag:block-header] (137 questions). Unfortunately their union is pretty small, but using a search engine restricted to BSE may also find you some interesting topics e.g. [ddg "validate block header"](https://duckduckgo.com/?q=site%3Abitcoin.stackexchange.com+validate+block-header). If you then have a specific question, please either edit this topic or ask a new question.
Murch
CC BY-SA 4.0
2024-05-01T15:39:44.360Z
You may also find ["Mastering Bitcoin Ch10: The Blockchain"](https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch11_blockchain.adoc) useful.
Murch
<mining-theory><block-header><bip9-version-bits>
Valid block header versions bits
Luke Taylor
# Valid block header versions bits

(Asked by: username_0 on 2024-05-01)

I am currently trying to learn what values miners can adjust in the block headers when hashing them. I see that the version number is routinely changed to some random bit string (which seems a bit odd if its intended use is to vote for proposals).

What I have gathered so far:

* The first bit cannot be 1 (to avoid negative version numbers) and the minimum decimal-converted version number must at least be equal to 4 [[prior question](https://bitcoin.stackexchange.com/questions/117530/what-restrictions-does-the-version-field-in-the-block-header-have)].
* From further reading [[link](https://learnmeabitcoin.com/technical/block/version/)] I also see that the first bit in every byte cannot be equal to 1? Is this correct?
* From what I understand, to signal the version bits you have to set the first bits to 001. Would it still be permissible to change the other version bit numbers and have the first three bits set to any other permutation that does not set the first bit equal to 1 (e.g. 010, 011)?

Does this mean all possible bit vectors that satisfy these constraints (if I understood them correctly) are valid? Ideally someone can sketch out the number of permissible bit vectors. Any references with further details are appreciated. Thanks!

**Tags:** mining-theory, block-header, bip9-version-bits

> **Comments:**
> **username_1**: Hi username_0, it seems to me that your question is fully answered in [What restrictions does the version field in the block header have?](https://bitcoin.stackexchange.com/q/117530/5406). Alternatively, you could take a look at https://bitcoin.stackexchange.com/q/90393/5406, and https://bitcoin.stackexchange.com/a/96442/5406, but I’m not quite sure why this question would not be fully resolved by the topic you link to yourself.  
> **username_0**: Thanks username_1, I'm having a read. Is my understanding correct on points 2 and 3?  
> **username_0**: Your post https://bitcoin.stackexchange.com/questions/96434/is-that-proved-that-for-each-block-there-is-always-nonce-value-which-will-make-b/96442#96442 has been very helpful! Do you know of any way to check if block header construction is valid?  
> **username_1**: I would suggest you could start by taking a look at topics tagged [tag:block-validity] (75 questions) or [tag:block-header] (137 questions). Unfortunately their union is pretty small, but using a search engine restricted to BSE may also find you some interesting topics e.g. [ddg "validate block header"](https://duckduckgo.com/?q=site%3Abitcoin.stackexchange.com+validate+block-header). If you then have a specific question, please either edit this topic or ask a new question.  
> **username_1**: You may also find ["Mastering Bitcoin Ch10: The Blockchain"](https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch11_blockchain.adoc) useful.  

---

## 0 answers

