25 const BF& batching_challenge_v,
29 const auto compute_four_limbs = [](
const auto& in) {
31 return std::array<FF, 4>{ in.slice(0, NUM_LIMB_BITS),
32 in.slice(NUM_LIMB_BITS, NUM_LIMB_BITS * 2),
33 in.slice(NUM_LIMB_BITS * 2, NUM_LIMB_BITS * 3),
34 in.slice(NUM_LIMB_BITS * 3, NUM_LIMB_BITS * 4) };
37 const auto compute_five_limbs = [](
const auto& in) {
40 in.slice(NUM_LIMB_BITS, NUM_LIMB_BITS * 2),
41 in.slice(NUM_LIMB_BITS * 2, NUM_LIMB_BITS * 3),
42 in.slice(NUM_LIMB_BITS * 3, NUM_LIMB_BITS * 4),
49 for (
size_t i = 0; i < 4; i++) {
63 const BF& batching_challenge_v,
71 using ClaimBatch = ClaimBatcher::Batch;
72 using InterleavedBatch = ClaimBatcher::InterleavedBatch;
81 transcript->add_to_hash_buffer(
"vk_hash", vk_hash);
82 vinfo(
"Translator vk hash in verifier: ", vk_hash);
91 commitments.gemini_masking_poly =
transcript->template receive_from_prover<Commitment>(
"Gemini:masking_poly_comm");
94 commitments.op = op_queue_wire_commitments[0];
95 commitments.x_lo_y_hi = op_queue_wire_commitments[1];
96 commitments.x_hi_z_1 = op_queue_wire_commitments[2];
97 commitments.y_lo_z_2 = op_queue_wire_commitments[3];
100 for (
auto [comm, label] :
zip_view(commitments.get_non_opqueue_wires_and_ordered_range_constraints(),
102 comm =
transcript->template receive_from_prover<Commitment>(label);
106 FF beta =
transcript->template get_challenge<FF>(
"beta");
107 FF gamma =
transcript->template get_challenge<FF>(
"gamma");
113 commitments.z_perm =
transcript->template receive_from_prover<Commitment>(commitment_labels.z_perm);
117 const FF alpha =
transcript->template get_challenge<FF>(
"Sumcheck:alpha");
123 for (
size_t idx = 0; idx < gate_challenges.size(); idx++) {
129 libra_commitments[0] =
transcript->template receive_from_prover<Commitment>(
"Libra:concatenation_commitment");
132 std::ranges::fill(padding_indicator_array,
FF{ 1 });
134 auto sumcheck_output = sumcheck.verify(
relation_parameters, gate_challenges, padding_indicator_array);
137 if (!sumcheck_output.verified) {
141 libra_commitments[1] =
transcript->template receive_from_prover<Commitment>(
"Libra:grand_sum_commitment");
142 libra_commitments[2] =
transcript->template receive_from_prover<Commitment>(
"Libra:quotient_commitment");
145 bool consistency_checked =
false;
146 ClaimBatcher claim_batcher{
147 .unshifted = ClaimBatch{ commitments.get_unshifted_without_interleaved(),
148 sumcheck_output.claimed_evaluations.get_unshifted_without_interleaved() },
149 .shifted = ClaimBatch{ commitments.get_to_be_shifted(), sumcheck_output.claimed_evaluations.get_shifted() },
150 .interleaved = InterleavedBatch{ .commitments_groups = commitments.get_groups_to_be_interleaved(),
151 .evaluations = sumcheck_output.claimed_evaluations.get_interleaved() }
153 auto opening_claim = Shplemini::compute_batch_opening_claim(padding_indicator_array,
155 sumcheck_output.challenge,
160 &consistency_checked,
162 sumcheck_output.claimed_libra_evaluation);
163 const auto pairing_points = PCS::reduce_verify_batch_opening_claim(
std::move(opening_claim),
transcript);
166 auto verified = pcs_vkey.pairing_check(pairing_points[0], pairing_points[1]);
167 return verified && consistency_checked;
bool verify_proof(const HonkProof &proof, const uint256_t &evaluation_input_x, const BF &batching_challenge_v, const uint256_t &accumulated_result, const std::array< Commitment, TranslatorFlavor::NUM_OP_QUEUE_WIRES > &op_queue_wire_commitments)
This function verifies a TranslatorFlavor Honk proof for given program settings.