ModulesΒ§
- IInvariant
Test - Module containing a contractβs types and functions.
- campaign π
- error π
- replay π
- result π
- shrink π
StructsΒ§
- Check
Sequence Options - Options controlling how
check_sequenceevaluates a candidate call sequence. - Check
Sequence Outcome - Outcome from replaying an invariant call sequence through
check_sequence. - Handler
Assertion Failure - A handler-side assertion bug: a
require/assertinside a fuzzed handler that the campaign reached. Deduped by(reverter, selector)site (Echidna/Medusa semantics), shortest sequence wins on collision. - Handler
Replay Outcome - Result of a strict handler-bug replay: anchor asserts, no earlier call asserts, and the recomputed edge fingerprint identifies which path the assertion took.
- Invariant
Campaign πSeed - Immutable state selected once for a logical invariant campaign and cloned into each worker.
- Invariant
Executor - Wrapper around any
Executorimplementer which provides fuzzing support using [proptest]. - Invariant
Failure πMetrics - Tracks invariant failure counts during a campaign.
- Invariant
Failures - Stores invariant test failures and revert counts.
- Invariant
Fuzz Test Result - The outcome of an invariant fuzz test
- Invariant
Metrics - Contains invariant metrics for a single fuzzed selector.
- Invariant
Progress πContext - Invariant
Test π - Contains invariant test data.
- Invariant
Test πData - Contains data collected during invariant test runs.
- Invariant
Test πRun - Contains data for an invariant test run.
- Invariant
Throughput πMetrics - Campaign-level throughput metrics for invariant progress reporting.
- Sequence
Shrink - Shrinker for a call sequence failure. Iterates sequence call sequence top down and removes calls one by one. If the failure is still reproducible with removed call then moves to the next one. If the failure is not reproducible then restore removed call and moves to next one.
- Shrink
Candidate Keys - Shared key set for shrinkers that need to skip duplicate concrete replays.
- Shrink
Run - Shared shrink attempt driver.
- Shrink
RunStats - Attempt counters collected while trying shrink candidates.
EnumsΒ§
- Check
Sequence Failure Site - Concrete failure site observed while replaying a sequence through
check_sequence. - Failure
Key - Identifies a single entry in the
InvariantFailuresmap. Invariant predicate failures and handler-side assertion bugs share one map keyed by this enum. - Invariant
Corpus πPersistence - Invariant
Fuzz Error
ConstantsΒ§
- DEFAULT_
DEPTH_ πFOR_ INVARIANT_ WORKER_ CAP - Baseline depth used to preserve the previous default-depth worker heuristic.
- INVARIANT_
FOCUS_ πWORKER_ DIVISOR - Share of parallel workers reserved for selector focus mode.
- MIN_
ESTIMATED_ πCALLS_ PER_ INVARIANT_ WORKER - Minimum estimated handler calls assigned to each auto invariant worker.
- MIN_
RUNS_ πPER_ INVARIANT_ WORKER - Minimum number of logical runs assigned to each auto invariant worker at the default invariant depth.
FunctionsΒ§
- auto_
invariant_ πworker_ count - build_
handler_ πfailure_ event - build_
invariant_ πprogress_ json - Builds the machine-readable invariant progress payload emitted during a campaign.
- call_
after_ πinvariant_ function - Calls the
afterInvariant()function on a contract. Returns call result and if call succeeded. The state after the call is not persisted. - call_
invariant_ πfunction - Calls the invariant function and returns call result and if succeeded.
- campaign_
seed_ πand_ corpus_ seed_ for_ worker - check_
sequence - Checks if the given call sequence breaks the invariant.
- check_
sequence_ value - Executes a call sequence and returns the optimization value (int256) from the invariant function. Used during shrinking for optimization mode.
- collect_
data π - Collects data from call for fuzzing. However, it first verifies that the sender is not an EOA before inserting it into the dictionary. Otherwise, we flood the dictionary with randomly generated addresses.
- execute_
tx - Executes an invariant replay fuzz call and returns the result.
- execute_
tx_ and_ register_ created - Executes an invariant replay call on a validation executor and registers created targets.
- focused_
campaign_ πseed_ for_ worker - focused_
targeted_ πcontracts - gas_
report_ πsamples_ for_ worker - handler_
site_ already_ minimal - True iff there is already a
HandlerAssertionFailureforsiteno longer thancandidate_len. Used to skip inserting a not-strictly-shorter repro. - invariant_
focus_ πseed - invariant_
focus_ πworker_ count - invariant_
focus_ πworker_ index - invariant_
run_ πdepth - invariant_
worker_ πcollects_ evm_ cmp_ log - invariant_
worker_ πconfig - invariant_
worker_ πcount_ with_ threads - invariant_
worker_ πrunner - invariant_
worker_ πseed - max_
invariant_ πworkers_ for_ campaign - rate_
per_ πsec - Converts a cumulative campaign total into an average per-second rate.
- record_
new_ πinvariant_ failures - Bridges newly-recorded invariant breaks from
failures.errorsinto the pulsefailure_metricsso the live progress stream reflects breaks as they happen. Iterates in declaration order so the emitted βfailureβ events are deterministic. - replay_
error - Replays and shrinks a call sequence, collecting logs and traces.
- replay_
handler_ failure_ sequence - Replays a handler-bug sequence and returns whether the anchor still asserts on the same path. Rejects sequences with a pre-anchor assertion (would be a different bug).
- replay_
run - Replays a call sequence for collecting logs and traces. Returns counterexample to be used when the call sequence is a failed scenario.
- round_
rate_ πfor_ progress - should_
continue_ πinvariant_ worker - shrink_
sequence_ by_ removing - Shared sequence shrinker. Tries to drop each call;
predicatedecides whether the candidate should be accepted, rejected, or skipped without spending a replay attempt.