ChainSafe / ChainSafe/lodestar

ERA file support

Open
#7,048 4 comments 0 reactions 0 assignees View on GitHub
good EPF issue meta-feature-request
Dominant language
TypeScript
Stars
1.4k
Forks
483
Avg merge
1d 16h
Merged PRs (30d)
150

Description

### Problem description

As Ethereum moves towards a world where historical information over 1 year is purged on nodes that don't really need it, support has been gaining around ERA files `.e2s` to store and redistribute execution, but also beacon chain history and state. We should be able to support integrating this data structure format in Lodestar.

### Solution description

Copying (modified) from discord https://discord.com/channels/593655374469660673/1336849245281587321/1349019517812215890:

- Use ERA files for historical state regen (as an alternative to db-managed backfill/sync from genesis)
something like --era-dir flag, which gets fed into the chain and used in our historical state regen worker . The behavior being something like:
- check for an ERA file for the requested range
- check the db for a prestate/blocks
- pick the best option for regen

- Use ERA files to serve beacon_blocks_by_range
- Produce ERA files, behavior being something like:
- on finalization, check if new ERAs can be produced
- produce ERA file
- this could be done in a worker

### Additional context

Implementation of `e2store` files by Nimbus: https://github.com/status-im/nimbus-eth2/blob/stable/docs/e2store.md
EthResearch Post: https://ethresear.ch/t/era-archival-files-for-block-and-consensus-data/13526
Ultralight (Portal Network) integration: https://github.com/ethereumjs/ultralight/pull/613

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.