Skip to content

Simulation step: emitted events and on-demand storage slot changes - #34

Open
gretzke wants to merge 4 commits into
mainfrom
feat/simulation-step-events
Open

Simulation step: emitted events and on-demand storage slot changes#34
gretzke wants to merge 4 commits into
mainfrom
feat/simulation-step-events

Conversation

@gretzke

@gretzke gretzke commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Each simulated step in the review checklist now shows its emitted events, and storage slot changes can be requested per step.

Events:

  • Captured on both simulating tiers: eth_simulateV1 call results and fork receipts. The estimate tier shows a note that events need a simulating tier.
  • Rendered per step in a collapsed section with a capped, scrollable height.
  • Decoding order: the plan's frozen contract ABIs first, then a lazy 4byte.directory signature lookup through a new cached core proxy endpoint (only fired when the section is expanded and the topic is unknown), raw topics and data as the final fallback. Signature lookups time out after 2s and never block anything.

Storage slot changes (the original issue):

  • A "Get storage slot changes" button below the events section of each step. It calls a new endpoint that replays the chain's schedule on a fork container and returns the diff of that step's transaction via debug_traceTransaction with the prestate tracer in diff mode.
  • Raw 32-byte slot values (before and after), grouped by touched contract with the call target first. Fork only, if Docker is unavailable the error shows inline.

Closes #21.

@david-uniswap david-uniswap left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran the core deployment suites (219 pass) and the checklist frontend tests (6 pass) locally. Event capture on both tiers, the 4byte proxy with negative caching and in-flight coalescing, and the single-flight storage trace endpoint all look right.

One non-blocking thing worth a follow-up: the fork replay in storageSlotChanges awaits each receipt but never checks receipt.status. If a prerequisite tx (or the target itself) reverts on the fork, the endpoint returns a diff that reads as "no storage slots changed" instead of an error. Low risk since the button only shows after a successful simulation of the same schedule, but checking status and erroring on a reverted replay would make the result trustworthy on its own.

Minor UX note, fine as is: the single storageLoading flag makes every step's button show the loading label while one trace runs, which at least matches the server's single-flight behavior.

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.

Simulation step: function calls more details

2 participants