-
Notifications
You must be signed in to change notification settings - Fork 725
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
Store linear blocks in freezer db #5905
base: unstable
Are you sure you want to change the base?
Conversation
Co-authored-by: Michael Sproul <michael@sigmaprime.io>
let block = store | ||
.get_hot_blinded_block(&block_root)? | ||
.ok_or(HotColdDBError::MissingBlockToFreeze(block_root))?; | ||
store.blinded_block_as_cold_kv_store_ops(&block_root, &block, &mut cold_db_ops)?; |
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.
Does the state_root_iter yield the same block_root more than once for skipped slots? If yes we are doing extra work here
upgrade_freezer_database::<T>(&db, &log)?; | ||
|
||
// No hot DB changes | ||
return Ok(vec![]); |
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.
@michaelsproul thoughts on migrating all finalized blocks? If we just delete that's going to be a lot of bandwidth on the entire network to backfill. However, migrating all blocks will take a while. Are DB migrations blocking the start routine of Lighthouse?
Issue Addressed
Part of tree-states Disk Edition ™️
Currently Lighthouse stores blocks by root in the same bucket as unfinalized blocks. Storing finalized blocks in a separate bucket allows faster reads of sequential slot ranges. It also simplifies pruning logic and can allow us to drop the head-tracker which has been a source of bugs in the past:
Proposed Changes
BeaconBlockFrozen
and compress them