diff --git a/configure.ac b/configure.ac index cb8d96a9..21a8f8fd 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 1) define(_CLIENT_VERSION_MINOR, 3) -define(_CLIENT_VERSION_REVISION, 2) +define(_CLIENT_VERSION_REVISION, 3) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2020) diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index 8fe838ed..b9d2c3bf 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -1,5 +1,5 @@ --- -name: "smartcash-linux-1.3.2" +name: "smartcash-linux-1.3.3" enable_cache: true suites: - "trusty" diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml index 8bcf25f6..8167e7c7 100644 --- a/contrib/gitian-descriptors/gitian-osx.yml +++ b/contrib/gitian-descriptors/gitian-osx.yml @@ -1,5 +1,5 @@ --- -name: "smartcash-osx-1.3.2" +name: "smartcash-osx-1.3.3" enable_cache: true suites: - "trusty" diff --git a/contrib/gitian-descriptors/gitian-rpi.yml b/contrib/gitian-descriptors/gitian-rpi.yml index cecbf152..80c17624 100644 --- a/contrib/gitian-descriptors/gitian-rpi.yml +++ b/contrib/gitian-descriptors/gitian-rpi.yml @@ -1,5 +1,5 @@ --- -name: "smartcash-rpi-1.3.1" +name: "smartcash-rpi-1.3.3" enable_cache: true suites: - "trusty" diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml index 6a29174d..29ae53ee 100644 --- a/contrib/gitian-descriptors/gitian-win.yml +++ b/contrib/gitian-descriptors/gitian-win.yml @@ -1,5 +1,5 @@ --- -name: "smartcash-win-1.3.2" +name: "smartcash-win-1.3.3" enable_cache: true suites: - "trusty" diff --git a/src/chainparams.cpp b/src/chainparams.cpp index a03868f5..cfe888a7 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -104,10 +104,10 @@ class CMainParams : public CChainParams { consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1510704000; // November 15th, 2017. // The best chain should have at least this much work. - consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000004c9f08a418c8643752"); + consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000004cf8b731421c64f500"); // By default assume that the signatures in ancestors of this block are valid. - consensus.defaultAssumeValid = uint256S("0x00000000000031b508294533c338d33961685b2cea7409db7466fe519bfadb45"); // 1784380 + consensus.defaultAssumeValid = uint256S("0x000000000000413fe282ddefc3a73689d6fab91e1b3ec70e873070b2a0fd83df"); // 1795520 // smartnode params consensus.nSmartnodePaymentsStartBlock = HF_V1_1_SMARTNODE_HEIGHT; // not true, but it's ok as long as it's less then nSmartnodePaymentsIncreaseBlock @@ -222,9 +222,10 @@ class CMainParams : public CChainParams { ( 1500000, uint256S("0x0000000000001e396ce1ea9dfde2956fef0f606a5d6cbbcb1a5ba6e1081eadf5")) ( 1599000, uint256S("0x00000000000024edb61519ed6ebdf085f5dd25a0963103dc108b68e5f88604f3")) ( 1725000, uint256S("0x0000000000002916acfe2598244cb207cd094e83c170cb5627868c522f3a0d03")) - ( 1763000, uint256S("0x000000000000029c03b91dea261d213bdece8428a4cf73cffd11b6c237e41379")), - 1598177270, // * UNIX timestamp of last checkpoint block - 13477920, // * total number of transactions between genesis and last checkpoint + ( 1763000, uint256S("0x000000000000029c03b91dea261d213bdece8428a4cf73cffd11b6c237e41379")) + ( 1795000, uint256S("0x00000000000000d87d14d7615cb56d92fe58a7c8515af977a9d540d1adb5cceb")), + 1599945921, // * UNIX timestamp of last checkpoint block + 13686967, // * total number of transactions between genesis and last checkpoint // (the tx=... number in the SetBestChain debug.log lines) 2000.0 // * estimated number of transactions per day after checkpoint }; diff --git a/src/clientversion.h b/src/clientversion.h index f7c40f3d..3d67195f 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -17,7 +17,7 @@ //! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 1 #define CLIENT_VERSION_MINOR 3 -#define CLIENT_VERSION_REVISION 2 +#define CLIENT_VERSION_REVISION 3 #define CLIENT_VERSION_BUILD 0 //! Set to true for release, false for prerelease or test build diff --git a/src/init.cpp b/src/init.cpp index 4e36dfe7..49eee183 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -42,6 +42,7 @@ #include "utilmoneystr.h" #include "utilstrencodings.h" #include "validationinterface.h" +#include "version.h" #include "warnings.h" #ifdef ENABLE_WALLET #include "wallet/db.h" @@ -488,6 +489,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-maxreceivebuffer=", strprintf(_("Maximum per-connection receive buffer, *1000 bytes (default: %u)"), DEFAULT_MAXRECEIVEBUFFER)); strUsage += HelpMessageOpt("-maxsendbuffer=", strprintf(_("Maximum per-connection send buffer, *1000 bytes (default: %u)"), DEFAULT_MAXSENDBUFFER)); strUsage += HelpMessageOpt("-maxtimeadjustment", strprintf(_("Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)"), DEFAULT_MAX_TIME_ADJUSTMENT)); + strUsage += HelpMessageOpt("-minpeerprotocol=", strprintf(_("Minimimum protocol to connect (default: %u)"), MIN_PEER_PROTO_VERSION)); strUsage += HelpMessageOpt("-onion=", strprintf(_("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)"), "-proxy")); strUsage += HelpMessageOpt("-onlynet=", _("Only connect to nodes in network (ipv4, ipv6 or onion)")); strUsage += HelpMessageOpt("-permitbaremultisig", strprintf(_("Relay non-P2SH multisig (default: %u)"), DEFAULT_PERMIT_BAREMULTISIG)); @@ -1104,6 +1106,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) } #endif } + static const int MIN_PEER_PROTO_VERSION = GetArg("-minpeerprotocol", MIN_PEER_PROTO_VERSION); // Make sure enough file descriptors are available int nBind = std::max((int)mapArgs.count("-bind") + (int)mapArgs.count("-whitebind"), 1); diff --git a/src/smartrewards/rewards.cpp b/src/smartrewards/rewards.cpp index 990cb642..a801713b 100644 --- a/src/smartrewards/rewards.cpp +++ b/src/smartrewards/rewards.cpp @@ -107,42 +107,13 @@ void CSmartRewards::UpdateRoundPayoutParameter() AssertLockHeld(cs_rewardscache); const CSmartRewardRound* round = cache.GetCurrentRound(); - int64_t nBlockPayees = round->nBlockPayees, nBlockInterval; - - int64_t nPayeeCount = round->eligibleEntries - round->disqualifiedEntries; + int64_t nBlockPayees = Params().GetConsensus().nRewardsPayouts_1_3_BlockPayees; + int64_t nBlockInterval = Params().GetConsensus().nRewardsPayouts_1_3_BlockStretch / 20; int nFirst_1_3_Round = Params().GetConsensus().nRewardsFirst_1_3_Round; - if ( round->number < nFirst_1_3_Round ) { + if ( round->number < (nFirst_1_3_Round + 3) ) { nBlockPayees = Params().GetConsensus().nRewardsPayouts_1_2_BlockPayees; nBlockInterval = Params().GetConsensus().nRewardsPayouts_1_2_BlockInterval; - } else if ( nPayeeCount ) { - int64_t nBlockStretch = Params().GetConsensus().nRewardsPayouts_1_3_BlockStretch; - int64_t nBlocksPerRound = Params().GetConsensus().nRewardsBlocksPerRound_1_3; - int64_t nTempBlockPayees = Params().GetConsensus().nRewardsPayouts_1_3_BlockPayees; - - nBlockPayees = std::max(nTempBlockPayees, (nPayeeCount / nBlockStretch * nTempBlockPayees) + 1); - - if (nPayeeCount > nBlockPayees) { - int64_t nStartDelayBlocks = Params().GetConsensus().nRewardsPayoutStartDelay; - int64_t nBlocksTarget = nStartDelayBlocks + nBlocksPerRound; - nBlockInterval = ((nBlockStretch * nBlockPayees) / nPayeeCount) + 1; - int64_t nStretchedLength = nPayeeCount / nBlockPayees * (nBlockInterval); - - if (nStretchedLength > nBlocksTarget) { - nBlockInterval--; - } else if (nStretchedLength < nBlockStretch) { - nBlockInterval++; - } - - } else { - // If its only one block to pay - nBlockInterval = 1; - } - - } else { - // If there are no eligible smartreward entries - nBlockPayees = 0; - nBlockInterval = 0; } cache.UpdateRoundPayoutParameter(nBlockPayees, nBlockInterval); diff --git a/src/smartrewards/rewardspayments.cpp b/src/smartrewards/rewardspayments.cpp index f0ec18dc..82fe0962 100644 --- a/src/smartrewards/rewardspayments.cpp +++ b/src/smartrewards/rewardspayments.cpp @@ -140,7 +140,6 @@ SmartRewardPayments::Result SmartRewardPayments::Validate(const CBlock& block, i return SmartRewardPayments::Valid; } - LOCK(cs_rewardscache); SmartRewardPayments::Result result; diff --git a/src/util.cpp b/src/util.cpp index 84f5c7db..d560353c 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -109,7 +109,7 @@ int nWalletBackups = 10; const char * const BITCOIN_CONF_FILENAME = "smartcash.conf"; const char * const BITCOIN_PID_FILENAME = "smartcashd.pid"; -const std::vector args = {"version", "alertnotify", "blocknotify", "blocksonly", "checkblocks", "checklevel", "conf", "daemon", "datadir", "dbcache", "feefilter", "loadblock", "maxorphantx", "maxmempool", "mempoolexpiry", "par", "pid", "prune", "reindex-chainstate", "reindex", "sysperms", "depositindex", "addnode", "banscore", "bantime", "bind", "connect", "discover", "dns", "dnsseed", "externalip", "forcednsseed", "listen", "listenonion", "maxconnections", "maxreceivebuffer", "maxsendbuffer", "maxtimeadjustment", "onion", "onlynet", "permitbaremultisig", "peerbloomfilters", "port", "proxy", "proxyrandomize", "rpcserialversion", "seednode", "timeout", "torcontrol", "torpassword", "upnp", "whitebind", "whitelist", "whitelistrelay", "whitelistforcerelay", "maxuploadtarget", "zmqpubhashblock", "zmqpubhashtx", "zmqpubrawblock", "zmqpubrawtx", "uacomment", "checkblockindex", "checkmempool", "checkpoints", "disablesafemode", "testsafemode", "dropmessagestest", "fuzzmessagestest", "stopafterblockimport", "limitancestorcount", "limitancestorsize", "limitdescendantcount", "limitdescendantsize", "bip9params", "debug", "nodebug", "help-debug", "logips", "logtimestamps", "logtimemicros", "mocktime", "limitfreerelay", "relaypriority", "maxsigcachesize", "maxtipage", "minrelaytxfee", "maxtxfee", "printtoconsole", "printpriority", "shrinkdebugfile", "acceptnonstdtxn", "bytespersigop", "datacarrier", "datacarriersize", "mempoolreplacement", "blockmaxweight", "blockmaxsize", "txmaxcount", "blockprioritysize", "blockversion", "server", "rest", "rpcbind", "rpccookiefile", "rpcuser", "rpcpassword", "rpcauth", "rpcport", "rpcallowip", "rpcthreads", "rpcworkqueue", "rpcservertimeout", "help", "?", "disablewallet", "keypool", "fallbackfee", "mintxfee", "paytxfee", "rescan", "salvagewallet", "sendfreetransactions", "spendzeroconfchange", "txconfirmtarget", "usehd", "upgradewallet", "wallet", "walletbroadcast", "walletnotify", "zapwallettxes", "dblogsize", "flushwallet", "privdb", "walletrejectlongchains", "testnet", "usenewaddressformat", "sapi", "sapiport", "sapithreads", "sapiworkqueue", "sapiservertimeout", "sapiwhitelist"}; +const std::vector args = {"version", "alertnotify", "blocknotify", "blocksonly", "checkblocks", "checklevel", "conf", "daemon", "datadir", "dbcache", "feefilter", "loadblock", "maxorphantx", "maxmempool", "mempoolexpiry", "par", "pid", "prune", "reindex-chainstate", "reindex", "sysperms", "depositindex", "addnode", "banscore", "bantime", "bind", "connect", "discover", "dns", "dnsseed", "externalip", "forcednsseed", "listen", "listenonion", "maxconnections", "maxreceivebuffer", "maxsendbuffer", "maxtimeadjustment", "minpeerprotocol", "onion", "onlynet", "permitbaremultisig", "peerbloomfilters", "port", "proxy", "proxyrandomize", "rpcserialversion", "seednode", "timeout", "torcontrol", "torpassword", "upnp", "whitebind", "whitelist", "whitelistrelay", "whitelistforcerelay", "maxuploadtarget", "zmqpubhashblock", "zmqpubhashtx", "zmqpubrawblock", "zmqpubrawtx", "uacomment", "checkblockindex", "checkmempool", "checkpoints", "disablesafemode", "testsafemode", "dropmessagestest", "fuzzmessagestest", "stopafterblockimport", "limitancestorcount", "limitancestorsize", "limitdescendantcount", "limitdescendantsize", "bip9params", "debug", "nodebug", "help-debug", "logips", "logtimestamps", "logtimemicros", "mocktime", "limitfreerelay", "relaypriority", "maxsigcachesize", "maxtipage", "minrelaytxfee", "maxtxfee", "printtoconsole", "printpriority", "shrinkdebugfile", "acceptnonstdtxn", "bytespersigop", "datacarrier", "datacarriersize", "mempoolreplacement", "blockmaxweight", "blockmaxsize", "txmaxcount", "blockprioritysize", "blockversion", "server", "rest", "rpcbind", "rpccookiefile", "rpcuser", "rpcpassword", "rpcauth", "rpcport", "rpcallowip", "rpcthreads", "rpcworkqueue", "rpcservertimeout", "help", "?", "disablewallet", "keypool", "fallbackfee", "mintxfee", "paytxfee", "rescan", "salvagewallet", "sendfreetransactions", "spendzeroconfchange", "txconfirmtarget", "usehd", "upgradewallet", "wallet", "walletbroadcast", "walletnotify", "zapwallettxes", "dblogsize", "flushwallet", "privdb", "walletrejectlongchains", "testnet", "usenewaddressformat", "sapi", "sapiport", "sapithreads", "sapiworkqueue", "sapiservertimeout", "sapiwhitelist"}; map mapArgs; map > mapMultiArgs;