Merge remote-tracking branch 'origin/stable' into back-merge-6.0.1

This commit is contained in:
Michael Sproul
2024-12-16 15:37:52 +11:00
17 changed files with 126 additions and 33 deletions

View File

@@ -1037,7 +1037,9 @@ where
);
// Check for states to reconstruct (in the background).
if beacon_chain.config.reconstruct_historic_states {
if beacon_chain.config.reconstruct_historic_states
&& beacon_chain.store.get_oldest_block_slot() == 0
{
beacon_chain.store_migrator.process_reconstruction();
}

View File

@@ -26,8 +26,10 @@ const MIN_COMPACTION_PERIOD_SECONDS: u64 = 7200;
const COMPACTION_FINALITY_DISTANCE: u64 = 1024;
/// Maximum number of blocks applied in each reconstruction burst.
///
/// This limits the amount of time that the finalization migration is paused for.
const BLOCKS_PER_RECONSTRUCTION: usize = 8192 * 4;
/// This limits the amount of time that the finalization migration is paused for. We set this
/// conservatively because pausing the finalization migration for too long can cause hot state
/// cache misses and excessive disk use.
const BLOCKS_PER_RECONSTRUCTION: usize = 1024;
/// Default number of epochs to wait between finalization migrations.
pub const DEFAULT_EPOCHS_PER_MIGRATION: u64 = 1;

View File

@@ -152,7 +152,7 @@ pub fn delete_old_schema_freezer_data<T: BeaconChainTypes>(
db.cold_db.do_atomically(cold_ops)?;
// In order to reclaim space, we need to compact the freezer DB as well.
db.cold_db.compact()?;
db.compact_freezer()?;
Ok(())
}