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

use op-alloy genesis types for genesis parsing #9267

Closed
Tracked by #7576 ...
mattsse opened this issue Jul 3, 2024 · 2 comments
Closed
Tracked by #7576 ...

use op-alloy genesis types for genesis parsing #9267

mattsse opened this issue Jul 3, 2024 · 2 comments
Labels
A-cli Related to the reth CLI D-good-first-issue Nice and easy! A great choice to get started

Comments

@mattsse
Copy link
Collaborator

mattsse commented Jul 3, 2024

op-alloy-rpc-types https://crates.io/crates/op-alloy-rpc-types/0.1.1 crate now has these types:

#[cfg(feature = "optimism")]
#[derive(Default, Debug, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
struct OptimismGenesisInfo {
bedrock_block: Option<u64>,
regolith_time: Option<u64>,
canyon_time: Option<u64>,
ecotone_time: Option<u64>,
fjord_time: Option<u64>,
#[serde(skip)]
base_fee_params: BaseFeeParamsKind,
}
#[cfg(feature = "optimism")]
#[derive(Debug, Eq, PartialEq, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
struct OptimismBaseFeeInfo {
eip1559_elasticity: Option<u64>,
eip1559_denominator: Option<u64>,
eip1559_denominator_canyon: Option<u64>,
}

TODO

  • replace those with op-alloy-rpc-types and simplify genesis setup:

let optimism_genesis_info = OptimismGenesisInfo::extract_from(&genesis);

unblocks more progress for #9266

FYI @loocapro

@mattsse mattsse added D-good-first-issue Nice and easy! A great choice to get started A-cli Related to the reth CLI labels Jul 3, 2024
@qiweiii
Copy link
Contributor

qiweiii commented Jul 4, 2024

I can take this!

is it just replace? how does it simplify the setup?

@mattsse
Copy link
Collaborator Author

mattsse commented Jul 4, 2024

thanks @qiweiii

there's already a pr for #9292
if you're looking for something else, I opened a few new good first issues

@mattsse mattsse closed this as completed Jul 8, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Reth Tracker Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Related to the reth CLI D-good-first-issue Nice and easy! A great choice to get started
Projects
Archived in project
Development

No branches or pull requests

2 participants