Skip to content

fix(l1): relax the nonce check for eth_call-family simulation RPCs#6953

Draft
ilitteri wants to merge 2 commits into
feat/eth-simulate-v1from
fix/eth-call-nonce-check
Draft

fix(l1): relax the nonce check for eth_call-family simulation RPCs#6953
ilitteri wants to merge 2 commits into
feat/eth-simulate-v1from
fix/eth-call-nonce-check

Conversation

@ilitteri

@ilitteri ilitteri commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Motivation

eth_call with only from set fails with a nonce mismatch for any sender whose account nonce is nonzero, where geth succeeds: env_from_generic defaults the tx nonce to 0 when the call object carries none, and the pre-execution hook enforced it unconditionally. Found while implementing eth_simulateV1 (#6951); stacked on that PR because it uses the disable_nonce_check environment flag introduced there.

Description

env_from_generic — used exclusively by the simulation RPCs (eth_call, eth_createAccessList, debug_traceCall) — now sets disable_nonce_check, matching geth's relaxed messages for these endpoints. eth_estimateGas was unaffected: it auto-fills the nonce from storage before simulating. Consensus execution paths don't go through env_from_generic and are unchanged.

How to Test

cargo test -p ethrex-rpc --lib call_integration

The regression test drives eth_call through the HTTP dispatch with a nonce: 0x5 state override on the sender and no nonce in the call object; it fails with the old behavior.

Checklist

  • Updated STORE_SCHEMA_VERSION (crates/storage/lib.rs) if the PR includes breaking changes to the Store requiring a re-sync. — N/A, no Store schema changes.

eth_call, eth_createAccessList and debug_traceCall build their environment
via env_from_generic, which defaults the tx nonce to 0 when the call object
carries none — and the pre-execution hook enforced it unconditionally, so a
from-only call for any sender with a nonzero account nonce failed with a
nonce mismatch. These endpoints execute relaxed messages (geth skips nonce
checks for all of them), so env_from_generic now sets disable_nonce_check.
eth_estimateGas was unaffected: it auto-fills the nonce from storage before
simulating.

The regression test drives eth_call through the HTTP dispatch with a nonce
state override on the sender and no nonce in the call object; it fails with
the old behavior.
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

⚠️ Known Issues — intentionally skipped tests

Source: docs/known_issues.md

Stateless blockchain EF-tests (zkevm bundle) skipped under Amsterdam v6.1.0

make -C tooling/ef_tests/blockchain test-stateless runs against the
tests-zkevm@v0.4.1 fixture bundle — currently the only published zkevm test
release. Those fixtures were filled against an older glamsterdam devnet and
re-execute every case under the for_amsterdam fork, so they lag the
glamsterdam-devnet v6.1.0 gas accounting this client now implements
(EIP-8037 / EIP-8038 / EIP-2780 / EIP-7976 / EIP-7981 …). Re-executing them
yields ~2790/2864 stale-gas failures ("Transaction execution unexpectedly
failed"), spread pervasively across every fork and through the EIP-8025 proof
suite, so there is no clean passing subset to keep.

Until a v6.1.0-aligned zkevm bundle is published, the entire bundle is skipped
for the stateless run via the fork_Amsterdam entry in the stateless-only
EXTRA_SKIPS (tooling/ef_tests/blockchain/tests/all.rs) — every test in this
Amsterdam-only bundle carries the [fork_Amsterdam-…] parametrization in its
test key. The skip is #[cfg(feature = "stateless")], so it does not touch
the non-stateless test-levm run. Coverage of these EIPs is retained by
test-levm, the engine EF-tests, and the state EF-tests, all of which execute
against the live v6.1.0 fixtures and pass.

Re-enable by removing the "fork_Amsterdam" skip once .fixtures_url_zkevm
points at a zkevm bundle filled for glamsterdam-devnet v6.1.0.

@github-actions github-actions Bot added the L1 Ethereum client label Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Lines of code report

Total lines added: 25
Total lines removed: 0
Total lines changed: 25

Detailed view
+-------------------------------------------------+-------+------+
| File                                            | Lines | Diff |
+-------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/eth/transaction.rs | 783   | +25  |
+-------------------------------------------------+-------+------+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L1 Ethereum client

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant