Skip to content

Add fuzzing and evaluate formal verification for settlement invariants #80

Description

@joelpeace48-cell

Problem

Property tests explore a wide input space but only along dimensions someone
thought to describe. For value-handling code, the highest-severity bugs tend to
live in state sequences nobody imagined — which is precisely what fuzzing and
formal methods are for.

What to do

  • cargo-fuzz targets over entrypoint arguments and, more importantly, over
    sequences of calls. A single malformed call is rarely the bug; an
    unexpected ordering usually is.
  • Run fuzzing on a schedule rather than per-commit, with a corpus committed so
    coverage compounds over time.
  • Evaluate formal verification for the settlement invariants specifically —
    conservation of funds and the escrow state machine are small, high-value, and
    well suited to it.
  • Record the evaluation outcome either way, including a decision not to proceed
    and why.

Acceptance criteria

  • Fuzz targets covering call sequences, not just single calls
  • Scheduled runs with a committed, growing corpus
  • Any crash converted into a regression test
  • Formal verification evaluated in writing with a recommendation

Notes

Even a negative evaluation is worth writing down — "we considered formal
verification and chose fuzzing plus an audit because X" is a credible answer to
a question reviewers do ask.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions