-
Notifications
You must be signed in to change notification settings - Fork 387
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
RFC: Echidna 2.0 #674
RFC: Echidna 2.0 #674
Conversation
Here is an idea i had, maybe it makes sense, maybe it doesn't 🤷♂️ Instead of having to manually create valid values using a modulo, or returning early if a value is too low or high, it would be nice if you could specify valid ranges for values. Pretty much all of the important args to functions in smart contracts are (arrays of) integers. So the below only applies to (u)int and arrays of (u)int). If you use a modulo to generate valid values then you (1) have to write all the modulo code and (2) echidna will report the original function arg inputs when it finds a violation (instead of the value after the modulo). However, with the proposed changes in this PR you could emit an event to tell you the actual value used, still a bit cumbersome. If you don't use a modulo but do something like this on the first line of the function So how about this //@echidna amount: <1-10000000000>, fee: <1,10,100>, distribution: <[33,33,34], [25, 50, 25], [10-20, 10-20, 10-20]>
function deposit(uint amount, uint fee, uint[3] memory distribution, bytes data) public {
// ...
}
I think having such syntax would eliminate a lot of code using modulo to get valid values, be more explicit, and would generally simplify using echidna. Let me know what you think 🙂 |
…tive variable names & comments (#679)
@ggrieco-tob asked me to expand on my feedback in #682 here. Apparently, Echidna currently does not report multiple assertion violations if they are in the same function. This behavior was a bit unexpected for me since most fuzzers will simply accumulate all the crashes until they hit the time limit. I understand that it is important to report violations as soon as they are found. However, that does not necessarily mean that the fuzzer needs to stop. The current design seems to be motivated by the expectation that developers would fix the violation and restart the fuzzer afterwards. However, for audits and long-running campaigns (say 24h or more) it's much more difficult to "fix" the code. It might therefore be useful to support this use case through a separate option. I had originally tried to use |
Regarding |
Hi @ggrieco-tob, |
* Draft GitHub action * Update action.yml * Allow solc version selection * Updation action.yml
* Use homebrew to set the OpenSSL prefix * Use `uname` to set $HOST_OS if it is not set in the environment * Do not re-clone the libff repo if it already exists * Adds additional environment variables to appease OpenSSL/CMake
This removes the action from the echidna repository. The action will now live on its own repository, where it can be versioned and published independently. Additionally, this updates the workflow to refer to the action on its new location, as well as adds a few lines to the README pointing to the new action location.
Superseded by #716 |
The next major release of Echidna should allows us to go beyond property testing for smart contracts and see through their code when it fails. In particular, we want a tool that is able to run:
AssertionFailure(...)
) in any contract and even if the execution reverts.int256
) and Echidna tries to find a maximum.If no test is selected, Echidna should run in exploration mode, where coverage feedback allows our tool to reach deep lines of the contracts.
On top of that, we want Echidna to show us valuable information regarding why the test is failing and what is the state of the contract before and after it failed. That's is why Echidna will show:
This new release also features a simplified interface, using a "test mode" to specify what type of tests you want. For instance, we offer two examples:
This change enables the removal of the usage of
checkAssertion
,benchmarkMode
or any boolean setting that indicates the testing mode.The code in this PR is very unstable and it is NOT ready for testing yet.