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 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).
RecursiveFlavor | defines the recursive verifier, what the arithmetisation of its circuit should be and what types of proofs it recursively verifies. |
Definition at line 34 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 40 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 42 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 41 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 43 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 37 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 44 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 38 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 39 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 69 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 50 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 57 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 51 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 59 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 55 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 58 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 56 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 67 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 64 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 65 of file ultra_recursive_verifier.test.cpp.
|
private |
Definition at line 68 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 77 of file ultra_recursive_verifier.test.cpp.
|
inlinestatic |
Definition at line 103 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 152 of file ultra_recursive_verifier.test.cpp.
|
inlinestatic |
Create inner circuit and call check_circuit on it.
Definition at line 109 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 208 of file ultra_recursive_verifier.test.cpp.
|
inlinestatic |
Construct verifier circuits for proofs whose data have been tampered with. Expect failure.
Definition at line 305 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 353 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 123 of file ultra_recursive_verifier.test.cpp.