BIP9 versionbits softfork for BIP68, BIP112 and BIP113 #7648
This PR softforks 3 lock-time related BIPs which are all implemented in
Relay policy for BIP113
BIP113 mempool-only policy was deployed with Bitcoin Core 0.11.2 at the same time as the BIP65 CLTV softfork so the policy is in wide use (at least 70% of nodes) as well as all the miners who upgraded to 0.11.2.
Relay policy for v2 transactions
BIP68/112 rely on v2 transactions. Currently only v1 transactions are relayed, so it is necessary to change the relay policy to allow v2. This will be done at the same time as softfork deployment and will have the net effect that once the softfork enforces, we can be pretty sure miners will mine v2 transactions.
At a later date once enough nodes upgrade and we're sure v2 transaction will be relayed efficiently, we can bump the default transaction version in core see #7562.
@laanwj yeah, I noticed that too. Unfortunately, that's the underlying behavior of the ComparisonTestFramework that the RPC test is built off of. I agree it would be nice to make optional.
EDIT: I suppose it would be easy to just always surpress the
I saw there was some discussion of this already (btcdrak#8), but I don't really see the point of the
Also perhaps we should remove the code in
All bip are generally tested in their own PR, bip68-112-113-p2p.py is doing test that are already done but also testing the sf activation logic. This expand way more than the subject of this PR.
softforks.py has a different purpose, it is here to test ONLY the sf activation logic. This basically mean that in future softfork, you can test the activation correctly by adding a single line at https://github.com/bitcoin/bitcoin/pull/7648/files#diff-98a8abf7f80dbe5eda93bbbbb4348e80R190 .
For example, testing any new segwit sf activation will only be a matter of adding a function which change the scriptPubKey to be push.
The test is meant to make testing sf soft fork logic activation of future sf a breeze.
I left some comment nits in the RPC test,
I also manually tested the case that is mentioned as being missing from
@btcdrak To be clear, I'm not talking about removing the entire
71527a0 Test of BIP9 fork activation of mtp, csv, sequence_lock (NicolasDorier) 19d73d5 Add RPC test for BIP 68/112/113 soft fork. (Alex Morcos) 12c89c9 Policy: allow transaction version 2 relay policy. (BtcDrak) 02c2435 Soft fork logic for BIP68 (BtcDrak) 478fba6 Soft fork logic for BIP113 (BtcDrak) 65751a3 Add CHECKSEQUENCEVERIFY softfork through BIP9 (Pieter Wuille)