diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 7cb4c0a2b9e5..7e4e42e610bc 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -274,7 +274,6 @@ class CMainParams : public CChainParams { vSporkAddresses = {"Xgtyuk76vhuFW2iT7UAiHgNdWXCf3J34wh"}; nMinSporkKeys = 1; - fBIP9CheckMasternodesUpgraded = true; checkpointData = { { @@ -464,7 +463,6 @@ class CTestNetParams : public CChainParams { vSporkAddresses = {"yjPtiKh2uwk3bDutTEA2q9mCtXyiZRWn55"}; nMinSporkKeys = 1; - fBIP9CheckMasternodesUpgraded = true; checkpointData = { { @@ -644,8 +642,6 @@ class CDevNetParams : public CChainParams { vSporkAddresses = {"yjPtiKh2uwk3bDutTEA2q9mCtXyiZRWn55"}; nMinSporkKeys = 1; - // devnets are started with no blocks and no MN, so we can't check for upgraded MN (as there are none) - fBIP9CheckMasternodesUpgraded = false; checkpointData = (CCheckpointData) { { @@ -846,8 +842,6 @@ class CRegTestParams : public CChainParams { // privKey: cP4EKFyJsHT39LDqgdcB43Y3YXjNyjb5Fuas1GQSeAtjnZWmZEQK vSporkAddresses = {"yj949n1UH6fDhw6HtVE5VMj2iSTaSWBMcW"}; nMinSporkKeys = 1; - // regtest usually has no masternodes in most tests, so don't check for upgraged MNs - fBIP9CheckMasternodesUpgraded = false; checkpointData = { { diff --git a/src/chainparams.h b/src/chainparams.h index b52ba292d1e6..ad25af62ed7c 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -129,17 +129,12 @@ class CChainParams void UpdateDIP3Parameters(int nActivationHeight, int nEnforcementHeight); void UpdateDIP8Parameters(int nActivationHeight); void UpdateBudgetParameters(int nMasternodePaymentsStartBlock, int nBudgetPaymentsStartBlock, int nSuperblockStartBlock); - void UpdateSubsidyAndDiffParams(int nMinimumDifficultyBlocks, int nHighSubsidyBlocks, int nHighSubsidyFactor); - void UpdateLLMQChainLocks(Consensus::LLMQType llmqType); void UpdateLLMQInstantSend(Consensus::LLMQType llmqType); - void UpdateLLMQTestParams(int size, int threshold); - void UpdateLLMQDevnetParams(int size, int threshold); int PoolMinParticipants() const { return nPoolMinParticipants; } int PoolMaxParticipants() const { return nPoolMaxParticipants; } int FulfilledRequestExpireTime() const { return nFulfilledRequestExpireTime; } const std::vector& SporkAddresses() const { return vSporkAddresses; } int MinSporkKeys() const { return nMinSporkKeys; } - bool BIP9CheckMasternodesUpgraded() const { return fBIP9CheckMasternodesUpgraded; } std::optional GetLLMQ(Consensus::LLMQType llmqType) const; protected: @@ -174,7 +169,6 @@ class CChainParams int nFulfilledRequestExpireTime; std::vector vSporkAddresses; int nMinSporkKeys; - bool fBIP9CheckMasternodesUpgraded; uint16_t nDefaultPlatformP2PPort; uint16_t nDefaultPlatformHTTPPort; diff --git a/src/miner.cpp b/src/miner.cpp index 93feeedd6688..6c1e703d4686 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -134,7 +134,7 @@ std::unique_ptr BlockAssembler::CreateNewBlock(const CScript& sc bool fDIP0003Active_context = nHeight >= chainparams.GetConsensus().DIP0003Height; bool fDIP0008Active_context = nHeight >= chainparams.GetConsensus().DIP0008Height; - pblock->nVersion = ComputeBlockVersion(pindexPrev, chainparams.GetConsensus(), chainparams.BIP9CheckMasternodesUpgraded()); + pblock->nVersion = ComputeBlockVersion(pindexPrev, chainparams.GetConsensus()); // Non-mainnet only: allow overriding block.nVersion with // -blockversion=N to test forking scenarios if (Params().NetworkIDString() != CBaseChainParams::MAIN) diff --git a/src/validation.cpp b/src/validation.cpp index 8c84fd033aa1..ae09129669de 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -45,7 +45,6 @@ #include #include #include -#include #include #include @@ -1960,7 +1959,7 @@ void StopScriptCheckWorkerThreads() VersionBitsCache versionbitscache GUARDED_BY(cs_main); -int32_t ComputeBlockVersion(const CBlockIndex* pindexPrev, const Consensus::Params& params, bool fCheckMasternodesUpgraded) +int32_t ComputeBlockVersion(const CBlockIndex* pindexPrev, const Consensus::Params& params) { LOCK(cs_main); int32_t nVersion = VERSIONBITS_TOP_BITS; @@ -1968,10 +1967,6 @@ int32_t ComputeBlockVersion(const CBlockIndex* pindexPrev, const Consensus::Para for (int i = 0; i < (int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; i++) { Consensus::DeploymentPos pos = Consensus::DeploymentPos(i); ThresholdState state = VersionBitsState(pindexPrev, params, pos, versionbitscache); - const struct VBDeploymentInfo& vbinfo = VersionBitsDeploymentInfo[pos]; - if (vbinfo.check_mn_protocol && state == ThresholdState::STARTED && fCheckMasternodesUpgraded) { - // TODO implement new logic for MN upgrade checks (e.g. with LLMQ based feature/version voting) - } if (state == ThresholdState::LOCKED_IN || state == ThresholdState::STARTED) { nVersion |= VersionBitsMask(params, static_cast(i)); } diff --git a/src/validation.h b/src/validation.h index 2406334850c9..b26717c16548 100644 --- a/src/validation.h +++ b/src/validation.h @@ -1069,7 +1069,7 @@ extern VersionBitsCache versionbitscache; /** * Determine what nVersion a new block should use. */ -int32_t ComputeBlockVersion(const CBlockIndex* pindexPrev, const Consensus::Params& params, bool fCheckMasternodesUpgraded = false); +int32_t ComputeBlockVersion(const CBlockIndex* pindexPrev, const Consensus::Params& params); /** * Return true if hash can be found in ::ChainActive() at nBlockHeight height. diff --git a/src/versionbitsinfo.cpp b/src/versionbitsinfo.cpp index b0ccf019f729..731fa31caa70 100644 --- a/src/versionbitsinfo.cpp +++ b/src/versionbitsinfo.cpp @@ -10,16 +10,13 @@ const struct VBDeploymentInfo VersionBitsDeploymentInfo[Consensus::MAX_VERSION_B { /*.name =*/ "testdummy", /*.gbt_force =*/ true, - /*.check_mn_protocol =*/ false, }, { /*.name =*/"v19", /*.gbt_force =*/true, - /*.check_mn_protocol =*/false, }, { /*.name =*/"v20", /*.gbt_force =*/true, - /*.check_mn_protocol =*/false, }, }; diff --git a/src/versionbitsinfo.h b/src/versionbitsinfo.h index edf81a31f040..a7822bc747a9 100644 --- a/src/versionbitsinfo.h +++ b/src/versionbitsinfo.h @@ -10,8 +10,6 @@ struct VBDeploymentInfo { const char *name; /** Whether GBT clients can safely ignore this rule in simplified usage */ bool gbt_force; - /** Whether to check current MN protocol or not */ - bool check_mn_protocol; }; extern const struct VBDeploymentInfo VersionBitsDeploymentInfo[];