Skip to content

Commit 1bb6c42

Browse files
committed
simplicity: change deployment to version bit 21
1 parent 4b5c6e5 commit 1bb6c42

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/chainparams.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ class CMainParams : public CChainParams {
215215
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].min_activation_height = 709632; // Approximately November 12th, 2021
216216

217217
// Simplicity
218-
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 24;
218+
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 21;
219219
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE;
220220
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
221221
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].min_activation_height = 0; // No activation delay
@@ -361,7 +361,7 @@ class CTestNetParams : public CChainParams {
361361
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].min_activation_height = 0; // No activation delay
362362

363363
// Simplicity
364-
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 24;
364+
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 21;
365365
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE;
366366
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
367367
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].min_activation_height = 0; // No activation delay
@@ -527,7 +527,7 @@ class SigNetParams : public CChainParams {
527527
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].min_activation_height = 0; // No activation delay
528528

529529
// Simplicity
530-
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 24;
530+
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 21;
531531
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE;
532532
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
533533
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].min_activation_height = 0; // No activation delay
@@ -626,7 +626,7 @@ class CRegTestParams : public CChainParams {
626626
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nThreshold = 128;
627627

628628
// Simplicity
629-
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 24;
629+
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 21;
630630
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE;
631631
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
632632
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].min_activation_height = 0; // No activation delay
@@ -1288,7 +1288,7 @@ class CLiquidV1Params : public CChainParams {
12881288
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nThreshold = 10080; // ...of 100% signalling
12891289

12901290
// Simplicity
1291-
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 24;
1291+
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].bit = 21;
12921292
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE;
12931293
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
12941294
consensus.vDeployments[Consensus::DEPLOYMENT_SIMPLICITY].min_activation_height = 0; // No activation delay

test/functional/feature_elements_simplicity_activation.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -53,38 +53,38 @@ def test_activation(self, rpc, activation_height):
5353
blocks = self.generatetoaddress(rpc, 127, rpc.getnewaddress())
5454
for n, block in enumerate(blocks):
5555
decode = rpc.getblockheader(block)
56-
assert_equal (decode["versionHex"], "21000000")
56+
assert_equal (decode["versionHex"], "20200000")
5757
assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status"], "started")
5858

5959
# Fail to signal on the 128th block. Since the threshold for Simplicity is
6060
# 100% this will prevent activation. Note that our period is 128, not
6161
# 144 (the default), as we have overridden the period for Simplicity. On
6262
# the main Liquid chain it is overridden to be one week of signalling.
6363
block = rpc.getnewblockhex()
64-
block = block[:7] + "0" + block[8:] # turn off Simplicity signal
64+
block = block[:4] + "0" + block[5:] # turn off Simplicity signal
6565
rpc.submitblock(block)
6666
assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status"], "started")
6767

6868
# Run through another 128 blocks, without failing to signal
6969
blocks = self.generatetoaddress(rpc, 127, rpc.getnewaddress())
7070
for n, block in enumerate(blocks):
7171
decode = rpc.getblockheader(block)
72-
assert_equal (decode["versionHex"], "21000000")
72+
assert_equal (decode["versionHex"], "20200000")
7373
assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status"], "started")
7474
# The 128th block then switches from "started" to "locked_in"
7575
blocks = self.generatetoaddress(rpc, 1, rpc.getnewaddress())
7676
assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status"], "started")
7777
assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status_next"], "locked_in")
78-
assert_equal(rpc.getblockheader(blocks[0])["versionHex"], "21000000")
78+
assert_equal(rpc.getblockheader(blocks[0])["versionHex"], "20200000")
7979

8080
# Run through another 128 blocks, which will go from "locked in" to "active" regardless of signalling
8181
blocks = self.generatetoaddress(rpc, 127, rpc.getnewaddress())
8282
for n, block in enumerate(blocks):
8383
decode = rpc.getblockheader(block)
84-
assert_equal (decode["versionHex"], "21000000")
84+
assert_equal (decode["versionHex"], "20200000")
8585
assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status"], "locked_in")
8686
block = rpc.getnewblockhex()
87-
block = block[:7] + "0" + block[8:] # turn off Simplicity signal
87+
block = block[:4] + "0" + block[5:] # turn off Simplicity signal
8888
rpc.submitblock(block)
8989
assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status"], "locked_in")
9090
assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status_next"], "active")

0 commit comments

Comments
 (0)