Skip to content

fix(rpc): support eth_simulateV1 with flashblocks#880

Open
realmehmetali wants to merge 1 commit into
worldcoin:mainfrom
realmehmetali:codex/fix-flashblocks-eth-simulate
Open

fix(rpc): support eth_simulateV1 with flashblocks#880
realmehmetali wants to merge 1 commit into
worldcoin:mainfrom
realmehmetali:codex/fix-flashblocks-eth-simulate

Conversation

@realmehmetali

@realmehmetali realmehmetali commented Jul 18, 2026

Copy link
Copy Markdown

Summary

  • remove the Flashblocks RPC panic path for eth_simulateV1
  • delegate state-root configuration to the wrapped OpEthApi
  • preserve the node's existing RPC configuration instead of introducing Flashblocks-specific behavior

Why

eth_simulateV1 consults compute_state_root_for_eth_simulate while serving simulations. The Flashblocks wrapper currently implements that method with unimplemented!(), so a standards-based simulation request can panic its RPC task.

Reliable simulation is especially important for automated wallets and AI agents that preflight multi-step state transitions before submitting transactions. This keeps World Chain's Flashblocks API aligned with the upstream OP-Reth implementation.

Validation

  • cargo fmt --all -- --check
  • cargo check -p world-chain-rpc --all-targets
  • cargo test -p world-chain-rpc --lib (11 passed)

Note

Low Risk
Single-method delegation with no new Flashblocks-specific logic; aligns behavior with the wrapped OP-Reth API.

Overview
Fixes eth_simulateV1 on the Flashblocks RPC wrapper by implementing compute_state_root_for_eth_simulate as a forward to the wrapped OpEthApi instead of unimplemented!(), which could panic the RPC task when simulations read that setting.

Behavior now matches the inner node’s RPC configuration (same pattern as max_simulate_blocks and call_gas_limit), with an #[inline] delegate added for consistency.

Reviewed by Cursor Bugbot for commit 8f9d954. Bugbot is set up for automated code reviews on this repo. Configure here.

@realmehmetali
realmehmetali force-pushed the codex/fix-flashblocks-eth-simulate branch from 9671612 to d19e561 Compare July 18, 2026 21:28
@realmehmetali
realmehmetali force-pushed the codex/fix-flashblocks-eth-simulate branch from d19e561 to c998602 Compare July 18, 2026 21:31
Delegate state-root configuration to the wrapped OP-Reth API so simulation requests no longer hit a panic path.
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

Successfully merging this pull request may close these issues.

1 participant