Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
ultra_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
17
18namespace bb {
19template <typename Flavor> class UltraVerifier_ {
20 using FF = typename Flavor::FF;
26 using PublicInputs = std::vector<FF>;
27 using Proof = typename Transcript::Proof;
28
29 public:
31 public:
32 bool result;
33 std::array<Commitment, Flavor::NUM_WIRES> ecc_op_tables;
34
36
37 explicit operator bool() const { return result; }
38 };
39
41 const std::shared_ptr<VerificationKey>& vk,
43 const std::shared_ptr<Transcript>& transcript = std::make_shared<Transcript>())
44 : verification_key(std::make_shared<DeciderVK>(vk))
47 {}
48
49 template <class IO> UltraVerifierOutput verify_proof(const Proof& proof, const Proof& ipa_proof = {});
50
51 std::shared_ptr<Transcript> ipa_transcript = std::make_shared<Transcript>();
52 std::shared_ptr<DeciderVK> verification_key;
54 std::shared_ptr<Transcript> transcript;
55};
56
60#ifdef STARKNET_GARAGA_FLAVORS
61using UltraStarknetVerifier = UltraVerifier_<UltraStarknetFlavor>;
62#endif
65
66} // namespace bb
typename TranscriptParams::Proof Proof
The DeciderVerificationKey encapsulates all the necessary information for a Mega Honk Verifier to ver...
The verification key is responsible for storing the commitments to the precomputed (non-witness) poly...
Curve::ScalarField FF
NativeTranscript Transcript
Curve::AffineElement Commitment
std::shared_ptr< Transcript > transcript
typename Transcript::Proof Proof
UltraVerifier_(const std::shared_ptr< VerificationKey > &vk, VerifierCommitmentKey< curve::Grumpkin > ipa_verification_key=VerifierCommitmentKey< curve::Grumpkin >(), const std::shared_ptr< Transcript > &transcript=std::make_shared< Transcript >())
VerifierCommitmentKey< curve::Grumpkin > ipa_verification_key
typename Flavor::VerificationKey VerificationKey
std::vector< FF > PublicInputs
typename Flavor::FF FF
typename Flavor::Transcript Transcript
UltraVerifierOutput verify_proof(const Proof &proof, const Proof &ipa_proof={})
typename Flavor::Commitment Commitment
std::shared_ptr< Transcript > ipa_transcript
std::shared_ptr< DeciderVK > verification_key
Representation of the Grumpkin Verifier Commitment Key inside a bn254 circuit.
Entry point for Barretenberg command-line interface.
VerifierCommitmentKey< Curve > vk
STL namespace.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
std::array< Commitment, Flavor::NUM_WIRES > ecc_op_tables