Skip to content

Commit

Permalink
Add OODS verification error.
Browse files Browse the repository at this point in the history
  • Loading branch information
alonh5 committed Mar 17, 2024
1 parent 5baeaef commit 679bc1a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/core/prover/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,11 @@ pub fn verify(
&proof.trace_oods_values,
random_coeff,
);
assert_eq!(
composition_polynomial_oods_value,
combine_secure_value(proof.composition_polynomial_column_oods_values)
);
if composition_polynomial_oods_value
!= combine_secure_value(proof.composition_polynomial_column_oods_values)
{
return Err(VerificationError::OodsVerificationError);
}
channel.mix_felts(&proof.trace_oods_values.flatten());
channel.mix_felts(&proof.composition_polynomial_column_oods_values);

Expand Down Expand Up @@ -301,6 +302,8 @@ pub enum ProvingError {

#[derive(Clone, Copy, Debug, Error)]
pub enum VerificationError {
#[error("The composition polynomial OODS value does not match the trace OODS values.")]
OodsVerificationError,
#[error(transparent)]
FriVerificationError(#[from] FriVerificationError),
}
Expand Down

0 comments on commit 679bc1a

Please sign in to comment.