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

Bug running against local Anvil RPC #147

Open
MCarlomagno opened this issue Mar 4, 2025 · 1 comment
Open

Bug running against local Anvil RPC #147

MCarlomagno opened this issue Mar 4, 2025 · 1 comment

Comments

@MCarlomagno
Copy link

Description

When I try to prove blocks locally running

# http://127.0.0.1:8546 corresponds to my local anvil node
just ethereum prove --rpc=http://127.0.0.1:8546 --block-number=16

I see an error:

thread 'main' panicked at /Users/marcos/repos/zeth/crates/preflight/src/lib.rs:164:18:
Unsupported chain

line

After inspecting and adding logs to the code, it seems that the error is caused because the chain from the RPC is detected as AnvilHardhat but the chain_spec mapping does not consider this config

    fn chain_spec(chain: &NamedChain) -> Option<Arc<Self::ChainSpec>> {
        match chain {
            NamedChain::Mainnet => Some(MAINNET.clone()),
            NamedChain::Sepolia => Some(SEPOLIA.clone()),
            NamedChain::Holesky => Some(HOLESKY.clone()),
            NamedChain::Dev => Some(DEV.clone()),
            // Missing AnvilHardhat here
            _ => None,
        }
    }
Copy link

linear bot commented Mar 4, 2025

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

No branches or pull requests

1 participant