diff --git a/Stealth.pro b/Stealth.pro index 4a2eb93..996fb81 100644 --- a/Stealth.pro +++ b/Stealth.pro @@ -18,7 +18,7 @@ win32 { TEMPLATE = app TARGET = "Stealth Qt" -VERSION = 3.1.7.0 +VERSION = 3.1.7.5 INCLUDEPATH += src src/json src/qt src/tor INCLUDEPATH += src/tor/adapter src/tor/common src/tor/ext INCLUDEPATH += src/tor/ext/curve25519_donna src/tor/ext/ed25519/donna diff --git a/contrib/macdeploy/Info-daemon.plist b/contrib/macdeploy/Info-daemon.plist index 88ab04d..834fb08 100644 --- a/contrib/macdeploy/Info-daemon.plist +++ b/contrib/macdeploy/Info-daemon.plist @@ -7,15 +7,15 @@ CFBundleDevelopmentRegion English CFBundleGetInfoString - Stealth [XST] Complete Anonymity 3.1.7.0 + Stealth [XST] Complete Anonymity 3.1.7.5 CFBundleIdentifier org.stealth.stealth-qt CFBundleShortVersionString - 3.1.7.0 + 3.1.7.5 CFBundleSignature oXST CFBundleVersion - 3.1.7.0 + 3.1.7.5 CFBundleName StealthCoind diff --git a/contrib/macdeploy/Info.plist b/contrib/macdeploy/Info.plist index 9d4a87c..e32ecee 100644 --- a/contrib/macdeploy/Info.plist +++ b/contrib/macdeploy/Info.plist @@ -9,16 +9,16 @@ CFBundlePackageType APPL CFBundleGetInfoString - Stealth [XST] Complete Anonymity 3.1.7.0 + Stealth [XST] Complete Anonymity 3.1.7.5 CFBundleExecutable Stealth Qt CFBundleIdentifier org.stealth.stealth-qt CFBundleShortVersionString - 3.1.7.0 + 3.1.7.5 CFBundleSignature oXST CFBundleVersion - 3.1.7.0 + 3.1.7.5 diff --git a/src/blockchain/chainparams.cpp b/src/blockchain/chainparams.cpp index ca93ae6..008c6db 100644 --- a/src/blockchain/chainparams.cpp +++ b/src/blockchain/chainparams.cpp @@ -62,6 +62,7 @@ ChainParams::ChainParams() ( XST_FORKFEELESS, 63800 ) ( XST_FORKMISSFIX, 63800 ) ( XST_FORKREINSTATE, 63900 ) + ( XST_FORKMISSFIX2, 64000 ) ( XST_FORKFEELESS2, 64000 ) ); @@ -75,6 +76,7 @@ ChainParams::ChainParams() START_FEELESS_M = 3702300; // start of feeless transactions START_MISSFIX_M = 3719600; // allow network stalls on transition to qPoS REINSTATE_M = 3776758; // reinstate disqualified stakers + START_MISSFIX2_M = 5572400; // fixing staker misses after chain halting START_FEELESS2_M = 5798888; // require feeless inputs to be confirmed mapForksMainNet = MakeMapIntInt( @@ -94,6 +96,7 @@ ChainParams::ChainParams() /* Jun 2 14:12:17 MST 2021 */ ( START_FEELESS_M, XST_FORKFEELESS ) /* Jun 3 15:45:07 MST 2021 */ ( START_MISSFIX_M, XST_FORKMISSFIX ) /* Jun 6 23:49:52 MST 2021 */ ( REINSTATE_M, XST_FORKREINSTATE ) + /* Approx 10/01 2021 1AM MST */ ( START_MISSFIX2_M, XST_FORKMISSFIX2 ) /* Approx 10/13 2021 6AM MST */ ( START_FEELESS2_M, XST_FORKFEELESS2 ) ); @@ -445,6 +448,7 @@ ChainParams::ChainParams() START_FEELESS_T = 3965963; START_MISSFIX_T = 4768119; REINSTATE_T = 99999999; // placeholder for testnet + START_MISSFIX2_T = 99999999; // placeholder for testnet START_FEELESS2_T = 99999999; // placeholder for testnet // should be similar to aryForksMainNet @@ -465,6 +469,7 @@ ChainParams::ChainParams() /* */ ( START_FEELESS_T, XST_FORKFEELESS ) /* */ ( START_MISSFIX_T, XST_FORKMISSFIX ) /* */ ( REINSTATE_T, XST_FORKREINSTATE ) + /* */ ( START_MISSFIX2_T, XST_FORKMISSFIX2 ) /* */ ( START_FEELESS2_T, XST_FORKFEELESS2 ) ); diff --git a/src/blockchain/chainparams.hpp b/src/blockchain/chainparams.hpp index 58183a2..6aa2678 100644 --- a/src/blockchain/chainparams.hpp +++ b/src/blockchain/chainparams.hpp @@ -66,6 +66,7 @@ class ChainParams int START_FEELESS_M; int START_MISSFIX_M; int REINSTATE_M; + int START_MISSFIX2_M; int START_FEELESS2_M; mapIntInt_t mapForksMainNet; @@ -249,6 +250,7 @@ class ChainParams int START_FEELESS_T; int START_MISSFIX_T; int REINSTATE_T; + int START_MISSFIX2_T; int START_FEELESS2_T; mapIntInt_t mapForksTestNet; diff --git a/src/client/clientversion.h b/src/client/clientversion.h index 9e906bf..dc97794 100644 --- a/src/client/clientversion.h +++ b/src/client/clientversion.h @@ -9,7 +9,7 @@ #define CLIENT_VERSION_MAJOR 3 #define CLIENT_VERSION_MINOR 1 #define CLIENT_VERSION_REVISION 7 -#define CLIENT_VERSION_BUILD 0 +#define CLIENT_VERSION_BUILD 5 // cloners: add your new forks higher than highest here // keep existing @@ -30,7 +30,8 @@ enum ForkNumbers XST_FORKFEELESS, // fork 10 XST_FORKMISSFIX, // fork 11 XST_FORKREINSTATE, // fork 12 - XST_FORKFEELESS2, // fork 13 + XST_FORKMISSFIX2, // fork 13 + XST_FORKFEELESS2, // fork 14 TOTAL_FORKS }; @@ -41,8 +42,10 @@ static const int CLIENT_PROTOCOL_VERSION = 64000; // proto version notes // ----- ------- ---------------------------------------------------------- -// 64000 : fork 13 : XST_FORKFEELESS2 -// 3.1.7.0 : Enforcing that feeless inputs are confirmed +// 64000 : fork 14 : XST_FORKFEELESS2 +// 64000 : fork 13 : XST_FORKMISSFIX2 +// : 3.1.7.5 : Fixing staker misses after chain halting +// : 3.1.7.0 : Enforcing that feeless inputs are confirmed // 63900 : fork 12 : XST_FORKREINSTATE // 3.1.6.7 : Improving feeless priority calculation, fixed gettxvolume // 3.1.6.6 : Fixing ungraceful overflow in feework diff calculation diff --git a/src/qpos/QPRegistry.cpp b/src/qpos/QPRegistry.cpp index 098cc19..59d1f3e 100644 --- a/src/qpos/QPRegistry.cpp +++ b/src/qpos/QPRegistry.cpp @@ -1563,7 +1563,13 @@ bool QPRegistry::UpdateOnNewTime(unsigned int nTime, { if (!fCurrentBlockWasProduced) { - if (nFork >= XST_FORKQPOS) + // After FORKFEELESS2, don't dock stakers for blocks + // after the first new queue here because by the 2nd + // queue there has already been a complete queue + // without a block and this could only mean that the + // chain had halted. + if ((nFork >= XST_FORKQPOS) && + ((nFork < XST_FORKFEELESS2) || (nNewQueues <= 1))) { StakerMissedBlock(queue.GetCurrentID(), nHeight); } @@ -1629,22 +1635,35 @@ bool QPRegistry::UpdateOnNewBlock(const CBlockIndex *const pindex, int nFork = GetFork(pindex->nHeight); - // Unfortunately, a line that disqualified stakers accidentally - // remained in a previous commit, so now we have to undo the damage. - if ((GetFork(nBlockHeight) < XST_FORKREINSTATE) && - (nFork >= XST_FORKREINSTATE)) + if (GetFork(nBlockHeight) < XST_FORKMISSFIX2) { - QPRegistryIterator iter; - for (iter = mapStakers.begin(); iter != mapStakers.end(); ++iter) + // Chain halting destroyed missed and docked block stats, so + // give everyone a fresh start on docked blocks. + if (nFork >= XST_FORKMISSFIX2) { - QPStaker& staker = iter->second; - if (staker.IsDisqualified()) + QPRegistryIterator iter; + for (iter = mapStakers.begin(); iter != mapStakers.end(); ++iter) { - staker.Requalify(true); + iter->second.ResetDocked(); } - staker.ResetDocked(); } - } + // Unfortunately, a line that disqualified stakers accidentally + // remained in a previous commit, so now we have to undo the damage. + else if ((GetFork(nBlockHeight) < XST_FORKREINSTATE) && + (nFork >= XST_FORKREINSTATE)) + { + QPRegistryIterator iter; + for (iter = mapStakers.begin(); iter != mapStakers.end(); ++iter) + { + QPStaker& staker = iter->second; + if (staker.IsDisqualified()) + { + staker.Requalify(true); + } + staker.ResetDocked(); + } + } + } // Q: Why do we update on new time before updating the registry // for the new block?