Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
ultra_recursive_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
20
22
23template <typename Builder> struct UltraRecursiveVerifierOutput {
27
31 std::array<G1, Builder::NUM_WIRES> ecc_op_tables; // Ecc op tables' commitments as extracted from the public inputs
32 // of the HidingKernel, only for ClientIVC
33 FF mega_hash; // The hash of public inputs and VK of the inner circuit in the GoblinAvmRecursiveVerifier
34
36
37 template <class IO>
39 : points_accumulator(inputs.pairing_inputs)
40 {
41 if constexpr (std::is_same_v<IO, RollupIO>) {
42 ipa_claim = inputs.ipa_claim;
43 } else if constexpr (std::is_same_v<IO, HidingKernelIO<Builder>>) {
44 ecc_op_tables = inputs.ecc_op_tables;
45 } else if constexpr (std::is_same_v<IO, GoblinAvmIO<Builder>>) {
46 mega_hash = inputs.mega_hash;
47 } else if constexpr (!std::is_same_v<IO, DefaultIO<Builder>>) {
48 throw_or_abort("Invalid public input type.");
49 }
50 }
51};
52
53template <typename Flavor> class UltraRecursiveVerifier_ {
54 public:
55 using FF = typename Flavor::FF;
60 using VKAndHash = typename Flavor::VKAndHash;
68
70 const std::shared_ptr<VKAndHash>& vk_and_hash,
71 const std::shared_ptr<Transcript>& transcript = std::make_shared<Transcript>());
72
73 template <class IO>
74 [[nodiscard("IPA claim and Pairing points should be accumulated")]] Output verify_proof(const StdlibProof& proof);
75
76 // TODO(https://github.com/AztecProtocol/barretenberg/issues/1364): Improve VKs. Clarify the usage of
77 // RecursiveDeciderVK here. Seems unnecessary.
81 std::shared_ptr<Transcript> transcript;
82};
83
84} // namespace bb::stdlib::recursion::honk
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
The verification key is responsible for storing the commitments to the precomputed (non-witness) poly...
Curve::ScalarField FF
bb::VerifierCommitmentKey< Curve > VerifierCommitmentKey
Curve::Element GroupElement
MegaCircuitBuilder CircuitBuilder
Curve::AffineElement Commitment
Unverified claim (C,r,v) for some witness polynomial p(X) such that.
Definition claim.hpp:53
A simple wrapper around a vector of stdlib field elements representing a proof.
Definition proof.hpp:19
The stdlib counterpart of DeciderVerificationKey, used in recursive folding verification.
typename Flavor::VerifierCommitmentKey VerifierCommitmentKey
Output verify_proof(const StdlibProof &proof)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
field_t< CircuitBuilder > ScalarField
Definition bn254.hpp:33
element< CircuitBuilder, bigfield< CircuitBuilder, bb::Bn254FqParams >, ScalarField, GroupNative > Group
Definition bn254.hpp:34
An object storing two EC points that represent the inputs to a pairing check.
void throw_or_abort(std::string const &err)