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

Vote weighting fuzzing #130

Merged
merged 16 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,086 changes: 1,086 additions & 0 deletions abis/0.8.23/VoteWeighting.json

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions audits/internal11/fuzzing/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Fuzzing VoteWeighting

## Prepare contracts for fuzzing
contracts/test/VoteWeightingFuzzing.sol <br>
contracts/test/EchidnaVoteWeightingAssert.sol <br>

## Fuzzing
```sh
# Move the script to the root of the project
cp start_echidna.sh ../../../
# Move config file to the root of the project
cp echidna_assert.yaml ../../../
cd ../../../
# Run
./start_echidna.sh
```
result overflow: [fuzzing-overflow.PNG](fuzzing-overflow.PNG) <br>
result assert: [fuzzing-assert.PNG](fuzzing-assert.PNG)
2,072 changes: 2,072 additions & 0 deletions audits/internal11/fuzzing/corpusEchidna/covered.1713373564.html

Large diffs are not rendered by default.

2,073 changes: 2,073 additions & 0 deletions audits/internal11/fuzzing/corpusEchidna/covered.1713373572.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions audits/internal11/fuzzing/crytic-export/combined_solc.json

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions audits/internal11/fuzzing/echidna_assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#testMode: overflow
testMode: assertion
coverage: true
corpusDir: corpusEchidna
coverageFormats: ["html"]
# maxBlockDelay: 12
# provide solc remappings to crytic-compile
# https://www.justinsilver.com/technology/programming/slither-echidna-remappings/
cryticArgs: ['--solc-remaps', '@=node_modules/@']

10 changes: 10 additions & 0 deletions audits/internal11/fuzzing/echidna_overflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
testMode: overflow
#testMode: assertion
coverage: true
corpusDir: corpusEchidna
coverageFormats: ["html"]
# maxBlockDelay: 12
# provide solc remappings to crytic-compile
# https://www.justinsilver.com/technology/programming/slither-echidna-remappings/
cryticArgs: ['--solc-remaps', '@=node_modules/@']

Binary file added audits/internal11/fuzzing/fuzzing-assert.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added audits/internal11/fuzzing/fuzzing-overflow.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions audits/internal11/fuzzing/start_echidna.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

rm -rf corpusEchidna/
echidna contracts/test/EchidnaVoteWeightingAssert.sol --contract EchidnaVoteWeightingAssert --config echidna_assert.yaml
Loading
Loading