Skip to content

Commit ef5cde5

Browse files
UdjinM6knst
authored andcommitted
feat: enforce mn_rr activation after v20 on regtest
Also group Dash-specific args at the end of the list in affected tests while at it.
1 parent 1ac1628 commit ef5cde5

18 files changed

+49
-21
lines changed

src/chainparams.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ class CRegTestParams : public CChainParams {
796796
consensus.DIP0024QuorumsHeight = 1; // Always have dip0024 quorums unless overridden
797797
consensus.V19Height = 1; // Always active unless overriden
798798
consensus.V20Height = consensus.DIP0003Height; // Active not earlier than dip0003. Functional tests (DashTestFramework) uses height 100 (same as coinbase maturity)
799-
consensus.MN_RRHeight = 1;
799+
consensus.MN_RRHeight = consensus.V20Height; // MN_RR does not really have effect before v20 activation
800800
consensus.MinBIP9WarningHeight = 0;
801801
consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // ~uint256(0) >> 1
802802
consensus.nPowTargetTimespan = 24 * 60 * 60; // Dash: 1 day
@@ -922,6 +922,7 @@ class CRegTestParams : public CChainParams {
922922
UpdateLLMQTestParametersFromArgs(args, Consensus::LLMQType::LLMQ_TEST_PLATFORM);
923923
UpdateLLMQInstantSendDIP0024FromArgs(args);
924924
assert(consensus.V20Height >= consensus.DIP0003Height);
925+
assert(consensus.MN_RRHeight >= consensus.V20Height);
925926
}
926927

927928
/**

test/functional/feature_asset_locks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def set_test_params(self):
5454
self.set_dash_test_params(2, 0, [[
5555
"-whitelist=127.0.0.1",
5656
"-llmqtestinstantsenddip0024=llmq_test_instantsend",
57-
"-testactivationheight=mn_rr@620",
5857
]] * 2, evo_count=2)
58+
self.mn_rr_height = 620
5959

6060
def skip_test_if_missing_module(self):
6161
self.skip_if_no_wallet()

test/functional/feature_assumevalid.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ class AssumeValidTest(BitcoinTestFramework):
6262
def set_test_params(self):
6363
self.setup_clean_chain = True
6464
self.num_nodes = 3
65-
self.extra_args = ["-dip3params=9000:9000", '-testactivationheight=v20@9000', "-checkblockindex=0"]
65+
self.extra_args = [
66+
"-dip3params=9000:9000",
67+
'-testactivationheight=v20@9000',
68+
'-testactivationheight=mn_rr@9000',
69+
"-checkblockindex=0",
70+
]
6671
self.rpc_timeout = 120
6772

6873
def setup_network(self):

test/functional/feature_block.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,12 @@ def set_test_params(self):
9090
# which causes RPC to hang, so we need to increase RPC timeouts
9191
self.rpc_timeout = 180
9292
self.extra_args = [[
93-
'-dip3params=2000:2000', # Must set '-dip3params=2000:2000' to create pre-dip3 blocks only
9493
'-acceptnonstdtxn=1', # This is a consensus block test, we don't care about tx policy
9594
'-testactivationheight=bip34@2',
95+
'-dip3params=2000:2000', # Must set '-dip3params=2000:2000' to create pre-dip3 blocks only
9696
'-testactivationheight=dip0001@2000',
9797
'-testactivationheight=v20@2000',
98+
'-testactivationheight=mn_rr@2000',
9899
]]
99100

100101
def setup_nodes(self):

test/functional/feature_cltv.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,11 @@ def set_test_params(self):
8888
self.extra_args = [[
8989
f'-testactivationheight=cltv@{CLTV_HEIGHT}',
9090
91-
'-dip3params=9000:9000',
92-
'-testactivationheight=v20@9000', # disabled for this test
9391
'-par=1', # Use only one script thread to get the exact reject reason for testing
9492
'-acceptnonstdtxn=1', # cltv_invalidate is nonstandard
93+
'-dip3params=9000:9000',
94+
'-testactivationheight=v20@9000', # disabled for this test
95+
'-testactivationheight=mn_rr@9000', # disabled for this test
9596
]]
9697
self.setup_clean_chain = True
9798
self.rpc_timeout = 480

test/functional/feature_csv_activation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,11 @@ def set_test_params(self):
9999
self.extra_args = [[
100100
'-peertimeout=999999', # bump because mocktime might cause a disconnect otherwise
101101
102-
'-dip3params=2000:2000',
103-
'-testactivationheight=v20@2000',
104102
f'-testactivationheight=csv@{CSV_ACTIVATION_HEIGHT}',
105103
'-par=1', # Use only one script thread to get the exact reject reason for testing
104+
'-dip3params=2000:2000',
105+
'-testactivationheight=v20@2000',
106+
'-testactivationheight=mn_rr@2000',
106107
]]
107108
self.supports_cli = False
108109

test/functional/feature_dersig.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,11 @@ def set_test_params(self):
5050
self.num_nodes = 1
5151
self.extra_args = [[
5252
f'-testactivationheight=dersig@{DERSIG_HEIGHT}',
53-
'-testactivationheight=v20@9000', # due to changes in CbTx
5453
55-
'-dip3params=9000:9000',
5654
'-par=1', # Use only one script thread to get the exact log msg for testing
55+
'-dip3params=9000:9000',
56+
'-testactivationheight=v20@9000', # due to changes in CbTx
57+
'-testactivationheight=mn_rr@9000', # due to changes in CbTx
5758
]]
5859
self.setup_clean_chain = True
5960
self.rpc_timeout = 240

test/functional/feature_dip4_coinbasemerkleroots.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class LLMQCoinbaseCommitmentsTest(DashTestFramework):
4747
def set_test_params(self):
4848
self.extra_args = [[ f'-testactivationheight=dip0008@{DIP0008_HEIGHT}', f'-testactivationheight=dip0024@{DIP0024_HEIGHT}', "-vbparams=testdummy:999999999999:999999999999" ]] * 4
4949
self.set_dash_test_params(4, 3, extra_args = self.extra_args)
50-
self.delay_v20(height=V20_HEIGHT)
50+
self.delay_v20_and_mn_rr(height=V20_HEIGHT)
5151

5252
def remove_masternode(self, idx):
5353
mn = self.mninfo[idx]

test/functional/feature_governance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def set_test_params(self):
1818
self.set_dash_test_params(6, 5, [[
1919
"-budgetparams=10:10:10",
2020
]] * 6)
21-
self.delay_v20(height=160)
21+
self.delay_v20_and_mn_rr(height=160)
2222

2323
def check_superblockbudget(self, v20_active):
2424
v20_state = self.nodes[0].getblockchaininfo()["softforks"]["v20"]

test/functional/feature_index_prune.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111
)
1212
from test_framework.governance import EXPECTED_STDERR_NO_GOV_PRUNE
1313

14-
DEPLOYMENT_ARGS = ["-testactivationheight=v20@3000", "-dip3params=3000:3000"]
14+
DEPLOYMENT_ARGS = [
15+
"-dip3params=3000:3000",
16+
"-testactivationheight=v20@3000",
17+
"-testactivationheight=mn_rr@3000",
18+
]
1519

1620
class FeatureIndexPruneTest(BitcoinTestFramework):
1721
def set_test_params(self):

0 commit comments

Comments
 (0)