Description
Component
Forge
Describe the feature you would like
Description:
Currently, Foundry’s invariant tests stop execution upon encountering the first assertion failure, ending the entire fuzzing campaign.
Feature Request:
Add an option to allow the fuzzing campaign to continue running until all configured runs are completed, even if assertion failures are encountered.
Rationale:
This feature would enable continuous fuzzing in an "Echidna-style" manner, where failing assertions are collected throughout the run without interrupting the campaign. Certain assertion failures require long-running fuzzing campaigns (e.g., 4+ hours), and stopping on the first failure can hinder the discovery of additional issues.
Expected Behavior:
When the continuous_run
option is enabled, the fuzzer should:
-
Continue running despite encountering assertion failures.
-
Log all failures encountered during the campaign.
-
Upon manual cancellation (e.g., CTRL+C/CMD+C) or completion of the configured runs/timeout, present all call traces for reproducing the assertion failures.
Example Configuration:
[invariant]
continuous_run = true
Example Output:
test/fuzzing/FuzzPositions.sol:FuzzPositions
↪ invariant_GLOB_01: [9/4294967295] Runs
❌ Failures: 2
Additional context
No response
Metadata
Metadata
Assignees
Type
Projects
Status