Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
chonk_recursive_verifier.cpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: not started, auditors: [], date: YYYY-MM-DD }
3// external_1: { status: not started, auditors: [], date: YYYY-MM-DD }
4// external_2: { status: not started, auditors: [], date: YYYY-MM-DD }
5// =====================
6
8
10
18{
19 using MergeCommitments = GoblinVerifier::MergeVerifier::InputCommitments;
20 std::shared_ptr<Transcript> chonk_rec_verifier_transcript(std::make_shared<Transcript>());
21
22 // Perform recursive decider verification
23 MegaVerifier verifier{ builder, stdlib_mega_vk_and_hash, chonk_rec_verifier_transcript };
24 MegaVerifier::Output mega_output = verifier.template verify_proof<HidingKernelIO<Builder>>(proof.mega_proof);
25
26 // Perform databus consistency checks
27 mega_output.kernel_return_data.incomplete_assert_equal(verifier.verifier_instance->witness_commitments.calldata);
28
29 // Perform Goblin recursive verification
30 GoblinVerificationKey goblin_verification_key{};
31 MergeCommitments merge_commitments{
32 .t_commitments = verifier.verifier_instance->witness_commitments.get_ecc_op_wires()
33 .get_copy(), // Commitments to subtables added by the hiding kernel
34 .T_prev_commitments = std::move(mega_output.ecc_op_tables) // Commitments to the state of the ecc op_queue as
35 // computed insided the hiding kernel
36 };
37 GoblinVerifier goblin_verifier{ builder, goblin_verification_key, chonk_rec_verifier_transcript };
39 goblin_verifier.verify(proof.goblin_proof, merge_commitments, MergeSettings::APPEND);
41 // TODO(https://github.com/AztecProtocol/barretenberg/issues/1396): State tracking in Chonk verifiers
42 return { output };
43}
44
45} // namespace bb::stdlib::recursion::honk
Output verify(const StdlibProof &)
Creates a circuit that executes the Chonk verification algorithm.
std::shared_ptr< RecursiveVKAndHash > stdlib_mega_vk_and_hash
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
void aggregate(PairingPoints const &other)
Compute a linear combination of the present pairing points with an input set of pairing points.