From 4b9272d58fdb0522a60e5692fb262e9139025826 Mon Sep 17 00:00:00 2001 From: Mihailo Milenkovic Date: Thu, 26 Jan 2023 17:11:49 +0100 Subject: [PATCH] Next Network Upgrade (#1710) --- src/chainparams.cpp | 7 ++++++- src/consensus/params.h | 1 + src/init.cpp | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 29c491f4ec..c5ff41ba50 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -140,6 +140,7 @@ class CMainParams : public CChainParams { consensus.FortCanningEpilogueHeight = 2257500; // Sep 22nd, 2022. consensus.GrandCentralHeight = 2479000; // Dec 8th, 2022. consensus.GrandCentralEpilogueHeight = 2574000; // Jan 10th, 2023. + consensus.NextNetworkUpgradeHeight = std::numeric_limits::max(); consensus.pos.diffLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // consensus.pos.nTargetTimespan = 14 * 24 * 60 * 60; // two weeks @@ -396,6 +397,7 @@ class CTestNetParams : public CChainParams { consensus.FortCanningEpilogueHeight = 1244000; consensus.GrandCentralHeight = 1366000; consensus.GrandCentralEpilogueHeight = 1438200; + consensus.NextNetworkUpgradeHeight = std::numeric_limits::max(); consensus.pos.diffLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // consensus.pos.nTargetTimespan = 14 * 24 * 60 * 60; // two weeks @@ -608,6 +610,7 @@ class CDevNetParams : public CChainParams { consensus.FortCanningEpilogueHeight = 1244000; consensus.GrandCentralHeight = 1366000; consensus.GrandCentralEpilogueHeight = 1438200; + consensus.NextNetworkUpgradeHeight = std::numeric_limits::max(); consensus.pos.diffLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); consensus.pos.nTargetTimespan = 5 * 60; // 5 min == 10 blocks @@ -821,6 +824,7 @@ class CRegTestParams : public CChainParams { consensus.FortCanningEpilogueHeight = 10000000; consensus.GrandCentralHeight = 10000000; consensus.GrandCentralEpilogueHeight = 10000000; + consensus.NextNetworkUpgradeHeight = 10000000; consensus.pos.diffLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); consensus.pos.nTargetTimespan = 14 * 24 * 60 * 60; // two weeks @@ -1062,7 +1066,8 @@ void SetupCommonArgActivationParams(Consensus::Params &consensus) { UpdateHeightValidation("Fort Canning Great World", "-greatworldheight", consensus.FortCanningGreatWorldHeight); UpdateHeightValidation("Fort Canning Epilogue", "-fortcanningepilogueheight", consensus.FortCanningEpilogueHeight); UpdateHeightValidation("Grand Central", "-grandcentralheight", consensus.GrandCentralHeight); - UpdateHeightValidation("Grand Central Next", "-grandcentralepilogueheight", consensus.GrandCentralEpilogueHeight); + UpdateHeightValidation("Grand Central Epilogue", "-grandcentralepilogueheight", consensus.GrandCentralEpilogueHeight); + UpdateHeightValidation("Next Network Upgrade", "-nextnetworkupgradeheight", consensus.NextNetworkUpgradeHeight); if (gArgs.GetBoolArg("-simulatemainnet", false)) { consensus.pos.nTargetTimespan = 5 * 60; // 5 min == 10 blocks diff --git a/src/consensus/params.h b/src/consensus/params.h index db52e964f5..bbb82af2b2 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -101,6 +101,7 @@ struct Params { int FortCanningEpilogueHeight; int GrandCentralHeight; int GrandCentralEpilogueHeight; + int NextNetworkUpgradeHeight; /** Foundation share after AMK, normalized to COIN = 100% */ CAmount foundationShareDFIP1; diff --git a/src/init.cpp b/src/init.cpp index f27be70b62..8117c15854 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -505,7 +505,8 @@ void SetupServerArgs() gArgs.AddArg("-greatworldheight", "Alias for Fort Canning Great World fork activation height (regtest only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS); gArgs.AddArg("-fortcanningepilogueheight", "Alias for Fort Canning Epilogue fork activation height (regtest only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS); gArgs.AddArg("-grandcentralheight", "Grand Central fork activation height (regtest only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS); - gArgs.AddArg("-grandcentralepilogueheight", "Grand Central Next fork activation height (regtest only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS); + gArgs.AddArg("-grandcentralepilogueheight", "Grand Central Epilogue fork activation height (regtest only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS); + gArgs.AddArg("-nextnetworkupgradeheight", "Next NEtwork Upgrade fork activation height (regtest only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS); gArgs.AddArg("-jellyfish_regtest", "Configure the regtest network for jellyfish testing", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::OPTIONS); gArgs.AddArg("-regtest-skip-loan-collateral-validation", "Skip loan collateral check for jellyfish testing", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::OPTIONS); gArgs.AddArg("-regtest-minttoken-simulate-mainnet", "Simulate mainnet for minttokens on regtest - default behavior on regtest is to allow anyone to mint mintable tokens for ease of testing", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::OPTIONS);