23 : transcript(transcript)
47 transcript->add_to_hash_buffer(
"vk_hash", vk_hash);
48 vinfo(
"ECCVM vk hash in prover: ", vk_hash);
59 const size_t circuit_size =
key->circuit_size;
64 auto masking_commitment =
key->commitment_key.commit(
key->polynomials.gemini_masking_poly);
65 transcript->send_to_verifier(
"Gemini:masking_poly_comm", masking_commitment);
67 auto batch =
key->commitment_key.start_batch();
69 batch.add_to_batch(wire, label,
true);
80 BB_BENCH_NAME(
"ECCVMProver::execute_log_derivative_commitments_round");
86 auto beta_sqr = beta * beta;
92 gamma * (gamma + beta_sqr) * (gamma + beta_sqr + beta_sqr) * (gamma + beta_sqr + beta_sqr + beta_sqr);
108 BB_BENCH_NAME(
"ECCVMProver::execute_grand_product_computation_round");
125 FF alpha =
transcript->template get_challenge<FF>(
"Sumcheck:alpha");
127 std::vector<FF> gate_challenges(CONST_ECCVM_LOG_N);
128 for (
size_t idx = 0; idx < gate_challenges.size(); idx++) {
132 Sumcheck sumcheck(
key->circuit_size,
164 key->commitment_key);
165 small_subgroup_ipa_prover.
prove();
169 PolynomialBatcher polynomial_batcher(
key->circuit_size);
170 polynomial_batcher.set_unshifted(
key->polynomials.get_unshifted());
171 polynomial_batcher.set_to_be_shifted_by_one(
key->polynomials.get_to_be_shifted());
174 Shplemini::prove(
key->circuit_size,
265 RefArray translation_polynomials{
key->polynomials.transcript_op,
266 key->polynomials.transcript_Px,
267 key->polynomials.transcript_Py,
268 key->polynomials.transcript_z1,
269 key->polynomials.transcript_z2 };
279 for (
auto [eval, poly, label] :
288 SmallIPA translation_masking_term_prover(
290 translation_masking_term_prover.prove();
293 FF small_ipa_evaluation_challenge =
294 transcript->template get_challenge<FF>(
"Translation:small_ipa_evaluation_challenge");
298 evaluation_points = translation_masking_term_prover.evaluation_points(small_ipa_evaluation_challenge);
299 evaluation_labels = translation_masking_term_prover.evaluation_labels();
302 for (
size_t idx = 0; idx < NUM_SMALL_IPA_EVALUATIONS; idx++) {
303 auto witness_poly = translation_masking_term_prover.get_witness_polynomials()[idx];
304 const FF evaluation = witness_poly.evaluate(evaluation_points[idx]);
305 transcript->send_to_verifier(evaluation_labels[idx], evaluation);
306 opening_claims[idx] = { .polynomial = witness_poly, .opening_pair = { evaluation_points[idx], evaluation } };
311 Polynomial batched_translation_univariate{
key->circuit_size };
312 FF batched_translation_evaluation{ 0 };
313 FF batching_scalar =
FF(1);
315 batched_translation_univariate.add_scaled(polynomial, batching_scalar);
316 batched_translation_evaluation += eval * batching_scalar;
321 opening_claims[NUM_SMALL_IPA_EVALUATIONS] = { batched_translation_univariate,
336 transcript->send_to_verifier(label,
key->commitment_key.commit(polynomial));
#define BB_BENCH_NAME(name)
A container for the prover polynomials.
The verification key is responsible for storing the commitments to the precomputed (non-witnessk) pol...
typename Curve::ScalarField FF
typename Curve::BaseField BF
ECCVMLookupRelation< FF > LookupRelation
OpeningClaim batch_opening_claim
void commit_to_witness_polynomial(Polynomial &polynomial, const std::string &label)
Utility to mask and commit to a witness polynomial and send the commitment to verifier.
SumcheckOutput< Flavor > sumcheck_output
BB_PROFILE void execute_log_derivative_commitments_round()
Compute sorted witness-table accumulator.
size_t unmasked_witness_size
ECCVMProver(CircuitBuilder &builder, const std::shared_ptr< Transcript > &transcript)
FF evaluation_challenge_x
ZKSumcheckData< Flavor > ZKData
std::shared_ptr< Transcript > transcript
std::pair< Proof, OpeningClaim > construct_proof()
CommitmentLabels commitment_labels
TranslationEvaluations translation_evaluations
std::shared_ptr< ProvingKey > key
BB_PROFILE void execute_preamble_round()
Fiat-Shamir the VK.
BB_PROFILE void execute_wire_commitments_round()
Compute commitments to the first three wires.
Flavor::CommitmentKey CommitmentKey
std::array< OpeningClaim, NUM_OPENING_CLAIMS > opening_claims
BB_PROFILE void execute_grand_product_computation_round()
Compute permutation and lookup grand product polynomials and commitments.
BB_PROFILE void execute_relation_check_rounds()
Run Sumcheck resulting in u = (u_1,...,u_d) challenges and all evaluations at u being calculated.
BB_PROFILE void execute_pcs_rounds()
Produce a univariate opening claim for the sumcheck multivariate evalutions and a batched univariate ...
void compute_translation_opening_claims()
To link the ECCVM Transcript wires op, Px, Py, z1, and z2 to the accumulator computed by the translat...
bb::RelationParameters< FF > relation_parameters
Class responsible for computation of the batched multilinear polynomials required by the Gemini proto...
static Polynomial random(size_t size, size_t start_index=0)
void mask()
Add random values to the coefficients of a polynomial. In practice, this is used for ensuring the com...
A template class for a reference array. Behaves as if std::array<T&, N> was possible.
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 .
A class designed to accept the ECCVM Transcript Polynomials, concatenate their masking terms in Lagra...
UltraKeccakFlavor::VerificationKey VerificationKey
Entry point for Barretenberg command-line interface.
void compute_logderivative_inverse(Polynomials &polynomials, auto &relation_parameters, const size_t circuit_size)
Compute the inverse polynomial I(X) required for logderivative lookupsdetails Inverse may be defined ...
VerifierCommitmentKey< Curve > vk
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
std::string to_string(bb::avm2::ValueTag tag)
T eccvm_set_permutation_delta
RefArray< BF, NUM_TRANSLATION_EVALUATIONS > get_all()
std::array< std::string, NUM_TRANSLATION_EVALUATIONS > labels
constexpr field invert() const noexcept