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: Complete, auditors: [Sergei], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
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 auto opening_claim = ShpleminiVerifier::compute_batch_opening_claim(
33 padding_indicator_array, claim_batcher, accumulator.challenge, generator, transcript)
34 .batch_opening_claim;
35
36 if constexpr (IsRecursiveFlavor<Flavor>) {
37 PairingPoints pairing_points(PCS::reduce_verify_batch_opening_claim(std::move(opening_claim), transcript));
38 return pairing_points;
39 } else {
40 auto pairing_points = PCS::reduce_verify_batch_opening_claim(std::move(opening_claim), transcript);
41 // Native pairing points contain affine elements
42 return { typename Curve::AffineElement(pairing_points[0]), typename Curve::AffineElement(pairing_points[1]) };
43 }
44};
45
48}; // namespace bb
HyperNova decider verifier (native + recursive). Verifies final opening proof.
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
A template class for a reference vector. Behaves as if std::vector<T&> was possible.
typename Group::affine_element AffineElement
Definition grumpkin.hpp:63
#define vinfo(...)
Definition log.hpp:94
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
Logic to support batching opening claims for unshifted, shifted and interleaved polynomials in Shplem...
std::optional< Batch > unshifted