Versions of protocols for BTC and TEST?

1

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?

skaht

Posted 2015-06-29T20:27:42.657

Reputation: 2 588

Answers

1

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

amaclin

Posted 2015-06-29T20:27:42.657

Reputation: 5 763

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 2015-07-09T03:55:58.633

https://github.com/bitcoin/bips/blob/master/bip-0034.mediawiki#backward-compatibility defines condition for when nVersion was set to 2.skaht 2015-07-09T04:06:11.723

1You're confusing transaction versions with block versions. The answer is correct.Pieter Wuille 2015-07-14T19:17:50.663

-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 }

skaht

Posted 2015-06-29T20:27:42.657

Reputation: 2 588

1This 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 2015-07-14T19:16:39.373

Thanks for clearing up the confusion between Block Versions and Transaction Versions.skaht 2015-07-17T02:06:33.533