Skip to content

web: show storage as of the current step in the trace viewer - #319

Merged
gnidan merged 1 commit into
mainfrom
web-trace-storage-per-step
Oct 6, 2026
Merged

gnidan merged 1 commit into
mainfrom
web-trace-storage-per-step

Conversation

@gnidan

@gnidan gnidan commented Oct 4, 2026

Copy link
Copy Markdown
Member

The trace viewer read storage once, after the whole transaction had run, and used that one snapshot at every step. Any storage variable therefore showed its final value from step 0 on, and the Storage section never changed while stepping.

Trace steps carry no storage, so this reads each SSTORE from its operands on the stack and builds the storage for every step from the storage before execution plus the SSTOREs that ran before that step. That matches the stack and memory in a step, which are also the state before the step's own instruction runs. The viewer uses the per-step storage for the Storage section, variable values and call arguments.

The logic is a small function in storageByStep.ts with a test next to it. This is the first test in packages/web.

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-06 15:28 UTC

@gnidan
gnidan merged commit 35ce126 into main Oct 6, 2026
7 checks passed
@gnidan
gnidan deleted the web-trace-storage-per-step branch October 6, 2026 15:24
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