fuzzing: fix call sequence display showing identical block/time (#753)#785
Merged
fuzzing: fix call sequence display showing identical block/time (#753)#785
Conversation
Capture immutable snapshots of block number and timestamp when each call executes to preserve actual execution context. Previously all calls showed the same values because they shared a pointer to a mutable block header that was modified in-place during execution. Also fixes nil pointer issues in String() method for simple transfers. Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Collaborator
Author
|
Closes #753 |
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
Context
The fuzzer intentionally modifies pending block headers in-place during execution (mimicking cheat codes like vm.warp/vm.roll). This allows time to advance within a single block for efficiency and test flexibility. However, all CallSequenceElement objects shared a pointer to the same mutable block header, causing the display to show the FINAL values for all calls instead of their actual execution context.
This fix captures immutable snapshots when each call executes, preserving the actual block number and timestamp without changing execution semantics.
Test plan
go test -v ./fuzzing/calls/...TestCallSequenceBlockTimestampDisplay- verifies distinct values for calls with delaysTestCallSequenceDisplayWithoutChainReference- verifies graceful nil handlingTestCallSequenceMultipleCallsSameBlock- verifies same values for zero-delay callsgo test -v ./...🤖 Generated with Claude Code