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 invariant tests #158

Open
PaulRBerg opened this issue Jan 26, 2023 · 4 comments
Open

Write invariant tests #158

PaulRBerg opened this issue Jan 26, 2023 · 4 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

See Trail of Bits' Learn how to fuzz like a pro: Fuzzing Arithmetics workshop, minute 34:00:

Trail of Bits: Fuzzing Arithmetics

@PaulRBerg
Copy link
Owner Author

Also minute 1:47:40:

Screenshot 2023-02-03 at 7 38 30 PM

@PaulRBerg
Copy link
Owner Author

The recently added assertEqCall might be useful for this:

foundry-rs/forge-std#311

@PaulRBerg
Copy link
Owner Author

Trail of Bits wrote some invariant tests for PRBMath using Echidna:

crytic/properties#30

@PaulRBerg PaulRBerg changed the title Test mathematical invariants Write invariant tests Aug 5, 2023
@PaulRBerg
Copy link
Owner Author

Also related: Reusable properties for Ethereum contracts.

@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