22template <IsUltraOrMegaHonk Flavor>
24 const std::shared_ptr<Transcript>& transcript)
25 : proving_key(
std::move(proving_key))
26 , transcript(transcript)
39 size_t polynomial_size = proving_key->dyadic_size();
40 Sumcheck sumcheck(polynomial_size,
41 proving_key->polynomials,
44 proving_key->gate_challenges,
45 proving_key->relation_parameters,
55 sumcheck_output = sumcheck.prove(zk_sumcheck_data);
57 sumcheck_output = sumcheck.prove();
73 auto&
ck = proving_key->commitment_key;
74 if (!
ck.initialized()) {
78 PolynomialBatcher polynomial_batcher(proving_key->dyadic_size());
79 polynomial_batcher.set_unshifted(proving_key->polynomials.get_unshifted());
80 polynomial_batcher.set_to_be_shifted_by_one(proving_key->polynomials.get_to_be_shifted());
85 proving_key->dyadic_size(), polynomial_batcher, sumcheck_output.challenge,
ck, transcript);
89 zk_sumcheck_data, sumcheck_output.challenge, sumcheck_output.claimed_libra_evaluation, transcript,
ck);
90 small_subgroup_ipa_prover.
prove();
94 sumcheck_output.challenge,
99 vinfo(
"executed multivariate-to-univariate reduction");
100 PCS::compute_opening_proof(
ck, prover_opening_claim, transcript);
101 vinfo(
"computed opening proof");
106 return transcript->export_proof();
114 execute_relation_check_rounds();
118 execute_pcs_rounds();
119 vinfo(
"finished decider proving.");
126#ifdef STARKNET_GARAGA_FLAVORS
typename Flavor::Transcript::Proof Proof
DeciderProver_(const std::shared_ptr< DeciderPK > &, const std::shared_ptr< Transcript > &transcript=std::make_shared< Transcript >())
typename Flavor::CommitmentKey CommitmentKey
BB_PROFILE void execute_pcs_rounds()
Produce a univariate opening claim for the sumcheck multivariate evalutions and a batched univariate ...
BB_PROFILE void execute_relation_check_rounds()
Run Sumcheck to establish that ∑_i pow(\vec{β*})f_i(ω) = e*. This results in u = (u_1,...
Class responsible for computation of the batched multilinear polynomials required by the Gemini proto...
static constexpr bool HasZK
static constexpr size_t VIRTUAL_LOG_N
static constexpr bool USE_PADDING
Unverified claim (C,r,v) for some witness polynomial p(X) such that.
Polynomial p and an opening pair (r,v) such that p(r) = v.
static OpeningClaim prove(const FF circuit_size, PolynomialBatcher &polynomial_batcher, std::span< FF > multilinear_challenge, const CommitmentKey< Curve > &commitment_key, const std::shared_ptr< Transcript > &transcript, const std::array< Polynomial, NUM_SMALL_IPA_EVALUATIONS > &libra_polynomials={}, const std::vector< Polynomial > &sumcheck_round_univariates={}, const std::vector< std::array< FF, 3 > > &sumcheck_round_evaluations={})
A Curve-agnostic ZK protocol to prove inner products of small vectors.
std::array< bb::Polynomial< FF >, NUM_SMALL_IPA_EVALUATIONS > get_witness_polynomials() const
void prove()
Compute the derived witnesses and and commit to them.
The implementation of the sumcheck Prover for statements of the form for multilinear polynomials .
static constexpr size_t SUBGROUP_SIZE
constexpr T get_msb(const T in)
Entry point for Barretenberg command-line interface.
CommitmentKey< Curve > ck
#define PROFILE_THIS_NAME(name)
This structure is created to contain various polynomials and constants required by ZK Sumcheck.