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
32 std::array<G1, Builder::NUM_WIRES> ecc_op_tables; // Ecc op tables' commitments as extracted from the public inputs
33 // of the HidingKernel, only for Chonk
34 FF mega_hash; // The hash of public inputs and VK of the inner circuit in the GoblinAvmRecursiveVerifier
35
37
38 template <class IO>
40 : points_accumulator(inputs.pairing_inputs)
41 {
42 if constexpr (std::is_same_v<IO, RollupIO>) {
43 ipa_claim = inputs.ipa_claim;
44 } else if constexpr (std::is_same_v<IO, HidingKernelIO<Builder>>) {
45 kernel_return_data = inputs.kernel_return_data;
46 ecc_op_tables = inputs.ecc_op_tables;
47 } else if constexpr (std::is_same_v<IO, GoblinAvmIO<Builder>>) {
48 mega_hash = inputs.mega_hash;
49 } else if constexpr (!std::is_same_v<IO, DefaultIO<Builder>>) {
50 throw_or_abort("Invalid public input type.");
51 }
52 }
53};
54
55template <typename Flavor> class UltraRecursiveVerifier_ {
56 public:
57 using FF = typename Flavor::FF;
62 using VKAndHash = typename Flavor::VKAndHash;
70
72 const std::shared_ptr<VKAndHash>& vk_and_hash,
73 const std::shared_ptr<Transcript>& transcript = std::make_shared<Transcript>());
74
75 template <class IO>
76 [[nodiscard("IPA claim and Pairing points should be accumulated")]] Output verify_proof(const StdlibProof& proof);
77
78 // TODO(https://github.com/AztecProtocol/barretenberg/issues/1364): Improve VKs. Clarify the usage of
79 // RecursiveVerifierInstances here. Seems unnecessary.
83 std::shared_ptr<Transcript> transcript;
84};
85
86} // 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-witnessk) pol...
bb::VerifierCommitmentKey< Curve > VerifierCommitmentKey
typename Curve::ScalarField FF
ECCVMCircuitBuilder CircuitBuilder
typename G1::affine_element Commitment
typename G1::element GroupElement
Verifier class for all the presumcheck rounds, which are shared between the folding verifier and ultr...
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 VerifierInstance, used in recursive folding verification.
std::shared_ptr< RecursiveVerifierInstance > verifier_instance
typename Flavor::VerifierCommitmentKey VerifierCommitmentKey
Output verify_proof(const StdlibProof &proof)
AvmProvingInputs inputs
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)