diff --git a/CHANGELOG.md b/CHANGELOG.md index 364d355b7..bf4b5980f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,13 @@ # Changelog +## v2.13.2.7 (2020-11-24) +- Dust mitigation in mempool (by JJ12880 from Radium Core) +- Compile on MacOS Catalina +- Cross-compile MacOS with Xcode 11.3.1 +- Updated dependencies for Win64, Linux64, MacOS, arm64, armv7 +- Sign/Verify compatibility with Legacy clients +- Disable Stake Cache (for now) +- Changed dbcache to 450MB (for txindex) +- Updated fix seeds for main and testnet. ## v2.13.2.6 (2020-07-21) - Fix staking memory leak (by JJ12880 from Radium Core) diff --git a/configure.ac b/configure.ac index d03c58389..6b3ce6078 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 2) define(_CLIENT_VERSION_MINOR, 13) define(_CLIENT_VERSION_REVISION, 2) -define(_CLIENT_VERSION_BUILD, 6) +define(_CLIENT_VERSION_BUILD, 7) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2020) define(_COPYRIGHT_HOLDERS,[The %s developers]) diff --git a/doc/Doxyfile b/doc/Doxyfile index 9daac3335..3d1a45061 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -34,7 +34,7 @@ PROJECT_NAME = "Blackcoin More" # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.13.2.6 +PROJECT_NUMBER = 2.13.2.7 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 1a1129f25..d6a8999ae 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -121,7 +121,7 @@ public: consensus.nStakeMinAge = 8 * 60 * 60; // 8 hours // The best chain should have at least this much work. - consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000002bcbdc747da2aad51b7"); + consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000002e39410b632f6e755fc"); /** * The message start string is designed to be unlikely to occur in normal data. @@ -220,7 +220,7 @@ public: nDefaultPort = 25714; // The best chain should have at least this much work. - consensus.nMinimumChainWork = uint256S("0x00"); + consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000027eceae4ce45300bf6"); /* consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0; diff --git a/src/clientversion.h b/src/clientversion.h index 9f51dd6c5..10a8a57a1 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -17,7 +17,7 @@ #define CLIENT_VERSION_MAJOR 2 #define CLIENT_VERSION_MINOR 13 #define CLIENT_VERSION_REVISION 2 -#define CLIENT_VERSION_BUILD 6 +#define CLIENT_VERSION_BUILD 7 //! Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true diff --git a/src/main.cpp b/src/main.cpp index acd05f3d7..cd785724c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1240,6 +1240,17 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C AssertLockHeld(cs_main); if (pfMissingInputs) *pfMissingInputs = false; + int dust_tx_count = 0; + CAmount min_dust = 100000; + + BOOST_FOREACH (const CTxOut& txout, tx.vout) { + // LogPrintf("tx_out value %d, minimum value %d dust count %d", txout.nValue, min_dust, dust_tx_count); + if (txout.nValue < min_dust) + dust_tx_count = dust_tx_count + 1; + if (dust_tx_count > 10) + return state.DoS(0, false, REJECT_DUST, "too many dust vouts"); + + } if (!CheckTransaction(tx, state)) return false; // state filled in by CheckTransaction diff --git a/src/txdb.h b/src/txdb.h index e09cb4d40..2b2316e7f 100644 --- a/src/txdb.h +++ b/src/txdb.h @@ -22,7 +22,7 @@ class CCoinsViewDBCursor; class uint256; //! -dbcache default (MiB) -static const int64_t nDefaultDbCache = 100; +static const int64_t nDefaultDbCache = 450; //! max. -dbcache (MiB) static const int64_t nMaxDbCache = sizeof(void*) > 4 ? 16384 : 1024; //! min. -dbcache (MiB) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 4a04b2e4b..6da25b886 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -806,7 +806,7 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int && pcoin.first->GetHash() != txNew.vin[0].prevout.hash) { // Stop adding more inputs if already too many inputs - if (txNew.vin.size() >= 100) + if (txNew.vin.size() >= 10) break; // Stop adding inputs if reached reserve limit if (nCredit + pcoin.first->vout[pcoin.second].nValue > nBalance - nReserveBalance) diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 4b5d6f447..4c259c1db 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -43,11 +43,11 @@ extern bool fWalletUnlockStakingOnly; static const unsigned int DEFAULT_KEYPOOL_SIZE = 100; //! -paytxfee default -static const CAmount DEFAULT_TRANSACTION_FEE = 100000; +static const CAmount DEFAULT_TRANSACTION_FEE = 10000; //! -fallbackfee default -static const CAmount DEFAULT_FALLBACK_FEE = 100000; +static const CAmount DEFAULT_FALLBACK_FEE = 10000; //! -mintxfee default -static const CAmount DEFAULT_TRANSACTION_MINFEE = 100000; +static const CAmount DEFAULT_TRANSACTION_MINFEE = 10000; //! minimum change amount static const CAmount MIN_CHANGE = CENT; //! Default for -spendzeroconfchange