barretenberg
Loading...
Searching...
No Matches
ultra_recursive_verifier.hpp
1#pragma once
2#include "barretenberg/flavor/goblin_ultra.hpp"
3#include "barretenberg/flavor/goblin_ultra_recursive.hpp"
4#include "barretenberg/flavor/ultra.hpp"
5#include "barretenberg/flavor/ultra_recursive.hpp"
6#include "barretenberg/plonk/proof_system/types/proof.hpp"
7#include "barretenberg/stdlib/recursion/honk/transcript/transcript.hpp"
8#include "barretenberg/sumcheck/sumcheck.hpp"
9
10namespace proof_system::plonk::stdlib::recursion::honk {
11template <typename Flavor> class UltraRecursiveVerifier_ {
12 public:
13 using FF = typename Flavor::FF;
14 using Commitment = typename Flavor::Commitment;
15 using GroupElement = typename Flavor::GroupElement;
16 using VerificationKey = typename Flavor::VerificationKey;
17 using NativeVerificationKey = typename Flavor::NativeVerificationKey;
18 using VerifierCommitmentKey = typename Flavor::VerifierCommitmentKey;
19 using Builder = typename Flavor::CircuitBuilder;
20 using PairingPoints = std::array<GroupElement, 2>;
21
22 explicit UltraRecursiveVerifier_(Builder* builder,
23 const std::shared_ptr<NativeVerificationKey>& native_verifier_key);
26 UltraRecursiveVerifier_& operator=(const UltraRecursiveVerifier_& other) = delete;
27 UltraRecursiveVerifier_& operator=(UltraRecursiveVerifier_&& other) = delete;
28 ~UltraRecursiveVerifier_() = default;
29
30 // TODO(luke): Eventually this will return something like aggregation_state but I'm simplifying for now until we
31 // determine the exact interface. Simply returns the two pairing points.
32 PairingPoints verify_proof(const plonk::proof& proof);
33
34 std::shared_ptr<VerificationKey> key;
35 std::map<std::string, Commitment> commitments;
36 std::shared_ptr<VerifierCommitmentKey> pcs_verification_key;
37 Builder* builder;
38 std::shared_ptr<Transcript<Builder>> transcript;
39};
40
41// Instance declarations for Ultra and Goblin-Ultra verifier circuits with both conventional Ultra and Goblin-Ultra
42// arithmetization.
46extern template class UltraRecursiveVerifier_<
48
49} // namespace proof_system::plonk::stdlib::recursion::honk
The recursive counterpart to the "native" Goblin Ultra flavor.
Definition: goblin_ultra_recursive.hpp:41
Definition: verification_key.hpp:25
PairingPoints verify_proof(const plonk::proof &proof)
This function constructs a recursive verifier circuit for an Ultra Honk proof of a given flavor.
Definition: ultra_recursive_verifier.cpp:22
Definition: proof.hpp:11