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

Add Echidna fuzzing with CI support #8

Merged
merged 15 commits into from
Mar 2, 2022
Merged

Add Echidna fuzzing with CI support #8

merged 15 commits into from
Mar 2, 2022

Conversation

coolhill
Copy link
Contributor

@coolhill coolhill commented Feb 15, 2022

  • Add a first test like EchidnaPercentMath
  • Add echidna-action
  • Corpus caching for long-term fuzz campaign (possibly access-controlled)
  • Upload the artifact

@coolhill coolhill force-pushed the echidna branch 3 times, most recently from 9bfa91e to 5562bcd Compare February 17, 2022 18:33
@coolhill coolhill force-pushed the echidna branch 2 times, most recently from a26e935 to cab3905 Compare February 17, 2022 18:38
// zero address should always revert
function withdraw_zero_address_recipient(uint256[] memory _ids) public {
withdraw_should_revert(address(0), _ids);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

⚠️ reviewer, this is the one invariant added for now, stating that a withdraw should always revert if recipient is 0x0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

more interesting ones will be added in another PR

@coolhill coolhill marked this pull request as ready for review February 28, 2022 15:49
@0xBRM 0xBRM requested review from gabrielpoca and naps62 March 2, 2022 10:27
@naps62
Copy link
Collaborator

naps62 commented Mar 2, 2022

Q: what is the init.json file / how was it generated?

Approving regardless, this is just for my own education

@coolhill
Copy link
Contributor Author

coolhill commented Mar 2, 2022

init.json is the trace of transactions that is used to initialize echidna. In order to generate it you run the etheno tool:
$ etheno --ganache --ganache-args "--deterministic --gasLimit 10000000" -x ./init.json

Then it starts a ganache and will record the transactions. It is documented here. In my case I actually had to use this branch of etheno bc of some bug.

After that you just run deployment script. Since these did not work in our case (not updated) I ran one test in Vault.spec.ts. Probably should switch to use deployment scripts when possible.

@coolhill coolhill merged commit 1fa648d into main Mar 2, 2022
@coolhill coolhill deleted the echidna branch March 2, 2022 16:11
gabrielpoca pushed a commit that referenced this pull request Mar 23, 2022
- introduce vault repository so it does not have to be generated from connection when requiring use
- adjust initial migration file to auto increment ids and allow for nullable updatedAt column
- introduce vaultMetric with collectVaultPerformances() function
- schedule collectVaultPerformances() function to run once per day
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.

2 participants