Implementation skeleton for exposing the eth_config JSON-RPC method (EIP-7910) as a reth Execution Extension / RPC namespace.
- Workspace layout with three crates:
eth-config-api: pure data model and helpers (no reth deps).eth-config-reth: reth integration layer (feature-gated) with resolver/cache/RPC stubs.eth-config-cli: optional CLI to diffeth_configresponses across nodes.
- Example JSON payloads under
examples/that mirror the EIP response shape. - Makefile shortcuts for fmt/lint/check/test/doc and CLI build.
- Types, module structure, and placeholder resolvers are in place.
- Integration logic still needs to derive fork data from
ChainSpec, compute FORK_HASH (EIP-6122), and wire jsonrpsee modules into reth. - Golden tests are stubbed and marked
#[ignore]; they need real fixtures from the EIP.
make fmt— format workspace.make lint— clippy all targets; setFEATURES=rethto include reth integration.make check/make test— fast correctness checks (tests currently placeholder).make doc— build docs without deps.make cli— build the validator CLI.
tests/hoodi_prague.rs: parses Prague sample and checks presence ofnextfork id.tests/hoodi_cancun.rs: parses Cancun sample with blob schedule and no next fork.tests/no_future_fork.rs: ensuresnext/lastnull handling.tests/bpo_fork.rs: blob-parameter-only fork sample.- Tests live in the
eth-config-testscrate (workspace member) and currently validate the example fixtures deserialize correctly. Run them viamake testorcargo test -p eth-config-tests.
- Adds the
eth_configRPC method to surface the active fork, next/last fork, precompile set, system contracts, blob schedule, and FORK_HASH. - Response shape (camelCase):
current,next,last: fork entries containing fork config (name, block, blobSchedule?, precompiles[], systemContracts[]).forkId:{ hash, next? }matching EIP-6122 semantics.
- Caching requirement: responses must invalidate when crossing a fork boundary.
crates/eth-config-api/src: data models (types.rs), FORK_HASH placeholder (fork_id.rs), registries for precompiles/system contracts.crates/eth-config-reth/src: resolver/cache/RPC/namespace stubs (behindrethfeature).crates/eth-config-cli/src: clap-based placeholder binary.tests/: integration test scaffolding for EIP sample outputs and edge cases.examples/: sampleeth_configpayloads for Cancun, Prague, and blob-parameter-only scenarios.
- Implement
ForkConfigResolverto readreth::chain_spec::ChainSpecand emitForkConfigfor current/next/last at a given block/slot. - Compute
ForkIdper EIP-6122 (hash over fork blocks) infork_id.rs. - Populate precompile/system-contract registries per fork and thread them through the resolver.
- Wire
EthConfigApiinto reth’s RPC builder (namespace.rs) using jsonrpsee. - Fill the golden JSON fixtures from the EIP text and enable the ignored tests.
- The crate names contain hyphens; the Rust module imports use underscores (e.g.,
eth_config_api). - The reth integration is feature-gated to avoid pulling the reth dependency unless requested.