Skip to content

Commit 4b4001b

Browse files
committed
perf: activate v20 on the same block as v19 for Reg Test
1 parent e0d97cf commit 4b4001b

10 files changed

+19
-15
lines changed

src/chainparams.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ class CRegTestParams : public CChainParams {
789789
consensus.DIP0024Height = 900;
790790
consensus.DIP0024QuorumsHeight = 900;
791791
consensus.V19Height = 900;
792-
consensus.V20Height = 1200;
792+
consensus.V20Height = 900;
793793
consensus.MinBIP9WarningHeight = 0;
794794
consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // ~uint256(0) >> 1
795795
consensus.nPowTargetTimespan = 24 * 60 * 60; // Dash: 1 day

src/test/block_reward_reallocation_tests.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ struct TestChainBRRBeforeActivationSetup : public TestChainSetup
3636
{
3737
// Force fast DIP3 activation
3838
TestChainBRRBeforeActivationSetup() :
39-
TestChainSetup(497, {"-dip3params=30:50", "-testactivationheight=brr@1000",
39+
TestChainSetup(497, {"-dip3params=30:50",
40+
"-testactivationheight=brr@1000",
41+
"-testactivationheight=v20@1200",
4042
"-vbparams=mn_rr:0:999999999999:0:20:16:12:5:1"})
4143
{
4244
}

test/functional/feature_asset_locks.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ def run_test(self):
242242

243243
self.set_sporks()
244244

245-
self.activate_v19(expected_activation_height=900)
246-
self.log.info("Activated v19 at height:" + str(node.getblockcount()))
245+
self.activate_v20(expected_activation_height=900)
246+
self.log.info("Activated v20 at height:" + str(node.getblockcount()))
247247

248248
self.nodes[0].sporkupdate("SPORK_2_INSTANTSEND_ENABLED", 0)
249249
self.wait_for_sporks_same()
@@ -256,7 +256,6 @@ def run_test(self):
256256
self.sync_blocks()
257257

258258
self.set_sporks()
259-
self.activate_v20()
260259
node.generate(1)
261260
self.sync_all()
262261
self.mempool_size = 0
@@ -640,7 +639,7 @@ def test_mn_rr(self, node_wallet, node, pubkey):
640639
all_mn_rewards = platform_reward + owner_reward + operator_reward
641640
assert_equal(all_mn_rewards, bt['coinbasevalue'] * 3 // 4) # 75/25 mn/miner reward split
642641
assert_equal(platform_reward, all_mn_rewards * 375 // 1000) # 0.375 platform share
643-
assert_equal(platform_reward, 31916328)
642+
assert_equal(platform_reward, 37015386)
644643
assert_equal(locked, self.get_credit_pool_balance())
645644
node.generate(1)
646645
self.sync_all()

test/functional/feature_block.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ def set_test_params(self):
8585
# Very large reorgs cause cs_main to be held for a very long time in ActivateBestChainStep,
8686
# which causes RPC to hang, so we need to increase RPC timeouts
8787
self.rpc_timeout = 180
88-
# Must set '-dip3params=2000:2000' to create pre-dip3 blocks only
8988
self.extra_args = [[
90-
'-dip3params=2000:2000',
89+
'-dip3params=2000:2000', # Must set '-dip3params=2000:2000' to create pre-dip3 blocks only
9190
'-acceptnonstdtxn=1', # This is a consensus block test, we don't care about tx policy
9291
'-testactivationheight=bip34@2',
9392
'-testactivationheight=dip0001@2000',
93+
'-testactivationheight=v20@2000',
9494
]]
9595

9696
def setup_nodes(self):

test/functional/feature_blockfilterindex_prune.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def run_test(self):
4343
assert_greater_than(len(self.nodes[0].getblockfilter(self.nodes[0].getblockhash(2))['filter']), 0)
4444

4545
self.log.info("start node without blockfilterindex")
46-
self.restart_node(0, extra_args=["-fastprune", "-prune=1"], expected_stderr=EXPECTED_STDERR_NO_GOV_PRUNE)
46+
self.restart_node(0, extra_args=["-fastprune", "-prune=1", '-testactivationheight=v20@2000'], expected_stderr=EXPECTED_STDERR_NO_GOV_PRUNE)
4747

4848
self.log.info("make sure accessing the blockfilters throws an error")
4949
assert_raises_rpc_error(-1, "Index is not enabled for filtertype basic", self.nodes[0].getblockfilter, self.nodes[0].getblockhash(2))

test/functional/feature_dip3_v19.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ def getmnlistdiff(self, base_block_hash, block_hash):
4343

4444
class DIP3V19Test(DashTestFramework):
4545
def set_test_params(self):
46-
self.set_dash_test_params(6, 5, fast_dip3_enforcement=True, evo_count=2)
46+
self.extra_args = [[
47+
'-testactivationheight=v20@1200', # required otherwise mine_quorum("llmq_test [100]") fails
48+
]] * 6
49+
self.set_dash_test_params(6, 5, fast_dip3_enforcement=True, evo_count=2, extra_args=self.extra_args)
4750

4851
def run_test(self):
4952
# Connect all nodes to node1 so that we always have the whole network connected

test/functional/feature_llmq_chainlocks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def run_test(self):
3333

3434
self.test_coinbase_best_cl(self.nodes[0], expected_cl_in_cb=False)
3535

36-
self.activate_v20(expected_activation_height=1200)
36+
self.activate_v20(expected_activation_height=900)
3737
self.log.info("Activated v20 at height:" + str(self.nodes[0].getblockcount()))
3838

3939
# v20 is active for the next block, not for the tip

test/functional/feature_llmq_rotation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ def run_test(self):
113113
expectedNew = [h_100_0, h_106_0, h_104_0, h_100_1, h_106_1, h_104_1]
114114
quorumList = self.test_getmnlistdiff_quorums(b_h_0, b_h_1, {}, expectedDeleted, expectedNew, testQuorumsCLSigs=False)
115115

116-
projected_activation_height = 1200
116+
projected_activation_height = 900
117117

118-
self.activate_v20(expected_activation_height=1200)
118+
self.activate_v20(expected_activation_height=900)
119119
self.log.info("Activated v20 at height:" + str(self.nodes[0].getblockcount()))
120120

121121
softfork_info = self.nodes[0].getblockchaininfo()['softforks']['v20']

test/functional/p2p_ibd_stalling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def on_getheaders(self, message):
4848
class P2PIBDStallingTest(BitcoinTestFramework):
4949
def set_test_params(self):
5050
self.disable_mocktime = True
51-
self.extra_args = [["-dip3params=2000:2000"]]
51+
self.extra_args = [["-dip3params=2000:2000", "-testactivationheight=v20@2000"]]
5252
self.setup_clean_chain = True
5353
self.num_nodes = 1
5454

test/functional/rpc_blockchain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def _test_getblockchaininfo(self):
155155
'dip0024': { 'type': 'buried', 'active': False, 'height': 900},
156156
'realloc': { 'type': 'buried', 'active': True, 'height': 1},
157157
'v19': { 'type': 'buried', 'active': False, 'height': 900},
158-
'v20': { 'type': 'buried', 'active': False, 'height': 1200},
158+
'v20': { 'type': 'buried', 'active': False, 'height': 900},
159159
'mn_rr': {
160160
'type': 'bip9',
161161
'bip9': {

0 commit comments

Comments
 (0)