Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
gemini.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
8
13
50namespace bb {
51
66namespace gemini {
75template <class Fr> inline std::vector<Fr> powers_of_rho(const Fr rho, const size_t num_powers)
76{
77 std::vector<Fr> rhos = { Fr(1), rho };
78 rhos.reserve(num_powers);
79 for (size_t j = 2; j < num_powers; j++) {
80 rhos.emplace_back(rhos[j - 1] * rho);
81 }
82 return rhos;
83};
84
92template <class Fr> inline std::vector<Fr> powers_of_evaluation_challenge(const Fr r, const size_t num_squares)
93{
94 std::vector<Fr> squares = { r };
95 squares.reserve(num_squares);
96 for (size_t j = 1; j < num_squares; j++) {
97 squares.emplace_back(squares[j - 1].sqr());
98 }
99 return squares;
100};
101} // namespace gemini
102
103template <typename Curve> class GeminiProver_ {
104 using Fr = typename Curve::ScalarField;
108
109 public:
124
125 size_t full_batched_size = 0; // size of the full batched polynomial (generally the circuit size)
127
128 Polynomial random_polynomial; // random polynomial used for ZK
130
131 RefVector<Polynomial> unshifted; // set of unshifted polynomials
132 RefVector<Polynomial> to_be_shifted_by_one; // set of polynomials to be left shifted by 1
133 RefVector<Polynomial> to_be_shifted_by_k; // set of polynomials to be right shifted by k
134 RefVector<Polynomial> interleaved; // the interleaved polynomials used in Translator
135 std::vector<RefVector<Polynomial>> groups_to_be_interleaved; // groups of polynomials to be interleaved
136
137 size_t k_shift_magnitude = 0; // magnitude of right-shift-by-k (assumed even)
138
139 Polynomial batched_unshifted; // linear combination of unshifted polynomials
140 Polynomial batched_to_be_shifted_by_one; // linear combination of to-be-shifted polynomials
141 Polynomial batched_to_be_shifted_by_k; // linear combination of to-be-shifted-by-k polynomials
142 Polynomial batched_interleaved; // linear combination of interleaved polynomials
143 // linear combination of the groups to be interleaved where polynomial i in the batched group is obtained by
144 // linearly combining the i-th polynomial in each group
146
147 public:
153
154 bool has_unshifted() const { return unshifted.size() > 0; }
155 bool has_to_be_shifted_by_one() const { return to_be_shifted_by_one.size() > 0; }
156 bool has_to_be_shifted_by_k() const { return to_be_shifted_by_k.size() > 0; }
157 bool has_interleaved() const { return interleaved.size() > 0; }
158
159 // Set references to the polynomials to be batched
160 void set_unshifted(RefVector<Polynomial> polynomials) { unshifted = polynomials; }
162 void set_to_be_shifted_by_k(RefVector<Polynomial> polynomials, const size_t shift_magnitude)
163 {
165 k_shift_magnitude % 2, static_cast<size_t>(0), "k must be even for the formulas herein to be valid");
166 to_be_shifted_by_k = polynomials;
167 k_shift_magnitude = shift_magnitude;
168 }
169
170 // Initialize the random polynomial used to add randomness to the batched polynomials for ZK
172 {
174 random_polynomial = random;
175 }
176
178 {
179 // Ensure the Gemini subprotocol for interleaved polynomials operates correctly
180 if (groups[0].size() % 2 != 0) {
181 throw_or_abort("Group size must be even ");
182 }
183 interleaved = results;
185 }
186
195 Polynomial compute_batched(const Fr& challenge, Fr& running_scalar)
196 {
197 // lambda for batching polynomials; updates the running scalar in place
198 auto batch = [&](Polynomial& batched, const RefVector<Polynomial>& polynomials_to_batch) {
199 for (auto& poly : polynomials_to_batch) {
200 batched.add_scaled(poly, running_scalar);
201 running_scalar *= challenge;
202 }
203 };
204
205 Polynomial full_batched(full_batched_size);
206
207 // if necessary, add randomness to the full batched polynomial for ZK
209 full_batched += random_polynomial; // A₀ += rand
210 }
211
212 // compute the linear combination F of the unshifted polynomials
213 if (has_unshifted()) {
215 full_batched += batched_unshifted; // A₀ += F
216 }
217
218 // compute the linear combination G of the to-be-shifted polynomials
221 full_batched += batched_to_be_shifted_by_one.shifted(); // A₀ += G/X
222 }
223
224 // compute the linear combination H of the to-be-shifted-by-k polynomials
228 full_batched += batched_to_be_shifted_by_k.right_shifted(k_shift_magnitude); // A₀ += X^k * H
229 }
230
231 // compute the linear combination of the interleaved polynomials and groups
232 if (has_interleaved()) {
234 for (size_t i = 0; i < groups_to_be_interleaved[0].size(); ++i) {
236 }
237 for (size_t i = 0; i < groups_to_be_interleaved.size(); ++i) {
238 batched_interleaved.add_scaled(interleaved[i], running_scalar);
239 for (size_t j = 0; j < groups_to_be_interleaved[0].size(); ++j) {
240 batched_group[j].add_scaled(groups_to_be_interleaved[i][j], running_scalar);
241 }
242 running_scalar *= challenge;
243 }
244 full_batched += batched_interleaved;
245 }
246
247 return full_batched;
248 }
249
258 {
259 // Initialize A₀₊ and compute A₀₊ += Random and A₀₊ += F as necessary
260 Polynomial A_0_pos(full_batched_size); // A₀₊
261
263 A_0_pos += random_polynomial; // A₀₊ += random
264 }
265 if (has_unshifted()) {
266 A_0_pos += batched_unshifted; // A₀₊ += F
267 }
268
270 Fr r_pow_k = r_challenge.pow(k_shift_magnitude); // r^k
272 A_0_pos += batched_to_be_shifted_by_k; // A₀₊ += r^k * H
273 }
274
275 Polynomial A_0_neg = A_0_pos;
276
278 Fr r_inv = r_challenge.invert(); // r⁻¹
279 batched_to_be_shifted_by_one *= r_inv; // G = G/r
280
281 A_0_pos += batched_to_be_shifted_by_one; // A₀₊ += G/r
282 A_0_neg -= batched_to_be_shifted_by_one; // A₀₋ -= G/r
283 }
284
285 return { A_0_pos, A_0_neg };
286 };
299 {
300 Polynomial P_pos(batched_group[0]);
301 Polynomial P_neg(batched_group[0]);
302
303 Fr current_r_shift_pos = r_challenge;
304 Fr current_r_shift_neg = -r_challenge;
305 for (size_t i = 1; i < batched_group.size(); i++) {
306 P_pos.add_scaled(batched_group[i], current_r_shift_pos);
307 P_neg.add_scaled(batched_group[i], current_r_shift_neg);
308 current_r_shift_pos *= r_challenge;
309 current_r_shift_neg *= -r_challenge;
310 }
311
312 return { P_pos, P_neg };
313 }
314
315 size_t get_group_size() { return batched_group.size(); }
316 };
317
318 static std::vector<Polynomial> compute_fold_polynomials(const size_t log_n,
319 std::span<const Fr> multilinear_challenge,
320 const Polynomial& A_0,
321 const bool& has_zk = false);
322
324 const size_t log_n,
325 PolynomialBatcher& polynomial_batcher,
326 const Fr& r_challenge,
327 const std::vector<Polynomial>& batched_groups_to_be_concatenated = {});
328
330 Polynomial&& A_0_pos,
331 Polynomial&& A_0_neg,
332 std::vector<Polynomial>&& fold_polynomials,
333 const Fr& r_challenge);
334
335 template <typename Transcript>
336 static std::vector<Claim> prove(const Fr circuit_size,
337 PolynomialBatcher& polynomial_batcher,
338 std::span<Fr> multilinear_challenge,
339 const CommitmentKey<Curve>& commitment_key,
340 const std::shared_ptr<Transcript>& transcript,
341 bool has_zk = false);
342
343}; // namespace bb
344
345template <typename Curve> class GeminiVerifier_ {
346 using Fr = typename Curve::ScalarField;
347 using GroupElement = typename Curve::Element;
350
351 public:
365 ClaimBatcher& claim_batcher,
366 auto& transcript)
367
368 {
369 const size_t log_n = multilinear_challenge.size();
370 const bool has_interleaved = claim_batcher.interleaved.has_value();
371
372 const Fr rho = transcript->template get_challenge<Fr>("rho");
373
374 GroupElement batched_commitment_unshifted = GroupElement::zero();
375 GroupElement batched_commitment_to_be_shifted = GroupElement::zero();
376
377 Fr batched_evaluation = Fr(0);
378 Fr batching_scalar = Fr(1);
379 for (auto [eval, comm] :
380 zip_view(claim_batcher.get_unshifted().evaluations, claim_batcher.get_unshifted().commitments)) {
381 batched_evaluation += eval * batching_scalar;
382 batched_commitment_unshifted += comm * batching_scalar;
383 batching_scalar *= rho;
384 }
385
386 for (auto [eval, comm] :
387 zip_view(claim_batcher.get_shifted().evaluations, claim_batcher.get_shifted().commitments)) {
388 batched_evaluation += eval * batching_scalar;
389 batched_commitment_to_be_shifted += comm * batching_scalar;
390 batching_scalar *= rho;
391 }
392
393 // Get polynomials Fold_i, i = 1,...,m-1 from transcript
394 const std::vector<Commitment> commitments = get_fold_commitments(log_n, transcript);
395
396 // compute vector of powers of random evaluation point r
397 const Fr r = transcript->template get_challenge<Fr>("Gemini:r");
398 const std::vector<Fr> r_squares = gemini::powers_of_evaluation_challenge(r, log_n);
399
400 // Get evaluations a_i, i = 0,...,m-1 from transcript
401 const std::vector<Fr> evaluations = get_gemini_evaluations(log_n, transcript);
402
403 // C₀_r_pos = ∑ⱼ ρʲ⋅[fⱼ] + r⁻¹⋅∑ⱼ ρᵏ⁺ʲ [gⱼ], the commitment to A₀₊
404 // C₀_r_neg = ∑ⱼ ρʲ⋅[fⱼ] - r⁻¹⋅∑ⱼ ρᵏ⁺ʲ [gⱼ], the commitment to A₀₋
405 GroupElement C0_r_pos = batched_commitment_unshifted;
406 GroupElement C0_r_neg = batched_commitment_unshifted;
407
408 Fr r_inv = r.invert();
409 if (!batched_commitment_to_be_shifted.is_point_at_infinity()) {
410 batched_commitment_to_be_shifted = batched_commitment_to_be_shifted * r_inv;
411 C0_r_pos += batched_commitment_to_be_shifted;
412 C0_r_neg -= batched_commitment_to_be_shifted;
413 }
414
415 // If verifying the opening for the translator VM, we reconstruct the commitment of the batched interleaved
416 // polynomials, "partially evaluated" in r and -r, using the commitments in the interleaved groups
417 GroupElement C_P_pos = GroupElement::zero();
418 GroupElement C_P_neg = GroupElement::zero();
419 if (has_interleaved) {
420 size_t interleaved_group_size = claim_batcher.get_groups_to_be_interleaved_size();
421 Fr current_r_shift_pos = Fr(1);
422 Fr current_r_shift_neg = Fr(1);
423 std::vector<Fr> r_shifts_pos;
424 std::vector<Fr> r_shifts_neg;
425 for (size_t i = 0; i < interleaved_group_size; ++i) {
426 r_shifts_pos.emplace_back(current_r_shift_pos);
427 r_shifts_neg.emplace_back(current_r_shift_neg);
428 current_r_shift_pos *= r;
429 current_r_shift_neg *= (-r);
430 }
431
432 for (auto [group_commitments, interleaved_evaluation] : zip_view(
433 claim_batcher.get_interleaved().commitments_groups, claim_batcher.get_interleaved().evaluations)) {
434 // Compute the contribution from each group j of commitments Gⱼ = {C₀, C₁, C₂, C₃, ..., Cₛ₋₁} where s is
435 // assumed even
436 // C_P_pos += ∑ᵢ ρᵏ⁺ᵐ⁺ʲ⋅ rⁱ ⋅ Cᵢ
437 // C_P_neg += ∑ᵢ ρᵏ⁺ᵐ⁺ʲ⋅ (-r)ⁱ ⋅ Cᵢ
438 for (size_t i = 0; i < interleaved_group_size; ++i) {
439 C_P_pos += group_commitments[i] * batching_scalar * r_shifts_pos[i];
440 C_P_neg += group_commitments[i] * batching_scalar * r_shifts_neg[i];
441 }
442 batched_evaluation += interleaved_evaluation * batching_scalar;
443 batching_scalar *= rho;
444 }
445 }
446
447 Fr p_neg = Fr(0);
448 Fr p_pos = Fr(0);
449 if (has_interleaved) {
450 p_pos = transcript->template receive_from_prover<Fr>("Gemini:P_0_pos");
451 p_neg = transcript->template receive_from_prover<Fr>("Gemini:P_0_neg");
452 }
453 std::vector<Fr> padding_indicator_array(log_n, Fr{ 1 });
454
455 // Compute the evaluations Aₗ(r^{2ˡ}) for l = 0, ..., m-1
456 std::vector<Fr> gemini_fold_pos_evaluations = compute_fold_pos_evaluations(
457 padding_indicator_array, batched_evaluation, multilinear_challenge, r_squares, evaluations, p_neg);
458 // Extract the evaluation A₀(r) = A₀₊(r) + P₊(r^s)
459 auto full_a_0_pos = gemini_fold_pos_evaluations[0];
460 std::vector<OpeningClaim<Curve>> fold_polynomial_opening_claims;
461 fold_polynomial_opening_claims.reserve(2 * log_n + 2);
462
463 // ( [A₀₊], r, A₀₊(r) )
464 fold_polynomial_opening_claims.emplace_back(OpeningClaim<Curve>{ { r, full_a_0_pos - p_pos }, C0_r_pos });
465 // ( [A₀₋], -r, A₀-(-r) )
466 fold_polynomial_opening_claims.emplace_back(OpeningClaim<Curve>{ { -r, evaluations[0] }, C0_r_neg });
467 for (size_t l = 0; l < log_n - 1; ++l) {
468 // ([Aₗ], r^{2ˡ}, Aₗ(r^{2ˡ}) )
469 fold_polynomial_opening_claims.emplace_back(
470 OpeningClaim<Curve>{ { r_squares[l + 1], gemini_fold_pos_evaluations[l + 1] }, commitments[l] });
471 // ([Aₗ], −r^{2ˡ}, Aₗ(−r^{2ˡ}) )
472 fold_polynomial_opening_claims.emplace_back(
473 OpeningClaim<Curve>{ { -r_squares[l + 1], evaluations[l + 1] }, commitments[l] });
474 }
475 if (has_interleaved) {
476 uint32_t interleaved_group_size = claim_batcher.get_groups_to_be_interleaved_size();
477 Fr r_pow = r.pow(interleaved_group_size);
478 fold_polynomial_opening_claims.emplace_back(OpeningClaim<Curve>{ { r_pow, p_pos }, C_P_pos });
479 fold_polynomial_opening_claims.emplace_back(OpeningClaim<Curve>{ { r_pow, p_neg }, C_P_neg });
480 }
481
482 return fold_polynomial_opening_claims;
483 }
484
493 static std::vector<Commitment> get_fold_commitments([[maybe_unused]] const size_t virtual_log_n, auto& transcript)
494 {
495 std::vector<Commitment> fold_commitments;
496 fold_commitments.reserve(virtual_log_n - 1);
497 for (size_t i = 0; i < virtual_log_n - 1; ++i) {
498 const Commitment commitment =
499 transcript->template receive_from_prover<Commitment>("Gemini:FOLD_" + std::to_string(i + 1));
500 fold_commitments.emplace_back(commitment);
501 }
502 return fold_commitments;
503 }
504
514 static std::vector<Fr> get_gemini_evaluations(const size_t virtual_log_n, auto& transcript)
515 {
516 std::vector<Fr> gemini_evaluations;
517 gemini_evaluations.reserve(virtual_log_n);
518
519 for (size_t i = 1; i <= virtual_log_n; ++i) {
520 const Fr evaluation = transcript->template receive_from_prover<Fr>("Gemini:a_" + std::to_string(i));
521 gemini_evaluations.emplace_back(evaluation);
522 }
523 return gemini_evaluations;
524 }
525
559 static std::vector<Fr> compute_fold_pos_evaluations(std::span<const Fr> padding_indicator_array,
560 const Fr& batched_evaluation,
561 std::span<const Fr> evaluation_point, // size = virtual_log_n
562 std::span<const Fr> challenge_powers, // size = virtual_log_n
563 std::span<const Fr> fold_neg_evals, // size = virtual_log_n
564 Fr p_neg = Fr(0))
565 {
566 const size_t virtual_log_n = evaluation_point.size();
567
568 std::vector<Fr> evals(fold_neg_evals.begin(), fold_neg_evals.end());
569
570 Fr eval_pos_prev = batched_evaluation;
571
572 Fr zero{ 0 };
573 if constexpr (Curve::is_stdlib_type) {
574 zero.convert_constant_to_fixed_witness(fold_neg_evals[0].get_context());
575 }
576
577 std::vector<Fr> fold_pos_evaluations;
578 fold_pos_evaluations.reserve(virtual_log_n);
579
580 // Add the contribution of P-((-r)ˢ) to get A_0(-r), which is 0 if there are no interleaved polynomials
581 evals[0] += p_neg;
582 // Solve the sequence of linear equations
583 for (size_t l = virtual_log_n; l != 0; --l) {
584 // Get r²⁽ˡ⁻¹⁾
585 const Fr& challenge_power = challenge_powers[l - 1];
586 // Get uₗ₋₁
587 const Fr& u = evaluation_point[l - 1];
588 const Fr& eval_neg = evals[l - 1];
589 // Get A₍ₗ₋₁₎(−r²⁽ˡ⁻¹⁾)
590 // Compute the numerator
591 Fr eval_pos = ((challenge_power * eval_pos_prev * 2) - eval_neg * (challenge_power * (Fr(1) - u) - u));
592 // Divide by the denominator
593 eval_pos *= (challenge_power * (Fr(1) - u) + u).invert();
594
595 // If current index is bigger than log_n, we propagate `batched_evaluation` to the next
596 // round. Otherwise, current `eval_pos` A₍ₗ₋₁₎(−r²⁽ˡ⁻¹⁾) becomes `eval_pos_prev` in the round l-2.
597 eval_pos_prev =
598 padding_indicator_array[l - 1] * eval_pos + (Fr{ 1 } - padding_indicator_array[l - 1]) * eval_pos_prev;
599 // If current index is bigger than log_n, we emplace 0, which is later multiplied against
600 // Commitment::one().
601 fold_pos_evaluations.emplace_back(padding_indicator_array[l - 1] * eval_pos_prev);
602 }
603
604 std::reverse(fold_pos_evaluations.begin(), fold_pos_evaluations.end());
605
606 return fold_pos_evaluations;
607 }
608};
609
610} // namespace bb
#define BB_ASSERT_EQ(actual, expected,...)
Definition assert.hpp:59
CommitmentKey object over a pairing group 𝔾₁.
Class responsible for computation of the batched multilinear polynomials required by the Gemini proto...
Definition gemini.hpp:123
std::pair< Polynomial, Polynomial > compute_partially_evaluated_interleaved_polynomial(const Fr &r_challenge)
Compute the partially evaluated polynomials P₊(X, r) and P₋(X, -r)
Definition gemini.hpp:298
void set_to_be_shifted_by_one(RefVector< Polynomial > polynomials)
Definition gemini.hpp:161
void set_interleaved(RefVector< Polynomial > results, std::vector< RefVector< Polynomial > > groups)
Definition gemini.hpp:177
void set_random_polynomial(Polynomial &&random)
Definition gemini.hpp:171
RefVector< Polynomial > interleaved
Definition gemini.hpp:134
std::vector< RefVector< Polynomial > > groups_to_be_interleaved
Definition gemini.hpp:135
RefVector< Polynomial > to_be_shifted_by_k
Definition gemini.hpp:133
void set_to_be_shifted_by_k(RefVector< Polynomial > polynomials, const size_t shift_magnitude)
Definition gemini.hpp:162
Polynomial compute_batched(const Fr &challenge, Fr &running_scalar)
Compute batched polynomial A₀ = F + G/X as the linear combination of all polynomials to be opened.
Definition gemini.hpp:195
void set_unshifted(RefVector< Polynomial > polynomials)
Definition gemini.hpp:160
std::vector< Polynomial > batched_group
Definition gemini.hpp:145
RefVector< Polynomial > to_be_shifted_by_one
Definition gemini.hpp:132
std::pair< Polynomial, Polynomial > compute_partially_evaluated_batch_polynomials(const Fr &r_challenge)
Compute partially evaluated batched polynomials A₀(X, r) = A₀₊ = F + G/r, A₀(X, -r) = A₀₋ = F - G/r.
Definition gemini.hpp:257
RefVector< Polynomial > unshifted
Definition gemini.hpp:131
PolynomialBatcher(const size_t full_batched_size)
Definition gemini.hpp:148
bb::Polynomial< Fr > Polynomial
Definition gemini.hpp:106
static std::vector< Claim > construct_univariate_opening_claims(const size_t log_n, Polynomial &&A_0_pos, Polynomial &&A_0_neg, std::vector< Polynomial > &&fold_polynomials, const Fr &r_challenge)
Computes/aggragates d+1 univariate polynomial opening claims of the form {polynomial,...
typename Curve::ScalarField Fr
Definition gemini.hpp:104
static std::vector< Claim > prove(const Fr circuit_size, PolynomialBatcher &polynomial_batcher, std::span< Fr > multilinear_challenge, const CommitmentKey< Curve > &commitment_key, const std::shared_ptr< Transcript > &transcript, bool has_zk=false)
static std::pair< Polynomial, Polynomial > compute_partially_evaluated_batch_polynomials(const size_t log_n, PolynomialBatcher &polynomial_batcher, const Fr &r_challenge, const std::vector< Polynomial > &batched_groups_to_be_concatenated={})
typename Curve::AffineElement Commitment
Definition gemini.hpp:105
static std::vector< Polynomial > compute_fold_polynomials(const size_t log_n, std::span< const Fr > multilinear_challenge, const Polynomial &A_0, const bool &has_zk=false)
Computes d-1 fold polynomials Fold_i, i = 1, ..., d-1.
static std::vector< OpeningClaim< Curve > > reduce_verification(std::span< Fr > multilinear_challenge, ClaimBatcher &claim_batcher, auto &transcript)
Returns univariate opening claims for the Fold polynomials to be checked later.
Definition gemini.hpp:364
typename Curve::ScalarField Fr
Definition gemini.hpp:346
static std::vector< Commitment > get_fold_commitments(const size_t virtual_log_n, auto &transcript)
Receive the fold commitments from the prover. This method is used by Shplemini where padding may be e...
Definition gemini.hpp:493
static std::vector< Fr > get_gemini_evaluations(const size_t virtual_log_n, auto &transcript)
Receive the fold evaluations from the prover. This method is used by Shplemini where padding may be e...
Definition gemini.hpp:514
typename Curve::Element GroupElement
Definition gemini.hpp:347
typename Curve::AffineElement Commitment
Definition gemini.hpp:348
Unverified claim (C,r,v) for some witness polynomial p(X) such that.
Definition claim.hpp:53
Structured polynomial class that represents the coefficients 'a' of a_0 + a_1 x .....
Polynomial shifted() const
Returns a Polynomial the left-shift of self.
Polynomial right_shifted(const size_t magnitude) const
Returns a Polynomial equal to the right-shift-by-magnitude of self.
void add_scaled(PolynomialSpan< const Fr > other, Fr scaling_factor) &
adds the polynomial q(X) 'other', multiplied by a scaling factor.
Polynomial p and an opening pair (r,v) such that p(r) = v.
Definition claim.hpp:34
A template class for a reference vector. Behaves as if std::vector<T&> was possible.
typename Group::element Element
Definition grumpkin.hpp:55
static constexpr bool is_stdlib_type
Definition grumpkin.hpp:62
typename Group::affine_element AffineElement
Definition grumpkin.hpp:56
std::vector< Fr > powers_of_evaluation_challenge(const Fr r, const size_t num_squares)
Compute squares of folding challenge r.
Definition gemini.hpp:92
std::vector< Fr > powers_of_rho(const Fr rho, const size_t num_powers)
Compute powers of challenge ρ
Definition gemini.hpp:75
Entry point for Barretenberg command-line interface.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
std::string to_string(bb::avm2::ValueTag tag)
Curve::ScalarField Fr
RefVector< Commitment > commitments
RefVector< Fr > evaluations
std::vector< RefVector< Commitment > > commitments_groups
Logic to support batching opening claims for unshifted and shifted polynomials in Shplemini.
uint32_t get_groups_to_be_interleaved_size()
InterleavedBatch get_interleaved()
std::optional< InterleavedBatch > interleaved
constexpr field invert() const noexcept
void throw_or_abort(std::string const &err)