hotfix to address the 'difficulty overhead' chain issues; added more fasta-sync checkpoints; bumped version number

This commit is contained in:
Some Random Crypto Guy
2024-11-16 00:48:31 +00:00
parent b285ec550d
commit c6d843b6f5
5 changed files with 24 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
# Salvium Zero v0.6.3
# Salvium Zero v0.6.4
Copyright (c) 2023-2024, Salvium
Portions Copyright (c) 2014-2023, The Monero Project
@@ -172,7 +172,7 @@ invokes cmake commands as needed.
```bash
cd salvium
git checkout v0.6.3
git checkout v0.6.4
make
```
@@ -251,7 +251,7 @@ Tested on a Raspberry Pi Zero with a clean install of minimal Raspbian Stretch (
```bash
git clone https://github.com/salvium/salvium
cd salvium
git checkout v0.6.3
git checkout v0.6.4
```
* Build:
@@ -370,10 +370,10 @@ application.
cd salvium
```
* If you would like a specific [version/tag](https://github.com/salvium/salvium/tags), do a git checkout for that version. eg. 'v0.6.3'. If you don't care about the version and just want binaries from master, skip this step:
* If you would like a specific [version/tag](https://github.com/salvium/salvium/tags), do a git checkout for that version. eg. 'v0.6.4'. If you don't care about the version and just want binaries from master, skip this step:
```bash
git checkout v0.6.3
git checkout v0.6.4
```
* If you are on a 64-bit system, run:

Binary file not shown.

View File

@@ -204,6 +204,7 @@ namespace cryptonote
ADD_CHECKPOINT2(180, "e20bc8ac6aabb6b0792f23a29ce42a577c6a57d177a8ac1a51b68fb6de508045", "0x262b40");
ADD_CHECKPOINT2(190, "f69fdad7a15471b63a82668b618ee5b2a384291269d944b11974a723c1604124", "0x2856a3");
ADD_CHECKPOINT2(200, "eba53fa7006dfcdc837a56c0bc8f0e1883cf34861c26934d680252a6878a3f5d", "0x2aa022");
ADD_CHECKPOINT2(90000, "e125b5c1b26521f98e29df6ec88f041c176a2c0a3fcacd5bd0ad2278e9b02fd2", "0xc99801f937888"); // 3546475285149832
}
return true;
}

View File

@@ -1034,13 +1034,27 @@ size_t Blockchain::recalculate_difficulties(boost::optional<uint64_t> start_heig
LOG_PRINT_L3("Blockchain::" << __func__);
CRITICAL_REGION_LOCAL(m_blockchain_lock);
const uint64_t start_height = start_height_opt ? *start_height_opt : check_difficulty_checkpoints().second;
//uint64_t start_height = start_height_opt ? *start_height_opt : check_difficulty_checkpoints().second;
uint8_t version = get_current_hard_fork_version();
uint64_t start_height = 0;
if (start_height_opt) {
start_height = *start_height_opt;
} else {
bool found = false;
for (size_t i=0; i<num_mainnet_hard_forks; ++i) {
if (version == mainnet_hard_forks[i].version) {
start_height = mainnet_hard_forks[i].height;
found = true;
break;
}
}
start_height = std::max(start_height, check_difficulty_checkpoints().second);
}
const uint64_t top_height = m_db->height() - 1;
MGINFO("Recalculating difficulties from height " << start_height << " to height " << top_height);
std::vector<uint64_t> timestamps;
std::vector<difficulty_type> difficulties;
uint8_t version = get_current_hard_fork_version();
size_t difficulty_blocks_count;
if (version == 1) {
difficulty_blocks_count = DIFFICULTY_BLOCKS_COUNT;
@@ -6128,7 +6142,7 @@ void Blockchain::cancel()
}
#if defined(PER_BLOCK_CHECKPOINT)
static const char expected_block_hashes_hash[] = "3cb6d33c311e54f2b8439a3e4cc047f6b9b74db9fd92955f1db131a5dfce1edf";
static const char expected_block_hashes_hash[] = "5065d5361119a526b7a45e9e5bdf1d5be86f80e9eb43b0398bf0e47489c81c6d";
void Blockchain::load_compiled_in_block_hashes(const GetCheckpointsCallback& get_checkpoints)
{
if (get_checkpoints == nullptr || !m_fast_sync)

View File

@@ -1,5 +1,5 @@
#define DEF_SALVIUM_VERSION_TAG "@VERSIONTAG@"
#define DEF_SALVIUM_VERSION "0.6.3"
#define DEF_SALVIUM_VERSION "0.6.4"
#define DEF_MONERO_VERSION_TAG "release"
#define DEF_MONERO_VERSION "0.18.3.3"
#define DEF_MONERO_RELEASE_NAME "Zero"