feat(fuzz): keep observed calls out of corpus#15817
Open
decofe wants to merge 4 commits into
Open
Conversation
decofe
requested review from
0xrusowsky,
figtracer,
mablr and
stevencartavia
as code owners
July 18, 2026 13:45
Collaborator
|
TBD if this is desired 46180e7 I think also mutating immediately upon selecting an observed call remains |
Initialize the isolated coverage snapshots in the test-trace seeding path where they are consumed. Remove a stale test variable so the branch remains warning-free.
…entaur/observed-call-dictionary-1784381979
mablr
reviewed
Jul 23, 2026
| self.push_observed_sequence(tx_seq) | ||
| let mut added = 0; | ||
| for call in calls { | ||
| if !self.observed_call_pool.iter().any(|existing| { |
Member
There was a problem hiding this comment.
This pool is unbounded and each insertion scans/compares every retained call, making distinct observed calls O(N^2) time plus unbounded calldata memory. We could use a dedupe set with a bounded reservoir/LRU.
| pub fn new_tx(&self, test_runner: &mut TestRunner) -> Result<BasicTxDetails> { | ||
| // Keep synthesizing fresh calls, but regularly use coverage-winning observed shapes as | ||
| // generation seeds. They are deliberately separate from corpus selection and persistence. | ||
| if !self.observed_call_pool.is_empty() && test_runner.rng().random_ratio(1, 2) { |
Member
There was a problem hiding this comment.
Calls to run-local created contracts remain in this pool after those targets are cleared, so this fixed 50% path can increasingly select dead addresses. We could prune/tag dynamic-target entries at run end (and consider making this rate weighted rather than fixed).
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.
Stacked on #15816.
Keep coverage-winning observed calls in a separate, deduplicated generation dictionary, analogous to Echidna
GenDict.wholeCalls. Sibling zero-input tests contribute direct observed calls only when their execution adds coverage; they are never persisted or counted as corpus entries. A later fuzz execution must gain coverage before normal corpus promotion.Validation:
cargo +nightly fmtandgit diff --checkpass. Focusedfoundry-evmtests are blocked before compilation because Cargo cannot fetch the pinnedfoundry-rs/optimismGit dependency (HTTP 401).Prompted by: @0xalpharush