<p>You should use <code>TX_VERSION = 1</code> and <code>TX_LOCK = 0xFFFFFFFF</code> for mainnet and testnet</p>

CC BY-SA 3.0
2015-07-09T03:55:58.633Z
Noticed reading through https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki#deployment that nVersion is now 3 after the July 4th soft fork.  Should this mean the bx --version argument should now be 3?
skaht
CC BY-SA 3.0
2015-07-09T04:06:11.723Z
https://github.com/bitcoin/bips/blob/master/bip-0034.mediawiki#backward-compatibility defines condition for when nVersion was set to 2.
skaht
CC BY-SA 3.0
2015-07-14T19:17:50.663Z
You're confusing transaction versions with block versions. The answer is correct.
Pieter Wuille
CC BY-SA 3.0
2015-06-29T21:25:10.617Z
2015-06-29T21:25:10.617Z
amaclin
<p><code>% bx fetch-header -t 365307 -c bx-mainnet.cfg</code><br>
header
{
    bits 404063944<br>
    hash 00000000000000000eecb8c5dabfede194627d53fddfdb685103e5317a7e175e
    merkle_tree_hash 8b787ac50ec4e7d3890a917ff196938972f940304badd4f3ebb3c1a480d6eeeb
    nonce 3395429232<br>
    previous_block_hash 00000000000000000641fa532675b3e4fcf879cb5e4358895fa7b87e883b13d9<br>
    time_stamp 1436897984<br>
    <strong>version 3</strong>
}</p>

<p><code>% bx fetch-header -t 503223 -c bx-testnet.cfg</code><br>
header
{
    bits 486604799<br>
    hash 0000000001eee9c08d12c48f11414c45379e2e7b1b5b5318b012ba0e677609f1
    merkle_tree_hash bb6dc83519a3246adca03a4eeb4d2a7c326693f8c1ed28b6e13824e90ecbde8a
    nonce 561008572<br>
    previous_block_hash 00000000000266ea01bc19141dffa2230e9897259d9ddc058cf41d97328477cb
    time_stamp 1436904967<br>
    <strong>version 3</strong> }</p>

CC BY-SA 3.0
2015-07-14T19:16:39.373Z
This is about block versions (which are at 3, since BIP66 took effect). The question was about transaction versions (which have been at 1 since Bitcoin's creation).
Pieter Wuille
CC BY-SA 3.0
2015-07-17T02:06:33.533Z
Thanks for clearing up the confusion between Block Versions and Transaction Versions.
skaht
CC BY-SA 3.0
2015-07-14T18:30:17.357Z
2015-07-14T18:30:17.357Z
skaht
<p>I'm dorking around with creating a TEST transaction using libbitcoin's bx command.  Besides setting the inputs and outputs, the bx tx-encode sub-command allows one to specify lock_time and version.  Any idea where one can look to find details about what the current version is for BTC and TEST transactions?</p>

<transactions><protocol>
Versions of protocols for BTC and TEST?
skaht
# Versions of protocols for BTC and TEST?

(Asked by: username_0 on 2015-06-29)

I'm dorking around with creating a TEST transaction using libbitcoin's bx command. Besides setting the inputs and outputs, the bx tx-encode sub-command allows one to specify lock\_time and version. Any idea where one can look to find details about what the current version is for BTC and TEST transactions?

**Tags:** transactions, protocol


---

## 2 answers

### Answer by username_1 on 2015-06-29. Score: 1

You should use `TX_VERSION = 1` and `TX_LOCK = 0xFFFFFFFF` for mainnet and testnet

> **Comments:**
> **username_0**: Noticed reading through https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki#deployment that nVersion is now 3 after the July 4th soft fork.  Should this mean the bx --version argument should now be 3?  
> **username_0**: https://github.com/bitcoin/bips/blob/master/bip-0034.mediawiki#backward-compatibility defines condition for when nVersion was set to 2.  
> **username_2**: You're confusing transaction versions with block versions. The answer is correct.  

---

### Answer by username_0 on 2015-07-14. Score: -1

`% bx fetch-header -t 365307 -c bx-mainnet.cfg`  
header
{
bits 404063944  
hash 00000000000000000eecb8c5dabfede194627d53fddfdb685103e5317a7e175e
merkle\_tree\_hash 8b787ac50ec4e7d3890a917ff196938972f940304badd4f3ebb3c1a480d6eeeb
nonce 3395429232  
previous\_block\_hash 00000000000000000641fa532675b3e4fcf879cb5e4358895fa7b87e883b13d9  
time\_stamp 1436897984  
**version 3**
}

`% bx fetch-header -t 503223 -c bx-testnet.cfg`  
header
{
bits 486604799  
hash 0000000001eee9c08d12c48f11414c45379e2e7b1b5b5318b012ba0e677609f1
merkle\_tree\_hash bb6dc83519a3246adca03a4eeb4d2a7c326693f8c1ed28b6e13824e90ecbde8a
nonce 561008572  
previous\_block\_hash 00000000000266ea01bc19141dffa2230e9897259d9ddc058cf41d97328477cb
time\_stamp 1436904967  
**version 3** }

> **Comments:**
> **username_2**: This is about block versions (which are at 3, since BIP66 took effect). The question was about transaction versions (which have been at 1 since Bitcoin's creation).  
> **username_0**: Thanks for clearing up the confusion between Block Versions and Transaction Versions.  

---

