59 using ClaimBatch = ClaimBatcher::Batch;
70 FF vk_hash =
key->get_hash();
71 transcript->add_to_hash_buffer(
"avm_vk_hash", vk_hash);
72 vinfo(
"AVM vk hash in verifier: ", vk_hash);
78 vinfo(
"Public inputs size mismatch");
87 vinfo(
"Public input size mismatch");
90 for (
size_t j = 0; j < public_inputs[i].size(); j++) {
99 VerifierCommitments commitments{
key };
100 for (
auto [comm, label] :
zip_view(commitments.get_wires(), commitments.get_wires_labels())) {
101 comm =
transcript->template receive_from_prover<Commitment>(label);
108 relation_parameters.
beta = beta;
109 relation_parameters.
gamma = gamma;
112 for (
auto [commitment, label] :
zip_view(commitments.get_derived(), commitments.get_derived_labels())) {
113 commitment =
transcript->template receive_from_prover<Commitment>(label);
123 const FF alpha =
transcript->template get_challenge<FF>(
"Sumcheck:alpha");
128 std::vector<FF> gate_challenges =
134 vinfo(
"Sumcheck verification failed");
148 const auto& [public_input_column, claimed_evaluation] :
zip_view(public_inputs, claimed_evaluations)) {
150 if (public_input_evaluation != claimed_evaluation) {
151 vinfo(
"public_input_evaluation failed, public inputs col ", idx);
166 Challenges challenges;
167 auto unshifted_challenges_vec =
transcript->template get_challenges<FF>(challenges.get_unshifted_labels());
168 std::ranges::move(unshifted_challenges_vec, challenges.get_unshifted().begin());
169 auto unshifted_challenges = challenges.get_unshifted();
170 auto shifted_challenges = challenges.get_to_be_shifted();
173 Commitment batched_shifted = Commitment::batch_mul(shifted_comms, shifted_challenges);
184 FF batched_unshifted_eval =
185 std::inner_product(unshifted_challenges.begin(), unshifted_challenges.end(), unshifted_evals.begin(),
FF(0));
187 FF batched_shifted_eval =
188 std::inner_product(shifted_challenges.begin(), shifted_challenges.end(), shifted_evals.begin(),
FF(0));
191 ClaimBatcher batched_claim_batcher{ .unshifted = ClaimBatch{ .commitments =
RefVector(batched_unshifted),
192 .evaluations =
RefVector(batched_unshifted_eval) },
193 .shifted = ClaimBatch{ .commitments =
RefVector(batched_shifted),
194 .evaluations =
RefVector(batched_shifted_eval) } };
196 Shplemini::compute_batch_opening_claim(
197 padding_indicator_array, batched_claim_batcher, output.
challenge, Commitment::one(),
transcript)
198 .batch_opening_claim;
200 const auto pairing_points = PCS::reduce_verify_batch_opening_claim(
std::move(opening_claim),
transcript);
202 const auto shplemini_verified = pcs_vkey.pairing_check(pairing_points[0], pairing_points[1]);
204 if (!shplemini_verified) {
205 vinfo(
"Shplemini verification failed");
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,...
SumcheckOutput< Flavor > verify(const bb::RelationParameters< FF > &relation_parameters, const std::vector< FF > &gate_challenges, const std::vector< FF > &padding_indicator_array)
The Sumcheck verification method. First it extracts round univariate, checks sum (the sumcheck univar...