diff --git a/configure.ac b/configure.ac index 7ab28b6..61f75c7 100755 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ AC_PREREQ([2.69]) define(_CLIENT_VERSION_MAJOR, 0) define(_CLIENT_VERSION_MINOR, 21) -define(_CLIENT_VERSION_REVISION, 2) +define(_CLIENT_VERSION_REVISION, 3) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_RC, 0) define(_CLIENT_VERSION_IS_RELEASE, true) diff --git a/contrib/gitian-build.py b/contrib/gitian-build.py index ad492af..eb75490 100755 --- a/contrib/gitian-build.py +++ b/contrib/gitian-build.py @@ -247,10 +247,6 @@ def main(): subprocess.check_call(['git', 'checkout', args.commit]) os.chdir(workdir) - os.chdir('gitian-builder') - subprocess.check_call(['git', 'pull']) - os.chdir(workdir) - if args.build: build() diff --git a/src/amount.h b/src/amount.h index e079355..adc88b0 100755 --- a/src/amount.h +++ b/src/amount.h @@ -22,7 +22,7 @@ static const CAmount COIN = 100000000; * critical; in unusual circumstances like a(nother) overflow bug that allowed * for the creation of coins out of thin air modification could lead to a fork. * */ -static const CAmount MAX_MONEY = 86579950 * COIN; +static const CAmount MAX_MONEY = 96000000 * COIN; inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); } #endif // BITCOIN_AMOUNT_H diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 9b07427..4a97260 100755 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -59,11 +59,11 @@ class CMainParams : public CChainParams { consensus.BIP16Exception = uint256S("0x00043e9c6bc54d9bd266c3767a83a7b9da435dd7f84e485a2bf2a869be62f1f3"); consensus.BIP34Height = 17; consensus.BIP34Hash = uint256S("0x001ea0da3586f06aa32de50b9764eec2eaba2274191771ad536092d4f9f90fa9"); - consensus.BIP65Height = 0; // 000000000000000004c2b624ed5d7756c508d90fd0da2c7c679febfa6c4735f0 - consensus.BIP66Height = 0; // 00000000000000000379eaa19dce8c9b722d46ae6a57c2f1a988119488b50931 - consensus.CSVHeight = 0; // 000000000000000004a1b34462cb8aeebd5799177f7a29cf28f2d1961716b5b5 - consensus.SegwitHeight = 0; // 0000000000000000001c8018d9cb3b742ef25114f27563e3fc4a1902167f9893 - consensus.MinBIP9WarningHeight = 0; // segwit activation height + miner confirmation window + consensus.BIP65Height = 1; // 001d498cbcd92d9b36fee933caf1551dd457bf710ec988e033faca697aff6a90 + consensus.BIP66Height = 1; // 001d498cbcd92d9b36fee933caf1551dd457bf710ec988e033faca697aff6a90 + consensus.CSVHeight = 1; // 001d498cbcd92d9b36fee933caf1551dd457bf710ec988e033faca697aff6a90 + consensus.SegwitHeight = 1; // 001d498cbcd92d9b36fee933caf1551dd457bf710ec988e033faca697aff6a90 + consensus.MinBIP9WarningHeight = 2017; // segwit activation height + miner confirmation window consensus.powLimit = uint256S("001fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); consensus.nPowTargetTimespan = 60 * 60; // two weeks consensus.nPowTargetSpacing = 60; @@ -83,8 +83,8 @@ class CMainParams : public CChainParams { consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nTimeout = 1622356007; // Sunday, 30 May 2021 consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].min_activation_height = 0; // No activation delay - consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000000000000015e19c1ad1"); - consensus.defaultAssumeValid = uint256S("0x0000000d7c7c25d0e2a8a8ff4013ae7154ba2d0c0217dc71b942f41af7be990a"); // 606942 + consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000000468939a4a704"); + consensus.defaultAssumeValid = uint256S("0x0000040a3e7b559aea417d3f886c0e8fe69f1f0530800424b9ea739b1f2c8498"); // 939796 /** * The message start string is designed to be unlikely to occur in normal data. @@ -133,14 +133,15 @@ class CMainParams : public CChainParams { {9074, uint256S("0x0000007e1d70d529752b87fe47f979ae5f8f27bbc987dd0c8b21c9c5a6f3099b")}, {12167, uint256S("0x0000006fa4023de2a1d4bd712e7d7aafa15a273f6c78b32bd87185846e0cc903")}, {606942, uint256S("0x0000000d7c7c25d0e2a8a8ff4013ae7154ba2d0c0217dc71b942f41af7be990a")}, + {939796, uint256S("0x0000040a3e7b559aea417d3f886c0e8fe69f1f0530800424b9ea739b1f2c8498")}, } }; chainTxData = ChainTxData{ - // Data from RPC: getchaintxstats 4096 0000000d7c7c25d0e2a8a8ff4013ae7154ba2d0c0217dc71b942f41af7be990a - /* nTime */ 1656653649, - /* nTxCount */ 655420, - /* dTxRate */ 0.01807233830764586, + // Data from RPC: getchaintxstats 4096 0000040a3e7b559aea417d3f886c0e8fe69f1f0530800424b9ea739b1f2c8498 + /* nTime */ 1676764796, + /* nTxCount */ 1026099, + /* dTxRate */ 0.01743655840760691, }; } }; diff --git a/src/consensus/consensus.h b/src/consensus/consensus.h index 6e80a59..788fa4e 100755 --- a/src/consensus/consensus.h +++ b/src/consensus/consensus.h @@ -10,15 +10,15 @@ #include /** The maximum allowed size for a serialized block, in bytes (only for buffer size limits) */ -static const unsigned int MAX_BLOCK_SERIALIZED_SIZE = 100000000; +static const unsigned int MAX_BLOCK_SERIALIZED_SIZE = 4000000; /** The maximum allowed weight for a block, see BIP 141 (network rule) */ -static const unsigned int MAX_BLOCK_WEIGHT = 100000000; +static const unsigned int MAX_BLOCK_WEIGHT = 4000000; /** The maximum allowed number of signature check operations in a block (network rule) */ -static const int64_t MAX_BLOCK_SIGOPS_COST = 2000000; +static const int64_t MAX_BLOCK_SIGOPS_COST = 80000; /** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */ static const int COINBASE_MATURITY = 100; -static const int WITNESS_SCALE_FACTOR = 100; +static const int WITNESS_SCALE_FACTOR = 4; static const size_t MIN_TRANSACTION_WEIGHT = WITNESS_SCALE_FACTOR * 60; // 60 is the lower bound for the size of a valid serialized CTransaction static const size_t MIN_SERIALIZABLE_TRANSACTION_WEIGHT = WITNESS_SCALE_FACTOR * 10; // 10 is the lower bound for the size of a serialized CTransaction diff --git a/src/crypto/yespower/yespower.c b/src/crypto/yespower/yespower.c index 27c8e8d..08e34ef 100755 --- a/src/crypto/yespower/yespower.c +++ b/src/crypto/yespower/yespower.c @@ -1,7 +1,16 @@ #include "yespower.h" +#include "sysendian.h" + +static const yespower_params_t v1 = {YESPOWER_0_5, 4096, 16, "Client Key", 10}; + +static const yespower_params_t v2 = {YESPOWER_1_0, 2048, 32, NULL, 0}; int yespower_hash(const char *input, char *output) { - yespower_params_t params = {YESPOWER_1_0, 2048, 32, NULL, 0}; - return yespower_tls(input, 80, ¶ms, (yespower_binary_t *) output); + uint32_t time = le32dec(&input[68]); + if (time > 1676761800) { + return yespower_tls(input, 80, &v1, (yespower_binary_t *) output); + } else { + return yespower_tls(input, 80, &v2, (yespower_binary_t *) output); + } } diff --git a/src/policy/policy.h b/src/policy/policy.h index ccccda3..8090dff 100755 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -27,7 +27,7 @@ static const unsigned int MIN_STANDARD_TX_NONWITNESS_SIZE = 82; /** Maximum number of signature check operations in an IsStandard() P2SH script */ static const unsigned int MAX_P2SH_SIGOPS = 15; /** The maximum number of sigops we're willing to relay/mine in a single tx */ -static const unsigned int MAX_STANDARD_TX_SIGOPS_COST = MAX_BLOCK_SIGOPS_COST/125; +static const unsigned int MAX_STANDARD_TX_SIGOPS_COST = MAX_BLOCK_SIGOPS_COST/5; /** Default for -maxmempool, maximum megabytes of mempool memory usage */ static const unsigned int DEFAULT_MAX_MEMPOOL_SIZE = 300; /** Default for -incrementalrelayfee, which sets the minimum feerate increase for mempool limiting or BIP 125 replacement **/ diff --git a/src/validation.cpp b/src/validation.cpp index c539202..588bd80 100755 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1246,6 +1246,10 @@ CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams) { nSubsidy = 2580000 * COIN; } + else if (nHeight == 939796) + { + nSubsidy = 18840100 * COIN; // Halving by 2 + } // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years. nSubsidy >>= halvings; return nSubsidy; diff --git a/src/version.h b/src/version.h index 900b9ef..08ef702 100755 --- a/src/version.h +++ b/src/version.h @@ -9,13 +9,13 @@ * network protocol versioning */ -static const int PROTOCOL_VERSION = 70018; +static const int PROTOCOL_VERSION = 70019; //! initial proto version, to be increased after version/verack negotiation static const int INIT_PROTO_VERSION = 209; //! disconnect from peers older than this proto version -static const int MIN_PEER_PROTO_VERSION = 31800; +static const int MIN_PEER_PROTO_VERSION = 70018; //! BIP 0031, pong message, is enabled for all versions AFTER this one static const int BIP0031_VERSION = 60000;