Skip to content

clients: enable testing namespace and pin gas-limit target#1496

Merged
fjl merged 5 commits into
ethereum:masterfrom
MysticRyuujin:testing-namespace
Jun 9, 2026
Merged

clients: enable testing namespace and pin gas-limit target#1496
fjl merged 5 commits into
ethereum:masterfrom
MysticRyuujin:testing-namespace

Conversation

@MysticRyuujin

Copy link
Copy Markdown
Contributor

Summary

Two related fixes for the rpc-compat simulator so the testing_* namespace fixtures from execution-apis replay byte-exact across clients. The PR bundles three commits already on the testing-namespace branch:

  1. Add testing namespace to clients — adds testing to the JSON-RPC allowlist for besu, erigon, go-ethereum, nethermind, and reth. Without this, testing_buildBlockV1 / testing_commitBlockV1 requests get namespace 'testing' is disabled errors.
  2. fix: restore HIVE_TERMINAL_TOTAL_DIFFICULTY authrpc block in geth.sh — restores the engine-API auth-rpc setup that the previous commit accidentally removed.
  3. clients/go-ethereum, clients/nethermind: pin gas-limit target via HIVE_TARGET_GAS_LIMIT (new in this PR) — plumbs a new HIVE_TARGET_GAS_LIMIT env var through clients/go-ethereum/geth.sh (--miner.gaslimit) and clients/nethermind/mkconfig.jq (Blocks.TargetBlockGasLimit).

Why the gas-limit pin matters

geth's CalcGasLimit moves the parent gas limit toward miner.gaslimit (default 60M) by 1/1024 per block. Nethermind keeps the parent gas limit unchanged unless Blocks.TargetBlockGasLimit is set. Under rpc-compat's ~75M-gas-limit chain head, the two clients diverge from block 1 onward, so blocks produced by testing_buildBlockV1 / testing_commitBlockV1 get different hashes per client and the strict-match tests fail on Nethermind. Pinning both clients to the same target makes them produce identical blocks.

Companion PRs

Test plan

MysticRyuujin and others added 5 commits February 25, 2026 13:32
Co-authored-by: Cursor <cursoragent@cursor.com>
…E_TARGET_GAS_LIMIT

Without an explicit target, geth and Nethermind use different default
gas-limit policies under the engine API: geth's CalcGasLimit moves the
parent gas limit toward miner.gaslimit (default 60M) by 1/1024 per
block, while Nethermind keeps the parent gas limit unchanged unless
Blocks.TargetBlockGasLimit is set. With the rpc-compat chain head sitting
at ~75M, the two clients diverge from block 1 onward, so blocks produced
by testing_buildBlockV1 / testing_commitBlockV1 in rpc-compat replay get
different hashes between clients and the strict-match tests fail on
Nethermind.

Wiring a new HIVE_TARGET_GAS_LIMIT env var through geth.sh
(--miner.gaslimit) and Nethermind's mkconfig.jq (Blocks.TargetBlockGasLimit)
makes both clients target the same ceiling. With the value set to
60000000 in execution-apis/tools/chain/forkenv.json, CalcGasLimit
produces the same gas limit at every step on both clients, so the
recorded rpc-compat fixtures replay byte-exact on both.

Spec and cross-client fixtures: ethereum/execution-apis#801
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.

2 participants