<p><a href="https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki" rel="nofollow noreferrer">BIP68</a> redefined the meaning of the <code>sequence</code> field on transaction inputs of transactions with an <code>version</code> of 2 or greater. If you want to use <code>OP_CHECKSEQUENCEVERIFY</code> (or <code>OP_CSV</code>, see <a href="https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki" rel="nofollow noreferrer">BIP112</a>) to make outputs that cannot be spent for some time or number of blocks until after they were created, your transaction needs to use version 2.</p>
<p>Previously the sequence was intended as a transaction replacement mechanism. Transaction inputs with higher sequences were supposed to be preferred over transaction inputs with lower sequences. However, there was no mechanism to enforce such behavior, rather than just monetarily incentivizing miners to do so, which made the sequence field essentially unused.</p>
<p>Transactions with version 3 or higher are currently non-standard and will not be relayed by Bitcoin Core nodes with the default configuration.</p>

CC BY-SA 4.0
2023-03-24T14:46:42.757Z
2023-10-25T21:46:40.753Z
2023-10-25T21:46:40.753Z
Murch
<p><a href="https://bitcoin.org/en/developer-reference#raw-transaction-format" rel="nofollow noreferrer">https://bitcoin.org/en/developer-reference#raw-transaction-format</a>:</p>

<p>Transaction version number; currently version 1. 
Programs creating transactions using newer consensus rules may use higher version numbers.</p>

CC BY-SA 3.0
2017-04-19T08:04:23.190Z
That's outdated. Since BIP68, v2 transactions exist. See the answer below.
Pieter Wuille
CC BY-SA 3.0
2017-04-19T09:19:18.287Z
There is actually a lot of v2 transactions now; shapeshift, for example, creates only v2 transactions (when exchanging into bitcoin).
Karel Bílek
CC BY-SA 3.0
2017-04-19T07:48:12.943Z
2017-04-19T07:48:12.943Z
pebwindkraft
<p>It seems to be related to BIP 0068.</p>

<p><a href="https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki" rel="nofollow noreferrer">https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki</a></p>

<p>BIP 68 deals with relative locktime and repurposes sequence number for a that purpose. Relative locktime allows the user to set locktime relative to a previous output.</p>

<p>As of April 2017, Shapeshift uses only v2 transactions, when exchanging from altcoins into bitcoin.</p>

<p>Just for interest, zcash says this about version 2 (zcash uses version 2 to mark transaction with "secret" inputs/outputs):</p>

<blockquote>
  <p>Note: A transaction version number of 2 does not have the same meaning as in Bitcoin, where it is associated
  with support for OP CHECKSEQUENCEVERIFY as specified in [BIP-68]. Zcash was forked from Bitcoin v0.11.2 and does
  not currently support BIP 68, or the related BIPs 9, 112 and 113.</p>
</blockquote>

CC BY-SA 3.0
2017-02-14T18:25:56.327Z
BIP68 introduces relative locktime, and that feature is up to now the only one that actually uses the transaction version field. But tx versions have been in Bitcoin since day one, and may be used for more things in the future
Pieter Wuille
CC BY-SA 3.0
2017-02-14T13:39:36.237Z
2017-10-27T02:22:13.190Z
2017-10-27T02:22:13.190Z
Karel Bílek
<p>Some bitcoin transaction have version 2. For example, this transaction</p>

<p><a href="https://blockchain.info/tx/b7022124bc7f31af9342d2f7af98ad9f60f2fd4fa544bf1affca8a436aadda41" rel="nofollow noreferrer">https://blockchain.info/tx/b7022124bc7f31af9342d2f7af98ad9f60f2fd4fa544bf1affca8a436aadda41</a></p>

<p>if you request a hex (by adding <code>?format=hex</code> for example) and putting it into <a href="https://blockchain.info/decode-tx" rel="nofollow noreferrer">https://blockchain.info/decode-tx</a> , you get <code>"version":2</code>.</p>

<p>What does this mean? There are more transactions with version 2 out in the wild, but <em>not that many</em>.</p>

