@@ -18,6 +18,7 @@ class SimplicityActivationTest(BitcoinTestFramework):
1818 def set_test_params (self ):
1919 self .setup_clean_chain = True
2020 self .num_nodes = 1
21+ self .extra_args = [["-evbparams=dynafed:0:::" ]]
2122
2223 def skip_test_if_missing_module (self ):
2324 self .skip_if_no_wallet ()
@@ -36,8 +37,8 @@ def test_activation(self, rpc, activation_height):
3637 if n < 143 :
3738 assert_equal (decode ["versionHex" ], "20000000" )
3839 elif n < 431 :
39- # TESTDUMMY deployment: 144 blocks active, 144 blocks locked in
40- assert_equal (decode ["versionHex" ], "30000000 " )
40+ # TESTDUMMY and DYNAFED deployment: 144 blocks active, 144 blocks locked in
41+ assert_equal (decode ["versionHex" ], "32000000 " )
4142 else :
4243 assert_equal (decode ["versionHex" ], "20000000" )
4344
@@ -52,38 +53,38 @@ def test_activation(self, rpc, activation_height):
5253 blocks = self .generatetoaddress (rpc , 127 , rpc .getnewaddress ())
5354 for n , block in enumerate (blocks ):
5455 decode = rpc .getblockheader (block )
55- assert_equal (decode ["versionHex" ], "21000000 " )
56+ assert_equal (decode ["versionHex" ], "20200000 " )
5657 assert_equal (rpc .getdeploymentinfo ()["deployments" ]["simplicity" ]["bip9" ]["status" ], "started" )
5758
5859 # Fail to signal on the 128th block. Since the threshold for Simplicity is
5960 # 100% this will prevent activation. Note that our period is 128, not
6061 # 144 (the default), as we have overridden the period for Simplicity. On
6162 # the main Liquid chain it is overridden to be one week of signalling.
6263 block = rpc .getnewblockhex ()
63- block = block [:7 ] + "0" + block [8 :] # turn off Simplicity signal
64+ block = block [:4 ] + "0" + block [5 :] # turn off Simplicity signal
6465 rpc .submitblock (block )
6566 assert_equal (rpc .getdeploymentinfo ()["deployments" ]["simplicity" ]["bip9" ]["status" ], "started" )
6667
6768 # Run through another 128 blocks, without failing to signal
6869 blocks = self .generatetoaddress (rpc , 127 , rpc .getnewaddress ())
6970 for n , block in enumerate (blocks ):
7071 decode = rpc .getblockheader (block )
71- assert_equal (decode ["versionHex" ], "21000000 " )
72+ assert_equal (decode ["versionHex" ], "20200000 " )
7273 assert_equal (rpc .getdeploymentinfo ()["deployments" ]["simplicity" ]["bip9" ]["status" ], "started" )
7374 # The 128th block then switches from "started" to "locked_in"
7475 blocks = self .generatetoaddress (rpc , 1 , rpc .getnewaddress ())
7576 assert_equal (rpc .getdeploymentinfo ()["deployments" ]["simplicity" ]["bip9" ]["status" ], "started" )
7677 assert_equal (rpc .getdeploymentinfo ()["deployments" ]["simplicity" ]["bip9" ]["status_next" ], "locked_in" )
77- assert_equal (rpc .getblockheader (blocks [0 ])["versionHex" ], "21000000 " )
78+ assert_equal (rpc .getblockheader (blocks [0 ])["versionHex" ], "20200000 " )
7879
7980 # Run through another 128 blocks, which will go from "locked in" to "active" regardless of signalling
8081 blocks = self .generatetoaddress (rpc , 127 , rpc .getnewaddress ())
8182 for n , block in enumerate (blocks ):
8283 decode = rpc .getblockheader (block )
83- assert_equal (decode ["versionHex" ], "21000000 " )
84+ assert_equal (decode ["versionHex" ], "20200000 " )
8485 assert_equal (rpc .getdeploymentinfo ()["deployments" ]["simplicity" ]["bip9" ]["status" ], "locked_in" )
8586 block = rpc .getnewblockhex ()
86- block = block [:7 ] + "0" + block [8 :] # turn off Simplicity signal
87+ block = block [:4 ] + "0" + block [5 :] # turn off Simplicity signal
8788 rpc .submitblock (block )
8889 assert_equal (rpc .getdeploymentinfo ()["deployments" ]["simplicity" ]["bip9" ]["status" ], "locked_in" )
8990 assert_equal (rpc .getdeploymentinfo ()["deployments" ]["simplicity" ]["bip9" ]["status_next" ], "active" )
@@ -103,15 +104,15 @@ def run_test(self):
103104 if n < 143 :
104105 assert_equal (decode ["versionHex" ], "20000000" )
105106 elif n < 431 :
106- # TESTDUMMY deployment: 144 blocks active, 144 blocks locked in
107- assert_equal (decode ["versionHex" ], "30000000 " )
107+ # TESTDUMMY and DYNAFED deployment: 144 blocks active, 144 blocks locked in
108+ assert_equal (decode ["versionHex" ], "32000000 " )
108109 else :
109110 assert_equal (decode ["versionHex" ], "20000000" )
110111
111112 # Test activation starting from height 1000
112113 # Note that for Simplicity this is an illogical combination (Simplicity without
113114 # Taproot) but for purposes of this test it's fine.
114- self .restart_node (0 , ["-evbparams=simplicity:500:::" ])
115+ self .restart_node (0 , ["-evbparams=dynafed:0:::" , "-evbparams= simplicity:500:::" ])
115116 self .nodes [0 ].invalidateblock (self .nodes [0 ].getblockhash (1 ))
116117 self .test_activation (self .nodes [0 ], 500 )
117118
0 commit comments