diff --git a/configure.ac b/configure.ac index 0c6c7a7fd4..24b785b26e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,8 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 2) -define(_CLIENT_VERSION_MINOR, 7) -define(_CLIENT_VERSION_REVISION, 1) +define(_CLIENT_VERSION_MINOR, 8) +define(_CLIENT_VERSION_REVISION, 0) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_RC, 0) define(_CLIENT_VERSION_IS_RELEASE, true) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 60496c0d00..88acaa74e0 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -130,6 +130,7 @@ class CMainParams : public CChainParams { consensus.FortCanningParkHeight = 1503143; consensus.FortCanningHillHeight = 1604999; // Feb 7, 2022. consensus.FortCanningRoadHeight = 1786000; // April 11, 2022. + consensus.FortCanningSpiceGardenHeight = 1936000; // June 2, 2022. consensus.GreatWorldHeight = std::numeric_limits::max(); consensus.pos.diffLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); @@ -359,6 +360,7 @@ class CTestNetParams : public CChainParams { consensus.FortCanningParkHeight = 828800; consensus.FortCanningHillHeight = 828900; consensus.FortCanningRoadHeight = 893700; + consensus.FortCanningSpiceGardenHeight = 1011600; consensus.GreatWorldHeight = std::numeric_limits::max(); consensus.pos.diffLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); @@ -549,6 +551,7 @@ class CDevNetParams : public CChainParams { consensus.FortCanningParkHeight = std::numeric_limits::max(); consensus.FortCanningHillHeight = std::numeric_limits::max(); consensus.FortCanningRoadHeight = std::numeric_limits::max(); + consensus.FortCanningSpiceGardenHeight = std::numeric_limits::max(); consensus.GreatWorldHeight = std::numeric_limits::max(); consensus.pos.diffLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); @@ -731,6 +734,7 @@ class CRegTestParams : public CChainParams { consensus.FortCanningParkHeight = 10000000; consensus.FortCanningHillHeight = 10000000; consensus.FortCanningRoadHeight = 10000000; + consensus.FortCanningSpiceGardenHeight = 10000000; consensus.GreatWorldHeight = 10000000; consensus.pos.diffLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); @@ -952,6 +956,7 @@ void CRegTestParams::UpdateActivationParametersFromArgs() UpdateHeightValidation("Fort Canning Park", "-fortcanningparkheight", consensus.FortCanningParkHeight); UpdateHeightValidation("Fort Canning Hill", "-fortcanninghillheight", consensus.FortCanningHillHeight); UpdateHeightValidation("Fort Canning Road", "-fortcanningroadheight", consensus.FortCanningRoadHeight); + UpdateHeightValidation("Fort Canning Split", "-fortcanningspicegardenheight", consensus.FortCanningSpiceGardenHeight); UpdateHeightValidation("Great World", "-greatworldheight", consensus.GreatWorldHeight); if (gArgs.GetBoolArg("-simulatemainnet", false)) { diff --git a/src/consensus/params.h b/src/consensus/params.h index 7c919d1bec..03170fa36c 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -95,6 +95,7 @@ struct Params { int FortCanningParkHeight; int FortCanningHillHeight; int FortCanningRoadHeight; + int FortCanningSpiceGardenHeight; int GreatWorldHeight; /** Foundation share after AMK, normalized to COIN = 100% */ diff --git a/src/init.cpp b/src/init.cpp index 6750ab1983..cff74a1d75 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -477,6 +477,7 @@ void SetupServerArgs() gArgs.AddArg("-fortcanningparkheight", "Fort Canning Park fork activation height (regtest only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS); gArgs.AddArg("-fortcanninghillheight", "Fort Canning Hill fork activation height (regtest only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS); gArgs.AddArg("-fortcanningroadheight", "Fort Canning Road fork activation height (regtest only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS); + gArgs.AddArg("-fortcanningspicegardenheight", "Fort Canning Spice Garden fork activation height (regtest only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS); gArgs.AddArg("-greatworldheight", "Great World 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("-simulatemainnet", "Configure the regtest network to mainnet target timespan and spacing ", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::OPTIONS); diff --git a/src/masternodes/govvariables/attributes.cpp b/src/masternodes/govvariables/attributes.cpp index ac4aeb47b8..d3bbb26061 100644 --- a/src/masternodes/govvariables/attributes.cpp +++ b/src/masternodes/govvariables/attributes.cpp @@ -744,8 +744,8 @@ Res ATTRIBUTES::Validate(const CCustomCSView & view) const case TokenKeys::LoanCollateralFactor: case TokenKeys::LoanMintingEnabled: case TokenKeys::LoanMintingInterest: { - if (view.GetLastHeight() < Params().GetConsensus().GreatWorldHeight) { - return Res::Err("Cannot be set before GreatWorld"); + if (view.GetLastHeight() < Params().GetConsensus().FortCanningSpiceGardenHeight) { + return Res::Err("Cannot be set before FortCanningSpiceGarden"); } if (!VerifyToken(view, attrV0->typeId)) { return Res::Err("No such token (%d)", attrV0->typeId); @@ -758,8 +758,8 @@ Res ATTRIBUTES::Validate(const CCustomCSView & view) const break; } case TokenKeys::FixedIntervalPriceId: - if (view.GetLastHeight() < Params().GetConsensus().GreatWorldHeight) { - return Res::Err("Cannot be set before GreatWorld"); + if (view.GetLastHeight() < Params().GetConsensus().FortCanningSpiceGardenHeight) { + return Res::Err("Cannot be set before FortCanningSpiceGarden"); } if (!VerifyToken(view, attrV0->typeId)) { return Res::Err("No such token (%d)", attrV0->typeId); @@ -783,8 +783,8 @@ Res ATTRIBUTES::Validate(const CCustomCSView & view) const break; case AttributeTypes::Oracles: - if (view.GetLastHeight() < Params().GetConsensus().GreatWorldHeight) { - return Res::Err("Cannot be set before GreatWorld"); + if (view.GetLastHeight() < Params().GetConsensus().FortCanningSpiceGardenHeight) { + return Res::Err("Cannot be set before FortCanningSpiceGarden"); } if (attrV0->typeId == OracleIDs::Splits) { const auto splitMap = boost::get(&attribute.second); @@ -845,8 +845,8 @@ Res ATTRIBUTES::Validate(const CCustomCSView & view) const break; case AttributeTypes::Locks: - if (view.GetLastHeight() < Params().GetConsensus().GreatWorldHeight) { - return Res::Err("Cannot be set before GreatWorld"); + if (view.GetLastHeight() < Params().GetConsensus().FortCanningSpiceGardenHeight) { + return Res::Err("Cannot be set before FortCanningSpiceGarden"); } if (attrV0->typeId != ParamIDs::TokenID) { return Res::Err("Unrecognised locks id"); diff --git a/src/masternodes/mn_checks.cpp b/src/masternodes/mn_checks.cpp index 8c2470e3bb..441c5ae80c 100644 --- a/src/masternodes/mn_checks.cpp +++ b/src/masternodes/mn_checks.cpp @@ -249,6 +249,13 @@ class CCustomMetadataParseVisitor : public boost::static_visitor return Res::Ok(); } + Res isPostFortCanningSpiceGardenFork() const { + if(static_cast(height) < consensus.FortCanningSpiceGardenHeight) { + return Res::Err("called before FortCanningSpiceGarden height"); + } + return Res::Ok(); + } + Res isPostGreatWorldFork() const { if(static_cast(height) < consensus.GreatWorldHeight) { return Res::Err("called before GreatWorldHeight height"); @@ -522,24 +529,24 @@ class CCustomMetadataParseVisitor : public boost::static_visitor auto res = isPostFortCanningFork(); if (!res) return res; - res = isPostGreatWorldFork(); - return res ? Res::Err("called after GreatWorld height") : serialize(obj); + res = isPostFortCanningSpiceGardenFork(); + return res ? Res::Err("called after FortCanningSpiceGarden height") : serialize(obj); } Res operator()(CLoanSetLoanTokenMessage& obj) const { auto res = isPostFortCanningFork(); if (!res) return res; - res = isPostGreatWorldFork(); - return res ? Res::Err("called after GreatWorld height") : serialize(obj); + res = isPostFortCanningSpiceGardenFork(); + return res ? Res::Err("called after FortCanningSpiceGarden height") : serialize(obj); } Res operator()(CLoanUpdateLoanTokenMessage& obj) const { auto res = isPostFortCanningFork(); if (!res) return res; - res = isPostGreatWorldFork(); - return res ? Res::Err("called after GreatWorld height") : serialize(obj); + res = isPostFortCanningSpiceGardenFork(); + return res ? Res::Err("called after FortCanningSpiceGarden height") : serialize(obj); } Res operator()(CLoanSchemeMessage& obj) const { diff --git a/src/masternodes/tokens.cpp b/src/masternodes/tokens.cpp index 1c1625e12f..0f12fd0039 100644 --- a/src/masternodes/tokens.cpp +++ b/src/masternodes/tokens.cpp @@ -299,7 +299,7 @@ inline Res CTokenImplementation::IsValidSymbol() const if (symbol.find('#') != std::string::npos) { return Res::Err("token symbol should not contain '#'"); } - if (creationHeight >= Params().GetConsensus().GreatWorldHeight && symbol.find('/') != std::string::npos) { + if (creationHeight >= Params().GetConsensus().FortCanningSpiceGardenHeight && symbol.find('/') != std::string::npos) { return Res::Err("token symbol should not contain '/'"); } return Res::Ok(); diff --git a/src/miner.cpp b/src/miner.cpp index 296a7cc010..f867335f52 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -221,7 +221,7 @@ std::unique_ptr BlockAssembler::CreateNewBlock(const CScript& sc addPackageTxs(nPackagesSelected, nDescendantsUpdated, nHeight, mnview); // TXs for the creationTx field in new tokens created via token split - if (nHeight >= chainparams.GetConsensus().GreatWorldHeight) { + if (nHeight >= chainparams.GetConsensus().FortCanningSpiceGardenHeight) { const auto attributes = mnview.GetAttributes(); if (attributes) { CDataStructureV0 splitKey{AttributeTypes::Oracles, OracleIDs::Splits, static_cast(nHeight)}; @@ -708,31 +708,6 @@ namespace pos { return Status::stakeReady; } - // This is an internal only method to ignore some mints, even though it's valid. - // This is done to workaround https://github.com/DeFiCh/ain/issues/693, so on specific bug condition, - // i.e, when subnode 1 stakes before subnode 0 on Eunos Paya+ (in particular to target pre-Eunos Paya masternodes that's carried over), it's ignored. - // in order to give time for subnode 0 to first succeed and create a record. - // - // This is done to ensure that we can workaround the bug, without waiting for consensus change in next update. - // This shouldn't have any effect on the mining, even though we ignore some successful hashes since the - // Coinages are retained and keep growing. Once subnode 0 mines, subnode 1 should stake again shortly with - // higher coinage / TM. - // - bool shouldIgnoreMint(uint8_t subNode, int64_t blockHeight, int64_t creationHeight, - const std::vector& subNodesBlockTime, const CChainParams& chainParams) { - - auto eunosPayaHeight = chainParams.GetConsensus().EunosPayaHeight; - if (blockHeight < eunosPayaHeight || creationHeight >= eunosPayaHeight) { - return false; - } - - if (subNode == 1 && subNodesBlockTime[0] == subNodesBlockTime[1]) { - LogPrint(BCLog::STAKING, "MakeStake: kernel ignored\n"); - return true; - } - return false; - } - Staker::Status Staker::stake(const CChainParams& chainparams, const ThreadStaker::Args& args) { bool found = false; @@ -807,7 +782,7 @@ namespace pos { // Plus one to avoid time-too-old error on exact median time. nLastCoinStakeSearchTime = tip->GetMedianTimePast() + 1; } - + lastBlockSeen = tip->GetBlockHash(); } @@ -828,8 +803,6 @@ namespace pos { if (pos::CheckKernelHash(stakeModifier, nBits, creationHeight, blockTime, blockHeight, masternodeID, chainparams.GetConsensus(), subNodesBlockTime, timelock, ctxState)) { - if (shouldIgnoreMint(ctxState.subNode, blockHeight, creationHeight, subNodesBlockTime, chainparams)) - break; LogPrint(BCLog::STAKING, "MakeStake: kernel found\n"); found = true; @@ -853,8 +826,6 @@ namespace pos { if (pos::CheckKernelHash(stakeModifier, nBits, creationHeight, blockTime, blockHeight, masternodeID, chainparams.GetConsensus(), subNodesBlockTime, timelock, ctxState)) { - if (shouldIgnoreMint(ctxState.subNode, blockHeight, creationHeight, subNodesBlockTime, chainparams)) - break; LogPrint(BCLog::STAKING, "MakeStake: kernel found\n"); found = true; diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index ddc0b58b56..12af6b304e 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1336,6 +1336,7 @@ UniValue getblockchaininfo(const JSONRPCRequest& request) BuriedForkDescPushBack(softforks, "fortcanningpark", consensusParams.FortCanningParkHeight); BuriedForkDescPushBack(softforks, "fortcanninghill", consensusParams.FortCanningHillHeight); BuriedForkDescPushBack(softforks, "fortcanningroad", consensusParams.FortCanningRoadHeight); + BuriedForkDescPushBack(softforks, "fortcanningspicegarden", consensusParams.FortCanningSpiceGardenHeight); BuriedForkDescPushBack(softforks, "greatworld", consensusParams.GreatWorldHeight); BIP9SoftForkDescPushBack(softforks, "testdummy", consensusParams, Consensus::DEPLOYMENT_TESTDUMMY); obj.pushKV("softforks", softforks); diff --git a/src/validation.cpp b/src/validation.cpp index b5a26d79c5..ee58633c18 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -3648,7 +3648,7 @@ void CChainState::ProcessTokenToGovVar(const CBlockIndex* pindex, CCustomCSView& // Migrate at +1 height so that GetLastHeight() in Gov var // Validate() has a height equal to the GW fork. - if (pindex->nHeight != chainparams.GetConsensus().GreatWorldHeight + 1) { + if (pindex->nHeight != chainparams.GetConsensus().FortCanningSpiceGardenHeight + 1) { return; } @@ -4068,7 +4068,7 @@ static Res VaultSplits(CCustomCSView& view, ATTRIBUTES& attributes, const DCT_ID } void CChainState::ProcessTokenSplits(const CBlock& block, const CBlockIndex* pindex, CCustomCSView& cache, const CreationTxs& creationTxs, const CChainParams& chainparams) { - if (pindex->nHeight < chainparams.GetConsensus().GreatWorldHeight) { + if (pindex->nHeight < chainparams.GetConsensus().FortCanningSpiceGardenHeight) { return; } const auto attributes = cache.GetAttributes(); @@ -5536,7 +5536,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, const Consensus::P if (block.vtx[i]->IsCoinBase() && !IsAnchorRewardTx(*block.vtx[i], dummy, height >= consensusParams.FortCanningHeight) && !IsAnchorRewardTxPlus(*block.vtx[i], dummy, height >= consensusParams.FortCanningHeight) && - !IsTokenSplitTx(*block.vtx[i], dummy, height >= consensusParams.GreatWorldHeight)) + !IsTokenSplitTx(*block.vtx[i], dummy, height >= consensusParams.FortCanningSpiceGardenHeight)) return state.Invalid(ValidationInvalidReason::CONSENSUS, false, REJECT_INVALID, "bad-cb-multiple", "more than one coinbase"); } } diff --git a/src/version.h b/src/version.h index 4e8fdcc93c..3ab303d56c 100644 --- a/src/version.h +++ b/src/version.h @@ -9,7 +9,7 @@ * network protocol versioning */ -static const int PROTOCOL_VERSION = 70028; +static const int PROTOCOL_VERSION = 70029; //! initial proto version, to be increased after version/verack negotiation static const int INIT_PROTO_VERSION = 209; diff --git a/test/functional/feature_loan_vault.py b/test/functional/feature_loan_vault.py index 67b49f3633..40c12f6345 100755 --- a/test/functional/feature_loan_vault.py +++ b/test/functional/feature_loan_vault.py @@ -18,8 +18,8 @@ def set_test_params(self): self.num_nodes = 2 self.setup_clean_chain = True self.extra_args = [ - ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-bayfrontgardensheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1', '-fortcanninghillheight=300', '-greatworldheight=1700', '-jellyfish_regtest=1', '-simulatemainnet'], - ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-bayfrontgardensheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1', '-fortcanninghillheight=300', '-greatworldheight=1700', '-jellyfish_regtest=1', '-simulatemainnet'] + ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-bayfrontgardensheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1', '-fortcanninghillheight=300', '-fortcanningspicegardenheight=1700', '-jellyfish_regtest=1', '-simulatemainnet'], + ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-bayfrontgardensheight=1', '-eunosheight=1', '-txindex=1', '-fortcanningheight=1', '-fortcanninghillheight=300', '-fortcanningspicegardenheight=1700', '-jellyfish_regtest=1', '-simulatemainnet'] ] self.vaults = [] self.owner_addresses = [] @@ -750,19 +750,19 @@ def loan_and_collateral_token_to_govvar(self): self.move_to_gw_fork() # Try and call disabled RPC calls - assert_raises_rpc_error(-32600, 'called after GreatWorld height', self.nodes[0].setloantoken, { + assert_raises_rpc_error(-32600, 'called after FortCanningSpiceGarden height', self.nodes[0].setloantoken, { 'symbol': "DUSD", 'name': "DUSD stable token", 'fixedIntervalPriceId': "DUSD/USD", 'mintable': True, 'interest': 1}) - assert_raises_rpc_error(-32600, 'called after GreatWorld height', self.nodes[0].updateloantoken, "DUSD", { + assert_raises_rpc_error(-32600, 'called after FortCanningSpiceGarden height', self.nodes[0].updateloantoken, "DUSD", { 'symbol': "DUSD", 'name': "DUSD stable token", 'fixedIntervalPriceId': "DUSD/USD", 'mintable': True, 'interest': 1}) - assert_raises_rpc_error(-32600, 'called after GreatWorld height', self.nodes[0].setcollateraltoken, { + assert_raises_rpc_error(-32600, 'called after FortCanningSpiceGarden height', self.nodes[0].setcollateraltoken, { 'token': self.idDFI, 'factor': 1, 'fixedIntervalPriceId': "DFI/USD"}) diff --git a/test/functional/feature_setgov.py b/test/functional/feature_setgov.py index ae6eac8f7a..a4fa1c6ef1 100755 --- a/test/functional/feature_setgov.py +++ b/test/functional/feature_setgov.py @@ -21,8 +21,8 @@ def set_test_params(self): self.num_nodes = 2 self.setup_clean_chain = True self.extra_args = [ - ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=200', '-fortcanningheight=400', '-fortcanninghillheight=1110', '-fortcanningroadheight=1150', '-greatworldheight=1200', '-subsidytest=1'], - ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=200', '-fortcanningheight=400', '-fortcanninghillheight=1110', '-fortcanningroadheight=1150', '-greatworldheight=1200', '-subsidytest=1']] + ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=200', '-fortcanningheight=400', '-fortcanninghillheight=1110', '-fortcanningroadheight=1150', '-fortcanningspicegardenheight=1200', '-subsidytest=1'], + ['-txnotokens=0', '-amkheight=50', '-bayfrontheight=50', '-eunosheight=200', '-fortcanningheight=400', '-fortcanninghillheight=1110', '-fortcanningroadheight=1150', '-fortcanningspicegardenheight=1200', '-subsidytest=1']] def run_test(self): @@ -630,13 +630,13 @@ def run_test(self): assert_equal(result, [[{'ICX_TAKERFEE_PER_BTC': Decimal('0.00200000')}], [{'LP_DAILY_LOAN_TOKEN_REWARD': Decimal('13020.86331792')}], [{'LP_LOAN_TOKEN_SPLITS': {'1': Decimal('0.10000000'), '2': Decimal('0.20000000'), '3': Decimal('0.70000000')}}], [{'LP_DAILY_DFI_REWARD': Decimal('13427.10581184')}], [{'LOAN_LIQUIDATION_PENALTY': Decimal('0.01000000')}], [{'LP_SPLITS': {'1': Decimal('0.70000000'), '2': Decimal('0.20000000'), '3': Decimal('0.10000000')}}], [{'ORACLE_BLOCK_INTERVAL': 30}], [{'ORACLE_DEVIATION': Decimal('0.07000000')}], [{'ATTRIBUTES': {'v0/params/dfip2201/active': 'true', 'v0/params/dfip2201/premium': '0.025', 'v0/params/dfip2201/minswap': '0.001', 'v0/params/dfip2203/active': 'true', 'v0/params/dfip2203/reward_pct': '0.05', 'v0/params/dfip2203/block_period': '20160', 'v0/token/5/payback_dfi': 'true', 'v0/token/5/payback_dfi_fee_pct': '0.33', 'v0/token/5/loan_payback/1': 'true', 'v0/token/5/loan_payback/2': 'true', 'v0/token/5/loan_payback_fee_pct/1': '0.25', 'v0/token/5/dex_in_fee_pct': '0.6', 'v0/token/5/dex_out_fee_pct': '0.12', 'v0/token/5/dfip2203': 'true'}}]]) # Check errors - assert_raises_rpc_error(-32600, "ATTRIBUTES: Cannot be set before GreatWorld", self.nodes[0].setgov, {"ATTRIBUTES":{'v0/locks/token/5':'true'}}) - assert_raises_rpc_error(-32600, "ATTRIBUTES: Cannot be set before GreatWorld", self.nodes[0].setgov, {"ATTRIBUTES":{'v0/oracles/splits/4000': '1/50'}}) - assert_raises_rpc_error(-32600, "ATTRIBUTES: Cannot be set before GreatWorld", self.nodes[0].setgov, {"ATTRIBUTES":{'v0/token/5/fixed_interval_price_id':'TSLA/USD'}}) - assert_raises_rpc_error(-32600, "ATTRIBUTES: Cannot be set before GreatWorld", self.nodes[0].setgov, {"ATTRIBUTES":{'v0/token/5/loan_collateral_enabled':'true'}}) - assert_raises_rpc_error(-32600, "ATTRIBUTES: Cannot be set before GreatWorld", self.nodes[0].setgov, {"ATTRIBUTES":{'v0/token/5/loan_collateral_factor':'1.00000000'}}) - assert_raises_rpc_error(-32600, "ATTRIBUTES: Cannot be set before GreatWorld", self.nodes[0].setgov, {"ATTRIBUTES":{'v0/token/5/loan_minting_enabled':'true'}}) - assert_raises_rpc_error(-32600, "ATTRIBUTES: Cannot be set before GreatWorld", self.nodes[0].setgov, {"ATTRIBUTES":{'v0/token/5/loan_minting_interest':'5.00000000'}}) + assert_raises_rpc_error(-32600, "ATTRIBUTES: Cannot be set before FortCanningSpiceGarden", self.nodes[0].setgov, {"ATTRIBUTES":{'v0/locks/token/5':'true'}}) + assert_raises_rpc_error(-32600, "ATTRIBUTES: Cannot be set before FortCanningSpiceGarden", self.nodes[0].setgov, {"ATTRIBUTES":{'v0/oracles/splits/4000': '1/50'}}) + assert_raises_rpc_error(-32600, "ATTRIBUTES: Cannot be set before FortCanningSpiceGarden", self.nodes[0].setgov, {"ATTRIBUTES":{'v0/token/5/fixed_interval_price_id':'TSLA/USD'}}) + assert_raises_rpc_error(-32600, "ATTRIBUTES: Cannot be set before FortCanningSpiceGarden", self.nodes[0].setgov, {"ATTRIBUTES":{'v0/token/5/loan_collateral_enabled':'true'}}) + assert_raises_rpc_error(-32600, "ATTRIBUTES: Cannot be set before FortCanningSpiceGarden", self.nodes[0].setgov, {"ATTRIBUTES":{'v0/token/5/loan_collateral_factor':'1.00000000'}}) + assert_raises_rpc_error(-32600, "ATTRIBUTES: Cannot be set before FortCanningSpiceGarden", self.nodes[0].setgov, {"ATTRIBUTES":{'v0/token/5/loan_minting_enabled':'true'}}) + assert_raises_rpc_error(-32600, "ATTRIBUTES: Cannot be set before FortCanningSpiceGarden", self.nodes[0].setgov, {"ATTRIBUTES":{'v0/token/5/loan_minting_interest':'5.00000000'}}) # Move to GW fork self.nodes[0].generate(1200 - self.nodes[0].getblockcount()) diff --git a/test/functional/feature_token_lock.py b/test/functional/feature_token_lock.py index 6e6092416f..e89fe5edb0 100644 --- a/test/functional/feature_token_lock.py +++ b/test/functional/feature_token_lock.py @@ -15,7 +15,7 @@ class TokenLockTest(DefiTestFramework): def set_test_params(self): self.num_nodes = 1 self.setup_clean_chain = True - self.extra_args = [['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanninghillheight=1', '-fortcanningroadheight=1', '-greatworldheight=200', '-subsidytest=1']] + self.extra_args = [['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanninghillheight=1', '-fortcanningroadheight=1', '-fortcanningspicegardenheight=200', '-subsidytest=1']] def run_test(self): self.nodes[0].generate(150) diff --git a/test/functional/feature_token_split.py b/test/functional/feature_token_split.py index 4fcb9e000b..a6f09e99a1 100644 --- a/test/functional/feature_token_split.py +++ b/test/functional/feature_token_split.py @@ -20,7 +20,7 @@ def set_test_params(self): self.num_nodes = 1 self.setup_clean_chain = True self.extra_args = [ - ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanningmuseumheight=1', '-fortcanninghillheight=1', '-fortcanningroadheight=1', '-greatworldheight=150', '-subsidytest=1']] + ['-txnotokens=0', '-amkheight=1', '-bayfrontheight=1', '-eunosheight=1', '-fortcanningheight=1', '-fortcanningmuseumheight=1', '-fortcanninghillheight=1', '-fortcanningroadheight=1', '-fortcanningspicegardenheight=150', '-subsidytest=1']] def run_test(self): self.setup_test_tokens() diff --git a/test/functional/rpc_blockchain.py b/test/functional/rpc_blockchain.py index 1b316d0aeb..f97c296e62 100755 --- a/test/functional/rpc_blockchain.py +++ b/test/functional/rpc_blockchain.py @@ -136,6 +136,7 @@ def _test_getblockchaininfo(self): 'fortcanningpark': {'type': 'buried', 'active': False, 'height': 10000000}, 'fortcanninghill': {'type': 'buried', 'active': False, 'height': 10000000}, 'fortcanningroad': {'type': 'buried', 'active': False, 'height': 10000000}, + 'fortcanningspicegarden': {'type': 'buried', 'active': False, 'height': 10000000}, 'greatworld': {'type': 'buried', 'active': False, 'height': 10000000}, 'testdummy': { 'type': 'bip9',