|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Test suite for recursive verification of Honk proofs for both Ultra and Mega arithmetisation. More...
Static Public Member Functions | |
| static void | SetUpTestSuite () |
| static void | test_inner_circuit () |
| Create inner circuit and call check_circuit on it. | |
| static void | test_recursive_verification_key_creation () |
| Instantiate a recursive verification key from the native verification key produced by the inner cicuit builder. Check consistency between the native and stdlib types. | |
| static void | test_independent_vk_hash () |
| Ensures that the recursive verifier circuit for two inner circuits of different size is the same as the proofs are currently constant. This is done by taking each trace block in part and checking all its selector values. | |
| static void | test_recursive_verification () |
| Construct a recursive verification circuit for the proof of an inner circuit then call check_circuit on it. | |
| static void | test_recursive_verification_fails () |
| Construct verifier circuits for proofs whose data have been tampered with. Expect failure. | |
| static void | test_recursive_verification_fails () |
| Tamper with a MegaZK proof in two ways. First, we modify the first non-zero value in the proof, which has to lead to a CircuitChecker failure. Then we also modify the last commitment ("KZG:W") in the proof, in this case, CircuitChecker succeeds, but the pairing check must fail. | |
| static void | test_recursive_verification_with_graph_analysis () |
| Test recursive verification with static graph analysis to detect unconstrained variables. | |
Static Private Member Functions | |
| static InnerBuilder | create_inner_circuit (size_t log_num_gates=10) |
| Create a non-trivial arbitrary inner circuit, the proof of which will be recursively verified. | |
Test suite for recursive verification of Honk proofs for both Ultra and Mega arithmetisation.
Inner* types describe the type of circuits (and everything else required to generate a proof) that we aim to recursively verify. Outer* describes the arithmetisation of the recursive verifier circuit and the types required to ensure the recursive verifier circuit is correct (i.e. by producing a proof and verifying it).
| Params | contains RecursiveFlavor and IO type for the test |
Definition at line 42 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 50 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 52 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 53 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 48 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 59 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 54 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 49 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 51 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 58 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 45 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 57 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 76 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 62 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 63 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 68 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 64 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 66 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 67 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 65 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 74 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 44 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 71 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 72 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 75 of file ultra_recursive_verifier.test.cpp.
|
inlinestaticprivate |
Create a non-trivial arbitrary inner circuit, the proof of which will be recursively verified.
| builder | |
| public_inputs | |
| log_num_gates |
Definition at line 84 of file ultra_recursive_verifier.test.cpp.
|
inlinestatic |
Definition at line 110 of file ultra_recursive_verifier.test.cpp.
|
inlinestatic |
Ensures that the recursive verifier circuit for two inner circuits of different size is the same as the proofs are currently constant. This is done by taking each trace block in part and checking all its selector values.
Definition at line 162 of file ultra_recursive_verifier.test.cpp.
|
inlinestatic |
Create inner circuit and call check_circuit on it.
Definition at line 116 of file ultra_recursive_verifier.test.cpp.
|
inlinestatic |
Construct a recursive verification circuit for the proof of an inner circuit then call check_circuit on it.
Definition at line 218 of file ultra_recursive_verifier.test.cpp.
|
inlinestatic |
Construct verifier circuits for proofs whose data have been tampered with. Expect failure.
Definition at line 304 of file ultra_recursive_verifier.test.cpp.
|
inlinestatic |
Tamper with a MegaZK proof in two ways. First, we modify the first non-zero value in the proof, which has to lead to a CircuitChecker failure. Then we also modify the last commitment ("KZG:W") in the proof, in this case, CircuitChecker succeeds, but the pairing check must fail.
Definition at line 349 of file ultra_recursive_verifier.test.cpp.
|
inlinestatic |
Instantiate a recursive verification key from the native verification key produced by the inner cicuit builder. Check consistency between the native and stdlib types.
Definition at line 130 of file ultra_recursive_verifier.test.cpp.
|
inlinestatic |
Test recursive verification with static graph analysis to detect unconstrained variables.
This test constructs a recursive verification circuit and uses the StaticAnalyzer to verify that all variables are properly constrained, with the expected exception of variables that appear in only one gate (e.g., unused Shplonk powers due to PCS structure).
This test was moved from graph_description_ultra_recursive_verifier.test.cpp to consolidate recursive verifier testing.
Definition at line 398 of file ultra_recursive_verifier.test.cpp.