mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-21 13:54:44 +00:00
Merge remote-tracking branch 'origin/stable' into back-merge-6.0.1
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user