Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write fuzz tests #184

Open
6 tasks
PaulRBerg opened this issue Apr 11, 2023 · 0 comments
Open
6 tasks

Write fuzz tests #184

PaulRBerg opened this issue Apr 11, 2023 · 0 comments
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.

Comments

@PaulRBerg
Copy link
Owner

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 and mul 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.

@PaulRBerg PaulRBerg added effort: high Large or difficult task. priority: 1 This is important. It should be dealt with shortly. work: complicated Sense-analyze-respond. The relationship between cause and effect requires analysis or expertise. type: test Adding, updating, or removing tests. and removed priority2 labels Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

1 participant