mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-30 11:24:31 +00:00
Improvements to Deneb store upon review (#4693)
* Start testing blob pruning * Get rid of unnecessary orphaned blob column * Make random blob tests deterministic * Test for pruning being blocked by finality * Fix bugs and test fork boundary * A few more tweaks to pruning conditions * Tweak oldest_blob_slot semantics * Test margin pruning * Clean up some terminology and lints * Schema migrations for v18 * Remove FIXME * Prune blobs on finalization not every slot * Fix more bugs + tests * Address review comments
This commit is contained in:
@@ -762,12 +762,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
// Drop the old cache head nice and early to try and free the memory as soon as possible.
|
||||
drop(old_cached_head);
|
||||
|
||||
// Prune blobs in the background.
|
||||
if let Some(data_availability_boundary) = self.data_availability_boundary() {
|
||||
self.store_migrator
|
||||
.process_prune_blobs(data_availability_boundary);
|
||||
}
|
||||
|
||||
// If the finalized checkpoint changed, perform some updates.
|
||||
//
|
||||
// The `after_finalization` function will take a write-lock on `fork_choice`, therefore it
|
||||
@@ -1064,6 +1058,12 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
self.head_tracker.clone(),
|
||||
)?;
|
||||
|
||||
// Prune blobs in the background.
|
||||
if let Some(data_availability_boundary) = self.data_availability_boundary() {
|
||||
self.store_migrator
|
||||
.process_prune_blobs(data_availability_boundary);
|
||||
}
|
||||
|
||||
// Take a write-lock on the canonical head and signal for it to prune.
|
||||
self.canonical_head.fork_choice_write_lock().prune()?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user