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: ethereumjs/ultralight#613
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
.e2sto 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:
Use ERA files to serve beacon_blocks_by_range
Produce ERA files, behavior being something like:
Additional context
Implementation of
e2storefiles by Nimbus: https://github.com/status-im/nimbus-eth2/blob/stable/docs/e2store.mdEthResearch Post: https://ethresear.ch/t/era-archival-files-for-block-and-consensus-data/13526
Ultralight (Portal Network) integration: ethereumjs/ultralight#613