-
Notifications
You must be signed in to change notification settings - Fork 811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manual finalization endpoint #7059
Manual finalization endpoint #7059
Conversation
…te from disk when serving block by range requests.
…nalized_slot`), and use fork choice in that case.
…rilev/lighthouse into manual-finalization-endpoint
one quick and dirty thing we might be able to try // add some for loop here so we only fetch at most one state per roots iterator
for {
let state_roots = RootsIterator::new(&store, finalized_state)
.take_while(|result| match result {
Ok((_, _, slot)) => *slot >= current_split_slot,
Err(_) => true,
})
.collect::<Result<Vec<_>, _>>()?;
// do the hot db -> cold db migration + pruning
} |
I think the lighthouse/beacon_node/beacon_chain/src/migrate.rs Lines 602 to 630 in 404e48d
Similarly the The only thing I can think is that we're putting these states in the cache, and that's enough to cause an OOM with |
@@ -190,6 +198,10 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> BackgroundMigrator<E, Ho | |||
Ok(()) | |||
} | |||
|
|||
pub fn process_manual_finalization(&self, notif: ManualFinalizationNotification) { | |||
let _ = self.send_background_notification(Notification::ManualFinalization(notif)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we ever run store migrator in the foreground other than testing, but probably should support it given we do it for all 3 other notifications, and if we want to test this with BeaconChainHarness
, it won't be immediately obvious why this doesn't get run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. We should do this for the clean version of this PR
Introduce a new lighthouse endpoint that allows a user to force a manual finalization. This migrates data to the freezer db and prunes sidechains which may help reduce disk space issues on holesky at the moment.