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

Era support for nimbus import #2429

Merged
merged 12 commits into from
Jul 9, 2024
Merged

Era support for nimbus import #2429

merged 12 commits into from
Jul 9, 2024

Conversation

advaita-saha
Copy link
Contributor

Fixes #2306

nimbus/nimbus_import.nim Outdated Show resolved Hide resolved
@advaita-saha advaita-saha marked this pull request as ready for review July 1, 2024 09:48
nimbus/nimbus_import.nim Outdated Show resolved Hide resolved
nimbus/nimbus_import.nim Outdated Show resolved Hide resolved
nimbus/nimbus_import.nim Outdated Show resolved Hide resolved
when consensusFork >= ConsensusFork.Capella:
return ok((forkyState.data.historical_roots, forkyState.data.historical_summaries, slot+8192))
else:
return ok((forkyState.data.historical_roots, HashList[HistoricalSummary, Limit HISTORICAL_ROOTS_LIMIT](), slot+8192))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Era's 8192 slots per file is derived from various constants in the consensus specs, e.g., SLOTS_PER_HISTORICAL_ROOT, or SLOTS_PER_EPOCH * SHARD_COMMITTEE_PERIOD. Not sure if makes sense to re-derive these now that from this code's perspective, they're just what Era files do, but it's a bit of a magical constant at the moment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion doesn't make sense doing that for the import process

nimbus/nimbus_import.nim Outdated Show resolved Hide resolved
nimbus/nimbus_import.nim Outdated Show resolved Hide resolved
nimbus/nimbus_import.nim Outdated Show resolved Hide resolved
nimbus/nimbus_import.nim Outdated Show resolved Hide resolved
@tersec tersec merged commit 9a499eb into master Jul 9, 2024
8 checks passed
@tersec tersec deleted the era-importer branch July 9, 2024 13:28
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

Successfully merging this pull request may close these issues.

Add era support to block importer
3 participants