-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Implement beacon db pruner #14687
Implement beacon db pruner #14687
Conversation
0138619
to
df84c28
Compare
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.
Just one comment on the interface name.
The implementation looks good to me. Do you plan to plug it in with a feature flag in a follow up PR? Have you tested this?
No flag to customize the retention period? |
Will include it in this PR. |
7eb6d40
to
20aafa7
Compare
4f2164b
to
b373d0d
Compare
Additional comment:
|
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.
Overall you did a nice job on this, looking good!
Most of my comments are suggestions or even nitpicks, but I do think we should make the db query improvements - in particular using the slot from the index - before merging this.
Co-authored-by: Radosław Kapka <[email protected]>
Co-authored-by: Preston Van Loon <[email protected]>
Co-authored-by: Radosław Kapka <[email protected]>
33b7bd4
to
d1a5c54
Compare
bkt *bolt.Bucket, | ||
startSlotEncoded, endSlotEncoded, startEpochEncoded, endEpochEncoded, slotStepEncoded interface{}, | ||
) ([][]byte, error) { | ||
_, span := trace.StartSpan(ctx, "BeaconDB.blockRootsBySlotRange") |
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.
Why were these trace spans removed?
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.
Fixed!
What type of PR is this?
Feature
What does this PR do? Why is it needed?
This PR implements beacon db pruning based on weak subjectivity period. This is needed to avoid storing historical blocks beyond a point for non-archival nodes.
Which issues(s) does this PR fix?
#8787
Other notes for review
This PR implements a pruner service based on weak subjectivity period to periodically delete blocks and states beyond weak subjectivity period to maintain a constant-size database.
Acknowledgements