59 using ClaimBatch = ClaimBatcher::Batch;
69 FF vk_hash =
key->get_hash();
70 transcript->add_to_hash_buffer(
"avm_vk_hash", vk_hash);
71 vinfo(
"AVM vk hash in verifier: ", vk_hash);
77 vinfo(
"Public inputs size mismatch");
86 vinfo(
"Public input size mismatch");
89 for (
size_t j = 0; j < public_inputs[i].size(); j++) {
98 VerifierCommitments commitments{
key };
99 for (
auto [comm, label] :
zip_view(commitments.get_wires(), commitments.get_wires_labels())) {
100 comm =
transcript->template receive_from_prover<Commitment>(label);
107 relation_parameters.
beta = beta;
108 relation_parameters.
gamma = gamma;
111 for (
auto [commitment, label] :
zip_view(commitments.get_derived(), commitments.get_derived_labels())) {
112 commitment =
transcript->template receive_from_prover<Commitment>(label);
122 const FF alpha =
transcript->template get_challenge<FF>(
"Sumcheck:alpha");
127 std::vector<FF> gate_challenges =
133 vinfo(
"Sumcheck verification failed");
147 const auto& [public_input_column, claimed_evaluation] :
zip_view(public_inputs, claimed_evaluations)) {
149 if (public_input_evaluation != claimed_evaluation) {
150 vinfo(
"public_input_evaluation failed, public inputs col ", idx);
165 Challenges challenges;
166 auto unshifted_challenges_vec =
transcript->template get_challenges<FF>(challenges.get_unshifted_labels());
167 std::ranges::move(unshifted_challenges_vec, challenges.get_unshifted().begin());
168 auto unshifted_challenges = challenges.get_unshifted();
169 auto shifted_challenges = challenges.get_to_be_shifted();
172 Commitment batched_shifted = Commitment::batch_mul(shifted_comms, shifted_challenges);
183 FF batched_unshifted_eval =
184 std::inner_product(unshifted_challenges.begin(), unshifted_challenges.end(), unshifted_evals.begin(),
FF(0));
186 FF batched_shifted_eval =
187 std::inner_product(shifted_challenges.begin(), shifted_challenges.end(), shifted_evals.begin(),
FF(0));
190 ClaimBatcher batched_claim_batcher{ .unshifted = ClaimBatch{ .commitments =
RefVector(batched_unshifted),
191 .evaluations =
RefVector(batched_unshifted_eval) },
192 .shifted = ClaimBatch{ .commitments =
RefVector(batched_shifted),
193 .evaluations =
RefVector(batched_shifted_eval) } };
195 Shplemini::compute_batch_opening_claim(
196 padding_indicator_array, batched_claim_batcher, output.
challenge, Commitment::one(),
transcript)
197 .batch_opening_claim;
199 const auto pairing_points = PCS::reduce_verify_batch_opening_claim(
std::move(opening_claim),
transcript);
200 const auto shplemini_verified = pairing_points.check();
202 if (!shplemini_verified) {
203 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...