Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
hypernova_decider_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
9namespace bb {
10
11template <typename Flavor>
13 Accumulator& accumulator, const HypernovaDeciderVerifier::Proof& proof)
14{
15 vinfo("HypernovaDeciderVerifier: verifying PCS proof...");
16 transcript->load_proof(proof);
17
18 // Construct generator based on whether we are in-circuit or not
19 Commitment generator;
20 if constexpr (IsRecursiveFlavor<Flavor>) {
21 generator = Commitment::one(accumulator.non_shifted_commitment.get_context());
22 } else {
23 generator = Commitment::one();
24 }
25
26 // Execute Shplemini verifier
28 RefVector(accumulator.non_shifted_evaluation) },
29 .shifted = ClaimBatch{ RefVector(accumulator.shifted_commitment),
30 RefVector(accumulator.shifted_evaluation) } };
31 std::vector<FF> padding_indicator_array(Flavor::VIRTUAL_LOG_N, 1);
32 const auto opening_claim = ShpleminiVerifier::compute_batch_opening_claim(
33 padding_indicator_array, claim_batcher, accumulator.challenge, generator, transcript);
34
35 auto pairing_points = PCS::reduce_verify_batch_opening_claim(opening_claim, transcript);
36
37 if constexpr (IsRecursiveFlavor<Flavor>) {
38 return pairing_points;
39 } else {
40 // Native pairing points contain affine elements
41 return { typename Curve::AffineElement(pairing_points[0]), typename Curve::AffineElement(pairing_points[1]) };
42 }
43};
44
47}; // namespace bb
PairingPoints verify_proof(Accumulator &accumulator, const Proof &proof)
std::conditional_t< IsRecursiveFlavor< Flavor >, typename HypernovaRecursiveTypes::Proof, typename HypernovaNativeTypes::Proof > Proof
std::conditional_t< IsRecursiveFlavor< Flavor >, typename HypernovaRecursiveTypes::PairingPoints, typename HypernovaNativeTypes::PairingPoints > PairingPoints
static constexpr size_t VIRTUAL_LOG_N
A template class for a reference vector. Behaves as if std::vector<T&> was possible.
typename Group::affine_element AffineElement
Definition grumpkin.hpp:56
#define vinfo(...)
Definition log.hpp:79
Entry point for Barretenberg command-line interface.
Logic to support batching opening claims for unshifted and shifted polynomials in Shplemini.
std::optional< Batch > unshifted