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

feat: formal verification & fuzz campaign #69

Merged
merged 35 commits into from
May 31, 2024
Merged

Conversation

simon-something
Copy link
Member

No description provided.

@simon-something simon-something marked this pull request as ready for review May 20, 2024 16:07
.github/workflows/coverage_check.yml Outdated Show resolved Hide resolved
.github/workflows/coverage_check.yml Outdated Show resolved Hide resolved
.github/workflows/coverage_check.yml Outdated Show resolved Hide resolved
.github/workflows/coverage_check.yml Outdated Show resolved Hide resolved
.github/workflows/tests.yml Outdated Show resolved Hide resolved
Comment on lines +95 to +101
- name: Run Echidna
uses: crytic/echidna-action@v2
with:
files: .
contract: InvariantGreeter
test-mode: assertion
crytic-args: --ignore-compile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would the action look for multiple invariant contracts? Each would have its own step?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can pass a directory (in files), contract is optional

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can pass a directory

@drgorillamd let's do that? Will be one less thing for whoever starts with the boilerplate to modify.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

til: when passing a directory, only the first contract is run, including the import (so here, it tries to run it on IERC20...). For multiple contracts, people are actually using a proxy

gas1cent
gas1cent previously approved these changes May 28, 2024
0xOneTony
0xOneTony previously approved these changes May 29, 2024
Copy link
Member

@0xOneTony 0xOneTony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

gas1cent
gas1cent previously approved these changes May 29, 2024
@@ -22,7 +22,9 @@
"lint:sol-tests": "solhint -c .solhint.tests.json 'test/**/*.sol'",
"prepare": "husky install",
"test": "forge test -vvv",
"test:fuzz": "echidna test/invariants/fuzz/Greeter.t.sol --contract GreeterInvariant --corpus-dir test/invariants/fuzz/echidna_coverage/ --test-mode assertion",
Copy link
Contributor

@0xmoebius 0xmoebius May 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use wildcards to run against all contracts under fuzz/ ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check the previous comment from gas @0xmoebius ;)

@simon-something simon-something dismissed stale reviews from gas1cent and 0xOneTony via 254ca83 May 31, 2024 14:14
@simon-something simon-something merged commit a3f1de4 into main May 31, 2024
7 checks passed
@simon-something simon-something deleted the feat/invariants branch May 31, 2024 14:54
xorsal pushed a commit that referenced this pull request Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants