<p>The format of messages occasionally needs to change. This is done in a backward-compatible way by exchanging versions in <em>version</em> messages and communicating in the "language" of the client with the lowest version. Through this mechanism, clients running version 0.1 should still be able to talk to the latest clients.</p>

<p>Blocks and transactions are special. When these formats are updated, nodes can't modify old messages to use the new format because this breaks the crypto. So version 2 nodes have to store and communicate both version 1 and version 2 blocks, and special version numbers are necessary to distinguish them.</p>

<p>Block/transaction versions other than 1 are not accepted.</p>

<p>In <em>version</em> messages, use the same version as the client version that you're trying to be compatible with.</p>

CC BY-SA 4.0
2022-08-03T20:33:55.687Z
Meanwhile, there are transaction and block version numbers of up to 4, for as much as I can see right now. E.g.: Block 407041: https://blockstream.info/block/00000000000000000491c2ad0d3df85497ca979f17f679cc4a1b40e4df962401
raoulsson
CC BY-SA 3.0
2011-12-02T08:46:29.770Z
2011-12-02T08:46:29.770Z
theymos
<p>A field labelled "version" appears in many contexts regarding the <a href="https://en.bitcoin.it/wiki/Protocol_specification" rel="noreferrer">Bitcoin protocol</a>. Sometimes one uses the current version of the Bitcoin client (version message), sometimes 1 is used (block, tx), why is that? What are the rules in numbering those versions? For the context that uses 1s, would other values validate, or would they be rejected by the client?</p>

<bitcoin-core><protocol><block-header><standard><transaction-version>
Version field in transactions, blocks, etc
ThePiachu
# Version field in transactions, blocks, etc

(Asked by: username_0 on 2011-12-02)

A field labelled "version" appears in many contexts regarding the [Bitcoin protocol](https://en.bitcoin.it/wiki/Protocol_specification). Sometimes one uses the current version of the Bitcoin client (version message), sometimes 1 is used (block, tx), why is that? What are the rules in numbering those versions? For the context that uses 1s, would other values validate, or would they be rejected by the client?

**Tags:** bitcoin-core, protocol, block-header, standard, transaction-version


---

## 1 answers

### Answer by username_1 on 2011-12-02. Score: 5 | Accepted answer

The format of messages occasionally needs to change. This is done in a backward-compatible way by exchanging versions in *version* messages and communicating in the "language" of the client with the lowest version. Through this mechanism, clients running version 0.1 should still be able to talk to the latest clients.

Blocks and transactions are special. When these formats are updated, nodes can't modify old messages to use the new format because this breaks the crypto. So version 2 nodes have to store and communicate both version 1 and version 2 blocks, and special version numbers are necessary to distinguish them.

Block/transaction versions other than 1 are not accepted.

In *version* messages, use the same version as the client version that you're trying to be compatible with.

> **Comments:**
> **username_2**: Meanwhile, there are transaction and block version numbers of up to 4, for as much as I can see right now. E.g.: Block 407041: https://blockstream.info/block/00000000000000000491c2ad0d3df85497ca979f17f679cc4a1b40e4df962401  

---