<p>In zcash transactions, version 2 means that the transaction has joinsplits. But I cannot find what it means in bitcoin.</p>

<p>I have found examples of version 2 transactions <a href="https://github.com/bitcoin/bitcoin/blob/1eef038b1bcf7852a1c9912db429467255d2a036/src/test/data/blanktxv2.json" rel="nofollow noreferrer">here</a> and <a href="https://github.com/bitcoin/bitcoin/blob/1eef038b1bcf7852a1c9912db429467255d2a036/src/test/data/txcreate2.json" rel="nofollow noreferrer">here</a></p>

<transactions><transaction-version>
What is "version" used for in Bitcoin transactions? Does it have any meaning?
Karel Bílek
# What is "version" used for in Bitcoin transactions? Does it have any meaning?

(Asked by: username_0 on 2017-02-14)

Some bitcoin transaction have version 2. For example, this transaction

<https://blockchain.info/tx/b7022124bc7f31af9342d2f7af98ad9f60f2fd4fa544bf1affca8a436aadda41>

if you request a hex (by adding `?format=hex` for example) and putting it into <https://blockchain.info/decode-tx> , you get `"version":2`.

What does this mean? There are more transactions with version 2 out in the wild, but *not that many*.

In zcash transactions, version 2 means that the transaction has joinsplits. But I cannot find what it means in bitcoin.

I have found examples of version 2 transactions [here](https://github.com/bitcoin/bitcoin/blob/1eef038b1bcf7852a1c9912db429467255d2a036/src/test/data/blanktxv2.json) and [here](https://github.com/bitcoin/bitcoin/blob/1eef038b1bcf7852a1c9912db429467255d2a036/src/test/data/txcreate2.json)

**Tags:** transactions, transaction-version


---

## 3 answers

### Answer by username_0 on 2017-02-14. Score: 4 | Accepted answer

It seems to be related to BIP 0068.

<https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki>

BIP 68 deals with relative locktime and repurposes sequence number for a that purpose. Relative locktime allows the user to set locktime relative to a previous output.

As of April 2017, Shapeshift uses only v2 transactions, when exchanging from altcoins into bitcoin.

Just for interest, zcash says this about version 2 (zcash uses version 2 to mark transaction with "secret" inputs/outputs):

> Note: A transaction version number of 2 does not have the same meaning as in Bitcoin, where it is associated
> with support for OP CHECKSEQUENCEVERIFY as specified in [BIP-68]. Zcash was forked from Bitcoin v0.11.2 and does
> not currently support BIP 68, or the related BIPs 9, 112 and 113.

> **Comments:**
> **username_3**: BIP68 introduces relative locktime, and that feature is up to now the only one that actually uses the transaction version field. But tx versions have been in Bitcoin since day one, and may be used for more things in the future  

---

### Answer by username_1 on 2023-03-24. Score: 2

[BIP68](https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki) redefined the meaning of the `sequence` field on transaction inputs of transactions with an `version` of 2 or greater. If you want to use `OP_CHECKSEQUENCEVERIFY` (or `OP_CSV`, see [BIP112](https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki)) to make outputs that cannot be spent for some time or number of blocks until after they were created, your transaction needs to use version 2.

Previously the sequence was intended as a transaction replacement mechanism. Transaction inputs with higher sequences were supposed to be preferred over transaction inputs with lower sequences. However, there was no mechanism to enforce such behavior, rather than just monetarily incentivizing miners to do so, which made the sequence field essentially unused.

Transactions with version 3 or higher are currently non-standard and will not be relayed by Bitcoin Core nodes with the default configuration.


---

### Answer by username_2 on 2017-04-19. Score: 0

<https://bitcoin.org/en/developer-reference#raw-transaction-format>:

Transaction version number; currently version 1.
Programs creating transactions using newer consensus rules may use higher version numbers.

> **Comments:**
> **username_3**: That's outdated. Since BIP68, v2 transactions exist. See the answer below.  
> **username_0**: There is actually a lot of v2 transactions now; shapeshift, for example, creates only v2 transactions (when exchanging into bitcoin).  

---

