Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
ultra_rollup_flavor.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
11
12namespace bb {
13
15 public:
16 static constexpr size_t num_frs_comm = bb::field_conversion::calc_num_bn254_frs<Commitment>();
17 static constexpr size_t num_frs_fr = bb::field_conversion::calc_num_bn254_frs<FF>();
18 static constexpr size_t PROOF_LENGTH_WITHOUT_PUB_INPUTS(size_t virtual_log_n = VIRTUAL_LOG_N)
19 {
20 return UltraFlavor::PROOF_LENGTH_WITHOUT_PUB_INPUTS(virtual_log_n) + IPA_PROOF_LENGTH;
21 }
23
24 using UltraFlavor::UltraFlavor;
25
34 class VerificationKey : public NativeVerificationKey_<PrecomputedEntities<Commitment>, Transcript> {
35 public:
36 static constexpr size_t VERIFICATION_KEY_LENGTH = UltraFlavor::VerificationKey::VERIFICATION_KEY_LENGTH;
37
38 virtual ~VerificationKey() = default;
39
40 bool operator==(const VerificationKey&) const = default;
41 VerificationKey() = default;
42 VerificationKey(const size_t circuit_size, const size_t num_public_inputs)
44 {}
45
46 VerificationKey(const PrecomputedData& precomputed)
47 {
51
52 CommitmentKey commitment_key{ precomputed.metadata.dyadic_size };
53 for (auto [polynomial, commitment] : zip_view(precomputed.polynomials, this->get_all())) {
54 commitment = commitment_key.commit(polynomial);
55 }
56 }
57
58 // Don't statically check for object completeness.
59 using MSGPACK_NO_STATIC_CHECK = std::true_type;
60
61 // For serialising and deserializing data
65 q_m,
66 q_c,
67 q_l,
68 q_r,
69 q_o,
70 q_4,
71 q_lookup,
72 q_arith,
73 q_delta_range,
74 q_elliptic,
75 q_memory,
76 q_nnf,
77 q_poseidon2_external,
78 q_poseidon2_internal,
79 sigma_1,
80 sigma_2,
81 sigma_3,
82 sigma_4,
83 id_1,
84 id_2,
85 id_3,
86 id_4,
87 table_1,
88 table_2,
89 table_3,
90 table_4,
91 lagrange_first,
92 lagrange_last);
93 };
94
96};
97
98} // namespace bb
CommitmentKey object over a pairing group 𝔾₁.
Base Native verification key class.
Definition flavor.hpp:152
static constexpr size_t PUBLIC_INPUTS_SIZE
A container encapsulating all the commitments that the verifier receives (to precomputed polynomials ...
static constexpr size_t VIRTUAL_LOG_N
static constexpr size_t PROOF_LENGTH_WITHOUT_PUB_INPUTS(size_t virtual_log_n=VIRTUAL_LOG_N)
The verification key is responsible for storing the commitments to the precomputed (non-witnessk) pol...
VerificationKey(const size_t circuit_size, const size_t num_public_inputs)
bool operator==(const VerificationKey &) const =default
MSGPACK_FIELDS(log_circuit_size, num_public_inputs, pub_inputs_offset, q_m, q_c, q_l, q_r, q_o, q_4, q_lookup, q_arith, q_delta_range, q_elliptic, q_memory, q_nnf, q_poseidon2_external, q_poseidon2_internal, sigma_1, sigma_2, sigma_3, sigma_4, id_1, id_2, id_3, id_4, table_1, table_2, table_3, table_4, lagrange_first, lagrange_last)
VerificationKey(const PrecomputedData &precomputed)
static constexpr size_t num_frs_fr
static constexpr size_t BACKEND_PUB_INPUTS_SIZE
static constexpr size_t num_frs_comm
static constexpr size_t PROOF_LENGTH_WITHOUT_PUB_INPUTS(size_t virtual_log_n=VIRTUAL_LOG_N)
constexpr T get_msb(const T in)
Definition get_msb.hpp:47
Entry point for Barretenberg command-line interface.
size_t pub_inputs_offset
Definition flavor.hpp:132
size_t num_public_inputs
Definition flavor.hpp:131
size_t dyadic_size
Definition flavor.hpp:130
The precomputed data needed to compute a Honk VK.
Definition flavor.hpp:138
RefArray< Polynomial, NUM_PRECOMPUTED_ENTITIES > polynomials
Definition flavor.hpp:139