Skip to content
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

Prune historic blocks #3209

Open
michaelsproul opened this issue May 24, 2022 · 4 comments
Open

Prune historic blocks #3209

michaelsproul opened this issue May 24, 2022 · 4 comments
Labels
database optimization Something to make Lighthouse run more efficiently.

Comments

@michaelsproul
Copy link
Member

Description

Currently Lighthouse stores every block from genesis to the current head, with no option to drop the older parts of history.

The p2p spec defines a parameter MIN_EPOCHS_FOR_BLOCK_REQUESTS equal to ~5 months, which we could adopt as the default backfill period for new checkpoint synced nodes.

https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#consensus-layer-network-interaction-domains

If community consensus enables it we could also automatically prune blocks older than MIN_EPOCHS_FOR_BLOCK_REQUESTS on all nodes in real time. Assuming finality and no storage of historic states this would make the size of the database approximately constant 😻

@michaelsproul michaelsproul added networking optimization Something to make Lighthouse run more efficiently. database labels May 24, 2022
@jmcruz1983
Copy link

Any update here?

@michaelsproul
Copy link
Member Author

On the backburner, we're hesitant to add this feature without opt-in from other client teams and a good solution to providing access to the historical data.

@AgeManning
Copy link
Member

Syncing from checkpoint sync doesn't store all blocks, just the minimum we need to serve. I'm going to close this in favour of block pruning in #4158

@michaelsproul
Copy link
Member Author

Re-opening this as the PR never got merged and it's nice to have an issue to refer to.

PR is bitrotted, but could be updated soon:

@michaelsproul michaelsproul changed the title Bound storage of historic blocks Prune historic blocks Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database optimization Something to make Lighthouse run more efficiently.
Projects
None yet
Development

No branches or pull requests

4 participants