-
Notifications
You must be signed in to change notification settings - Fork 11
feat: support Era Imports for Gnosis (full history 2 of 2) #83
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
base: prerelease-1.7.0-auraheaders
Are you sure you want to change the base?
Conversation
- Introduced `ImportEraCommand` to handle importing chains from ERA files. - Created `era.rs` and `import_era.rs` for ERA-related functionalities. - Updated `mod.rs` files to include new modules. - Refactored `main.rs` to utilize the new `GnosisCli` structure. - Added necessary dependencies in `Cargo.toml` and `Cargo.lock`.
…eation and simplify tokio task spawning
…, import_era, and gnosis_spec modules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good!
src/cli/era.rs
Outdated
| @@ -0,0 +1,358 @@ | |||
| // Bulk is from https://github.com/debjit-bw/reth/blob/994d73edf63f2a17cdc9c1e32338dcd81c165905/crates/era-utils/src/history.rs | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link paradigmxyz repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for these notes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah mb, fixed
| @@ -0,0 +1,125 @@ | |||
| // File copied from https://github.com/paradigmxyz/reth/blob/94c93583af801a75ae5bb96080d21dc1851325fa/crates/cli/commands/src/import_era.rs | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explain why this file has to be copied
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
src/initialize/mod.rs
Outdated
| pub mod download_init_state; | ||
| pub mod import_and_ensure_state; | ||
|
|
||
| pub const MAINNET_ERA_IMPORT_HEIGHT: u64 = 26478650; // Gnosis mainnet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comment that this is the merge block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
31aa372 to
e34c7ac
Compare
Introduces a Gnosis-specific CLI (GnosisCli) with a new ImportEra command to support ERA block imports. The ERA import logic, adapted from Reth, has been customized to directly import receipts from ERA files instead of executing blocks to generate them — a Gnosis-specific modification.