Skip to content

fuzzing: refactor shrinking#786

Merged
anishnaik merged 1 commit intomasterfrom
dev/shrinking-early-exit
Feb 5, 2026
Merged

fuzzing: refactor shrinking#786
anishnaik merged 1 commit intomasterfrom
dev/shrinking-early-exit

Conversation

@anishnaik
Copy link
Copy Markdown
Collaborator

@anishnaik anishnaik commented Feb 5, 2026

Attempts to emulate echidna's shrinking behavior without NoCall

Closes #752

Implements early exit optimization for call sequence shrinking to avoid
unnecessary shrinking attempts when sequences are already minimal.

Changes:
- Add canShrinkTransaction() to check if a single transaction can be shrunk
- Add canShrinkFurther() to check if a sequence has shrinking potential
- Integrate early exit check in shrinkCallSequence() main loop
- Refactor shrinking helpers into fuzzer_worker_shrinking.go
- Simplify removeReverts() to avoid delay accumulation bugs

The shrinking loop now exits early when:
- Sequence has only 1 transaction AND
- That transaction has zero value, gas price, and delays

Toward #752

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@anishnaik anishnaik changed the title fuzzing: add early exit guard and refactor shrinking fuzzing: refactor shrinking Feb 5, 2026
@anishnaik anishnaik merged commit 0ad62db into master Feb 5, 2026
22 of 25 checks passed
@anishnaik anishnaik deleted the dev/shrinking-early-exit branch February 5, 2026 11:04
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.

[Bug]: Medusa fails to shrink call (revert) + vm.roll + vm.warp into only vm.roll + vm.warp

1 participant