60 const size_t num_polynomials,
61 const size_t num_to_be_shifted,
62 const std::vector<Fr>& mle_opening_point,
72 bool has_virtual_rounds = (mle_opening_point.size() > log_size);
76 if (has_virtual_rounds) {
85 const size_t num_not_to_be_shifted = num_polynomials - num_to_be_shifted;
89 for (
size_t idx = log_size; idx < mle_opening_point.size(); idx++) {
90 ebz_factor *= (
Fr(1) - mle_opening_point[idx]);
94 for (
size_t idx = 0; idx < num_not_to_be_shifted; idx++) {
102 for (
size_t idx = 0; idx < num_to_be_shifted; idx++) {
127 for (
size_t idx = 0; idx < num_zero_polynomials; idx++) {
143 const std::vector<Fr>& custom_unshifted_evals,
151 for (
size_t i = 0; i < custom_unshifted.size(); ++i) {
152 auto& p = custom_unshifted[i];
164 template <
typename Flavor>
166 const size_t sumcheck_univariate_length,
167 std::vector<Fr>& challenge,
173 for (
size_t idx = 0; idx < log_n; idx++) {
174 bb::Polynomial<Fr> round_univariate = mock_sumcheck_polynomials.libra_univariates[idx];
176 round_univariate.
at(0) += mock_sumcheck_polynomials.libra_running_sum;
182 round_univariate.
evaluate(challenge[idx]) });
184 mock_sumcheck_polynomials.update_zk_sumcheck_data(challenge[idx], idx);
#define BB_ASSERT_GTE(left, right,...)
CommitmentKey object over a pairing group 𝔾₁.
Commitment commit(PolynomialSpan< const Fr > polynomial) const
Uses the ProverSRS to create a commitment to p(X)
Class responsible for computation of the batched multilinear polynomials required by the Gemini proto...
void set_to_be_shifted_by_one(RefVector< Polynomial > polynomials)
void set_unshifted(RefVector< Polynomial > polynomials)
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.
static Polynomial random(size_t size, size_t start_index=0)
Fr evaluate(const Fr &z) const
Fr evaluate_mle(std::span< const Fr > evaluation_points, bool shift=false) const
evaluate multi-linear extension p(X_0,…,X_{n-1}) = \sum_i a_i*L_i(X_0,…,X_{n-1}) at u = (u_0,...
Fr & at(size_t index)
Our mutable accessor, unlike operator[]. We abuse precedent a bit to differentiate at() and operator[...
A template class for a reference vector. Behaves as if std::vector<T&> was possible.
typename Group::affine_element AffineElement
constexpr T get_msb(const T in)
Entry point for Barretenberg command-line interface.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Logic to support batching opening claims for unshifted and shifted polynomials in Shplemini.
std::optional< Batch > unshifted
std::vector< Commitment > commitments
std::vector< Polynomial > polys
Constructs random polynomials, computes commitments and corresponding evaluations.
MockClaimGenerator(const size_t poly_size, const size_t num_polynomials, const size_t num_to_be_shifted, const std::vector< Fr > &mle_opening_point, const CommitmentKey &commitment_key)
Construct claim data for a set of random polynomials with the specified type.
std::vector< bb::Polynomial< Fr > > round_univariates
std::vector< Fr > const_size_mle_opening_point
std::vector< Commitment > sumcheck_commitments
ClaimBatcher claim_batcher
std::vector< std::array< Fr, 3 > > sumcheck_evaluations
typename Curve::AffineElement Commitment
MockClaimGenerator(const size_t poly_size, const std::vector< Polynomial > custom_unshifted, const std::vector< Fr > &custom_unshifted_evals, const CommitmentKey &commitment_key)
PolynomialBatcher polynomial_batcher
typename Curve::ScalarField Fr
MockClaimGenerator(const size_t n, const size_t num_zero_polynomials)
void compute_sumcheck_opening_data(const size_t log_n, const size_t sumcheck_univariate_length, std::vector< Fr > &challenge, const CommitmentKey &ck)
This structure is created to contain various polynomials and constants required by ZK Sumcheck.