Write fuzz tests #184
Labels
effort: high
Large or difficult task.
priority: 1
This is important. It should be dealt with shortly.
type: test
Adding, updating, or removing tests.
work: complicated
Sense-analyze-respond. The relationship between cause and effect requires analysis or expertise.
Context
#183 split the tests into two categories, "unit" and "fuzz", but it didn't add any new fuzz tests.
This is a task developing in stages.
1. Porting Over
The idea is to replicate the existing tests that can be fuzzed, e.g. all tests in
div
andmul
that produce an output of zero can be fuzzed because there is no need to test against another mathematical implementation.abs
convertFrom
convertTo
div
gm
mul
2. Differential Fuzzing
Here, the goal is to verify that the outputs of all Solidity functions in PRBMath closely match those of an alternative implementation written in Rust.
See the Foundry Book tutorial on differential fuzzing, and my related tweet about this.
The text was updated successfully, but these errors were encountered: