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

[Feature] typed hardforks for anvil bindings #1905

Open
siosw opened this issue Jan 10, 2025 · 9 comments
Open

[Feature] typed hardforks for anvil bindings #1905

siosw opened this issue Jan 10, 2025 · 9 comments
Labels
blocked This cannot move forward until something else changes c-provider enhancement New feature or request good first issue Good for newcomers

Comments

@siosw
Copy link
Contributor

siosw commented Jan 10, 2025

Component

node-bindings

Describe the feature you would like

currently starting an anvil node with a hardfork enabled looks like this:

let provider = ProviderBuilder::new()
    .with_recommended_fillers()
    .on_anvil_with_wallet_and_config(|anvil| anvil.arg("--hardfork").arg("prague"));

anvil itself represents this as hardfork::Option<ChainHardfork>
i think it would be neat if we could do:

let provider = ProviderBuilder::new()
    .with_recommended_fillers()
    .on_anvil_with_wallet_and_config(|anvil| anvil.hardfork(EthereumHardfork::Prague));

happy to pick this up if there is consensus around implementing this

Additional context

No response

@siosw siosw added the enhancement New feature or request label Jan 10, 2025
@mattsse
Copy link
Member

mattsse commented Jan 10, 2025

ref paradigmxyz/reth#13572

@mvares
Copy link
Contributor

mvares commented Jan 11, 2025

Hey @mattsse, is it possible to work on this issue without disrupting reth?

@mattsse
Copy link
Member

mattsse commented Jan 11, 2025

I think we really just need a new repository for this, created https://github.com/alloy-rs/hardforks

feel free to submit a pr that adds the reth crate + extras.
the reth-ethereum-forks doesn't have any reth deps so we can extract this in one go

cc @klkvr

@mvares
Copy link
Contributor

mvares commented Jan 11, 2025

The reth-ethereum-forks crate contains some workspace dependencies. If it’s not a problem for you, I’d like you to submit only the initial setup. In Cargo.toml, it uses dependencies based on the workspace.

@mattsse
Copy link
Member

mattsse commented Jan 11, 2025

those workspace deps need to be converted when it is extracted

@mvares
Copy link
Contributor

mvares commented Jan 11, 2025

those workspace deps need to be converted when it is extracted

Sure
Currently, I can’t send anything to the repository because creating a fork is not allowed

@mattsse
Copy link
Member

mattsse commented Jan 11, 2025

initialized it

@siosw
Copy link
Contributor Author

siosw commented Jan 14, 2025

i have a PR for this once hardforks crate is in

@yash-atreya
Copy link
Member

Blocked by alloy-rs/hardforks#1

@yash-atreya yash-atreya added c-provider good first issue Good for newcomers blocked This cannot move forward until something else changes labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This cannot move forward until something else changes c-provider enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants