Replies: 4 comments 7 replies
-
Hey @engn33r, thanks for sharing this idea! Is there somewhere a comparison about the difference between both test properties? So, personally, I prefer very much to continue keeping
Thougths? |
Beta Was this translation helpful? Give feedback.
-
I can only point to the blog post overview of the tests at https://blog.trailofbits.com/2023/02/27/reusable-properties-ethereum-contracts-echidna/ but I will call in @bsamuels453 who probably can better speak to what the property tests enable. |
Beta Was this translation helpful? Give feedback.
-
Echidna vs. Foundry The big difference between Echidna and Foundry fuzzing is that Echidna uses stateful fuzzing and Foundry uses stateless fuzzing. This means certain issues cannot be detected using Foundry fuzzing unless an explicit test case is built for the test case in mind. The recent Raft finance hack is a good example of a hack that likely could not be detected using Foundry fuzzing due to the necessity of chaining multiple bugs + calls together to create a property violation. Another big difference worth calling out is that Echidna is coverage-guided and Foundry is not. Echidna will prefer picking corpus parameters that increase coverage as much as possible. This makes intuitive sense, but it's hard to truly measure the difference because of the stateful vs. stateless detail. While Halmos is a very cool tool, I think it only makes sense as an extension of stateless fuzzing that compensates for Foundry's poor corpus selection. Halmos won't be able to detect issues that require specific state transitions that a stateful fuzzer can achieve. a16z tests vs. crytic/properties Because of the differences between each fuzzer, crytic/properties is written for stateful fuzzing. As I mentioned before, it's very challenging to qualitatively measure the difference between stateful and stateless fuzzing, but according to the math, stateful should be better. I think the only test crytic/properties has that are clearly superior to a16z is the rounding direction detector, but it's a bit challenging to set up which may impede your use case. Anyways, if there's any devops issues/friction you've experienced with integrating Echidna with your system, pls let me know so we can get issues filed. |
Beta Was this translation helpful? Give feedback.
-
Closing this discussion as I'm tracking the initiative now here: #184. |
Beta Was this translation helpful? Give feedback.
-
When ERC4626 was added to snekmate, property tests from https://github.com/a16z/erc4626-tests were added. More recently, Trail of Bits wrote some property tests that are similar but could offer additional assurance https://github.com/crytic/properties.
I have not tested these property tests yet, but they may be worth adding here. But if the existing test coverage is strong, then these may not provide much benefit.
Thoughts on whether this might be useful to explore now that vyper support in echidna has improved?
Beta Was this translation helpful? Give feedback.
All reactions