Skip to content

Commit e168005

Browse files
committed
Update GPU yescryptR16
1 parent daae293 commit e168005

File tree

8 files changed

+33
-19
lines changed

8 files changed

+33
-19
lines changed

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ AC_PREREQ([2.60])
33
define(_CLIENT_VERSION_MAJOR, 0)
44
define(_CLIENT_VERSION_MINOR, 16)
55
define(_CLIENT_VERSION_REVISION, 3)
6-
define(_CLIENT_VERSION_BUILD, 0)
6+
define(_CLIENT_VERSION_BUILD, 1)
77
define(_CLIENT_VERSION_IS_RELEASE, true)
8-
define(_COPYRIGHT_YEAR, 2021)
8+
define(_COPYRIGHT_YEAR, 2023)
99
define(_COPYRIGHT_HOLDERS,[The %s developers])
1010
define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitweb Core]])
1111
AC_INIT([Bitweb Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/bitweb-project/Bitweb_old_api_for_back_compatibility/issues],[bitweb],[https://bitwebcore.net/])

src/amount.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static const CAmount CENT = 1000000;
2323
* critical; in unusual circumstances like a(nother) overflow bug that allowed
2424
* for the creation of coins out of thin air modification could lead to a fork.
2525
* */
26-
static const CAmount MAX_MONEY = 86579950 * COIN;
26+
static const CAmount MAX_MONEY = 96000000 * COIN;
2727
inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
2828

2929
#endif // BITCOIN_AMOUNT_H

src/chainparams.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ class CMainParams : public CChainParams {
7777
consensus.BIP16Height = 0;
7878
consensus.BIP34Height = 17;
7979
consensus.BIP34Hash = uint256S("0x001ea0da3586f06aa32de50b9764eec2eaba2274191771ad536092d4f9f90fa9");
80-
consensus.BIP65Height = 0;
81-
consensus.BIP66Height = 0;
80+
consensus.BIP65Height = 1;
81+
consensus.BIP66Height = 1;
8282
consensus.powLimit = uint256S("0x001fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
8383
consensus.nPowTargetTimespan = 60 * 60;
8484
consensus.nPowTargetSpacing = 60;
@@ -102,10 +102,10 @@ class CMainParams : public CChainParams {
102102
consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
103103

104104
// The best chain should have at least this much work.
105-
consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000000000000015e19c1ad1");
105+
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000000468939a4a704");
106106

107107
// By default assume that the signatures in ancestors of this block are valid.
108-
consensus.defaultAssumeValid = uint256S("0x0000000d7c7c25d0e2a8a8ff4013ae7154ba2d0c0217dc71b942f41af7be990a"); // 606942
108+
consensus.defaultAssumeValid = uint256S("0x0000040a3e7b559aea417d3f886c0e8fe69f1f0530800424b9ea739b1f2c8498"); // 939796
109109

110110
/**
111111
* The message start string is designed to be unlikely to occur in normal data.
@@ -151,15 +151,16 @@ class CMainParams : public CChainParams {
151151
{9074, uint256S("0x0000007e1d70d529752b87fe47f979ae5f8f27bbc987dd0c8b21c9c5a6f3099b")},
152152
{12167, uint256S("0x0000006fa4023de2a1d4bd712e7d7aafa15a273f6c78b32bd87185846e0cc903")},
153153
{606942, uint256S("0x0000000d7c7c25d0e2a8a8ff4013ae7154ba2d0c0217dc71b942f41af7be990a")},
154+
{939796, uint256S("0x0000040a3e7b559aea417d3f886c0e8fe69f1f0530800424b9ea739b1f2c8498")},
154155
}
155156
};
156157

157158
chainTxData = ChainTxData{
158159
// Data as of block height 1000000 from 'getchaintxstats' command
159-
1656653649, // * UNIX timestamp of last known number of transactions
160-
655420, // * total number of transactions between genesis and that timestamp
160+
1676764796, // * UNIX timestamp of last known number of transactions
161+
1026099, // * total number of transactions between genesis and that timestamp
161162
// (the tx=... number in the SetBestChain debug.log lines)
162-
0.01807233830764586 // * estimated number of transactions per second after that timestamp
163+
0.01743655840760691 // * estimated number of transactions per second after that timestamp
163164
};
164165
}
165166
};

src/consensus/consensus.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
#include <stdint.h>
1111

1212
/** The maximum allowed size for a serialized block, in bytes (only for buffer size limits) */
13-
static const unsigned int MAX_BLOCK_SERIALIZED_SIZE = 100000000;
13+
static const unsigned int MAX_BLOCK_SERIALIZED_SIZE = 4000000;
1414
/** The maximum allowed weight for a block, see BIP 141 (network rule) */
15-
static const unsigned int MAX_BLOCK_WEIGHT = 100000000;
15+
static const unsigned int MAX_BLOCK_WEIGHT = 4000000;
1616
/** The maximum allowed number of signature check operations in a block (network rule) */
17-
static const int64_t MAX_BLOCK_SIGOPS_COST = 2000000;
17+
static const int64_t MAX_BLOCK_SIGOPS_COST = 80000;
1818
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
1919
static const int COINBASE_MATURITY = 100;
2020

21-
static const int WITNESS_SCALE_FACTOR = 100;
21+
static const int WITNESS_SCALE_FACTOR = 4;
2222

2323
static const size_t MIN_TRANSACTION_WEIGHT = WITNESS_SCALE_FACTOR * 60; // 60 is the lower bound for the size of a valid serialized CTransaction
2424
static const size_t MIN_SERIALIZABLE_TRANSACTION_WEIGHT = WITNESS_SCALE_FACTOR * 10; // 10 is the lower bound for the size of a serialized CTransaction

src/crypto/yespower/yespower.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
#include "yespower.h"
2+
#include "sysendian.h"
3+
4+
static const yespower_params_t v1 = {YESPOWER_0_5, 4096, 16, "Client Key", 10};
5+
6+
static const yespower_params_t v2 = {YESPOWER_1_0, 2048, 32, NULL, 0};
27

38
int yespower_hash(const char *input, char *output)
49
{
5-
yespower_params_t params = {YESPOWER_1_0, 2048, 32, NULL, 0};
6-
return yespower_tls(input, 80, &params, (yespower_binary_t *) output);
10+
uint32_t time = le32dec(&input[68]);
11+
if (time > 1676761800) {
12+
return yespower_tls(input, 80, &v1, (yespower_binary_t *) output);
13+
} else {
14+
return yespower_tls(input, 80, &v2, (yespower_binary_t *) output);
15+
}
716
}

src/policy/policy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static const unsigned int MIN_STANDARD_TX_NONWITNESS_SIZE = 82;
2727
/** Maximum number of signature check operations in an IsStandard() P2SH script */
2828
static const unsigned int MAX_P2SH_SIGOPS = 15;
2929
/** The maximum number of sigops we're willing to relay/mine in a single tx */
30-
static const unsigned int MAX_STANDARD_TX_SIGOPS_COST = MAX_BLOCK_SIGOPS_COST/125;
30+
static const unsigned int MAX_STANDARD_TX_SIGOPS_COST = MAX_BLOCK_SIGOPS_COST/5;
3131
/** Default for -maxmempool, maximum megabytes of mempool memory usage */
3232
static const unsigned int DEFAULT_MAX_MEMPOOL_SIZE = 300;
3333
/** Default for -incrementalrelayfee, which sets the minimum feerate increase for mempool limiting or BIP 125 replacement **/

src/validation.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,6 +1229,10 @@ CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
12291229
{
12301230
nSubsidy = 2580000 * COIN;
12311231
}
1232+
else if (nHeight == 939796)
1233+
{
1234+
nSubsidy = 18840100 * COIN; // Halving by 2
1235+
}
12321236
// Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
12331237
nSubsidy >>= halvings;
12341238
return nSubsidy;

src/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* network protocol versioning
1010
*/
1111

12-
static const int PROTOCOL_VERSION = 70018;
12+
static const int PROTOCOL_VERSION = 70019;
1313

1414
//! initial proto version, to be increased after version/verack negotiation
1515
static const int INIT_PROTO_VERSION = 209;
@@ -18,7 +18,7 @@ static const int INIT_PROTO_VERSION = 209;
1818
static const int GETHEADERS_VERSION = 31800;
1919

2020
//! disconnect from peers older than this proto version
21-
static const int MIN_PEER_PROTO_VERSION = GETHEADERS_VERSION;
21+
static const int MIN_PEER_PROTO_VERSION = PROTOCOL_VERSION;
2222

2323
//! nTime field added to CAddress, starting with this version;
2424
//! if possible, avoid requesting addresses nodes older than this

0 commit comments

Comments
 (0)