|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Logic to support batching opening claims for unshifted and shifted polynomials in Shplemini. More...
#include <claim_batcher.hpp>
Classes | |
| struct | Batch |
Public Types | |
| using | Fr = typename Curve::ScalarField |
| using | Commitment = typename Curve::AffineElement |
Public Member Functions | |
| Batch | get_unshifted () |
| Batch | get_shifted () |
| Fr | get_unshifted_batch_scalar () const |
| void | compute_scalars_for_each_batch (std::span< const Fr > inverted_vanishing_evals, const Fr &nu_challenge, const Fr &r_challenge) |
| Compute scalars used to batch each set of claims, excluding contribution from batching challenge \rho. | |
| void | update_batch_mul_inputs_and_batched_evaluation (std::vector< Commitment > &commitments, std::vector< Fr > &scalars, Fr &batched_evaluation, const Fr &rho) |
| Append the commitments and scalars from each batch of claims to the Shplemini vectors which subsequently will be inputs to the batch mul; update the batched evaluation and the running batching challenge (power of rho) in place. | |
Public Attributes | |
| std::optional< Batch > | unshifted |
| std::optional< Batch > | shifted |
Logic to support batching opening claims for unshifted and shifted polynomials in Shplemini.
Stores references to the commitments/evaluations of unshifted and shifted polynomials to be batch opened via Shplemini. Aggregates the commitments and batching scalars for each batch into the corresponding containers for Shplemini. Computes the batched evaluation. Contains logic for computing the per-batch scalars used to batch each set of claims (see details below).
Definition at line 109 of file claim_batcher.hpp.
| using bb::ClaimBatcher_< Curve >::Commitment = typename Curve::AffineElement |
Definition at line 111 of file claim_batcher.hpp.
| using bb::ClaimBatcher_< Curve >::Fr = typename Curve::ScalarField |
Definition at line 110 of file claim_batcher.hpp.
|
inline |
Compute scalars used to batch each set of claims, excluding contribution from batching challenge \rho.
Computes scalars s_0, s_1 given by
\[ - s_0 = \left(\frac{1}{z-r} + \nu \times \frac{1}{z+r}\right) \]
,
\[ \left( - s_0, \ldots, - \rho^{i+k-1} \times s_0, - \rho^{i+k} \times s_1, \ldots, - \rho^{k+m-1} \times s_1 \right) \]
| inverse_vanishing_evals | 1/(z-r), 1/(z+r), 1/(z-r²), 1/(z+r²), ..., 1/(z-r^{2^{d-1}}), 1/(z+r^{2^{d-1}}) |
| nu_challenge | ν (shplonk batching challenge) |
| r_challenge | r (gemini evaluation challenge) |
Definition at line 151 of file claim_batcher.hpp.
|
inline |
Definition at line 124 of file claim_batcher.hpp.
|
inline |
Definition at line 123 of file claim_batcher.hpp.
|
inline |
Definition at line 126 of file claim_batcher.hpp.
|
inline |
Append the commitments and scalars from each batch of claims to the Shplemini vectors which subsequently will be inputs to the batch mul; update the batched evaluation and the running batching challenge (power of rho) in place.
| commitments | commitment inputs to the single Shplemini batch mul |
| scalars | scalar inputs to the single Shplemini batch mul |
| batched_evaluation | running batched evaluation of the committed multilinear polynomials |
| rho | multivariate batching challenge \rho |
Definition at line 187 of file claim_batcher.hpp.
| std::optional<Batch> bb::ClaimBatcher_< Curve >::shifted |
Definition at line 121 of file claim_batcher.hpp.
| std::optional<Batch> bb::ClaimBatcher_< Curve >::unshifted |
Definition at line 120 of file claim_batcher.hpp.