Skip to content
← selected work

Tooling · Movement Labs

Property-Based Fuzzing for Move

Foundry-style property-based fuzzing built directly into Move’s test attribute, with shrinking and a replayable regression corpus.

Period
2026 - in review
Role
Author
Source
Public

The problem

Move tests could only run the inputs someone had written down by hand, so contract invariants were only ever checked against cases their author had already thought of.

What I did

  • Extended the #[test] attribute so parameters become fuzz inputs: bounded and half-open ranges, unions, exclusions, and explicit matrices.
  • Made unassigned parameters fuzz by default, replacing the compiler error that previously just refused them.
  • Shrank failing cases to a minimal counterexample rather than reporting whichever large input happened to fail.
  • Persisted failing inputs to a corpus and replayed them on later runs, so a regression can’t silently disappear.
  • Zipped fuzz dimensions instead of taking their Cartesian product, with a hard cap on expansion, so adding parameters doesn’t explode the suite.
  • Weighted each draw across boundary values, constants harvested from the program, and random input, so the fuzzer spends its time near the edges where bugs live.

Stack

RustMoveCompiler toolingProperty-based testing