0

I'm working on a zk-based privacy application and we've started on the process of fuzz-testing our core (zk-snark based) smart contracts. We started our approach with Echidna (utilizing etheno for E2E testing). That decision was made based on the fact that our codebase utilizes the Hardhat framework, but it looks there are many issues with echidna and crytic-compile and the experience has not been as smooth.

The main issue with fuzzing zk-based SCs are that the inputs (which include proofs that are generated outside in a more complex process than usual through the circuits), need to be estimated very sharply by the fuzzer. Using echidna with etheno supposedly provides us with the advantage of echidna being able to use some of our unit-test inputs and function routing to make better guess at the inputs that it fees to the SC functions while fuzzing in assertion mode.

We want to try foundry too, but having not developed over foundry yet, I'm worried if we can migrate our crypto-related scripts (currently in TS) to foundry, which utilizes solidity scripting and if its fuzzer can make as intelligent guesses for the zk-based functions..

Also, there doesn't seem to be any zk-based protocol that has hosted its fuzz-tests in github with echidna. So, it'd be really helpful to get pointers to any public zkp-based codebase that has fuzz-tests for its core SCs for reference..

Lastly, recommendations on which framework: (Echidna + hardhat) or Foundry (standalone or with HH) would be best for going forward with fuzz-testing the zk-based SCs would be highly appreciated.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.