diff --git a/src/chainparams.cpp b/src/chainparams.cpp index b65d78be85..906e364222 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -134,8 +134,8 @@ class CMainParams : public CChainParams { // Nov 15, 2020 12:00:00 UTC protocol upgrade consensus.axionActivationTime = 1605441600; - // May 15, 2021 12:00:00 UTC protocol upgrade - consensus.tachyonActivationTime = 1621080000; + // May 15, 2021 12:00:00 UTC protocol upgrade was 1621080000, but since this upgrade was for relay rules only, + // we do not track this time (since it does not apply at all to the blockchain itself). // May 15, 2022 12:00:00 UTC tentative protocol upgrade consensus.upgrade8ActivationTime = 1652616000; @@ -345,10 +345,6 @@ class CTestNetParams : public CChainParams { // Nov 15, 2020 12:00:00 UTC protocol upgrade consensus.axionActivationTime = 1605441600; - // May 15, 2021 12:00:00 UTC tentative protocol upgrade - // (always active on test networks) - consensus.tachyonActivationTime = 0; - // May 15, 2022 12:00:00 UTC tentative protocol upgrade consensus.upgrade8ActivationTime = 1652616000; @@ -519,10 +515,6 @@ class CTestNet4Params : public CChainParams { // Nov 15, 2020 12:00:00 UTC protocol upgrade consensus.axionActivationTime = 1605441600; - // May 15, 2021 12:00:00 UTC tentative protocol upgrade - // (always active on test networks) - consensus.tachyonActivationTime = 0; - // May 15, 2022 12:00:00 UTC tentative protocol upgrade consensus.upgrade8ActivationTime = 1652616000; @@ -666,10 +658,6 @@ class CScaleNetParams : public CChainParams { // Nov 15, 2020 12:00:00 UTC protocol upgrade consensus.axionActivationTime = 1605441600; - // May 15, 2021 12:00:00 UTC tentative protocol upgrade - // (always active on test networks) - consensus.tachyonActivationTime = 0; - // May 15, 2022 12:00:00 UTC tentative protocol upgrade consensus.upgrade8ActivationTime = 1652616000; @@ -797,10 +785,6 @@ class CRegTestParams : public CChainParams { // Nov 15, 2020 12:00:00 UTC protocol upgrade consensus.axionActivationTime = 1605441600; - // May 15, 2021 12:00:00 UTC tentative protocol upgrade - // (always active on test networks) - consensus.tachyonActivationTime = 0; - // May 15, 2022 12:00:00 UTC tentative protocol upgrade consensus.upgrade8ActivationTime = 1652616000; diff --git a/src/consensus/activation.cpp b/src/consensus/activation.cpp index 89bab56c24..4fc5e1374a 100644 --- a/src/consensus/activation.cpp +++ b/src/consensus/activation.cpp @@ -91,16 +91,6 @@ bool IsAxionEnabled(const Consensus::Params ¶ms, gArgs.GetArg("-axionactivationtime", params.axionActivationTime); } -bool IsTachyonEnabled(const Consensus::Params ¶ms, - const CBlockIndex *pindexPrev) { - if (pindexPrev == nullptr) { - return false; - } - - return pindexPrev->GetMedianTimePast() >= - gArgs.GetArg("-tachyonactivationtime", params.tachyonActivationTime); -} - bool IsUpgrade8Enabled(const Consensus::Params ¶ms, const CBlockIndex *pindexPrev) { if (pindexPrev == nullptr) { return false; diff --git a/src/consensus/activation.h b/src/consensus/activation.h index 50f87cff92..ec8ffb37a4 100644 --- a/src/consensus/activation.h +++ b/src/consensus/activation.h @@ -39,9 +39,8 @@ bool IsPhononEnabled(const Consensus::Params ¶ms, bool IsAxionEnabled(const Consensus::Params ¶ms, const CBlockIndex *pindexPrev); -/** Check if May 15th, 2021 protocol upgrade has activated. */ -bool IsTachyonEnabled(const Consensus::Params ¶ms, - const CBlockIndex *pindexPrev); +/** Note: May 15th, 2021 protocol upgrade was relay-only, and has no on-chain rules. + * The function "IsTachyonEnabled" that used to live here has been removed. */ /** Check if tentative May 15th, 2022 protocol upgrade has activated. */ bool IsUpgrade8Enabled(const Consensus::Params ¶ms, const CBlockIndex *pindexPrev); diff --git a/src/consensus/params.h b/src/consensus/params.h index 5260e58bfb..9fe473f4d7 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -43,8 +43,10 @@ struct Params { int phononHeight; /** Unix time used for MTP activation of 15 Nov 2020 12:00:00 UTC upgrade */ int axionActivationTime; - /** Unix time used for tentative MTP activation of 15 May 2021 12:00:00 UTC upgrade */ - int tachyonActivationTime; + + /** Note: Unix time used for MTP activation of the 15 May 2021 12:00:00 UTC upgrade was 1621080000, but since + * it was a relay-rules-only upgrade, so we no longer track this time for blockchain consensus. */ + /** Unix time used for tentative MTP activation of 15 May 2022 12:00:00 UTC upgrade */ int64_t upgrade8ActivationTime; /** Default blocksize limit -- can be overridden with the -excessiveblocksize= command-line switch */ diff --git a/src/init.cpp b/src/init.cpp index 767a91aa74..b264ee5048 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -941,13 +941,6 @@ void SetupServerArgs() { "default: %d). This option only has an effect on regtest or scalenet.", defaultChainParams->GetConsensus().axionActivationTime), true, OptionsCategory::DEBUG_TEST); - gArgs.AddArg( - "-tachyonactivationtime=", - strprintf("Activation time of the May 2021 Bitcoin Cash Network Upgrade " - "( seconds since epoch, default: %d, non-mainnet: %d)", - defaultChainParams->GetConsensus().tachyonActivationTime, - testnetChainParams->GetConsensus().tachyonActivationTime), - true, OptionsCategory::DEBUG_TEST); gArgs.AddArg( "-upgrade8activationtime=", strprintf("Activation time of the tentative May 2022 Bitcoin Cash Network Upgrade ( seconds since epoch, " diff --git a/src/test/activation_tests.cpp b/src/test/activation_tests.cpp index a199b645be..68d77b5b23 100644 --- a/src/test/activation_tests.cpp +++ b/src/test/activation_tests.cpp @@ -104,32 +104,6 @@ BOOST_AUTO_TEST_CASE(isaxionenabled) { } } -BOOST_AUTO_TEST_CASE(istachyonenabled) { - CBlockIndex prev; - - const Consensus::Params ¶ms = Params().GetConsensus(); - const auto activation = - gArgs.GetArg("-tachyonctivationtime", params.tachyonActivationTime); - SetMockTime(activation - 1000000); - - BOOST_CHECK(!IsTachyonEnabled(params, nullptr)); - - std::array blocks; - for (size_t i = 1; i < blocks.size(); ++i) { - blocks[i].pprev = &blocks[i - 1]; - } - BOOST_CHECK(!IsTachyonEnabled(params, &blocks.back())); - - SetMTP(blocks, activation - 1); - BOOST_CHECK(!IsTachyonEnabled(params, &blocks.back())); - - SetMTP(blocks, activation); - BOOST_CHECK(IsTachyonEnabled(params, &blocks.back())); - - SetMTP(blocks, activation + 1); - BOOST_CHECK(IsTachyonEnabled(params, &blocks.back())); -} - BOOST_AUTO_TEST_CASE(isupgrade8enabled) { CBlockIndex prev; diff --git a/src/test/main.cpp b/src/test/main.cpp index a756d7c3f7..b2d09827c0 100644 --- a/src/test/main.cpp +++ b/src/test/main.cpp @@ -23,7 +23,6 @@ struct CustomArgumentsFixture { const std::set testArgs = { testsuitename, "-axionactivationtime", - "-tachyonactivationtime", }; for (const auto &arg : testArgs) {