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

extract Chainspec type from primitives #7929

Open
Tracked by #7904
mattsse opened this issue Apr 27, 2024 · 7 comments · May be fixed by #8055
Open
Tracked by #7904

extract Chainspec type from primitives #7929

mattsse opened this issue Apr 27, 2024 · 7 comments · May be fixed by #8055
Labels
C-debt A section of code is hard to understand or change D-good-first-issue Nice and easy! A great choice to get started S-stale This issue/PR is stale and will close with no further activity

Comments

@mattsse
Copy link
Collaborator

mattsse commented Apr 27, 2024

The chainspec type bloats reth-primitives

/// An Ethereum chain specification.
///
/// A chain specification describes:
///
/// - Meta-information about the chain (the chain ID)
/// - The genesis block of the chain ([`Genesis`])
/// - What hardforks are activated, and under which conditions
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
pub struct ChainSpec {

the entire mod should be converted into its own crate

https://github.com/paradigmxyz/reth/blob/cc4a418ddf73ae5af240b403e4b6e1d191130cee/crates/primitives/src/chain/mod.rs

this type is used quite a lot, we can likely re-export this type from reth-provider or similar

@mattsse mattsse changed the title extract Chainspec type extract Chainspec type from primitives Apr 27, 2024
@mattsse mattsse added D-good-first-issue Nice and easy! A great choice to get started C-debt A section of code is hard to understand or change labels Apr 27, 2024
@guha-rahul
Copy link
Contributor

hey , so we need to transfer the ChainSpec struct and the mod.rs under crates/storage/provider/src right?

@mattsse
Copy link
Collaborator Author

mattsse commented Apr 28, 2024

should be moved to its own crate like reth-chainspec

@HrithikSampson
Copy link

Hi, should the be chainSpecBuilder be also moved accordingly

@HrithikSampson
Copy link

Can I also try this issue

@guha-rahul
Copy link
Contributor

Hey @mattsse , i have extracted the 3 files in a separate crate under storage, but i am getting

error: failed to load manifest for workspace member `/home/rahul/reth/bin/reth`

Caused by:
  failed to load manifest for dependency `reth-basic-payload-builder`

Caused by:
  failed to load manifest for dependency `reth-engine-primitives`

Caused by:
  failed to load manifest for dependency `reth-chainspec`

Caused by:
  failed to load manifest for dependency `reth-primitives`

Caused by:
  failed to parse manifest at `/home/rahul/reth/crates/primitives/Cargo.toml`

Caused by:
  error inheriting `reth_chainspec` from workspace root manifest's `workspace.dependencies.reth_chainspec`

Caused by:
  `dependency.reth_chainspec` was not found in `workspace.dependencies`

Even tho i have reth-chainspec = { path = "crates/storage/chainspec" } under [workspace.dependencies] .
Should i open a draft so that you can take a look.

@mattsse
Copy link
Collaborator Author

mattsse commented May 2, 2024

could you please open a pr?

@guha-rahul guha-rahul linked a pull request May 2, 2024 that will close this issue
Copy link
Contributor

This issue is stale because it has been open for 21 days with no activity.

@github-actions github-actions bot added the S-stale This issue/PR is stale and will close with no further activity label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-debt A section of code is hard to understand or change D-good-first-issue Nice and easy! A great choice to get started S-stale This issue/PR is stale and will close with no further activity
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

3 participants