diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 40e77891c9544..3d60c0539ab2f 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -799,7 +799,7 @@ class CRegTestParams : public CChainParams { consensus.DIP0020Height = 1; // Always active unless overridden consensus.DIP0024Height = 1; // Always have dip0024 quorums unless overridden consensus.DIP0024QuorumsHeight = 1; // Always have dip0024 quorums unless overridden - consensus.V19Height = 900; + consensus.V19Height = 1; // Always active unless overriden consensus.V20Height = 900; consensus.MN_RRHeight = 900; consensus.MinBIP9WarningHeight = 0; @@ -1031,6 +1031,8 @@ static void MaybeUpdateHeights(const ArgsManager& args, Consensus::Params& conse consensus.DIP0008Height = int{height}; } else if (name == "dip0024") { consensus.DIP0024QuorumsHeight = int{height}; + } else if (name == "v19") { + consensus.V19Height = int{height}; } else if (name == "v20") { consensus.V20Height = int{height}; } else if (name == "mn_rr") { diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp index 1a05491f065ba..8d4e0fecbde20 100644 --- a/src/chainparamsbase.cpp +++ b/src/chainparamsbase.cpp @@ -20,7 +20,7 @@ void SetupChainParamsBaseOptions(ArgsManager& argsman) argsman.AddArg("-budgetparams=::", "Override masternode, budget and superblock start heights (regtest-only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS); argsman.AddArg("-devnet=", "Use devnet chain with provided name", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS); argsman.AddArg("-dip3params=:", "Override DIP3 activation and enforcement heights (regtest-only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS); - argsman.AddArg("-testactivationheight=name@height.", "Set the activation height of 'name' (bip147, bip34, dersig, cltv, csv, brr, dip0001, dip0008, dip0024, v20, mn_rr). (regtest-only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST); + argsman.AddArg("-testactivationheight=name@height.", "Set the activation height of 'name' (bip147, bip34, dersig, cltv, csv, brr, dip0001, dip0008, dip0024, v19, v20, mn_rr). (regtest-only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST); argsman.AddArg("-highsubsidyblocks=", "The number of blocks with a higher than normal subsidy to mine at the start of a chain. Block after that height will have fixed subsidy base. (default: 0, devnet-only)", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS); argsman.AddArg("-highsubsidyfactor=", "The factor to multiply the normal block subsidy by while in the highsubsidyblocks window of a chain (default: 1, devnet-only)", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS); argsman.AddArg("-llmqchainlocks=", "Override the default LLMQ type used for ChainLocks. Allows using ChainLocks with smaller LLMQs. (default: llmq_devnet, devnet-only)", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS); diff --git a/src/evo/deterministicmns.cpp b/src/evo/deterministicmns.cpp index f997859eddcd8..303a88c566806 100644 --- a/src/evo/deterministicmns.cpp +++ b/src/evo/deterministicmns.cpp @@ -180,6 +180,7 @@ CDeterministicMNCPtr CDeterministicMNList::GetMNPayee(gsl::not_null(newList.GetTotalRegisteredCount(), proTx.nType); dmn->proTxHash = tx.GetHash(); @@ -819,10 +815,6 @@ bool CDeterministicMNManager::BuildNewListFromBlock(const CBlock& block, gsl::no return state.Invalid(BlockValidationResult::BLOCK_CONSENSUS, "bad-protx-payload"); } - if (opt_proTx->nType == MnType::Evo && !DeploymentActiveAfter(pindexPrev, Params().GetConsensus(), Consensus::DEPLOYMENT_V19)) { - return state.Invalid(BlockValidationResult::BLOCK_CONSENSUS, "bad-protx-payload"); - } - if (newList.HasUniqueProperty(opt_proTx->addr) && newList.GetUniquePropertyMN(opt_proTx->addr)->proTxHash != opt_proTx->proTxHash) { return state.Invalid(BlockValidationResult::BLOCK_CONSENSUS, "bad-protx-dup-addr"); } @@ -1236,12 +1228,6 @@ bool CDeterministicMNManager::MigrateDBIfNeeded() return true; } - if (DeploymentActiveAt(*m_chainstate.m_chain.Tip(), consensusParams, Consensus::DEPLOYMENT_V19)) { - // too late - LogPrintf("CDeterministicMNManager::%s -- migration is not possible\n", __func__); - return false; - } - // Removing the old EVODB_BEST_BLOCK value early results in older version to crash immediately, even if the upgrade // process is cancelled in-between. But if the new version sees that the old EVODB_BEST_BLOCK is already removed, // then we must assume that the upgrade process was already running before but was interrupted. @@ -1264,6 +1250,13 @@ bool CDeterministicMNManager::MigrateDBIfNeeded() return true; } + if (DeploymentActiveAt(*m_chainstate.m_chain.Tip(), consensusParams, Consensus::DEPLOYMENT_V19)) { + // too late + LogPrintf("CDeterministicMNManager::%s -- migration is not possible\n", __func__); + return false; + } + + CDBBatch batch(m_evoDb.GetRawDB()); for (const auto nHeight : irange::range(Params().GetConsensus().DIP0003Height, m_chainstate.m_chain.Height() + 1)) { @@ -1351,12 +1344,6 @@ bool CDeterministicMNManager::MigrateDBIfNeeded2() return true; } - if (DeploymentActiveAt(*m_chainstate.m_chain.Tip(), consensusParams, Consensus::DEPLOYMENT_V19)) { - // too late - LogPrintf("CDeterministicMNManager::%s -- migration is not possible\n", __func__); - return false; - } - // Removing the old EVODB_BEST_BLOCK value early results in older version to crash immediately, even if the upgrade // process is cancelled in-between. But if the new version sees that the old EVODB_BEST_BLOCK is already removed, // then we must assume that the upgrade process was already running before but was interrupted. @@ -1379,6 +1366,12 @@ bool CDeterministicMNManager::MigrateDBIfNeeded2() return true; } + if (DeploymentActiveAt(*m_chainstate.m_chain.Tip(), consensusParams, Consensus::DEPLOYMENT_V19)) { + // too late + LogPrintf("CDeterministicMNManager::%s -- migration is not possible\n", __func__); + return false; + } + CDBBatch batch(m_evoDb.GetRawDB()); for (const auto nHeight : irange::range(Params().GetConsensus().DIP0003Height, m_chainstate.m_chain.Height() + 1)) { diff --git a/src/rpc/evo.cpp b/src/rpc/evo.cpp index 458be6b3e573e..cd18a04976c55 100644 --- a/src/rpc/evo.cpp +++ b/src/rpc/evo.cpp @@ -643,11 +643,6 @@ static UniValue protx_register_common_wrapper(const JSONRPCRequest& request, EnsureWalletIsUnlocked(*pwallet); } - const bool isV19active{DeploymentActiveAfter(WITH_LOCK(cs_main, return chainman.ActiveChain().Tip();), Params().GetConsensus(), Consensus::DEPLOYMENT_V19)}; - if (isEvoRequested && !isV19active) { - throw JSONRPCError(RPC_INVALID_REQUEST, "EvoNodes aren't allowed yet"); - } - size_t paramIdx = 0; CMutableTransaction tx; @@ -965,11 +960,6 @@ static UniValue protx_update_service_common_wrapper(const JSONRPCRequest& reques EnsureWalletIsUnlocked(*wallet); - const bool isV19active{DeploymentActiveAfter(WITH_LOCK(cs_main, return chainman.ActiveChain().Tip();), Params().GetConsensus(), Consensus::DEPLOYMENT_V19)}; - if (isEvoRequested && !isV19active) { - throw JSONRPCError(RPC_INVALID_REQUEST, "EvoNodes aren't allowed yet"); - } - CProUpServTx ptx; ptx.nType = mnType; ptx.proTxHash = ParseHashV(request.params[0], "proTxHash"); @@ -1055,6 +1045,8 @@ static UniValue protx_update_service_common_wrapper(const JSONRPCRequest& reques FundSpecialTx(*wallet, tx, ptx, feeSource); + const bool isV19active = DeploymentActiveAfter(WITH_LOCK(cs_main, return chainman.ActiveChain().Tip();), + Params().GetConsensus(), Consensus::DEPLOYMENT_V19); SignSpecialTxPayloadByHash(tx, ptx, keyOperator, !isV19active); SetTxPayload(tx, ptx); diff --git a/src/test/evo_deterministicmns_tests.cpp b/src/test/evo_deterministicmns_tests.cpp index 6db58b72b52c3..04a04fbf687e1 100644 --- a/src/test/evo_deterministicmns_tests.cpp +++ b/src/test/evo_deterministicmns_tests.cpp @@ -860,7 +860,7 @@ struct TestChainV19Setup : public TestChainV19BeforeActivationSetup { // 5 blocks earlier TestChainV19BeforeActivationSetup::TestChainV19BeforeActivationSetup() : - TestChainSetup(894) + TestChainSetup(494, {"-testactivationheight=v19@500"}) { bool v19_active{DeploymentActiveAfter(m_node.chainman->ActiveChain().Tip(), Params().GetConsensus(), Consensus::DEPLOYMENT_V19)}; diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp index eb34f1d3fa7d7..b7606f163f3c6 100644 --- a/src/test/util/setup_common.cpp +++ b/src/test/util/setup_common.cpp @@ -382,9 +382,9 @@ TestChainSetup::TestChainSetup(int num_blocks, const std::vector& e /* TestChainDIP3BeforeActivationSetup */ { 430, uint256S("0x0bcefaa33fec56cd84d05d0e76cd6a78badcc20f627d91903646de6a07930a14") }, /* TestChainBRRBeforeActivationSetup */ - { 497, uint256S("0x3c71d807d28b9b813434eb0679ec3d5bcf424c20088cf578f3757521c3e3eded") }, + { 497, uint256S("0x0857a9b5db51835b1c828f019f4c664b5fe6c28ac44a6d868436930f832d31e5") }, /* TestChainV19BeforeActivationSetup */ - { 894, uint256S("0x3f031e5cceade15bdfa559ddecb2ccb2b8d17083bdfd871a9d23b17d04b15292") }, + { 494, uint256S("0x44ee5c8a5e5cbd4437d63c54ddc1d40329be811b25c492fa901e11cdf408f905") }, } }; diff --git a/test/functional/feature_dip3_v19.py b/test/functional/feature_dip3_v19.py index cdf4cdef367cd..f8bc889800cdb 100755 --- a/test/functional/feature_dip3_v19.py +++ b/test/functional/feature_dip3_v19.py @@ -44,10 +44,11 @@ def getmnlistdiff(self, base_block_hash, block_hash): class DIP3V19Test(DashTestFramework): def set_test_params(self): self.extra_args = [[ - '-testactivationheight=v20@1200', # required otherwise mine_quorum("llmq_test [100]") fails + '-testactivationheight=v19@200', ]] * 6 self.set_dash_test_params(6, 5, 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 # Otherwise only masternode connections will be established between nodes, which won't propagate TXs/blocks @@ -66,7 +67,9 @@ def run_test(self): mn_list_before = self.nodes[0].masternodelist() pubkeyoperator_list_before = set([mn_list_before[e]["pubkeyoperator"] for e in mn_list_before]) - self.activate_v19(expected_activation_height=900) + self.mine_quorum(llmq_type_name='llmq_test', llmq_type=100) + + self.activate_by_name('v19', expected_activation_height=200) self.log.info("Activated v19 at height:" + str(self.nodes[0].getblockcount())) mn_list_after = self.nodes[0].masternodelist() diff --git a/test/functional/feature_dip4_coinbasemerkleroots.py b/test/functional/feature_dip4_coinbasemerkleroots.py index 920633c08b023..e8af3f2ac44eb 100755 --- a/test/functional/feature_dip4_coinbasemerkleroots.py +++ b/test/functional/feature_dip4_coinbasemerkleroots.py @@ -115,7 +115,7 @@ def run_test(self): # Verify that the first quorum appears in MNLISTDIFF expectedDeleted = [] - expectedNew = [QuorumId(100, int(first_quorum, 16)), QuorumId(104, int(first_quorum, 16)), QuorumId(106, int(first_quorum, 16))] + expectedNew = [QuorumId(100, int(first_quorum, 16)), QuorumId(104, int(first_quorum, 16))] quorumList = self.test_getmnlistdiff_quorums(null_hash, self.nodes[0].getbestblockhash(), {}, expectedDeleted, expectedNew) baseBlockHash = self.nodes[0].getbestblockhash() @@ -123,20 +123,20 @@ def run_test(self): # Verify that the second quorum appears in MNLISTDIFF expectedDeleted = [] - expectedNew = [QuorumId(100, int(second_quorum, 16)), QuorumId(104, int(second_quorum, 16)), QuorumId(106, int(second_quorum, 16))] + expectedNew = [QuorumId(100, int(second_quorum, 16)), QuorumId(104, int(second_quorum, 16))] quorums_before_third = self.test_getmnlistdiff_quorums(baseBlockHash, self.nodes[0].getbestblockhash(), quorumList, expectedDeleted, expectedNew) block_before_third = self.nodes[0].getbestblockhash() third_quorum = self.mine_quorum() # Verify that the first quorum is deleted and the third quorum is added in MNLISTDIFF (the first got inactive) - expectedDeleted = [QuorumId(100, int(first_quorum, 16)), QuorumId(104, int(first_quorum, 16)), QuorumId(106, int(first_quorum, 16))] - expectedNew = [QuorumId(100, int(third_quorum, 16)), QuorumId(104, int(third_quorum, 16)), QuorumId(106, int(third_quorum, 16))] + expectedDeleted = [QuorumId(100, int(first_quorum, 16)), QuorumId(104, int(first_quorum, 16))] + expectedNew = [QuorumId(100, int(third_quorum, 16)), QuorumId(104, int(third_quorum, 16))] self.test_getmnlistdiff_quorums(block_before_third, self.nodes[0].getbestblockhash(), quorums_before_third, expectedDeleted, expectedNew) # Verify that the diff between genesis and best block is the current active set (second and third quorum) expectedDeleted = [] - expectedNew = [QuorumId(100, int(second_quorum, 16)), QuorumId(104, int(second_quorum, 16)), QuorumId(106, int(second_quorum, 16)), QuorumId(100, int(third_quorum, 16)), QuorumId(104, int(third_quorum, 16)), QuorumId(106, int(third_quorum, 16))] + expectedNew = [QuorumId(100, int(second_quorum, 16)), QuorumId(104, int(second_quorum, 16)), QuorumId(100, int(third_quorum, 16)), QuorumId(104, int(third_quorum, 16))] self.test_getmnlistdiff_quorums(null_hash, self.nodes[0].getbestblockhash(), {}, expectedDeleted, expectedNew) # Now verify that diffs are correct around the block that mined the third quorum. @@ -153,8 +153,8 @@ def run_test(self): self.test_getmnlistdiff_quorums(block_before_third, prev_block2, quorums_before_third, expectedDeleted, expectedNew) self.test_getmnlistdiff_quorums(block_before_third, prev_block, quorums_before_third, expectedDeleted, expectedNew) # The block in which the quorum was mined and the 2 after that should all give the same diff - expectedDeleted = [QuorumId(100, int(first_quorum, 16)), QuorumId(104, int(first_quorum, 16)), QuorumId(106, int(first_quorum, 16))] - expectedNew = [QuorumId(100, int(third_quorum, 16)), QuorumId(104, int(third_quorum, 16)), QuorumId(106, int(third_quorum, 16))] + expectedDeleted = [QuorumId(100, int(first_quorum, 16)), QuorumId(104, int(first_quorum, 16))] + expectedNew = [QuorumId(100, int(third_quorum, 16)), QuorumId(104, int(third_quorum, 16))] quorums_with_third = self.test_getmnlistdiff_quorums(block_before_third, mined_in_block, quorums_before_third, expectedDeleted, expectedNew) self.test_getmnlistdiff_quorums(block_before_third, next_block, quorums_before_third, expectedDeleted, expectedNew) self.test_getmnlistdiff_quorums(block_before_third, next_block2, quorums_before_third, expectedDeleted, expectedNew) diff --git a/test/functional/feature_governance.py b/test/functional/feature_governance.py index 826ba991ee4f7..d1dfa540fa2a1 100755 --- a/test/functional/feature_governance.py +++ b/test/functional/feature_governance.py @@ -91,13 +91,13 @@ def run_test(self): self.log.info("Check 1st superblock before v20") self.bump_mocktime(3) self.generate(self.nodes[0], 3, sync_fun=self.sync_blocks()) - assert_equal(self.nodes[0].getblockcount(), 130) + assert_equal(self.nodes[0].getblockcount(), 137) assert_equal(self.nodes[0].getblockchaininfo()["softforks"]["v20"]["active"], False) self.check_superblockbudget(False) self.log.info("Check 2nd superblock before v20") - self.bump_mocktime(10) - self.generate(self.nodes[0], 10, sync_fun=self.sync_blocks()) + self.bump_mocktime(3) + self.generate(self.nodes[0], 3, sync_fun=self.sync_blocks()) assert_equal(self.nodes[0].getblockcount(), 140) assert_equal(self.nodes[0].getblockchaininfo()["softforks"]["v20"]["active"], False) self.check_superblockbudget(False) diff --git a/test/functional/feature_governance_cl.py b/test/functional/feature_governance_cl.py index 4c6d1a1ba975a..accd731a83e3b 100755 --- a/test/functional/feature_governance_cl.py +++ b/test/functional/feature_governance_cl.py @@ -48,8 +48,6 @@ def run_test(self): self.nodes[0].sporkupdate("SPORK_17_QUORUM_DKG_ENABLED", 0) self.wait_for_sporks_same() - self.activate_v19(expected_activation_height=900) - self.log.info("Activated v19 at height:" + str(self.nodes[0].getblockcount())) self.mine_cycle_quorum() self.sync_blocks() diff --git a/test/functional/feature_llmq_connections.py b/test/functional/feature_llmq_connections.py index b46d756ba0e5d..e629a2c059f33 100755 --- a/test/functional/feature_llmq_connections.py +++ b/test/functional/feature_llmq_connections.py @@ -74,8 +74,6 @@ def run_test(self): self.nodes[0].sporkupdate("SPORK_23_QUORUM_POSE", 4070908800) self.wait_for_sporks_same() - self.activate_v19(expected_activation_height=900) - self.log.info("Activated v19 at height:" + str(self.nodes[0].getblockcount())) self.mine_cycle_quorum() # Since we IS quorums are mined only using dip24 (rotation) we need to enable rotation, and continue tests on llmq_test_dip0024 for connections. diff --git a/test/functional/feature_llmq_evo.py b/test/functional/feature_llmq_evo.py index 613e0ea58eccc..5502a78e6d606 100755 --- a/test/functional/feature_llmq_evo.py +++ b/test/functional/feature_llmq_evo.py @@ -9,7 +9,6 @@ Checks EvoNodes ''' -from _decimal import Decimal from io import BytesIO from test_framework.p2p import P2PInterface @@ -17,7 +16,7 @@ QuorumId, ser_uint256 from test_framework.test_framework import DashTestFramework from test_framework.util import ( - assert_equal, assert_greater_than_or_equal, p2p_port + assert_equal, assert_greater_than_or_equal, ) @@ -46,7 +45,7 @@ def getmnlistdiff(self, baseBlockHash, blockHash): class LLMQEvoNodesTest(DashTestFramework): def set_test_params(self): - self.set_dash_test_params(5, 4, [["-testactivationheight=mn_rr@1200"]] * 5, evo_count=5) + self.set_dash_test_params(5, 4, [["-testactivationheight=mn_rr@400"]] * 5, evo_count=5) self.set_dash_llmq_test_params(4, 4) def run_test(self): @@ -65,14 +64,8 @@ def run_test(self): b_0 = self.nodes[0].getbestblockhash() self.test_getmnlistdiff(null_hash, b_0, {}, [], expectedUpdated) - self.log.info("Test that EvoNodes registration is rejected before v19") - self.test_evo_is_rejected_before_v19() - self.test_masternode_count(expected_mns_count=4, expected_evo_count=0) - self.activate_v19(expected_activation_height=900) - self.log.info("Activated v19 at height:" + str(self.nodes[0].getblockcount())) - self.nodes[0].sporkupdate("SPORK_2_INSTANTSEND_ENABLED", 0) self.wait_for_sporks_same() @@ -193,37 +186,6 @@ def test_evo_protx_are_in_mnlist(self, evo_protx_list): assert_equal(mn_list.get(mn)['type'], "Evo") assert_equal(found, True) - def test_evo_is_rejected_before_v19(self): - bls = self.nodes[0].bls('generate') - collateral_address = self.nodes[0].getnewaddress() - funds_address = self.nodes[0].getnewaddress() - owner_address = self.nodes[0].getnewaddress() - voting_address = self.nodes[0].getnewaddress() - reward_address = self.nodes[0].getnewaddress() - - collateral_amount = 4000 - outputs = {collateral_address: collateral_amount, funds_address: 1} - collateral_txid = self.nodes[0].sendmany("", outputs) - self.generate(self.nodes[0], 8) - - rawtx = self.nodes[0].getrawtransaction(collateral_txid, 1) - collateral_vout = 0 - for txout in rawtx['vout']: - if txout['value'] == Decimal(collateral_amount): - collateral_vout = txout['n'] - break - assert collateral_vout is not None - - ipAndPort = '127.0.0.1:%d' % p2p_port(len(self.nodes)) - operatorReward = len(self.nodes) - - try: - self.nodes[0].protx('register_evo', collateral_txid, collateral_vout, ipAndPort, owner_address, bls['public'], voting_address, operatorReward, reward_address, funds_address, True) - # this should never succeed - assert False - except: - self.log.info("protx_evo rejected") - def test_masternode_count(self, expected_mns_count, expected_evo_count): mn_count = self.nodes[0].masternode('count') assert_equal(mn_count['total'], expected_mns_count + expected_evo_count) diff --git a/test/functional/feature_llmq_is_cl_conflicts.py b/test/functional/feature_llmq_is_cl_conflicts.py index b19572ef7771a..66f98af047e22 100755 --- a/test/functional/feature_llmq_is_cl_conflicts.py +++ b/test/functional/feature_llmq_is_cl_conflicts.py @@ -59,8 +59,6 @@ def run_test(self): self.nodes[0].sporkupdate("SPORK_17_QUORUM_DKG_ENABLED", 0) self.wait_for_sporks_same() - self.activate_v19(expected_activation_height=900) - self.log.info("Activated v19 at height:" + str(self.nodes[0].getblockcount())) self.mine_cycle_quorum() # mine single block, wait for chainlock diff --git a/test/functional/feature_llmq_is_retroactive.py b/test/functional/feature_llmq_is_retroactive.py index 94269ea423dd0..4ac7532ce047c 100755 --- a/test/functional/feature_llmq_is_retroactive.py +++ b/test/functional/feature_llmq_is_retroactive.py @@ -30,7 +30,6 @@ def run_test(self): self.nodes[0].sporkupdate("SPORK_2_INSTANTSEND_ENABLED", 1) self.wait_for_sporks_same() - self.activate_v19(expected_activation_height=900) self.mine_cycle_quorum() # Make sure that all nodes are chainlocked at the same height before starting actual tests diff --git a/test/functional/feature_llmq_rotation.py b/test/functional/feature_llmq_rotation.py index 9a11e6c940303..e1283e27ee418 100755 --- a/test/functional/feature_llmq_rotation.py +++ b/test/functional/feature_llmq_rotation.py @@ -80,10 +80,8 @@ def run_test(self): self.log.info("Mining 2 quorums") h_0 = self.mine_quorum() h_100_0 = QuorumId(100, int(h_0, 16)) - h_106_0 = QuorumId(106, int(h_0, 16)) h_1 = self.mine_quorum() h_100_1 = QuorumId(100, int(h_1, 16)) - h_106_1 = QuorumId(106, int(h_1, 16)) self.log.info("Mine single block, wait for chainlock") self.generate(self.nodes[0], 1, sync_fun=self.no_op) @@ -101,10 +99,10 @@ def run_test(self): assert_equal(dkg_info['active_dkgs'], 0) nonzero_dkgs += dkg_info['active_dkgs'] assert_equal(dkg_info['next_dkg'], next_dkg) - assert_equal(nonzero_dkgs, 7) # 1 quorums 4 nodes and 1 quorum of 3 nodes + assert_equal(nonzero_dkgs, 4) # 1 quorums 4 nodes expectedDeleted = [] - expectedNew = [h_100_0, h_106_0, h_100_1, h_106_1] + expectedNew = [h_100_0, h_100_1] quorumList = self.test_getmnlistdiff_quorums(b_h_0, b_h_1, {}, expectedDeleted, expectedNew, testQuorumsCLSigs=False) projected_activation_height = 900 diff --git a/test/functional/feature_notifications.py b/test/functional/feature_notifications.py index c21cee9311658..295152ef331f4 100755 --- a/test/functional/feature_notifications.py +++ b/test/functional/feature_notifications.py @@ -100,9 +100,6 @@ def run_test(self): self.log.info("test -chainlocknotify") - self.activate_v19(expected_activation_height=900) - self.log.info("Activated v19 at height:" + str(self.nodes[0].getblockcount())) - self.nodes[0].sporkupdate("SPORK_17_QUORUM_DKG_ENABLED", 0) self.nodes[0].sporkupdate("SPORK_19_CHAINLOCKS_ENABLED", 4070908800) self.wait_for_sporks_same() diff --git a/test/functional/interface_zmq_dash.py b/test/functional/interface_zmq_dash.py index b1f64e445da49..0ecd4820475c4 100755 --- a/test/functional/interface_zmq_dash.py +++ b/test/functional/interface_zmq_dash.py @@ -137,8 +137,6 @@ def run_test(self): # Initialize the network self.nodes[0].sporkupdate("SPORK_17_QUORUM_DKG_ENABLED", 0) self.wait_for_sporks_same() - self.activate_v19(expected_activation_height=900) - self.log.info("Activated v19 at height:" + str(self.nodes[0].getblockcount())) self.mine_cycle_quorum() diff --git a/test/functional/p2p_instantsend.py b/test/functional/p2p_instantsend.py index ee1bc0cd4899b..d7fcfdc69a290 100755 --- a/test/functional/p2p_instantsend.py +++ b/test/functional/p2p_instantsend.py @@ -23,8 +23,6 @@ def set_test_params(self): def run_test(self): self.nodes[0].sporkupdate("SPORK_17_QUORUM_DKG_ENABLED", 0) self.wait_for_sporks_same() - self.activate_v19(expected_activation_height=900) - self.log.info("Activated v19 at height:" + str(self.nodes[0].getblockcount())) (quorum_info_i_0, quorum_info_i_1) = self.mine_cycle_quorum() self.test_mempool_doublespend() diff --git a/test/functional/p2p_quorum_data.py b/test/functional/p2p_quorum_data.py index 7fae59f4e1d5c..248f8c0752e33 100755 --- a/test/functional/p2p_quorum_data.py +++ b/test/functional/p2p_quorum_data.py @@ -400,7 +400,6 @@ def test_rpc_quorum_getdata_protx_hash(): mn1.node.quorum, "getdata", 0, 100, quorum_hash, 0x03, "0000000000000000000000000000000000000000000000000000000000000000") - self.activate_v19(expected_activation_height=900) # Enable DKG and disable ChainLocks self.nodes[0].sporkupdate("SPORK_17_QUORUM_DKG_ENABLED", 0) self.nodes[0].sporkupdate("SPORK_19_CHAINLOCKS_ENABLED", 4070908800) diff --git a/test/functional/rpc_blockchain.py b/test/functional/rpc_blockchain.py index 093be59e6b281..013a16cf385f7 100755 --- a/test/functional/rpc_blockchain.py +++ b/test/functional/rpc_blockchain.py @@ -172,7 +172,7 @@ def _test_getblockchaininfo(self): 'dip0020': { 'type': 'buried', 'active': True, 'height': 1}, 'dip0024': { 'type': 'buried', 'active': True, 'height': 1}, 'realloc': { 'type': 'buried', 'active': True, 'height': 1}, - 'v19': { 'type': 'buried', 'active': False, 'height': 900}, + 'v19': { 'type': 'buried', 'active': True, 'height': 1}, 'v20': { 'type': 'buried', 'active': False, 'height': 900}, 'mn_rr': { 'type': 'buried', 'active': False, 'height': 900}, 'withdrawals': { diff --git a/test/functional/rpc_mnauth.py b/test/functional/rpc_mnauth.py index 36309554aa276..015ceff9f2da1 100755 --- a/test/functional/rpc_mnauth.py +++ b/test/functional/rpc_mnauth.py @@ -17,12 +17,9 @@ class FakeMNAUTHTest(DashTestFramework): def set_test_params(self): - self.set_dash_test_params(1, 0) + self.set_dash_test_params(2, 1) def run_test(self): - self.activate_v19(expected_activation_height=900) - self.dynamically_add_masternode() - masternode = self.mninfo[0] masternode.node.add_p2p_connection(P2PInterface()) diff --git a/test/functional/rpc_verifyislock.py b/test/functional/rpc_verifyislock.py index 94fe291e76e25..91f5e992af46f 100755 --- a/test/functional/rpc_verifyislock.py +++ b/test/functional/rpc_verifyislock.py @@ -33,8 +33,6 @@ def run_test(self): node.sporkupdate("SPORK_17_QUORUM_DKG_ENABLED", 0) self.wait_for_sporks_same() - self.activate_v19(expected_activation_height=900) - self.log.info("Activated v19 at height:" + str(self.nodes[0].getblockcount())) self.mine_cycle_quorum() self.bump_mocktime(1) self.generate(self.nodes[0], 8, sync_fun=self.sync_blocks()) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 886d12672973a..82295828ff06d 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -1239,9 +1239,6 @@ def activate_by_name(self, name, expected_activation_height=None): self.nodes[0].sporkupdate("SPORK_17_QUORUM_DKG_ENABLED", spork17_value) self.wait_for_sporks_same() - def activate_v19(self, expected_activation_height=None): - self.activate_by_name('v19', expected_activation_height) - def activate_v20(self, expected_activation_height=None): self.activate_by_name('v20', expected_activation_height) @@ -1524,8 +1521,9 @@ def setup_network(self): self.start_masternodes() - self.bump_mocktime(1) - self.generate(self.nodes[0], 1) + # it should be at least 8 blocks since v20 when MN can be used in quorums + self.bump_mocktime(8) + self.generate(self.nodes[0], 8) for i in range(1, num_simple_nodes): force_finish_mnsync(self.nodes[i])