-
Notifications
You must be signed in to change notification settings - Fork 792
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
Historic block pruning #4158
base: unstable
Are you sure you want to change the base?
Historic block pruning #4158
Conversation
Dropping this to v4.2.1, I haven't had a chance to implement the state deletion yet |
What are the blockers on this PR? |
@delbonis We need to implement pruning for historic states as well, something that drops all the existing historic states and prevents more from being stored would be the simplest. Are you interested in working on it? Otherwise I'm hoping to get to it soon-ish |
Opened a separate issue for the state pruning here: #4481 |
Dropping this from 4.6.0 as I don't have time |
Issue Addressed
Closes:
Builds on:
Proposed Changes
Add a step to the finalization migration which deletes blocks if they are older than the newly computed weak subjectivity checkpoint. To avoid burdening the disk this deletion is scheduled to occur once per week.
The block pruning is potentially I/O intensive, so to prevent it running in parallel with the I/O heavy finalization migration, it happens as part of finalization in the migrator. This required plumbing in the
BeaconChain
.Limitations
If a node has been synced from genesis or has reconstructed states then block pruning is disabled. This is because we should also prune the historic states from disk in this case, and currently have no machinery in
unstable
for doing this (I had a branch, once upon a time). In the interests of simplicity this is deferred for future work.Although now that I think about it, maybe having states without blocks is OK... and we will trigger the case where the
oldest_block_slot
is greater than thestate_upper_limit
even with this restriction (once a node prunes blocks newer than its oldest stored state). Need to think on this some more. Related: #3211.TODO