-
Notifications
You must be signed in to change notification settings - Fork 419
Description
I'm trying to compare Echidna with the Forge fuzzer on several benchmark contracts.
To make the comparison as fair as possible, I've created a benchmark generator that automatically generates challenging contracts. The benchmarks intentionally use a limited subset of Solidity to avoid language features that could be handled differently by different tools. Each contract contains ~50 assertions (some can fail, but others cannot due to infeasible path conditions). (If you're curious, you can find one of the benchmarks here. The benchmark-generation approach is inspired by the Fuzzle benchmark generator for C-based fuzzers.) To find the assertions that can fail, a fuzzer needs to generate up to ~15 transactions and satisfy some input constraints for each transaction.
Since I'm not deeply familiar with Echidna I'd like to check if there are any potential issues with my benchmark setup before sharing results.
For each fuzzing campaign I'm using the following settings that deviate from the defaults:
testLimit: 1073741823 (instead of 50000)shrinkLimit: 1073741823 (instead of 5000)codeSize: 0xc00000 (instead of 0x6000)
The motivation for increasing the testLimit and shrinkLimit settings is that I want to run long fuzzing campaigns (for instance, 1 hour for each contract), and I use the timeout setting to terminate the campaign after a fixed amount of time.
I also increased the codeSize setting to handle larger contracts, if necessary. Currently, all benchmark contracts are below the EVM limit when using the solc optimizer (0.8.19).
Please let me know if you see any potential issues with this setup.