diff --git a/src/kernel/chainparams.cpp b/src/kernel/chainparams.cpp index 188983c76c..e0b8e35a9b 100644 --- a/src/kernel/chainparams.cpp +++ b/src/kernel/chainparams.cpp @@ -231,7 +231,7 @@ public: consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000044a50fe819c39ad624021859"); consensus.defaultAssumeValid = uint256S("0x000000000000000000035c3f0d31e71a5ee24c5aaf3354689f65bd7b07dee632"); // 784000 // Simplicity - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 24; + consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 21; consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE; consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT; consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].min_activation_height = 0; // No activation delay @@ -380,7 +380,7 @@ public: consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000977edb0244170858d07"); consensus.defaultAssumeValid = uint256S("0x0000000000000021bc50a89cde4870d4a81ffe0153b3c8de77b435a2fd3f6761"); // 2429000 // Simplicity - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 24; + consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 21; consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE; consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT; consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].min_activation_height = 0; // No activation delay @@ -541,7 +541,7 @@ public: consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].min_activation_height = 0; // No activation delay // Simplicity - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 24; + consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 21; consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE; consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT; consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].min_activation_height = 0; // No activation delay @@ -641,7 +641,7 @@ public: consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nThreshold = 128; // Simplicity - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 24; + consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 21; consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE; consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT; consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].min_activation_height = 0; // No activation delay @@ -1323,7 +1323,7 @@ public: consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nThreshold = 10080; // ...of 100% signalling // Simplicity - consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 24; + consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 21; consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE; consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT; consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].min_activation_height = 0; // No activation delay diff --git a/test/functional/feature_elements_simplicity_activation.py b/test/functional/feature_elements_simplicity_activation.py index 34a20e958a..70d2ff4ad0 100755 --- a/test/functional/feature_elements_simplicity_activation.py +++ b/test/functional/feature_elements_simplicity_activation.py @@ -18,6 +18,7 @@ class SimplicityActivationTest(BitcoinTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 + self.extra_args = [["-evbparams=dynafed:0:::"]] def skip_test_if_missing_module(self): self.skip_if_no_wallet() @@ -39,8 +40,8 @@ class SimplicityActivationTest(BitcoinTestFramework): if n < 143: assert_equal (decode["versionHex"], "20000000") elif n < 431: - # TESTDUMMY deployment: 144 blocks active, 144 blocks locked in - assert_equal (decode["versionHex"], "30000000") + # TESTDUMMY and DYNAFED deployment: 144 blocks active, 144 blocks locked in + assert_equal (decode["versionHex"], "32000000") else: assert_equal (decode["versionHex"], "20000000") @@ -55,7 +56,7 @@ class SimplicityActivationTest(BitcoinTestFramework): blocks = self.generatetoaddress(rpc, 127, rpc.getnewaddress()) for n, block in enumerate(blocks): decode = rpc.getblockheader(block) - assert_equal (decode["versionHex"], "21000000") + assert_equal (decode["versionHex"], "20200000") assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status"], "started") # Fail to signal on the 128th block. Since the threshold for Simplicity is @@ -63,7 +64,7 @@ class SimplicityActivationTest(BitcoinTestFramework): # 144 (the default), as we have overridden the period for Simplicity. On # the main Liquid chain it is overridden to be one week of signalling. block = rpc.getnewblockhex() - block = block[:7] + "0" + block[8:] # turn off Simplicity signal + block = block[:4] + "0" + block[5:] # turn off Simplicity signal rpc.submitblock(block) assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status"], "started") @@ -71,22 +72,22 @@ class SimplicityActivationTest(BitcoinTestFramework): blocks = self.generatetoaddress(rpc, 127, rpc.getnewaddress()) for n, block in enumerate(blocks): decode = rpc.getblockheader(block) - assert_equal (decode["versionHex"], "21000000") + assert_equal (decode["versionHex"], "20200000") assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status"], "started") # The 128th block then switches from "started" to "locked_in" blocks = self.generatetoaddress(rpc, 1, rpc.getnewaddress()) assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status"], "started") assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status_next"], "locked_in") - assert_equal(rpc.getblockheader(blocks[0])["versionHex"], "21000000") + assert_equal(rpc.getblockheader(blocks[0])["versionHex"], "20200000") # Run through another 128 blocks, which will go from "locked in" to "active" regardless of signalling blocks = self.generatetoaddress(rpc, 127, rpc.getnewaddress()) for n, block in enumerate(blocks): decode = rpc.getblockheader(block) - assert_equal (decode["versionHex"], "21000000") + assert_equal (decode["versionHex"], "20200000") assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status"], "locked_in") block = rpc.getnewblockhex() - block = block[:7] + "0" + block[8:] # turn off Simplicity signal + block = block[:4] + "0" + block[5:] # turn off Simplicity signal rpc.submitblock(block) assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status"], "locked_in") assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status_next"], "active") @@ -106,15 +107,15 @@ class SimplicityActivationTest(BitcoinTestFramework): if n < 143: assert_equal (decode["versionHex"], "20000000") elif n < 431: - # TESTDUMMY deployment: 144 blocks active, 144 blocks locked in - assert_equal (decode["versionHex"], "30000000") + # TESTDUMMY and DYNAFED deployment: 144 blocks active, 144 blocks locked in + assert_equal (decode["versionHex"], "32000000") else: assert_equal (decode["versionHex"], "20000000") # Test activation starting from height 1000 # Note that for Simplicity this is an illogical combination (Simplicity without # Taproot) but for purposes of this test it's fine. - self.restart_node(0, ["-evbparams=simplicity:500:::"]) + self.restart_node(0, ["-evbparams=dynafed:0:::", "-evbparams=simplicity:500:::"]) self.nodes[0].invalidateblock(self.nodes[0].getblockhash(1)) self.test_activation(self.nodes[0], 500) diff --git a/test/functional/wallet_elements_dust_relay.py b/test/functional/wallet_elements_dust_relay.py index 233b27ad4d..6cc731faa4 100755 --- a/test/functional/wallet_elements_dust_relay.py +++ b/test/functional/wallet_elements_dust_relay.py @@ -23,6 +23,9 @@ class WalletTest(BitcoinTestFramework): args + ["-dustrelayfee=0.00003000"], # second node uses default upstream dustrelayfee ] + def add_options(self, parser): + self.add_wallet_options(parser) + def skip_test_if_missing_module(self): self.skip_if_no_wallet()