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 // Total number of folded polynomials, which is just all polynomials except the shifts
68 // The number of shifted witness entities including derived witness entities
69 static constexpr size_t NUM_SHIFTED_ENTITIES = 5;
70 // The number of unshifted witness entities
72
73 // A container to be fed to ShpleminiVerifier to avoid redundant scalar muls
76
77 // define the tuple of Relations that comprise the Sumcheck relation
78 // Note: made generic for use in MegaRecursive.
79 template <typename FF>
80
81 // List of relations reflecting the Ultra arithmetisation. WARNING: As UltraKeccak flavor inherits from
82 // Ultra flavor any change of ordering in this tuple needs to be reflected in the smart contract, otherwise
83 // relation accumulation will not match.
93
95
96 static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length<Relations>();
97 static_assert(MAX_PARTIAL_RELATION_LENGTH == 7);
98 static constexpr size_t MAX_TOTAL_RELATION_LENGTH = compute_max_total_relation_length<Relations>();
99 static_assert(MAX_TOTAL_RELATION_LENGTH == 11);
100 static constexpr size_t NUM_SUBRELATIONS = compute_number_of_subrelations<Relations>();
101 // For instances of this flavour, used in folding, we need a unique sumcheck batching challenge for each
102 // subrelation. This is because using powers of alpha would increase the degree of Protogalaxy polynomial $G$ (the
103 // combiner) too much.
104 using SubrelationSeparators = std::array<FF, NUM_SUBRELATIONS - 1>;
105
106 // BATCHED_RELATION_PARTIAL_LENGTH = algebraic degree of sumcheck relation *after* multiplying by the `pow_zeta`
107 // random polynomial e.g. For \sum(x) [A(x) * B(x) + C(x)] * PowZeta(X), relation length = 2 and random relation
108 // length = 3
111
112 static constexpr size_t num_frs_comm = FrCodec::calc_num_fields<Commitment>();
113 static constexpr size_t num_frs_fr = FrCodec::calc_num_fields<FF>();
114
115 // Proof length formula methods
116 static constexpr size_t OINK_PROOF_LENGTH_WITHOUT_PUB_INPUTS =
117 /* 1. NUM_WITNESS_ENTITIES commitments */ (NUM_WITNESS_ENTITIES * num_frs_comm);
118
119 static constexpr size_t DECIDER_PROOF_LENGTH(size_t virtual_log_n = VIRTUAL_LOG_N)
120 {
121 return /* 2. virtual_log_n sumcheck univariates */
122 (virtual_log_n * BATCHED_RELATION_PARTIAL_LENGTH * num_frs_fr) +
123 /* 3. NUM_ALL_ENTITIES sumcheck evaluations */ (NUM_ALL_ENTITIES * num_frs_fr) +
124 /* 4. virtual_log_n - 1 Gemini Fold commitments */ ((virtual_log_n - 1) * num_frs_comm) +
125 /* 5. virtual_log_n Gemini a evaluations */ (virtual_log_n * num_frs_fr) +
126 /* 6. Shplonk Q commitment */ (num_frs_comm) +
127 /* 7. KZG W commitment */ (num_frs_comm);
128 }
129
130 static constexpr size_t PROOF_LENGTH_WITHOUT_PUB_INPUTS(size_t virtual_log_n = VIRTUAL_LOG_N)
131 {
133 }
134
135 template <size_t NUM_INSTANCES>
137 decltype(create_protogalaxy_tuple_of_tuples_of_univariates<Relations, NUM_INSTANCES>());
138 template <size_t NUM_INSTANCES>
141 NUM_INSTANCES,
142 /*optimized=*/true>());
143
144 // Whether or not the first row of the execution trace is reserved for 0s to enable shifts
145 static constexpr bool has_zero_row = true;
146
147 static constexpr bool is_decider = true;
148
153 template <typename DataType_> class PrecomputedEntities {
154 public:
155 bool operator==(const PrecomputedEntities&) const = default;
156 using DataType = DataType_;
158 q_m, // column 0
159 q_c, // column 1
160 q_l, // column 2
161 q_r, // column 3
162 q_o, // column 4
163 q_4, // column 5
164 q_lookup, // column 6
165 q_arith, // column 7
166 q_delta_range, // column 8
167 q_elliptic, // column 9
168 q_memory, // column 10
169 q_nnf, // column 11
170 q_poseidon2_external, // column 12
171 q_poseidon2_internal, // column 13
172 sigma_1, // column 14
173 sigma_2, // column 15
174 sigma_3, // column 16
175 sigma_4, // column 17
176 id_1, // column 18
177 id_2, // column 19
178 id_3, // column 20
179 id_4, // column 21
180 table_1, // column 22
181 table_2, // column 23
182 table_3, // column 24
183 table_4, // column 25
184 lagrange_first, // column 26
185 lagrange_last) // column 27
186
187 auto get_non_gate_selectors() { return RefArray{ q_m, q_c, q_l, q_r, q_o, q_4 }; }
189 {
190 return RefArray{ q_lookup, q_arith, q_delta_range, q_elliptic,
191 q_memory, q_nnf, q_poseidon2_external, q_poseidon2_internal };
192 }
193 auto get_selectors() { return concatenate(get_non_gate_selectors(), get_gate_selectors()); }
194
195 auto get_sigmas() { return RefArray{ sigma_1, sigma_2, sigma_3, sigma_4 }; };
196 auto get_ids() { return RefArray{ id_1, id_2, id_3, id_4 }; };
197 auto get_tables() { return RefArray{ table_1, table_2, table_3, table_4 }; };
198 };
199
204 template <typename DataType> class WitnessEntities {
205 public:
207 w_l, // column 0
208 w_r, // column 1
209 w_o, // column 2
210 w_4, // column 3
211 z_perm, // column 4
212 lookup_inverses, // column 5
213 lookup_read_counts, // column 6
214 lookup_read_tags) // column 7
215
216 auto get_wires() { return RefArray{ w_l, w_r, w_o, w_4 }; };
217 auto get_to_be_shifted() { return RefArray{ w_l, w_r, w_o, w_4, z_perm }; };
218
219 MSGPACK_FIELDS(w_l, w_r, w_o, w_4, z_perm, lookup_inverses, lookup_read_counts, lookup_read_tags);
220 };
221
225 template <typename DataType> class ShiftedEntities {
226 public:
228 w_l_shift, // column 0
229 w_r_shift, // column 1
230 w_o_shift, // column 2
231 w_4_shift, // column 3
232 z_perm_shift) // column 4
233
234 auto get_shifted() { return RefArray{ w_l_shift, w_r_shift, w_o_shift, w_4_shift, z_perm_shift }; };
235 };
236
246 template <typename DataType>
260
265 class AllValues : public AllEntities<FF> {
266 public:
268 using Base::Base;
269 };
270
274 // TODO(https://github.com/AztecProtocol/barretenberg/issues/966): use inheritance
275 class ProverPolynomials : public AllEntities<Polynomial> {
276 public:
277 // Define all operations as default, except copy construction/assignment
278 ProverPolynomials() = default;
279 ProverPolynomials(size_t circuit_size)
280 {
281
282 BB_BENCH_NAME("creating empty prover polys");
283
284 for (auto& poly : get_to_be_shifted()) {
285 poly = Polynomial{ /*memory size*/ circuit_size - 1,
286 /*largest possible index*/ circuit_size,
287 /* offset */ 1 };
288 }
289 for (auto& poly : get_unshifted()) {
290 if (poly.is_empty()) {
291 // Not set above
292 poly = Polynomial{ /*fully formed*/ circuit_size };
293 }
294 }
295 set_shifted();
296 }
299 ProverPolynomials(ProverPolynomials&& o) noexcept = default;
302 [[nodiscard]] size_t get_polynomial_size() const { return q_c.size(); }
303 [[nodiscard]] AllValues get_row(const size_t row_idx) const
304 {
305 AllValues result;
306 for (auto [result_field, polynomial] : zip_view(result.get_all(), get_all())) {
307 result_field = polynomial[row_idx];
308 }
309 return result;
310 }
311
312 [[nodiscard]] AllValues get_row_for_permutation_arg(size_t row_idx)
313 {
314 AllValues result;
315 for (auto [result_field, polynomial] : zip_view(result.get_sigmas(), get_sigmas())) {
316 result_field = polynomial[row_idx];
317 }
318 for (auto [result_field, polynomial] : zip_view(result.get_ids(), get_ids())) {
319 result_field = polynomial[row_idx];
320 }
321 for (auto [result_field, polynomial] : zip_view(result.get_wires(), get_wires())) {
322 result_field = polynomial[row_idx];
323 }
324 return result;
325 }
326
327 // Set all shifted polynomials based on their to-be-shifted counterpart
329 {
330 for (auto [shifted, to_be_shifted] : zip_view(get_shifted(), get_to_be_shifted())) {
331 shifted = to_be_shifted.shifted();
332 }
333 }
334
335 void increase_polynomials_virtual_size(const size_t size_in)
336 {
337 for (auto& polynomial : this->get_all()) {
338 polynomial.increase_virtual_size(size_in);
339 }
340 }
341 };
342
344
349 template <typename Codec, typename HashFunction> class Transcript_ : public BaseTranscript<Codec, HashFunction> {
350 public:
352
353 // Transcript objects defined as public member variables for easy access and modification
354 std::vector<FF> public_inputs;
364 std::array<FF, NUM_ALL_ENTITIES> sumcheck_evaluations;
365 std::vector<Commitment> gemini_fold_comms;
366 std::vector<FF> gemini_fold_evals;
369 Transcript_() = default;
370
372 {
373 auto transcript = Base::prover_init_empty();
374 return std::static_pointer_cast<Transcript_>(transcript);
375 };
376
378 {
379 auto verifier_transcript = Base::verifier_init_empty(transcript);
380 return std::static_pointer_cast<Transcript_>(verifier_transcript);
381 };
382
389 void deserialize_full_transcript(size_t public_input_size, size_t virtual_log_n = VIRTUAL_LOG_N)
390 {
391 // take current proof and put them into the struct
392 auto& proof_data = this->proof_data;
393 size_t num_frs_read = 0;
394 for (size_t i = 0; i < public_input_size; ++i) {
395 public_inputs.push_back(Base::template deserialize_from_buffer<FF>(proof_data, num_frs_read));
396 }
397 w_l_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
398 w_r_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
399 w_o_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
400 lookup_read_counts_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
401 lookup_read_tags_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
402 w_4_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
403 lookup_inverses_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
404 z_perm_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
405 for (size_t i = 0; i < virtual_log_n; ++i) {
406 sumcheck_univariates.push_back(
409 }
411 Base::template deserialize_from_buffer<std::array<FF, NUM_ALL_ENTITIES>>(proof_data, num_frs_read);
412 for (size_t i = 0; i < virtual_log_n - 1; ++i) {
413 gemini_fold_comms.push_back(
414 Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read));
415 }
416 for (size_t i = 0; i < virtual_log_n; ++i) {
417 gemini_fold_evals.push_back(Base::template deserialize_from_buffer<FF>(proof_data, num_frs_read));
418 }
419 shplonk_q_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
420
421 kzg_w_comm = Base::template deserialize_from_buffer<Commitment>(proof_data, num_frs_read);
422 }
423
430 void serialize_full_transcript(size_t virtual_log_n = VIRTUAL_LOG_N)
431 {
432 auto& proof_data = this->proof_data;
433 size_t old_proof_length = proof_data.size();
434 proof_data.clear(); // clear proof_data so the rest of the function can replace it
435 for (const auto& public_input : public_inputs) {
437 }
446 for (size_t i = 0; i < virtual_log_n; ++i) {
448 }
450 for (size_t i = 0; i < virtual_log_n - 1; ++i) {
452 }
453 for (size_t i = 0; i < virtual_log_n; ++i) {
455 }
458
459 // sanity check to make sure we generate the same length of proof as before.
460 BB_ASSERT_EQ(proof_data.size(), old_proof_length);
461 }
462 };
463
465
474 class VerificationKey : public NativeVerificationKey_<PrecomputedEntities<Commitment>, Transcript> {
475 public:
476 bool operator==(const VerificationKey&) const = default;
477 VerificationKey() = default;
478 VerificationKey(const size_t circuit_size, const size_t num_public_inputs)
480 {}
481
483 {
485 this->num_public_inputs = precomputed.metadata.num_public_inputs;
486 this->pub_inputs_offset = precomputed.metadata.pub_inputs_offset;
487
488 CommitmentKey commitment_key{ precomputed.metadata.dyadic_size };
489 for (auto [polynomial, commitment] : zip_view(precomputed.polynomials, this->get_all())) {
490 commitment = commitment_key.commit(polynomial);
491 }
492 }
493 };
494
498 class PartiallyEvaluatedMultivariates : public AllEntities<Polynomial> {
499 public:
501 PartiallyEvaluatedMultivariates(const size_t circuit_size)
502 {
503 BB_BENCH_NAME("PartiallyEvaluatedMultivariates constructor");
504
505 // Storage is only needed after the first partial evaluation, hence polynomials of
506 // size (n / 2)
507 for (auto& poly : this->get_all()) {
508 poly = Polynomial(circuit_size / 2);
509 }
510 }
511 PartiallyEvaluatedMultivariates(const ProverPolynomials& full_polynomials, size_t circuit_size)
512 {
513 BB_BENCH_NAME("PartiallyEvaluatedMultivariates constructor");
514 for (auto [poly, full_poly] : zip_view(get_all(), full_polynomials.get_all())) {
515 // After the initial sumcheck round, the new size is CEIL(size/2).
516 size_t desired_size = full_poly.end_index() / 2 + full_poly.end_index() % 2;
517 poly = Polynomial(desired_size, circuit_size / 2);
518 }
519 }
520 };
521
531 template <size_t LENGTH, size_t SKIP_COUNT>
533
538
543
550 class CommitmentLabels : public AllEntities<std::string> {
551 public:
553 {
554 w_l = "W_L";
555 w_r = "W_R";
556 w_o = "W_O";
557 w_4 = "W_4";
558 z_perm = "Z_PERM";
559 lookup_inverses = "LOOKUP_INVERSES";
560 lookup_read_counts = "LOOKUP_READ_COUNTS";
561 lookup_read_tags = "LOOKUP_READ_TAGS";
562
563 q_c = "Q_C";
564 q_l = "Q_L";
565 q_r = "Q_R";
566 q_o = "Q_O";
567 q_4 = "Q_4";
568 q_m = "Q_M";
569 q_lookup = "Q_LOOKUP";
570 q_arith = "Q_ARITH";
571 q_delta_range = "Q_SORT";
572 q_elliptic = "Q_ELLIPTIC";
573 q_memory = "Q_MEMORY";
574 q_nnf = "Q_NNF";
575 q_poseidon2_external = "Q_POSEIDON2_EXTERNAL";
576 q_poseidon2_internal = "Q_POSEIDON2_INTERNAL";
577 sigma_1 = "SIGMA_1";
578 sigma_2 = "SIGMA_2";
579 sigma_3 = "SIGMA_3";
580 sigma_4 = "SIGMA_4";
581 id_1 = "ID_1";
582 id_2 = "ID_2";
583 id_3 = "ID_3";
584 id_4 = "ID_4";
585 table_1 = "TABLE_1";
586 table_2 = "TABLE_2";
587 table_3 = "TABLE_3";
588 table_4 = "TABLE_4";
589 lagrange_first = "LAGRANGE_FIRST";
590 lagrange_last = "LAGRANGE_LAST";
591 };
592 };
593
599 template <typename Commitment, typename VerificationKey>
600 class VerifierCommitments_ : public AllEntities<Commitment> {
601 public:
602 VerifierCommitments_(const std::shared_ptr<VerificationKey>& verification_key,
603 const std::optional<WitnessEntities<Commitment>>& witness_commitments = std::nullopt)
604 {
605 // Copy the precomputed polynomial commitments into this
606 for (auto [precomputed, precomputed_in] : zip_view(this->get_precomputed(), verification_key->get_all())) {
607 precomputed = precomputed_in;
608 }
609
610 // If provided, copy the witness polynomial commitments into this
611 if (witness_commitments.has_value()) {
612 for (auto [witness, witness_in] :
613 zip_view(this->get_witness(), witness_commitments.value().get_all())) {
614 witness = witness_in;
615 }
616
617 // Set shifted commitments
618 this->w_l_shift = witness_commitments->w_l;
619 this->w_r_shift = witness_commitments->w_r;
620 this->w_o_shift = witness_commitments->w_o;
621 this->w_4_shift = witness_commitments->w_4;
622 this->z_perm_shift = witness_commitments->z_perm;
623 }
624 }
625 }; // namespace bb
626 // Specialize for Ultra (general case used in UltraRecursive).
628};
629
630} // namespace bb
#define BB_ASSERT_EQ(actual, expected,...)
Definition assert.hpp:88
#define BB_BENCH_NAME(name)
Definition bb_bench.hpp:218
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
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...
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.
CommitmentKey object over a pairing group 𝔾₁.
Base Native verification key class.
Definition flavor.hpp:161
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...
A field element for each entity of the flavor. These entities represent the prover polynomials evalua...
A container for commitment labels.
A container for storing the partially evaluated multivariates produced by sumcheck.
PartiallyEvaluatedMultivariates(const size_t circuit_size)
PartiallyEvaluatedMultivariates(const ProverPolynomials &full_polynomials, 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.
ProverPolynomials(size_t circuit_size)
ProverPolynomials(const ProverPolynomials &o)=delete
ProverPolynomials & operator=(const ProverPolynomials &)=delete
ProverPolynomials & operator=(ProverPolynomials &&o) noexcept=default
AllValues get_row_for_permutation_arg(size_t row_idx)
void increase_polynomials_virtual_size(const size_t size_in)
ProverPolynomials(ProverPolynomials &&o) noexcept=default
AllValues get_row(const size_t row_idx) const
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...
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)
Container for all witness polynomials used/constructed by the prover.
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)
decltype(create_protogalaxy_tuple_of_tuples_of_univariates< Relations, NUM_INSTANCES >()) ProtogalaxyTupleOfTuplesOfUnivariatesNoOptimisticSkipping
static constexpr RepeatedCommitmentsData REPEATED_COMMITMENTS
static constexpr size_t MAX_TOTAL_RELATION_LENGTH
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH
static constexpr size_t NUM_FOLDED_ENTITIES
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
decltype(create_protogalaxy_tuple_of_tuples_of_univariates< Relations, NUM_INSTANCES, true >()) ProtogalaxyTupleOfTuplesOfUnivariates
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
std::array< FF, NUM_SUBRELATIONS - 1 > SubrelationSeparators
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::UltraArithmeticRelation< 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 {domain_start, domain_start + 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_COMPOUND_GET_ALL(...)
constexpr T get_msb(const T in)
Definition get_msb.hpp:47
Entry point for Barretenberg command-line interface.
constexpr auto create_protogalaxy_tuple_of_tuples_of_univariates()
Utility function to construct a container for the subrelation accumulators of Protogalaxy folding.
Definition flavor.hpp:461
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:139
size_t num_public_inputs
Definition flavor.hpp:138
size_t dyadic_size
Definition flavor.hpp:137
The precomputed data needed to compute a Honk VK.
Definition flavor.hpp:145
RefArray< Polynomial, NUM_PRECOMPUTED_ENTITIES > polynomials
Definition flavor.hpp:146