Repository navigation
fix(typewriter): copy mutations from callers and listeners, and emit inclusion after it commits - #125
Merged
Merged
Conversation
…inclusion after it commits `execute` kept the caller's `params` and `authorization` by reference, and every listener got the runtime's own objects. A caller or listener that changed them changed what revm executed, the rows a queued persist inserts, and the settlement calldata. `execute` now copies its input and each listener gets its own copy. Settlement emitted `included` before the inclusion write committed, so a failed commit left listeners with an inclusion the database never stored. The simulation now changes every input after `execute` takes it and every event after it is emitted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
executedeep-copies its input, and eachon()listener gets its own deep copy of the event. Before this, a caller reusing itsparamsorauthorization, or a listener editing its event, changed what revm executed, the rows a queued persist inserts, and the settlement calldata.includedand tracking the block. Before this, a failed commit left listeners holding an inclusion the database never stored.execute(afterexecutetakes it) and every emitted event. On main, seed 0x02 fails withMutationExpiresTooSoonError. Removing only the listener copy fails the same way.🤖 Generated with Claude Code