-
-
Notifications
You must be signed in to change notification settings - Fork 144
Write fuzz tests #184
Copy link
Copy link
Open
Labels
effort: highLarge or difficult task.Large or difficult task.priority: 1This is important. It should be dealt with shortly.This is important. It should be dealt with shortly.type: testAdding, updating, or removing tests.Adding, updating, or removing tests.work: complicatedSense-analyze-respond. The relationship between cause and effect requires analysis or expertise.Sense-analyze-respond. The relationship between cause and effect requires analysis or expertise.
Description
Metadata
Metadata
Assignees
Labels
effort: highLarge or difficult task.Large or difficult task.priority: 1This is important. It should be dealt with shortly.This is important. It should be dealt with shortly.type: testAdding, updating, or removing tests.Adding, updating, or removing tests.work: complicatedSense-analyze-respond. The relationship between cause and effect requires analysis or expertise.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
divandmulthat produce an output of zero can be fuzzed because there is no need to test against another mathematical implementation.absconvertFromconvertTodivgmmul2. 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.