Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 5)
define(_CLIENT_VERSION_MINOR, 6)
define(_CLIENT_VERSION_REVISION, 99)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_MAJOR, 6)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 1)
define(_CLIENT_VERSION_RC, 0)
define(_CLIENT_VERSION_IS_RELEASE, false)
define(_COPYRIGHT_YEAR, 2024)
Expand Down
20 changes: 10 additions & 10 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ class CMainParams : public CChainParams
};

/**
* Testnet (v5)
* Testnet (v6)
*/
class CTestNetParams : public CChainParams
{
Expand Down Expand Up @@ -411,7 +411,7 @@ class CTestNetParams : public CChainParams
consensus.nMaxProposalPayments = 20;

// spork keys
consensus.strSporkPubKey = "04677c34726c491117265f4b1c83cef085684f36c8df5a97a3a42fc499316d0c4e63959c9eca0dba239d9aaaf72011afffeb3ef9f51b9017811dec686e412eb504";
consensus.strSporkPubKey = "04e2a70ef650b9c47f3966c72678ae12d3933b1e0ba49f761429568c71e075996fa64b133ec74ea91761b29ebc8cb2be8f717c827c1516ddb6af0f54de74d6f450";
consensus.strSporkPubKeyOld = "04E88BB455E2A04E65FCC41D88CD367E9CCE1F5A409BE94D8C2B4B35D223DED9C8E2F4E061349BA3A38839282508066B6DC4DB72DD432AC4067991E6BF20176127";
consensus.nTime_EnforceNewSporkKey = 1608512400; //!> December 21, 2020 01:00:00 AM GMT
consensus.nTime_RejectOldSporkKey = 1614560400; //!> March 1, 2021 01:00:00 AM GMT
Expand Down Expand Up @@ -450,12 +450,11 @@ class CTestNetParams : public CChainParams
consensus.vUpgrades[Consensus::UPGRADE_V3_4].nActivationHeight = 201;
consensus.vUpgrades[Consensus::UPGRADE_V4_0].nActivationHeight = 201;
consensus.vUpgrades[Consensus::UPGRADE_V5_0].nActivationHeight = 201;
consensus.vUpgrades[Consensus::UPGRADE_V5_2].nActivationHeight = 262525;
consensus.vUpgrades[Consensus::UPGRADE_V5_3].nActivationHeight = 332300;
consensus.vUpgrades[Consensus::UPGRADE_V5_5].nActivationHeight = 925056;
consensus.vUpgrades[Consensus::UPGRADE_V5_6].nActivationHeight = 1624280; // Estimate Feb 23 Midnight UTC
consensus.vUpgrades[Consensus::UPGRADE_V6_0].nActivationHeight =
Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT;
consensus.vUpgrades[Consensus::UPGRADE_V5_2].nActivationHeight = 201;
consensus.vUpgrades[Consensus::UPGRADE_V5_3].nActivationHeight = 201;
consensus.vUpgrades[Consensus::UPGRADE_V5_5].nActivationHeight = 201;
consensus.vUpgrades[Consensus::UPGRADE_V5_6].nActivationHeight = 201;
consensus.vUpgrades[Consensus::UPGRADE_V6_0].nActivationHeight = 49400;

/**
* The message start string is designed to be unlikely to occur in normal data.
Expand All @@ -469,8 +468,9 @@ class CTestNetParams : public CChainParams
nDefaultPort = 51474;

// nodes with support for servicebits filtering should be at the top
vSeeds.emplace_back("pivx-testnet.seed.fuzzbawls.pw", true);
vSeeds.emplace_back("pivx-testnet.seed2.fuzzbawls.pw", true);
vSeeds.emplace_back("seed.testnet.pivx.ninja", true);
//vSeeds.emplace_back("pivx-testnet.seed.fuzzbawls.pw", true);
//vSeeds.emplace_back("pivx-testnet.seed2.fuzzbawls.pw", true);

base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1, 139); // Testnet pivx addresses start with 'x' or 'y'
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1, 19); // Testnet pivx script addresses start with '8' or '9'
Expand Down
2 changes: 1 addition & 1 deletion src/chainparamsbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ std::unique_ptr<CBaseChainParams> CreateBaseChainParams(const std::string& chain
if (chain == CBaseChainParams::MAIN)
return std::make_unique<CBaseChainParams>("", 51473);
else if (chain == CBaseChainParams::TESTNET)
return std::make_unique<CBaseChainParams>("testnet5", 51475);
return std::make_unique<CBaseChainParams>("testnet6", 51475);
else if (chain == CBaseChainParams::REGTEST)
return std::make_unique<CBaseChainParams>("regtest", 51477);
else
Expand Down
4 changes: 3 additions & 1 deletion src/evo/deterministicmns.h
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,9 @@ class CDeterministicMNList
void DeleteUniqueProperty(const CDeterministicMNCPtr& dmn, const T& oldValue)
{
static const T nullValue;
assert(oldValue != nullValue);
if (oldValue == nullValue) {
return;
}

auto oldHash = ::SerializeHash(oldValue, SER_GETHASH, PROTOCOL_VERSION | ADDRV2_FORMAT);
auto p = mnUniquePropertyMap.find(oldHash);
Expand Down
5 changes: 3 additions & 2 deletions src/masternode-sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,9 @@ void CMasternodeSync::Process()
// Check if we lost all masternodes (except the local one in case the node is a MN)
// from sleep/wake or failure to sync originally (after spork 21, check if we lost
// all proposals instead). If we did, resync from scratch.
if ((!legacy_obsolete && mnodeman.CountEnabled(true /* only_legacy */) <= 1) ||
(legacy_obsolete && g_budgetman.CountProposals() == 0)) {
if ((!legacy_obsolete && mnodeman.CountEnabled(true /* only_legacy */) <= 1)
/* leads to an infinite loop if network has no proposals and legacy mns are obsolete
|| (legacy_obsolete && g_budgetman.CountProposals() == 0)*/) {
Reset();
} else {
return;
Expand Down
10 changes: 10 additions & 0 deletions src/rpc/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ static const CRPCConvertParam vRPCConvertParams[] = {
{ "preparebudget", 3, "start" },
{ "preparebudget", 5, "montly_payment" },
{ "prioritisetransaction", 1, "fee_delta" },
{ "protx_list", 0, "detailed" },
{ "protx_list", 1, "wallet_only" },
{ "protx_list", 2, "valid_only" },
{ "protx_list", 3, "height" },
{ "protx_register", 1, "collateralIndex" },
{ "protx_register", 7, "operatorReward" },
{ "protx_register_fund", 6, "operatorReward" },
{ "protx_register_prepare", 1, "collateralIndex" },
{ "protx_register_prepare", 7, "operatorReward" },
{ "protx_revoke", 2, "reason" },
{ "quorumdkgsimerror", 1, "rate" },
{ "quorumdkgstatus", 0, "detail_level" },
{ "listquorums", 0, "count" },
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/masternode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ void SerializeMNB(UniValue& statusObjRet, const CMasternodeBroadcast& mnb, const
UniValue startmasternode(const JSONRPCRequest& request)
{
// Skip after legacy obsolete. !TODO: remove when transition to DMN is complete
if (deterministicMNManager->LegacyMNObsolete()) {
if (!request.fHelp && deterministicMNManager->LegacyMNObsolete()) {
throw JSONRPCError(RPC_MISC_ERROR, "startmasternode is not supported when deterministic masternode list is active (DIP3)");
}

Expand Down
23 changes: 10 additions & 13 deletions src/tiertwo/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,23 +236,20 @@ bool InitActiveMN()
LogPrintf("IS %s MASTERNODE\n", (fDeterministic ? "DETERMINISTIC " : ""));

if (fDeterministic) {
// Check enforcement
if (!deterministicMNManager->IsDIP3Enforced()) {
const std::string strError = strprintf(
_("Cannot start deterministic masternode before enforcement. Remove %s to start as legacy masternode"),
"-mnoperatorprivatekey");
LogPrintf("-- ERROR: %s\n", strError);
return UIError(strError);
}
// Create and register activeMasternodeManager
activeMasternodeManager = new CActiveDeterministicMasternodeManager();
RegisterValidationInterface(activeMasternodeManager);
auto res = activeMasternodeManager->SetOperatorKey(mnoperatorkeyStr);
if (!res) { return UIError(res.getError()); }
// Init active masternode
const CBlockIndex* pindexTip = WITH_LOCK(cs_main, return chainActive.Tip(););
activeMasternodeManager->Init(pindexTip);
if (activeMasternodeManager->GetState() == CActiveDeterministicMasternodeManager::MASTERNODE_ERROR) {
return UIError(activeMasternodeManager->GetStatus()); // state logged internally
// Init active masternode if DIP3 is enforced
if (deterministicMNManager->IsDIP3Enforced()) {
const CBlockIndex* pindexTip = WITH_LOCK(cs_main, return chainActive.Tip(););
activeMasternodeManager->Init(pindexTip);
if (activeMasternodeManager->GetState() == CActiveDeterministicMasternodeManager::MASTERNODE_ERROR) {
return UIError(activeMasternodeManager->GetStatus()); // state logged internally
}
} else {
LogPrintf("%s: Evo upgrade is not active yet. Active masternode manager initialized in waiting state.\n", __func__);
}
} else {
// Check enforcement
Expand Down
10 changes: 5 additions & 5 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4221,13 +4221,13 @@ void static CheckBlockIndex()
// it was the one which was commented out
int ActiveProtocol()
{
// SPORK_14 is used for 70926 (v5.5.0), commented out now.
//if (sporkManager.IsSporkActive(SPORK_14_NEW_PROTOCOL_ENFORCEMENT))
// return MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT;
// SPORK_14 is used for 70928 (v6.0.0.1), commented out now.
if (sporkManager.IsSporkActive(SPORK_14_NEW_PROTOCOL_ENFORCEMENT))
return MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT;

// SPORK_15 is used for 70927 (v5.6.0), commented out now.
if (sporkManager.IsSporkActive(SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2))
return MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT;
//if (sporkManager.IsSporkActive(SPORK_15_NEW_PROTOCOL_ENFORCEMENT_2))
// return MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT;

return MIN_PEER_PROTO_VERSION_BEFORE_ENFORCEMENT;
}
Expand Down
4 changes: 2 additions & 2 deletions src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ static const int PROTOCOL_VERSION = 70928;
static const int INIT_PROTO_VERSION = 209;

//! disconnect from peers older than this proto version
static const int MIN_PEER_PROTO_VERSION_BEFORE_ENFORCEMENT = 70926;
static const int MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT = 70927;
static const int MIN_PEER_PROTO_VERSION_BEFORE_ENFORCEMENT = 70927;
static const int MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT = 70928;

//! Version where BIP155 was introduced
static const int MIN_BIP155_PROTOCOL_VERSION = 70923;
Expand Down
Loading