mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
perf: activate v20 on the same block as v19 for Reg Test
This commit is contained in:
parent
e0d97cf7ac
commit
4b4001bbe7
@ -789,7 +789,7 @@ public:
|
|||||||
consensus.DIP0024Height = 900;
|
consensus.DIP0024Height = 900;
|
||||||
consensus.DIP0024QuorumsHeight = 900;
|
consensus.DIP0024QuorumsHeight = 900;
|
||||||
consensus.V19Height = 900;
|
consensus.V19Height = 900;
|
||||||
consensus.V20Height = 1200;
|
consensus.V20Height = 900;
|
||||||
consensus.MinBIP9WarningHeight = 0;
|
consensus.MinBIP9WarningHeight = 0;
|
||||||
consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // ~uint256(0) >> 1
|
consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // ~uint256(0) >> 1
|
||||||
consensus.nPowTargetTimespan = 24 * 60 * 60; // Dash: 1 day
|
consensus.nPowTargetTimespan = 24 * 60 * 60; // Dash: 1 day
|
||||||
|
@ -36,7 +36,9 @@ struct TestChainBRRBeforeActivationSetup : public TestChainSetup
|
|||||||
{
|
{
|
||||||
// Force fast DIP3 activation
|
// Force fast DIP3 activation
|
||||||
TestChainBRRBeforeActivationSetup() :
|
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"})
|
"-vbparams=mn_rr:0:999999999999:0:20:16:12:5:1"})
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -242,8 +242,8 @@ class AssetLocksTest(DashTestFramework):
|
|||||||
|
|
||||||
self.set_sporks()
|
self.set_sporks()
|
||||||
|
|
||||||
self.activate_v19(expected_activation_height=900)
|
self.activate_v20(expected_activation_height=900)
|
||||||
self.log.info("Activated v19 at height:" + str(node.getblockcount()))
|
self.log.info("Activated v20 at height:" + str(node.getblockcount()))
|
||||||
|
|
||||||
self.nodes[0].sporkupdate("SPORK_2_INSTANTSEND_ENABLED", 0)
|
self.nodes[0].sporkupdate("SPORK_2_INSTANTSEND_ENABLED", 0)
|
||||||
self.wait_for_sporks_same()
|
self.wait_for_sporks_same()
|
||||||
@ -256,7 +256,6 @@ class AssetLocksTest(DashTestFramework):
|
|||||||
self.sync_blocks()
|
self.sync_blocks()
|
||||||
|
|
||||||
self.set_sporks()
|
self.set_sporks()
|
||||||
self.activate_v20()
|
|
||||||
node.generate(1)
|
node.generate(1)
|
||||||
self.sync_all()
|
self.sync_all()
|
||||||
self.mempool_size = 0
|
self.mempool_size = 0
|
||||||
@ -640,7 +639,7 @@ class AssetLocksTest(DashTestFramework):
|
|||||||
all_mn_rewards = platform_reward + owner_reward + operator_reward
|
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(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, 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())
|
assert_equal(locked, self.get_credit_pool_balance())
|
||||||
node.generate(1)
|
node.generate(1)
|
||||||
self.sync_all()
|
self.sync_all()
|
||||||
|
@ -85,12 +85,12 @@ class FullBlockTest(BitcoinTestFramework):
|
|||||||
# Very large reorgs cause cs_main to be held for a very long time in ActivateBestChainStep,
|
# 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
|
# which causes RPC to hang, so we need to increase RPC timeouts
|
||||||
self.rpc_timeout = 180
|
self.rpc_timeout = 180
|
||||||
# Must set '-dip3params=2000:2000' to create pre-dip3 blocks only
|
|
||||||
self.extra_args = [[
|
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
|
'-acceptnonstdtxn=1', # This is a consensus block test, we don't care about tx policy
|
||||||
'-testactivationheight=bip34@2',
|
'-testactivationheight=bip34@2',
|
||||||
'-testactivationheight=dip0001@2000',
|
'-testactivationheight=dip0001@2000',
|
||||||
|
'-testactivationheight=v20@2000',
|
||||||
]]
|
]]
|
||||||
|
|
||||||
def setup_nodes(self):
|
def setup_nodes(self):
|
||||||
|
@ -43,7 +43,7 @@ class FeatureBlockfilterindexPruneTest(BitcoinTestFramework):
|
|||||||
assert_greater_than(len(self.nodes[0].getblockfilter(self.nodes[0].getblockhash(2))['filter']), 0)
|
assert_greater_than(len(self.nodes[0].getblockfilter(self.nodes[0].getblockhash(2))['filter']), 0)
|
||||||
|
|
||||||
self.log.info("start node without blockfilterindex")
|
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")
|
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))
|
assert_raises_rpc_error(-1, "Index is not enabled for filtertype basic", self.nodes[0].getblockfilter, self.nodes[0].getblockhash(2))
|
||||||
|
@ -43,7 +43,10 @@ class TestP2PConn(P2PInterface):
|
|||||||
|
|
||||||
class DIP3V19Test(DashTestFramework):
|
class DIP3V19Test(DashTestFramework):
|
||||||
def set_test_params(self):
|
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):
|
def run_test(self):
|
||||||
# Connect all nodes to node1 so that we always have the whole network connected
|
# Connect all nodes to node1 so that we always have the whole network connected
|
||||||
|
@ -33,7 +33,7 @@ class LLMQChainLocksTest(DashTestFramework):
|
|||||||
|
|
||||||
self.test_coinbase_best_cl(self.nodes[0], expected_cl_in_cb=False)
|
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()))
|
self.log.info("Activated v20 at height:" + str(self.nodes[0].getblockcount()))
|
||||||
|
|
||||||
# v20 is active for the next block, not for the tip
|
# v20 is active for the next block, not for the tip
|
||||||
|
@ -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]
|
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)
|
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()))
|
self.log.info("Activated v20 at height:" + str(self.nodes[0].getblockcount()))
|
||||||
|
|
||||||
softfork_info = self.nodes[0].getblockchaininfo()['softforks']['v20']
|
softfork_info = self.nodes[0].getblockchaininfo()['softforks']['v20']
|
||||||
|
@ -48,7 +48,7 @@ class P2PStaller(P2PDataStore):
|
|||||||
class P2PIBDStallingTest(BitcoinTestFramework):
|
class P2PIBDStallingTest(BitcoinTestFramework):
|
||||||
def set_test_params(self):
|
def set_test_params(self):
|
||||||
self.disable_mocktime = True
|
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.setup_clean_chain = True
|
||||||
self.num_nodes = 1
|
self.num_nodes = 1
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ class BlockchainTest(BitcoinTestFramework):
|
|||||||
'dip0024': { 'type': 'buried', 'active': False, 'height': 900},
|
'dip0024': { 'type': 'buried', 'active': False, 'height': 900},
|
||||||
'realloc': { 'type': 'buried', 'active': True, 'height': 1},
|
'realloc': { 'type': 'buried', 'active': True, 'height': 1},
|
||||||
'v19': { 'type': 'buried', 'active': False, 'height': 900},
|
'v19': { 'type': 'buried', 'active': False, 'height': 900},
|
||||||
'v20': { 'type': 'buried', 'active': False, 'height': 1200},
|
'v20': { 'type': 'buried', 'active': False, 'height': 900},
|
||||||
'mn_rr': {
|
'mn_rr': {
|
||||||
'type': 'bip9',
|
'type': 'bip9',
|
||||||
'bip9': {
|
'bip9': {
|
||||||
|
Loading…
Reference in New Issue
Block a user