Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
chonk_batch_verifier.cpp
Go to the documentation of this file.
5
6namespace bb {
7
9{
10 const size_t num_proofs = inputs.size();
11 if (num_proofs == 0) {
12 return true;
13 }
14
15 // Phase 1: Run all non-IPA verification for each proof, collecting IPA claims
16 // TODO(https://github.com/AztecProtocol/barretenberg/issues/1651): Consider batching and/or multithreading the
17 // non-IPA portion of verification as well. Becomes significant for moderate batch sizes.
20 ipa_claims.reserve(num_proofs);
21 ipa_transcripts.reserve(num_proofs);
22
23 for (const auto& input : inputs) {
24 ChonkNativeVerifier verifier(input.vk_and_hash);
25 auto result = verifier.reduce_to_ipa_claim(input.proof);
26 if (!result.all_checks_passed) {
27 return false;
28 }
29 ipa_claims.push_back(result.ipa_claim);
30 ipa_transcripts.push_back(std::make_shared<NativeTranscript>(result.ipa_proof));
31 }
32
33 // Phase 2: Batch IPA verification with single SRS MSM
35 return IPA<curve::Grumpkin>::batch_reduce_verify(ipa_vk, ipa_claims, ipa_transcripts);
36}
37
38} // namespace bb
static bool verify(std::span< const Input > inputs)
Verify multiple Chonk proofs with batched IPA verification.
Verifier for Chonk IVC proofs (both native and recursive).
IPAReductionResult reduce_to_ipa_claim(const Proof &proof)
Run Chonk verification up to but not including IPA, returning the IPA claim for deferred verification...
static constexpr size_t ECCVM_FIXED_SIZE
IPA (inner product argument) commitment scheme class.
Definition ipa.hpp:86
Representation of the Grumpkin Verifier Commitment Key inside a bn254 circuit.
AvmProvingInputs inputs
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13