36 kernel_io.reconstruct_from_public(oink_result.public_inputs);
39 if (!kernel_io.pairing_inputs.check()) {
40 info(
"ChonkVerifier: verification failed at PI pairing points check");
41 return { {}, {},
false };
45 const Commitment kernel_calldata_commitment = oink_result.kernel_calldata_commitment;
46 const Commitment return_data_commitment = kernel_io.kernel_return_data;
47 bool databus_consistency_verified = (kernel_calldata_commitment == return_data_commitment);
48 vinfo(
"ChonkVerifier: databus consistency verified: ", databus_consistency_verified);
49 if (!databus_consistency_verified) {
50 info(
"ChonkVerifier: verification failed at databus consistency check");
51 return { {}, {},
false };
55 MergeCommitments merge_commitments{ .t_commitments = oink_result.ecc_op_wires,
56 .T_prev_commitments = kernel_io.ecc_op_tables };
59 vinfo(
"ChonkVerifier: Merge reduced to pairing check: ", merge_result.reduction_succeeded ?
"true" :
"false");
61 if (!merge_result.reduction_succeeded) {
62 info(
"ChonkVerifier: verification failed at Merge reduction");
63 return { {}, {},
false };
65 if (!merge_result.pairing_points.check()) {
66 info(
"ChonkVerifier: verification failed at Merge pairing check");
67 return { {}, {},
false };
73 vinfo(
"ChonkVerifier: ECCVM reduced to IPA opening: ", eccvm_result.reduction_succeeded ?
"true" :
"false");
75 if (!eccvm_result.reduction_succeeded) {
76 info(
"ChonkVerifier: verification failed at ECCVM step");
77 return { {}, {},
false };
79 auto translator_input = eccvm_verifier.get_translator_input_data();
82 auto batched_result = batched_verifier.
verify(proof.joint_proof,
83 translator_input.evaluation_challenge_x,
84 translator_input.batching_challenge_v,
85 translator_input.accumulated_result,
86 merge_result.merged_commitments);
87 vinfo(
"ChonkVerifier: Batched translator+joint reduction: ", batched_result.reduction_succeeded ?
"true" :
"false");
89 if (!batched_result.reduction_succeeded) {
90 info(
"ChonkVerifier: verification failed at batched translator+joint reduction");
91 return { {}, {},
false };
93 if (!batched_result.pairing_points.check()) {
94 info(
"ChonkVerifier: verification failed at batched translator+joint pairing check");
95 return { {}, {},
false };
98 return {
std::move(eccvm_result.ipa_claim), proof.ipa_proof,
true };
146 kernel_io.reconstruct_from_public(oink_result.public_inputs);
150 if (kernel_io.kernel_return_data.get_value() != kernel_calldata_commitment.get_value()) {
151 info(
"ChonkRecursiveVerifier: Databus Consistency check failure");
153 kernel_io.kernel_return_data.incomplete_assert_equal(kernel_calldata_commitment);
156 MergeCommitments merge_commitments{ .t_commitments = oink_result.ecc_op_wires,
157 .T_prev_commitments = kernel_io.ecc_op_tables };
160 vinfo(
"ChonkRecursiveVerifier: Merge reduced to pairing check: ",
161 merge_result.reduction_succeeded ?
"true" :
"false");
166 vinfo(
"ChonkRecursiveVerifier: ECCVM reduced to IPA opening: ",
167 eccvm_result.reduction_succeeded ?
"true" :
"false");
168 auto translator_input = eccvm_verifier.get_translator_input_data();
171 auto batched_result = batched_verifier.
verify(proof.joint_proof,
172 translator_input.evaluation_challenge_x,
173 translator_input.batching_challenge_v,
174 translator_input.accumulated_result,
175 merge_result.merged_commitments);
176 vinfo(
"ChonkRecursiveVerifier: Batched translator+joint reduction: ",
177 batched_result.reduction_succeeded ?
"true" :
"false");
181 pairing_points_to_aggregate.reserve(NUM_PAIRING_POINTS);
183 pairing_points_to_aggregate.push_back(kernel_io.pairing_inputs);
184 pairing_points_to_aggregate.push_back(
std::move(merge_result.pairing_points));
185 pairing_points_to_aggregate.push_back(
std::move(batched_result.pairing_points));
191 constexpr bool handle_edge_cases =
false;
193 PairingPoints::aggregate_multiple(pairing_points_to_aggregate, handle_edge_cases);
195 bool all_checks_passed =
196 merge_result.reduction_succeeded && eccvm_result.reduction_succeeded && batched_result.reduction_succeeded;
199 .ipa_claim =
std::move(eccvm_result.ipa_claim),
200 .ipa_proof = proof.ipa_proof,
201 .all_checks_passed = all_checks_passed };
ReductionResult verify(const Proof &joint_proof, const TransBF &evaluation_input_x, const TransBF &batching_challenge_v, const TransBF &accumulated_result, const std::array< Commitment, TranslatorFlavor::NUM_OP_QUEUE_WIRES > &op_queue_wire_commitments)
Phase 2: Verify translator Oink + joint sumcheck + joint PCS.