Skip to content

Prune historic blocks #3209

@michaelsproul

Description

@michaelsproul

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 😻

Metadata

Metadata

Assignees

No one assigned

    Labels

    databaseoptimizationSomething to make Lighthouse run more efficiently.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions