Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
eccvm_verifier.hpp
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
7#pragma once
12
13namespace bb {
14
19template <typename Flavor> class ECCVMVerifier_ {
20 public:
21 using FF = Flavor::FF;
22 using BF = Flavor::BF;
33
34 static constexpr bool IsRecursive = Curve::is_stdlib_type;
36
37 // Unified constructor for both native and recursive verification
38 // For recursive case, extracts builder from proof elements via get_context()
39 ECCVMVerifier_(const std::shared_ptr<Transcript>& transcript, const Proof& proof)
40 : proof(proof)
42 {
43 // ECCVM VK is constant
45 if constexpr (IsRecursive) {
46 // Extract builder from proof - safe since transcript cannot hash non-witness elements
47 builder = proof.back().get_context();
49 vk_hash = stdlib::witness_t<Builder>(builder, native_vk->hash());
50 key->fix_witness();
51 vk_hash.fix_witness();
52 } else {
53 key = native_vk;
54 vk_hash = native_vk->hash();
55 }
56 }
57
58 [[nodiscard("IPA claim should be verified/accumulated")]] OpeningClaim<Curve> verify_proof();
59
60 void compute_translation_opening_claims(const std::vector<Commitment>& translation_commitments);
62
71
72 std::shared_ptr<VerificationKey> key;
74
76
77 // Builder pointer (only used for recursive, nullptr for native)
79
80 // Final ShplonkVerifier consumes an array consisting of Translation Opening Claims and a
81 // `multivariate_to_univariate_opening_claim`
84
85 // Verification flags (native only, recursive uses circuit assertions)
86 bool sumcheck_verified = false;
87 bool consistency_checked = false;
88 std::shared_ptr<Transcript> transcript;
90
92
93 private:
94 // Translation evaluation and batching challenges. They are propagated to the TranslatorVerifier
97 // The value ∑ mᵢ(x) ⋅ vⁱ which needs to be propagated to TranslatorVerifier
99 // The accumulated result computed from translation evaluations, to be used by TranslatorVerifier
101};
102
103// Type aliases
106
107} // namespace bb
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
A container for commitment labels.
The verification key is responsible for storing the commitments to the precomputed (non-witnessk) pol...
bb::VerifierCommitmentKey< Curve > VerifierCommitmentKey
typename Curve::ScalarField FF
VerifierCommitments_< Commitment, VerificationKey > VerifierCommitments
typename G1::affine_element Commitment
typename Curve::BaseField BF
curve::Grumpkin Curve
static constexpr size_t NUM_TRANSLATION_OPENING_CLAIMS
NativeTranscript Transcript
IPA< Curve > PCS
Unified ECCVM verifier class for both native and recursive verification.
bool translation_masking_consistency_checked
std::shared_ptr< Transcript > transcript
std::conditional_t< IsRecursive, Builder *, void * > builder
void compute_translation_opening_claims(const std::vector< Commitment > &translation_commitments)
To link the ECCVM Transcript wires op, Px, Py, z1, and z2 to the accumulator computed by the translat...
TranslationEvaluations_< FF > translation_evaluations
static constexpr size_t NUM_OPENING_CLAIMS
ECCVMVerifier_(const std::shared_ptr< Transcript > &transcript, const Proof &proof)
std::conditional_t< IsRecursive, typename Flavor::CircuitBuilder, void > Builder
std::shared_ptr< VerificationKey > key
static constexpr bool IsRecursive
std::array< OpeningClaim< Curve >, NUM_OPENING_CLAIMS > opening_claims
OpeningClaim< Curve > verify_proof()
Verifies an ECCVM Honk proof for given program settings.
TranslatorInputData get_translator_input_data() const
Get the data required by the TranslatorVerifier.
Flavor::Commitment Commitment
IPA (inner product argument) commitment scheme class.
Definition ipa.hpp:93
Unverified claim (C,r,v) for some witness polynomial p(X) such that.
Definition claim.hpp:53
static constexpr bool is_stdlib_type
Definition grumpkin.hpp:69
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
Stores the evaluations of op, Px, Py, z1, and z2 computed by the ECCVM Prover. These evaluations are ...
Data passed from ECCVM Verifier to Translator Verifier for verification.