2

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 and here

1

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.

  • 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 – Pieter Wuille Feb 14 '17 at 18:25
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.

  • 2
    That's outdated. Since BIP68, v2 transactions exist. See the answer below. – Pieter Wuille Apr 19 '17 at 8:04
  • There is actually a lot of v2 transactions now; shapeshift, for example, creates only v2 transactions (when exchanging into bitcoin). – Karel Bílek Apr 19 '17 at 9:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.