Skip to content

Commit

Permalink
HF-8 1500000 - Friday, 11 August 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
Snider committed Jul 14, 2023
1 parent 9a6423b commit bcb9b1a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/cryptonote_basic/cryptonote_basic.h
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ namespace cryptonote

BEGIN_SERIALIZE()
VARINT_FIELD(major_version)
if (major_version > BLOCK_MAJOR_VERSION_7) {
if (major_version > BLOCK_MAJOR_VERSION_8) {
MERROR("Block version is too high " << (unsigned)major_version);
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/cryptonote_basic/cryptonote_basic_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ namespace cryptonote {
const int emission_speed_factor = EMISSION_SPEED_FACTOR_PER_MINUTE - (target_minutes-1);
const uint64_t orig_already_generated_coins = already_generated_coins;

if (version < BLOCK_MAJOR_VERSION_7)
if (version < BLOCK_MAJOR_VERSION_8)
{
if (orig_already_generated_coins >= UINT64_C(14992413379483553)) {
already_generated_coins -= UINT64_C(14992032107906461); //premine minus the normal block 2 emission
Expand Down
2 changes: 1 addition & 1 deletion src/cryptonote_basic/cryptonote_format_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ bool encrypt_swap_data_with_tx_secret_key(const crypto::secret_key& sk, uint8_t*
blobdata bd = get_block_hashing_blob(b);

// From BLOCK_MAJOR_VERSION_7 use Argon2 Chukwa v2
if (b.major_version == BLOCK_MAJOR_VERSION_7){
if (b.major_version >= BLOCK_MAJOR_VERSION_7){
crypto::chukwa_slow_hash_v2(bd.data(), bd.size(), res);
return true;
}else{
Expand Down
1 change: 1 addition & 0 deletions src/cryptonote_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#define BLOCK_MAJOR_VERSION_5 5
#define BLOCK_MAJOR_VERSION_6 6
#define BLOCK_MAJOR_VERSION_7 7
#define BLOCK_MAJOR_VERSION_8 8
#define CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT 500
#define CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE 0

Expand Down
9 changes: 6 additions & 3 deletions src/cryptonote_core/blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ static const struct {
{ 5, 296287, 0, 1540279084 },
// version 6
{ 6, 391500, 0, 1552132800 },
{ 7, 1147126, 0, 1644148989 }
{ 7, 1147126, 0, 1644148989 },
{ 8, 1500000, 0, 1691752271 }
};
static const uint64_t mainnet_hard_fork_version_1_till = 50000;

Expand All @@ -119,7 +120,8 @@ static const struct {
{ 4, 31, 0, 1518118888 },
{ 5, 41, 0, 1539941268 },
{ 6, 51, 0, 1551264860 },
{ 7, 71, 0, 1551264860 + 1000 } // Give it some time offset
{ 7, 71, 0, 1551264860 + 1000 },
{ 8, 100, 0, 1551264860 + 9000 } // Give it some time offset
};
static const uint64_t testnet_hard_fork_version_1_till = 10;

Expand Down Expand Up @@ -3540,7 +3542,8 @@ bool Blockchain::update_next_cumulative_size_limit()
get_current_hard_fork_version() == BLOCK_MAJOR_VERSION_4 ||
get_current_hard_fork_version() == BLOCK_MAJOR_VERSION_5 ||
get_current_hard_fork_version() == BLOCK_MAJOR_VERSION_6 ||
get_current_hard_fork_version() == BLOCK_MAJOR_VERSION_7)
get_current_hard_fork_version() == BLOCK_MAJOR_VERSION_7||
get_current_hard_fork_version() == BLOCK_MAJOR_VERSION_8)
{
//support LTHN max cumulative size limit change since 65k: large blocks every 5 blocks only
//transaction size is also checked here.
Expand Down

0 comments on commit bcb9b1a

Please sign in to comment.