AztecProtocol / aztec-verifier-contracts

28 stars 8 forks source link

feat(test): differential fuzzing campaign #3

Closed Maddiaa0 closed 1 year ago

Maddiaa0 commented 1 year ago

Description

This pr aims to introduce a differential fuzzing framework between the smart contract verifiers and their c++ counter parts

Usage

    function testFuzzProof() public {
        bytes memory proof = new DifferentialFuzzer()
            .with_flavour(FuzzConfig.PlonkFlavour.Standard)    // plonk flavour
            .with_public_inputs([1,2,3,4])                     // array of public inputs
            .generate_proof();
        verifier.verify(proof);
    }

The above usage will generate a proof for the selected Plonk Flavour then perform a differential test between the c++ verifier and the solidity verifier. The idea being that lots of different circuits can be tested with lots of different ranges of public inputs.

Questions

What is a better approach to this?

Task list