zBlock-2 / summa-solvency-Turing

Apache License 2.0
0 stars 0 forks source link

Set up the Fuzz testing suite in summa #2

Open 0xpanicError opened 4 months ago

0xpanicError commented 4 months ago

I'm finally was able to setup a fuzz testing suite in the project by using cargo fuzz. To setup I have used the 3 functions from zk_prover/src/merkle_sum_tree/utils/operatio_helpers

I obviously didn't expect to find any bugs in these 3 functions but I can confirm no inputs in fuzz testing cause them to panic. Now I will work on fuzzing other functions in utils directory and then move to MST implementation.

0xpanicError commented 4 months ago

Fuzz tested the build_leaves_from_entries , build_merkle_tree_from_leaves and build_middle_level function in zk_prover/src/merkle_sum_tree/utils/build_tree.rs

No inputs caused the function to panic.

Code: https://github.com/teddav/summa/blob/mst_fuzzer/zk_prover/fuzz/fuzz_targets/build_leaves_from_entries.rs