Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
ultra_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
32
33namespace bb {
34
36 public:
42 using PCS = KZG<Curve>;
46
47 static constexpr size_t VIRTUAL_LOG_N = CONST_PROOF_SIZE_LOG_N;
48 // indicates when evaluating sumcheck, edges can be left as degree-1 monomials
49 static constexpr bool USE_SHORT_MONOMIALS = true;
50
51 // Indicates that this flavor runs with non-ZK Sumcheck.
52 static constexpr bool HasZK = false;
53 // To achieve fixed proof size and that the recursive verifier circuit is constant, we are using padding in Sumcheck
54 // and Shplemini
55 static constexpr bool USE_PADDING = true;
56 static constexpr size_t NUM_WIRES = CircuitBuilder::NUM_WIRES;
57 // The number of multivariate polynomials on which a sumcheck prover sumcheck operates (witness polynomials,
58 // precomputed polynomials and shifts). We often need containers of this size to hold related data, so we choose a
59 // name more agnostic than `NUM_POLYNOMIALS`.
60 static constexpr size_t NUM_ALL_ENTITIES = 41;
61 // The number of polynomials precomputed to describe a circuit and to aid a prover in constructing a satisfying
62 // assignment of witnesses. We again choose a neutral name.
63 static constexpr size_t NUM_PRECOMPUTED_ENTITIES = 28;
64 // The total number of witness entities not including shifts.
65 static constexpr size_t NUM_WITNESS_ENTITIES = 8;
66 // The number of shifted witness entities including derived witness entities
67 static constexpr size_t NUM_SHIFTED_ENTITIES = 5;
68 // The number of unshifted witness entities
70
71 // A container to be fed to ShpleminiVerifier to avoid redundant scalar muls
74
75 // Size of the final PCS MSM after KZG adds quotient commitment:
76 // 1 (Shplonk Q) + NUM_UNSHIFTED + (log_n - 1) Gemini folds + 1 (G1 identity) + 1 (KZG W)
77 // (shifted commitments are removed as duplicates)
78 static constexpr size_t FINAL_PCS_MSM_SIZE(size_t log_n = VIRTUAL_LOG_N)
79 {
80 return NUM_UNSHIFTED_ENTITIES + log_n + 2;
81 }
82
83 // define the tuple of Relations that comprise the Sumcheck relation
84 // Note: made generic for use in MegaRecursive.
85 template <typename FF>
86
87 // List of relations reflecting the Ultra arithmetisation. WARNING: As UltraKeccak flavor inherits from
88 // Ultra flavor any change of ordering in this tuple needs to be reflected in the smart contract, otherwise
89 // relation accumulation will not match.
99
101
102 static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length<Relations>();
103 static_assert(MAX_PARTIAL_RELATION_LENGTH == 7);
104 static constexpr size_t NUM_SUBRELATIONS = compute_number_of_subrelations<Relations>();
105 // A challenge whose powers are used to batch subrelation contributions during Sumcheck
107
108 // BATCHED_RELATION_PARTIAL_LENGTH = algebraic degree of sumcheck relation *after* multiplying by the `pow_zeta`
109 // random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation
110 // length = 3
113
114 static constexpr size_t num_frs_comm = FrCodec::calc_num_fields<Commitment>();
115 static constexpr size_t num_frs_fr = FrCodec::calc_num_fields<FF>();
116
117 // Proof length formula methods
118 static constexpr size_t OINK_PROOF_LENGTH_WITHOUT_PUB_INPUTS =
119 /* 1. NUM_WITNESS_ENTITIES commitments */ (NUM_WITNESS_ENTITIES * num_frs_comm);
120
121 static constexpr size_t DECIDER_PROOF_LENGTH(size_t virtual_log_n = VIRTUAL_LOG_N)
122 {
123 return /* 2. virtual_log_n sumcheck univariates */
124 (virtual_log_n * BATCHED_RELATION_PARTIAL_LENGTH * num_frs_fr) +
125 /* 3. NUM_ALL_ENTITIES sumcheck evaluations */ (NUM_ALL_ENTITIES * num_frs_fr) +
126 /* 4. virtual_log_n - 1 Gemini Fold commitments */ ((virtual_log_n - 1) * num_frs_comm) +
127 /* 5. virtual_log_n Gemini a evaluations */ (virtual_log_n * num_frs_fr) +
128 /* 6. Shplonk Q commitment */ (num_frs_comm) +
129 /* 7. KZG W commitment */ (num_frs_comm);
130 }
131
132 static constexpr size_t PROOF_LENGTH_WITHOUT_PUB_INPUTS(size_t virtual_log_n = VIRTUAL_LOG_N)
133 {
135 }
136
137 // Whether or not the first row of the execution trace is reserved for 0s to enable shifts
138 static constexpr bool has_zero_row = true;
139
140 static constexpr bool is_decider = true;
141
146 template <typename DataType_> class PrecomputedEntities {
147 public:
148 bool operator==(const PrecomputedEntities&) const = default;
149 using DataType = DataType_;
151 q_m, // column 0
152 q_c, // column 1
153 q_l, // column 2
154 q_r, // column 3
155 q_o, // column 4
156 q_4, // column 5
157 q_lookup, // column 6
158 q_arith, // column 7
159 q_delta_range, // column 8
160 q_elliptic, // column 9
161 q_memory, // column 10
162 q_nnf, // column 11
163 q_poseidon2_external, // column 12
164 q_poseidon2_internal, // column 13
165 sigma_1, // column 14
166 sigma_2, // column 15
167 sigma_3, // column 16
168 sigma_4, // column 17
169 id_1, // column 18
170 id_2, // column 19
171 id_3, // column 20
172 id_4, // column 21
173 table_1, // column 22
174 table_2, // column 23
175 table_3, // column 24
176 table_4, // column 25
177 lagrange_first, // column 26
178 lagrange_last) // column 27
179
180 auto get_non_gate_selectors() { return RefArray{ q_m, q_c, q_l, q_r, q_o, q_4 }; }
182 {
183 return RefArray{ q_lookup, q_arith, q_delta_range, q_elliptic,
184 q_memory, q_nnf, q_poseidon2_external, q_poseidon2_internal };
185 }
186 auto get_selectors() { return concatenate(get_non_gate_selectors(), get_gate_selectors()); }
187
188 auto get_sigmas() { return RefArray{ sigma_1, sigma_2, sigma_3, sigma_4 }; };
189 auto get_ids() { return RefArray{ id_1, id_2, id_3, id_4 }; };
190 auto get_tables() { return RefArray{ table_1, table_2, table_3, table_4 }; };
191 };
192
197 template <typename DataType, bool HasZK_ = HasZK> class MaskingEntities {
198 public:
199 // When ZK is disabled, this class is empty
200 auto get_all() { return RefArray<DataType, 0>{}; }
201 auto get_all() const { return RefArray<const DataType, 0>{}; }
202 static auto get_labels() { return std::vector<std::string>{}; }
203 };
204
205 // Specialization for when ZK is enabled
206 template <typename DataType> class MaskingEntities<DataType, true> {
207 public:
208 DEFINE_FLAVOR_MEMBERS(DataType, gemini_masking_poly)
209 };
210
214 template <typename DataType> class WitnessEntities {
215 public:
217 w_l, // column 0
218 w_r, // column 1
219 w_o, // column 2
220 w_4, // column 3
221 z_perm, // column 4
222 lookup_inverses, // column 5
223 lookup_read_counts, // column 6
224 lookup_read_tags) // column 7
225
226 auto get_wires() { return RefArray{ w_l, w_r, w_o, w_4 }; };
227 auto get_to_be_shifted() { return RefArray{ w_l, w_r, w_o, w_4, z_perm }; };
228
229 MSGPACK_FIELDS(w_l, w_r, w_o, w_4, z_perm, lookup_inverses, lookup_read_counts, lookup_read_tags);
230 };
231
235 template <typename DataType> class ShiftedEntities {
236 public:
238 w_l_shift, // column 0
239 w_r_shift, // column 1
240 w_o_shift, // column 2
241 w_4_shift, // column 3
242 z_perm_shift) // column 4
243
244 auto get_shifted() { return RefArray{ w_l_shift, w_r_shift, w_o_shift, w_4_shift, z_perm_shift }; };
245 };
246
256 template <typename DataType, bool HasZK_ = HasZK>
277
278 // Default AllEntities alias (no ZK)
279 template <typename DataType> using AllEntities = AllEntities_<DataType, HasZK>;
280
285 template <bool HasZK_ = HasZK> class AllValues_ : public AllEntities_<FF, HasZK_> {
286 public:
288 using Base::Base;
289 };
290
292
296 // TODO(https://github.com/AztecProtocol/barretenberg/issues/966): use inheritance
297 template <bool HasZK_ = HasZK> class ProverPolynomials_ : public AllEntities_<Polynomial, HasZK_> {
298 public:
299 // Define all operations as default, except copy construction/assignment
301 ProverPolynomials_(size_t circuit_size)
302 {
303
304 BB_BENCH_NAME("creating empty prover polys");
305
306 for (auto& poly : this->get_to_be_shifted()) {
307 poly = Polynomial{ /*memory size*/ circuit_size - 1,
308 /*largest possible index*/ circuit_size,
309 /* offset */ 1 };
310 }
311 for (auto& poly : this->get_unshifted()) {
312 if (poly.is_empty()) {
313 // Not set above
314 poly = Polynomial{ /*fully formed*/ circuit_size };
315 }
316 }
317 set_shifted();
318 }
321 ProverPolynomials_(ProverPolynomials_&& o) noexcept = default;
324 [[nodiscard]] size_t get_polynomial_size() const { return this->q_c.size(); }
325 [[nodiscard]] AllValues_<HasZK_> get_row(const size_t row_idx) const
326 {
327 AllValues_<HasZK_> result;
328 for (auto [result_field, polynomial] : zip_view(result.get_all(), this->get_all())) {
329 result_field = polynomial[row_idx];
330 }
331 return result;
332 }
333
335 {
336 AllValues_<HasZK_> result;
337 for (auto [result_field, polynomial] : zip_view(result.get_sigmas(), this->get_sigmas())) {
338 result_field = polynomial[row_idx];
339 }
340 for (auto [result_field, polynomial] : zip_view(result.get_ids(), this->get_ids())) {
341 result_field = polynomial[row_idx];
342 }
343 for (auto [result_field, polynomial] : zip_view(result.get_wires(), this->get_wires())) {
344 result_field = polynomial[row_idx];
345 }
346 return result;
347 }
348
349 // Set all shifted polynomials based on their to-be-shifted counterpart
351 {
352 for (auto [shifted, to_be_shifted] : zip_view(this->get_shifted(), this->get_to_be_shifted())) {
353 shifted = to_be_shifted.shifted();
354 }
355 }
356
357 void increase_polynomials_virtual_size(const size_t size_in)
358 {
359 for (auto& polynomial : this->get_all()) {
360 polynomial.increase_virtual_size(size_in);
361 }
362 }
363 };
364
366
368
373 template <typename Codec, typename HashFunction> class Transcript_ : public BaseTranscript<Codec, HashFunction> {
374 public:
376
377 using Base::Base; // Inherit base class constructors
378
379 // Transcript objects defined as public member variables for easy access and modification
380 std::vector<FF> public_inputs;
390 std::array<FF, NUM_ALL_ENTITIES> sumcheck_evaluations;
391 std::vector<Commitment> gemini_fold_comms;
392 std::vector<FF> gemini_fold_evals;
395 Transcript_() = default;
396
398 {
399 auto transcript = Base::prover_init_empty();
400 return std::static_pointer_cast<Transcript_>(transcript);
401 };
402
404 {
405 auto verifier_transcript = Base::verifier_init_empty(transcript);
406 return std::static_pointer_cast<Transcript_>(verifier_transcript);
407 };
408
415 void deserialize_full_transcript(size_t public_input_size, size_t virtual_log_n = VIRTUAL_LOG_N)
416 {
417 // take current proof and put them into the struct
418 auto& proof_data = this->proof_data;
419 size_t num_frs_read = 0;
420 for (size_t i = 0; i < public_input_size; ++i) {
421 public_inputs.push_back(Base::template deserialize_from_buffer<FF>(proof_data, num_frs_read));
422 }
423 w_l_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
424 w_r_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
425 w_o_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
426 lookup_read_counts_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
427 lookup_read_tags_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
428 w_4_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
429 lookup_inverses_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
430 z_perm_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
431 for (size_t i = 0; i < virtual_log_n; ++i) {
432 sumcheck_univariates.push_back(
435 }
437 Base::template deserialize_from_buffer<std::array<FF, NUM_ALL_ENTITIES>>(proof_data, num_frs_read);
438 for (size_t i = 0; i < virtual_log_n - 1; ++i) {
439 gemini_fold_comms.push_back(
440 Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read));
441 }
442 for (size_t i = 0; i < virtual_log_n; ++i) {
443 gemini_fold_evals.push_back(Base::template deserialize_from_buffer<FF>(proof_data, num_frs_read));
444 }
445 shplonk_q_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
446
447 kzg_w_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
448 }
449
456 void serialize_full_transcript(size_t virtual_log_n = VIRTUAL_LOG_N)
457 {
458 auto& proof_data = this->proof_data;
459 size_t old_proof_length = proof_data.size();
460 proof_data.clear(); // clear proof_data so the rest of the function can replace it
461 for (const auto& public_input : public_inputs) {
463 }
472 for (size_t i = 0; i < virtual_log_n; ++i) {
474 }
476 for (size_t i = 0; i < virtual_log_n - 1; ++i) {
478 }
479 for (size_t i = 0; i < virtual_log_n; ++i) {
481 }
484
485 // sanity check to make sure we generate the same length of proof as before.
486 BB_ASSERT_EQ(proof_data.size(), old_proof_length);
487 }
488 };
489
491
500 class VerificationKey : public NativeVerificationKey_<PrecomputedEntities<Commitment>, Transcript> {
501 public:
502 bool operator==(const VerificationKey&) const = default;
503 VerificationKey() = default;
504 VerificationKey(const size_t circuit_size, const size_t num_public_inputs)
506 {}
507
509 {
511 this->num_public_inputs = precomputed.metadata.num_public_inputs;
512 this->pub_inputs_offset = precomputed.metadata.pub_inputs_offset;
513
514 CommitmentKey commitment_key{ precomputed.metadata.dyadic_size };
515 for (auto [polynomial, commitment] : zip_view(precomputed.polynomials, this->get_all())) {
516 commitment = commitment_key.commit(polynomial);
517 }
518 }
519
520#ifndef NDEBUG
526#endif
527 };
528
532 template <bool HasZK_ = HasZK> class PartiallyEvaluatedMultivariates_ : public AllEntities_<Polynomial, HasZK_> {
533 public:
535 PartiallyEvaluatedMultivariates_(const size_t circuit_size)
536 {
537 BB_BENCH_NAME("PartiallyEvaluatedMultivariates constructor");
538
539 // Storage is only needed after the first partial evaluation, hence polynomials of
540 // size (n / 2)
541 for (auto& poly : this->get_all()) {
542 poly = Polynomial(circuit_size / 2);
543 }
544 }
545 PartiallyEvaluatedMultivariates_(const ProverPolynomials_<HasZK_>& full_polynomials, size_t circuit_size)
546 {
547 BB_BENCH_NAME("PartiallyEvaluatedMultivariates constructor");
548 for (auto [poly, full_poly] : zip_view(this->get_all(), full_polynomials.get_all())) {
549 // After the initial sumcheck round, the new size is CEIL(size/2).
550 size_t desired_size = full_poly.end_index() / 2 + full_poly.end_index() % 2;
551 poly = Polynomial(desired_size, circuit_size / 2);
552 }
553 }
554 };
555
557
563
568
573
580 class CommitmentLabels : public AllEntities<std::string> {
581 public:
583 {
584 w_l = "W_L";
585 w_r = "W_R";
586 w_o = "W_O";
587 w_4 = "W_4";
588 z_perm = "Z_PERM";
589 lookup_inverses = "LOOKUP_INVERSES";
590 lookup_read_counts = "LOOKUP_READ_COUNTS";
591 lookup_read_tags = "LOOKUP_READ_TAGS";
592
593 q_c = "Q_C";
594 q_l = "Q_L";
595 q_r = "Q_R";
596 q_o = "Q_O";
597 q_4 = "Q_4";
598 q_m = "Q_M";
599 q_lookup = "Q_LOOKUP";
600 q_arith = "Q_ARITH";
601 q_delta_range = "Q_SORT";
602 q_elliptic = "Q_ELLIPTIC";
603 q_memory = "Q_MEMORY";
604 q_nnf = "Q_NNF";
605 q_poseidon2_external = "Q_POSEIDON2_EXTERNAL";
606 q_poseidon2_internal = "Q_POSEIDON2_INTERNAL";
607 sigma_1 = "SIGMA_1";
608 sigma_2 = "SIGMA_2";
609 sigma_3 = "SIGMA_3";
610 sigma_4 = "SIGMA_4";
611 id_1 = "ID_1";
612 id_2 = "ID_2";
613 id_3 = "ID_3";
614 id_4 = "ID_4";
615 table_1 = "TABLE_1";
616 table_2 = "TABLE_2";
617 table_3 = "TABLE_3";
618 table_4 = "TABLE_4";
619 lagrange_first = "LAGRANGE_FIRST";
620 lagrange_last = "LAGRANGE_LAST";
621 };
622 };
623
629 template <typename Commitment, typename VerificationKey, bool HasZK_ = HasZK>
630 class VerifierCommitments_ : public AllEntities_<Commitment, HasZK_> {
631 public:
632 VerifierCommitments_(const std::shared_ptr<VerificationKey>& verification_key,
633 const std::optional<WitnessEntities<Commitment>>& witness_commitments = std::nullopt)
634 {
635 // Copy the precomputed polynomial commitments into this
636 for (auto [precomputed, precomputed_in] : zip_view(this->get_precomputed(), verification_key->get_all())) {
637 precomputed = precomputed_in;
638 }
639
640 // If provided, copy the witness polynomial commitments into this
641 if (witness_commitments.has_value()) {
642 for (auto [witness, witness_in] :
643 zip_view(this->get_witness(), witness_commitments.value().get_all())) {
644 witness = witness_in;
645 }
646
647 // Set shifted commitments
648 this->w_l_shift = witness_commitments->w_l;
649 this->w_r_shift = witness_commitments->w_r;
650 this->w_o_shift = witness_commitments->w_o;
651 this->w_4_shift = witness_commitments->w_4;
652 this->z_perm_shift = witness_commitments->z_perm;
653 }
654 }
655 }; // namespace bb
656 // Specialize for Ultra (general case used in UltraRecursive).
658};
659
660} // namespace bb
#define BB_ASSERT_EQ(actual, expected,...)
Definition assert.hpp:77
#define BB_BENCH_NAME(name)
Definition bb_bench.hpp:219
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
void serialize_to_buffer(const T &element, Proof &proof_data)
Serializes object and appends it to proof_data.
static std::shared_ptr< BaseTranscript > prover_init_empty()
For testing: initializes transcript with some arbitrary data so that a challenge can be generated aft...
T deserialize_from_buffer(const Proof &proof_data, size_t &offset) const
Deserializes the frs starting at offset into the typed element and returns that element.
static std::shared_ptr< BaseTranscript > verifier_init_empty(const std::shared_ptr< BaseTranscript > &transcript)
For testing: initializes transcript based on proof data then receives junk data produced by BaseTrans...
CommitmentKey object over a pairing group 𝔾₁.
Base Native verification key class.
Definition flavor.hpp:137
A template class for a reference array. Behaves as if std::array<T&, N> was possible.
Definition ref_array.hpp:22
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
static constexpr size_t NUM_WIRES
A base class labelling all entities (for instance, all of the polynomials used by the prover during s...
DEFINE_COMPOUND_GET_ALL(MaskingEntities< DataType, HasZK_ >, PrecomputedEntities< DataType >, WitnessEntities< DataType >, ShiftedEntities< DataType >) auto get_unshifted()
A field element for each entity of the flavor. These entities represent the prover polynomials evalua...
A container for commitment labels.
ZK-specific entities (only used when HasZK = true)
A container for storing the partially evaluated multivariates produced by sumcheck.
PartiallyEvaluatedMultivariates_(const ProverPolynomials_< HasZK_ > &full_polynomials, size_t circuit_size)
PartiallyEvaluatedMultivariates_(const size_t circuit_size)
A base class labelling precomputed entities and (ordered) subsets of interest.
bool operator==(const PrecomputedEntities &) const =default
DEFINE_FLAVOR_MEMBERS(DataType, 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) auto get_non_gate_selectors()
A container for polynomials handles.
void increase_polynomials_virtual_size(const size_t size_in)
ProverPolynomials_(const ProverPolynomials_ &o)=delete
AllValues_< HasZK_ > get_row_for_permutation_arg(size_t row_idx)
ProverPolynomials_ & operator=(ProverPolynomials_ &&o) noexcept=default
ProverPolynomials_(ProverPolynomials_ &&o) noexcept=default
AllValues_< HasZK_ > get_row(const size_t row_idx) const
ProverPolynomials_(size_t circuit_size)
ProverPolynomials_ & operator=(const ProverPolynomials_ &)=delete
Class for ShitftedEntities, containing shifted witness polynomials.
DEFINE_FLAVOR_MEMBERS(DataType, w_l_shift, w_r_shift, w_o_shift, w_4_shift, z_perm_shift) auto get_shifted()
Derived class that defines proof structure for Ultra proofs, as well as supporting functions.
void serialize_full_transcript(size_t virtual_log_n=VIRTUAL_LOG_N)
Serializes the structure variables into a FULL Ultra proof. Should be called only if deserialize_full...
std::vector< FF > public_inputs
std::vector< FF > gemini_fold_evals
static std::shared_ptr< Transcript_ > verifier_init_empty(const std::shared_ptr< Transcript_ > &transcript)
std::array< FF, NUM_ALL_ENTITIES > sumcheck_evaluations
static std::shared_ptr< Transcript_ > prover_init_empty()
void deserialize_full_transcript(size_t public_input_size, size_t virtual_log_n=VIRTUAL_LOG_N)
Takes a FULL Ultra proof and deserializes it into the public member variables that compose the struct...
std::vector< Commitment > gemini_fold_comms
std::vector< bb::Univariate< FF, BATCHED_RELATION_PARTIAL_LENGTH > > sumcheck_univariates
The verification key is responsible for storing the commitments to the precomputed (non-witnessk) pol...
bool compare(const VerificationKey &other)
VerificationKey(const size_t circuit_size, const size_t num_public_inputs)
bool operator==(const VerificationKey &) const =default
VerificationKey(const PrecomputedData &precomputed)
A container encapsulating all the commitments that the verifier receives (to precomputed polynomials ...
VerifierCommitments_(const std::shared_ptr< VerificationKey > &verification_key, const std::optional< WitnessEntities< Commitment > > &witness_commitments=std::nullopt)
DEFINE_FLAVOR_MEMBERS(DataType, w_l, w_r, w_o, w_4, z_perm, lookup_inverses, lookup_read_counts, lookup_read_tags) auto get_wires()
MSGPACK_FIELDS(w_l, w_r, w_o, w_4, z_perm, lookup_inverses, lookup_read_counts, lookup_read_tags)
static constexpr RepeatedCommitmentsData REPEATED_COMMITMENTS
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH
static constexpr bool USE_PADDING
static constexpr size_t NUM_RELATIONS
static constexpr size_t NUM_PRECOMPUTED_ENTITIES
static constexpr bool HasZK
static constexpr bool is_decider
static constexpr bool USE_SHORT_MONOMIALS
static constexpr size_t FINAL_PCS_MSM_SIZE(size_t log_n=VIRTUAL_LOG_N)
static constexpr size_t num_frs_comm
Curve::ScalarField FF
Curve::AffineElement Commitment
static constexpr size_t num_frs_fr
static constexpr size_t MAX_PARTIAL_RELATION_LENGTH
static constexpr size_t NUM_SUBRELATIONS
static constexpr bool has_zero_row
bb::Polynomial< FF > Polynomial
static constexpr size_t VIRTUAL_LOG_N
std::tuple< bb::ArithmeticRelation< FF >, bb::UltraPermutationRelation< FF >, bb::LogDerivLookupRelation< FF >, bb::DeltaRangeConstraintRelation< FF >, bb::EllipticRelation< FF >, bb::MemoryRelation< FF >, bb::NonNativeFieldRelation< FF >, bb::Poseidon2ExternalRelation< FF >, bb::Poseidon2InternalRelation< FF > > Relations_
Curve::Element GroupElement
Relations_< FF > Relations
static constexpr size_t DECIDER_PROOF_LENGTH(size_t virtual_log_n=VIRTUAL_LOG_N)
static constexpr size_t NUM_ALL_ENTITIES
static constexpr size_t OINK_PROOF_LENGTH_WITHOUT_PUB_INPUTS
static constexpr size_t NUM_UNSHIFTED_ENTITIES
static constexpr size_t NUM_SHIFTED_ENTITIES
static constexpr size_t PROOF_LENGTH_WITHOUT_PUB_INPUTS(size_t virtual_log_n=VIRTUAL_LOG_N)
static constexpr size_t NUM_WIRES
static constexpr size_t NUM_WITNESS_ENTITIES
A univariate polynomial represented by its values on {0, 1,..., domain_end - 1}.
typename Group::element Element
Definition bn254.hpp:21
typename Group::affine_element AffineElement
Definition bn254.hpp:22
bb::fr ScalarField
Definition bn254.hpp:18
Base class templates for structures that contain data parameterized by the fundamental polynomials of...
#define DEFINE_FLAVOR_MEMBERS(DataType,...)
Define the body of a flavor class, included each member and a pointer view with which to iterate the ...
constexpr T get_msb(const T in)
Definition get_msb.hpp:47
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
UltraCircuitBuilder_< UltraExecutionTraceBlocks > UltraCircuitBuilder
RefArray< T,(Ns+...)> constexpr concatenate(const RefArray< T, Ns > &... ref_arrays)
Concatenates multiple RefArray objects into a single RefArray.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
size_t pub_inputs_offset
Definition flavor.hpp:115
size_t num_public_inputs
Definition flavor.hpp:114
size_t dyadic_size
Definition flavor.hpp:113
The precomputed data needed to compute a Honk VK.
Definition flavor.hpp:121
RefArray< Polynomial, NUM_PRECOMPUTED_ENTITIES > polynomials
Definition flavor.hpp:122