perf: activate v20 on the same block as v19 for Reg Test

This commit is contained in:
Konstantin Akimov 2024-08-15 14:35:37 +07:00
parent e0d97cf7ac
commit 4b4001bbe7
No known key found for this signature in database
GPG Key ID: 2176C4A5D01EA524
10 changed files with 19 additions and 15 deletions

View File

@ -789,7 +789,7 @@ public:
consensus.DIP0024Height = 900;
consensus.DIP0024QuorumsHeight = 900;
consensus.V19Height = 900;
consensus.V20Height = 1200;
consensus.V20Height = 900;
consensus.MinBIP9WarningHeight = 0;
consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // ~uint256(0) >> 1
consensus.nPowTargetTimespan = 24 * 60 * 60; // Dash: 1 day

View File

@ -36,7 +36,9 @@ struct TestChainBRRBeforeActivationSetup : public TestChainSetup
{
// Force fast DIP3 activation
TestChainBRRBeforeActivationSetup() :
TestChainSetup(497, {"-dip3params=30:50", "-testactivationheight=brr@1000",
TestChainSetup(497, {"-dip3params=30:50",
"-testactivationheight=brr@1000",
"-testactivationheight=v20@1200",
"-vbparams=mn_rr:0:999999999999:0:20:16:12:5:1"})
{
}

View File

@ -242,8 +242,8 @@ class AssetLocksTest(DashTestFramework):
self.set_sporks()
self.activate_v19(expected_activation_height=900)
self.log.info("Activated v19 at height:" + str(node.getblockcount()))
self.activate_v20(expected_activation_height=900)
self.log.info("Activated v20 at height:" + str(node.getblockcount()))
self.nodes[0].sporkupdate("SPORK_2_INSTANTSEND_ENABLED", 0)
self.wait_for_sporks_same()
@ -256,7 +256,6 @@ class AssetLocksTest(DashTestFramework):
self.sync_blocks()
self.set_sporks()
self.activate_v20()
node.generate(1)
self.sync_all()
self.mempool_size = 0
@ -640,7 +639,7 @@ class AssetLocksTest(DashTestFramework):
all_mn_rewards = platform_reward + owner_reward + operator_reward
assert_equal(all_mn_rewards, bt['coinbasevalue'] * 3 // 4) # 75/25 mn/miner reward split
assert_equal(platform_reward, all_mn_rewards * 375 // 1000) # 0.375 platform share
assert_equal(platform_reward, 31916328)
assert_equal(platform_reward, 37015386)
assert_equal(locked, self.get_credit_pool_balance())
node.generate(1)
self.sync_all()

View File

@ -85,12 +85,12 @@ class FullBlockTest(BitcoinTestFramework):
# Very large reorgs cause cs_main to be held for a very long time in ActivateBestChainStep,
# which causes RPC to hang, so we need to increase RPC timeouts
self.rpc_timeout = 180
# Must set '-dip3params=2000:2000' to create pre-dip3 blocks only
self.extra_args = [[
'-dip3params=2000:2000',
'-dip3params=2000:2000', # Must set '-dip3params=2000:2000' to create pre-dip3 blocks only
'-acceptnonstdtxn=1', # This is a consensus block test, we don't care about tx policy
'-testactivationheight=bip34@2',
'-testactivationheight=dip0001@2000',
'-testactivationheight=v20@2000',
]]
def setup_nodes(self):

View File

@ -43,7 +43,7 @@ class FeatureBlockfilterindexPruneTest(BitcoinTestFramework):
assert_greater_than(len(self.nodes[0].getblockfilter(self.nodes[0].getblockhash(2))['filter']), 0)
self.log.info("start node without blockfilterindex")
self.restart_node(0, extra_args=["-fastprune", "-prune=1"], expected_stderr=EXPECTED_STDERR_NO_GOV_PRUNE)
self.restart_node(0, extra_args=["-fastprune", "-prune=1", '-testactivationheight=v20@2000'], expected_stderr=EXPECTED_STDERR_NO_GOV_PRUNE)
self.log.info("make sure accessing the blockfilters throws an error")
assert_raises_rpc_error(-1, "Index is not enabled for filtertype basic", self.nodes[0].getblockfilter, self.nodes[0].getblockhash(2))

View File

@ -43,7 +43,10 @@ class TestP2PConn(P2PInterface):
class DIP3V19Test(DashTestFramework):
def set_test_params(self):
self.set_dash_test_params(6, 5, fast_dip3_enforcement=True, evo_count=2)
self.extra_args = [[
'-testactivationheight=v20@1200', # required otherwise mine_quorum("llmq_test [100]") fails
]] * 6
self.set_dash_test_params(6, 5, fast_dip3_enforcement=True, evo_count=2, extra_args=self.extra_args)
def run_test(self):
# Connect all nodes to node1 so that we always have the whole network connected

View File

@ -33,7 +33,7 @@ class LLMQChainLocksTest(DashTestFramework):
self.test_coinbase_best_cl(self.nodes[0], expected_cl_in_cb=False)
self.activate_v20(expected_activation_height=1200)
self.activate_v20(expected_activation_height=900)
self.log.info("Activated v20 at height:" + str(self.nodes[0].getblockcount()))
# v20 is active for the next block, not for the tip

View File

@ -113,9 +113,9 @@ class LLMQQuorumRotationTest(DashTestFramework):
expectedNew = [h_100_0, h_106_0, h_104_0, h_100_1, h_106_1, h_104_1]
quorumList = self.test_getmnlistdiff_quorums(b_h_0, b_h_1, {}, expectedDeleted, expectedNew, testQuorumsCLSigs=False)
projected_activation_height = 1200
projected_activation_height = 900
self.activate_v20(expected_activation_height=1200)
self.activate_v20(expected_activation_height=900)
self.log.info("Activated v20 at height:" + str(self.nodes[0].getblockcount()))
softfork_info = self.nodes[0].getblockchaininfo()['softforks']['v20']

View File

@ -48,7 +48,7 @@ class P2PStaller(P2PDataStore):
class P2PIBDStallingTest(BitcoinTestFramework):
def set_test_params(self):
self.disable_mocktime = True
self.extra_args = [["-dip3params=2000:2000"]]
self.extra_args = [["-dip3params=2000:2000", "-testactivationheight=v20@2000"]]
self.setup_clean_chain = True
self.num_nodes = 1

View File

@ -155,7 +155,7 @@ class BlockchainTest(BitcoinTestFramework):
'dip0024': { 'type': 'buried', 'active': False, 'height': 900},
'realloc': { 'type': 'buried', 'active': True, 'height': 1},
'v19': { 'type': 'buried', 'active': False, 'height': 900},
'v20': { 'type': 'buried', 'active': False, 'height': 1200},
'v20': { 'type': 'buried', 'active': False, 'height': 900},
'mn_rr': {
'type': 'bip9',
'bip9': {