Skip to content

test: pin the field set of debug_trace* struct logs - #1945

Draft
Wodann wants to merge 1 commit into
mainfrom
test/debug-trace-struct-log-fields
Draft

Wodann wants to merge 1 commit into
mainfrom
test/debug-trace-struct-log-fields

Conversation

@Wodann

@Wodann Wodann commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

The tests of #1907 check that the required StructLog fields are present and that three named fields are absent by default, but none rejects a field outside the spec's schema. A field that alloy or revm-inspectors adds would pass every test and reach every consumer of the trace. This PR adds the test the review of #1907 asked for.

What changes

  • One test in crates/edr_provider/src/requests/debug/tests/edr.rs traces a call into a loop that runs out of gas, with memory and return data enabled. It asserts that the trace has exactly the OpcodeTransactionTrace fields, that every step has only StructLog fields, and that the steps together carry all eleven of them, so an empty or partial trace cannot pass it.
  • A module-doc bullet gives the motivation. The spec does not forbid additional properties, so the closed set is an EDR pin.

Validation

Removing error from the pinned set and injecting a memSize key into one step each make the test fail, with the offending key and step in the message.

Notes for review

  • The fixture runs on Osaka. From Amsterdam, EDR adds the EIP-8037 stateGasCost and stateGasReservoir fields deliberately, and the eip8037 integration tests already pin them.

@Wodann Wodann added the no changeset needed This PR doesn't require a changeset label Nov 17, 2026
@Wodann
Wodann temporarily deployed to github-action-benchmark November 17, 2026 05:48 — with GitHub Actions Inactive
@changeset-bot

changeset-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 418f1c0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.77%. Comparing base (a3f6038) to head (418f1c0).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1945      +/-   ##
==========================================
- Coverage   81.77%   81.77%   -0.01%     
==========================================
  Files         475      475              
  Lines       85145    85145              
  Branches    85145    85145              
==========================================
- Hits        69626    69625       -1     
  Misses      13226    13226              
- Partials     2293     2294       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Wodann
Wodann temporarily deployed to github-action-benchmark November 17, 2026 06:17 — with GitHub Actions Inactive
@Wodann
Wodann temporarily deployed to github-action-benchmark November 17, 2026 06:17 — with GitHub Actions Inactive
@Wodann Wodann self-assigned this Nov 17, 2026
@Wodann
Wodann force-pushed the test/debug-trace-struct-log-fields branch from 14d5f77 to cfa6168 Compare November 17, 2026 07:36
@Wodann
Wodann had a problem deploying to github-action-benchmark November 17, 2026 07:36 — with GitHub Actions Error
@Wodann
Wodann force-pushed the test/debug-trace-struct-log-fields branch from cfa6168 to 387ed76 Compare November 17, 2026 07:36
@Wodann
Wodann had a problem deploying to github-action-benchmark November 17, 2026 07:36 — with GitHub Actions Error
No test rejected a struct log field outside the spec's StructLog schema.
A field that revm-inspectors or alloy added would pass every test. EDR
serialises the struct log verbatim, so it would reach every consumer.

The new test traces a call into a loop that runs out of gas, with memory
and return data enabled. Its steps carry all eleven StructLog fields.
The test asserts that no step has any other field. It also asserts that
the steps together have every field, so an empty or partial trace cannot
pass it. The trace's top-level fields are pinned to the
OpcodeTransactionTrace set.
@Wodann
Wodann force-pushed the test/debug-trace-struct-log-fields branch from 387ed76 to 418f1c0 Compare November 17, 2026 07:38
@Wodann
Wodann temporarily deployed to github-action-benchmark November 17, 2026 07:38 — with GitHub Actions Inactive
@Wodann
Wodann temporarily deployed to github-action-benchmark November 17, 2026 07:40 — with GitHub Actions Inactive
@Wodann
Wodann temporarily deployed to github-action-benchmark November 17, 2026 07:40 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
github-action-benchmark — 418f1c0a Deployed Nov 17, 2026 by Wodann via Run JS scenario runner benchmark for Hardhat Node style workload #6246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changeset needed This PR doesn't require a changeset

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant