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

Add era support to block importer #2306

Open
arnetheduck opened this issue Jun 6, 2024 · 0 comments
Open

Add era support to block importer #2306

arnetheduck opened this issue Jun 6, 2024 · 0 comments
Assignees

Comments

@arnetheduck
Copy link
Member

arnetheduck commented Jun 6, 2024

The current version of the block importer only supports era1 files, meaning we can only cover the range of blocks up to the merge on mainnet.

After the merge, we can use consensus layer era blocks instead - this is slightly more involved:

  • we must decode the consensus layer block based on its fork schedule, meaning we need access to the consensus layer runtime configuration
  • we must map slot number to block number - slot numbers may have gaps in which there is no (execution) block, meaning that the slot will grow faster than the execution block number

We must also take into account networks which don't have a pre-merge period in era1.

To load era files, we should have a new --era-dir option similar to --era1-dir - the importer will then load the base state of the database, figure out whether to load era1 or era, then go about topping up blocks the same way as is done with era1.

@advaita-saha advaita-saha self-assigned this Jun 11, 2024
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