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

Implement freezer fallback to era1 files #31279

Open
fjl opened this issue Feb 27, 2025 · 0 comments
Open

Implement freezer fallback to era1 files #31279

fjl opened this issue Feb 27, 2025 · 0 comments
Assignees

Comments

@fjl
Copy link
Contributor

fjl commented Feb 27, 2025

When Geth runs with pruned history, the freezer will no longer contain pre-merge blocks. One way for users to still access these blocks, is importing era1 files.

We should add a code path to the ancient store implementation that uses era1.

  • When an ancient item is requested, we should first check if it is within the block range of the freezer. If the request is for a block number below the freezer range, the access goes to era.
  • We define a era1 subdirectory of the ancients directory to hold era1 files.
  • All accesses should try to open the file, i.e. no pre-opening. That way, the user can add era1 files while Geth is running to make certain block ranges available.
  • There can be a LRU cache for open era1 files, with a time-based eviction policy. It's important to ensure Geth closes the files that haven't been accessed for a while, so that users can actually delete era1 files while it is running.
@s1na s1na self-assigned this Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants