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

Support pruning #1119

Open
theo-zil opened this issue Jul 1, 2024 · 3 comments
Open

Support pruning #1119

theo-zil opened this issue Jul 1, 2024 · 3 comments
Labels
Agate Required for mainnet launch

Comments

@theo-zil
Copy link
Contributor

theo-zil commented Jul 1, 2024

Nodes can currently run with a partial history (by loading from a checkpoint), but it's not a fully fledged feature.

  • Add API to query what blocks a node has available
  • Make sure RPCs fail gracefully for unknown blocks (might already be the case, just need to check)
  • Add dynamic pruning feature - i.e. a config parameter to keep latest N blocks and delete anything older than N from storage
@DrZoltanFazekas DrZoltanFazekas added the Agate Required for mainnet launch label Jul 25, 2024
@DrZoltanFazekas
Copy link
Contributor

As an addition to the above, it should also be possible to set the config parameter to a block height we currently don't have (e.g. a block number before the checkpoint from which we synced), to fetch the missing blocks. If the config parameter is set to 0 (genesis), we can sync all blocks older than the checkpoint from which we started syncing.

@DrZoltanFazekas
Copy link
Contributor

When it comes to state pruning, the work on #1503 could make implementing it easier. Think of how Geth vs newer Ethereum clients such as Erigon store the state. The latter ones use a flat key-block-value mapping. @JamesHinshelwood please correct me if I'm wrong

@shawn-zil
Copy link
Contributor

I suspect that the gradual block production throughput degradation in #1970 might have something to do with the growing database indexes. So, if a validator does not hold the entire history, but only a certain number of blocks, the performance degradation might stabilize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agate Required for mainnet launch
Projects
None yet
Development

No branches or pull requests

3 participants