|
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 |
| struct | InterleavedBatch |
Public Types | |
| using | Fr = typename Curve::ScalarField |
| using | Commitment = typename Curve::AffineElement |
Public Member Functions | |
| Batch | get_unshifted () |
| Batch | get_shifted () |
| InterleavedBatch | get_interleaved () |
| uint32_t | get_groups_to_be_interleaved_size () |
| 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, Fr shplonk_batching_pos={ 0 }, Fr shplonk_batching_neg={ 0 }) |
| 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 |
| std::optional< InterleavedBatch > | interleaved |
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 batched 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 28 of file claim_batcher.hpp.
| using bb::ClaimBatcher_< Curve >::Commitment = typename Curve::AffineElement |
Definition at line 30 of file claim_batcher.hpp.
| using bb::ClaimBatcher_< Curve >::Fr = typename Curve::ScalarField |
Definition at line 29 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_eval_pos | 1/(z-r) |
| inverse_vanishing_eval_neg | 1/(z+r) |
| nu_challenge | ν (shplonk batching challenge) |
| r_challenge | r (gemini evaluation challenge) |
Definition at line 85 of file claim_batcher.hpp.
|
inline |
Definition at line 54 of file claim_batcher.hpp.
|
inline |
Definition at line 53 of file claim_batcher.hpp.
|
inline |
Definition at line 52 of file claim_batcher.hpp.
|
inline |
Definition at line 51 of file claim_batcher.hpp.
|
inline |
Definition at line 59 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 |
| rho_power | current power of \rho used in the batching scalar |
| shplonk_batching_pos | and |
| shplonk_batching_neg | consecutive powers of the Shplonk batching challenge ν for the interleaved contributions |
Definition at line 136 of file claim_batcher.hpp.
| std::optional<InterleavedBatch> bb::ClaimBatcher_< Curve >::interleaved |
Definition at line 48 of file claim_batcher.hpp.
| std::optional<Batch> bb::ClaimBatcher_< Curve >::shifted |
Definition at line 47 of file claim_batcher.hpp.
| std::optional<Batch> bb::ClaimBatcher_< Curve >::unshifted |
Definition at line 46 of file claim_batcher.hpp.