Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
oink_verifier.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Planned, auditors: [], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
7#pragma once
8
10
11namespace bb {
12
25template <typename Flavor> class OinkVerifier {
26 using WitnessCommitments = typename Flavor::WitnessCommitments;
28 using FF = typename Flavor::FF;
30 using SubrelationSeparator = typename Flavor::SubrelationSeparator;
32
33 public:
34 std::shared_ptr<Transcript> transcript;
36 std::string domain_separator;
40
48
49 void verify();
50
52
54
56
58
60
62
63 private:
68 size_t get_num_public_inputs() const
69 {
70 auto vk = verifier_instance->get_vk();
71 if constexpr (IsRecursiveFlavor<Flavor>) {
72 return static_cast<size_t>(static_cast<uint32_t>(vk->num_public_inputs.get_value()));
73 } else {
74 return static_cast<size_t>(vk->num_public_inputs);
75 }
76 }
77};
78} // namespace bb
A container for commitment labels.
typename Curve::ScalarField FF
typename G1::affine_element Commitment
BaseTranscript< Codec, HashFunction > Transcript
Verifier class for all the presumcheck rounds, which are shared between the folding verifier and ultr...
typename Flavor::Transcript Transcript
WitnessCommitments witness_comms
Flavor::CommitmentLabels comm_labels
void execute_wire_commitments_round()
Get the wire polynomials (part of the witness), with the exception of the fourth wire,...
size_t get_num_public_inputs() const
Helper to get number of public inputs, abstracting differences between native and recursive flavors.
typename Flavor::FF FF
void execute_preamble_round()
Get circuit size, public input size, and public inputs from transcript.
void verify()
Oink Verifier function that runs all the rounds of the verifier.
std::shared_ptr< Transcript > transcript
SubrelationSeparator generate_alpha_round()
void execute_log_derivative_inverse_round()
Get log derivative inverse polynomial and its commitment, if MegaFlavor.
OinkVerifier(const std::shared_ptr< Instance > &verifier_instance, const std::shared_ptr< Transcript > &transcript, std::string domain_separator="")
typename Flavor::SubrelationSeparator SubrelationSeparator
bb::RelationParameters< FF > relation_parameters
void execute_grand_product_computation_round()
Compute lookup grand product delta and get permutation and lookup grand product commitments.
std::shared_ptr< Instance > verifier_instance
typename Flavor::Commitment Commitment
std::string domain_separator
typename Flavor::WitnessCommitments WitnessCommitments
void execute_sorted_list_accumulator_round()
Get sorted witness-table accumulator and fourth wire commitments.
The VerifierInstance encapsulates all the necessary information for a Honk Verifier to verify a proof...
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
VerifierCommitmentKey< Curve > vk
STL namespace.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
Container for parameters used by the grand product (permutation, lookup) Honk relations.