debug: standardize callTracer output and add debug_traceCall - #855
Draft
MysticRyuujin wants to merge 3 commits into
Draft
debug: standardize callTracer output and add debug_traceCall#855MysticRyuujin wants to merge 3 commits into
MysticRyuujin wants to merge 3 commits into
Conversation
MysticRyuujin
force-pushed
the
calltracer-spec-fixtures
branch
from
August 11, 2026 17:22
8807e61 to
51dd82f
Compare
Specify the callTracer output for debug_traceTransaction, debug_traceBlockByNumber/ByHash, and a new debug_traceCall. Add the recursive CallFrame/CallLog/CallTracerConfig/CallTracerBlockEntry schemas, specgen absolute-URI $ref passthrough, and speccheck tracer-aware anyOf branch selection. Fixtures regenerated separately against the osaka+calltree chain.
The chain now comes from a hivechain build carrying the calltree contract and the tx-calltree / tx-callrevert block modifiers (hive #1587, also included in hive #1589), so the fixtures can exercise nested call trees: inner reverts, STATICCALL write protection, DELEGATECALL logs, CALLCODE, precompile calls, and CREATE followed by SELFDESTRUCT. Ten blocks carry a calltree invocation. Regenerated with -lastfork bpo2 -length 54, unchanged from the previous chain parameters, so the only behavioural difference is the added call-family coverage. Every fixture is refilled because the block hashes change. speccheck passes and the debug_trace* fixtures were replayed against six clients with hive rpc-compat.
…fs stubbed The docs dereferencer fetches absolute-URI $refs over HTTP; the CallFrame recursion anchor resolves in-document via $id and is not published as a URL.
MysticRyuujin
force-pushed
the
calltracer-spec-fixtures
branch
from
August 11, 2026 19:48
e4872f4 to
4861c60
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Specifies the
callTraceroutput (undefined until now) fordebug_traceTransaction,debug_traceBlockByNumber/ByHash, and a newdebug_traceCall. Same approach as theopcode-tracer spec (#762); other named tracers keep the unconstrained escape-hatch branch.
Backed by a six-client hive rpc-compat run reproducible from this repo's fixtures. Per-client
conformance below.
What's in it
CallFrame/CallLog/CallTracerConfig/CallTracerBlockEntry(
src/schemas/call-tracer.yaml) — per-field presence/omission rules; recursion via an$idself-ref.
debug_traceCall:GenericTransaction+ optional block param (defaultlatest) +TraceCallConfig(reuses the eth_simulateV1 overrides). A revert is not a JSON-RPC error.$refs so the recursive schema survives; speccheck nowselects the
anyOfbranch by the requested tracer — without it, trace-result validation wasvacuous (including the existing opcode branch). Negative tests included.
hivechain, which now carries the calltree contract andthe
tx-calltree/tx-callrevertmodifiers (cmd/hivechain: add calltree contract and tx mods for callTracer testing hive#1587, merged), so the fixtures exercise nestedcall trees — inner reverts, STATICCALL write protection, DELEGATECALL logs, CALLCODE,
precompile calls, and CREATE followed by SELFDESTRUCT. Every fixture is refilled because the
block hashes change; the chain parameters are otherwise unchanged (
-lastfork bpo2 -length 54).Decisions already baked into the spec (raise it if you object, but these are settled by the
data, not open for a round-trip):
erroris exactly"execution reverted"for REVERT, free-form otherwise — the only string allclients agree on.
gasUsed= receiptgasUsed(4/5 clients; besu to align).Conformance — 32
debug_trace*fixtures replayed per client via hive rpc-compat, 2026-07-29:debug_traceCallblock param optional (one-liner, see below)-32001where the spec/reference returns-32000on an out-of-range block indebug_traceCall, plustrace-genesisand two block-not-found casesonlyTopCall(still returns nestedcalls); accept a block-hash param indebug_traceCall; two opcode-tracer storage-encoding casesdebug_trace*not usable yet; tracked as not-yet-implemented, not a conformance gapErigon and Nethermind are now fully green, and besu's gaps have narrowed considerably since the
earlier survey —
withLog/logs, the chained-DELEGATECALLfrom, the CREATEtoand the rootgasUsedall pass now.One thing I need a nod on:
debug_traceCall's block param is spec'd optional, defaultlatest(matching #812/#814). That needs a one-line geth change (follow-up PR). If we'd ratherkeep it required, say so and I'll drop it.
One thing left open —
logs[].index: spec'd optional and undefined for now. It's the onlyfield the geth family disagrees on — geth block-global (receipt index), erigon/reth tx-local
(each recomputing under
onlyTopCall), nethermind omits it: three meanings plus an absence.Can't be standardized without forcing two clients to change for a value nothing depends on, so
I'm flagging it rather than blessing one — fine to leave undefined unless someone needs it.
(
position, its neighbour, is standardized.)Glamsterdam follow-up: this specs the fork-independent frame shape only. The EIP-8037
two-dimensional gas fields (
regularGasUsed/stateGasUsed/gasRefund) proposed in #852 are thenatural next layer —
CallFrameleavesadditionalPropertiesopen, so they drop in as optionalfields once Glamsterdam is scheduled and clients emit them, without reopening this spec. Thanks
@qu0b for the EIP-8037 groundwork and the client survey.
Draft because: the cross-client divergence report is still to follow, and the
debug_traceCallblock-param question above needs an answer. ethereum/hive#1587 is merged andthis branch is rebased on main with the chain regenerated from upstream hivechain, so the
fixtures are fully reproducible. ethereum/hive#1588 is still open; until it lands, hive enforces
the exact-match tracer fixtures but validates the speconly subset only vacuously. speccheck
enforces those fixtures at generation time, so that is a hive reporting gap, not a spec gap, and
no longer a hard blocker here.
The conformance run above is reproducible from this branch's fixtures with hive rpc-compat; the
exact invocation, and the client-file needed to pin each client, are noted in
GLAMSTERDAM.md.
That branch is a separate Glamsterdam integration superset — nothing in this PR depends on it, and
this spec is deliberately fork-independent.