Skip to content

docs(validation): §5.10 trace root-frame gas parity — Portal↔RPC parity (traces.gas)#154

Merged
dzhelezov merged 1 commit into
mainfrom
docs/validation-5.10-gas-parity
Jul 11, 2026
Merged

docs(validation): §5.10 trace root-frame gas parity — Portal↔RPC parity (traces.gas)#154
dzhelezov merged 1 commit into
mainfrom
docs/validation-5.10-gas-parity

Conversation

@dzhelezov

Copy link
Copy Markdown
Collaborator

Documents the traces.gas root-frame divergence class closed by #153 (the structurally-unrelated companion to the §5.9 ancestor-error cascade), resolving the INV-21 row's "documented in VALIDATION.md §5" reference — same follow-the-fix pattern as #151#152 (§5.9).

What §5.10 documents

  • The divergence. Portal serves Parity-style traces whose root action.gas is gasLimit − EIP-2028 intrinsic; ponder's RPC path stores geth callTracer, which seeds the top frame's gas with the full tx.gasLimit before intrinsic deduction. So the pre-fix Portal store wrote the ROOT frame one intrinsic low. gas_used and every non-root frame were already byte-identical.
  • Concrete case. eth mainnet block 19068568, tx 7 (Uniswap V2 swap): root 0x74700 (Portal) vs 0x7a120 (RPC/gasLimit); child [0] 0x3616b on both.
  • Root cause. A derived-representation difference between two self-consistent trace conventions — not a data defect on either side. The RPC store persists geth's convention; the fork matches it.
  • Resolution. fix(traces): root-frame gas parity — Portal store byte-identical to the RPC path on traces.gas (INV-21) #153 overrides the root frame's gas with the parent tx gasLimit (INV-21, mutation-verified), chosen for RPC-parity drop-in determinism — same decision as fix(transform): store NULL not fabricated [] when Portal drops accessList — refines #32 #110 (access_list) and fix(traces): ancestor-error cascade — Portal store byte-identical to the RPC path on traces.error/revert_reason #151 (error cascade); avoids a path-dependent seam at the historical→realtime cutover.
  • Grounding at scale. All 12 preserved Portal-vs-RPC store windows: 2196/2196 root frames RPC.gas == tx.gasLimit (legacy + EIP-1559, intrinsic-independent); gas_used and non-root gas diff zero in every window; root gas + the §5.9 cascade are the only two trace divergence classes, both now closed.
  • Candor. Contract-creation and access-list roots were absent from the corpus (creationRoots=0, alRoots=0 in all 12 windows), so those tx classes rest on the geth callTracer mechanism, not an in-corpus measurement — stated explicitly in the section, the invariant, and the code comment.

Docs-only (VALIDATION.md, +21 lines). No code / test / lint surface touched.

🤖 Generated with Claude Code

…ty (traces.gas)

Documents the traces.gas root-frame divergence class closed by #153 (merged
3bfc074), the structurally-unrelated companion to the §5.9 error cascade. Portal
serves Parity action.gas (gasLimit minus the EIP-2028 intrinsic) on the root
frame; ponder's RPC path stores geth callTracer, which seeds the top frame's gas
with the full tx.gasLimit before intrinsic deduction — so the pre-fix Portal
store wrote the root one intrinsic low (gas_used and all non-root frames already
byte-identical). #153 overrides the root frame's gas with the parent tx gasLimit
(INV-21) for drop-in RPC-parity determinism, the same "match the RPC path"
decision as #110 (access_list) and #151 (error cascade).

Grounded on all 12 preserved Portal-vs-RPC store windows: 2196/2196 root frames
RPC.gas == tx.gasLimit (legacy + EIP-1559, intrinsic-independent), gas_used and
non-root gas diff zero in every window; root gas + the §5.9 cascade are the only
two trace divergence classes, both now closed. Candor: contract-creation and
access-list roots were absent from the corpus, so those tx classes rest on the
geth callTracer mechanism, not an in-corpus measurement.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dzhelezov dzhelezov marked this pull request as ready for review July 11, 2026 07:51
@dzhelezov dzhelezov merged commit c3bfd1a into main Jul 11, 2026
14 checks passed
@dzhelezov dzhelezov deleted the docs/validation-5.10-gas-parity branch July 11, 2026 07:51
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