Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion crates/prover/src/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ bn254 proof"
InvalidPublicValues,
}

#[derive(Error, Debug)]
enum PublicValuesVerificationError {
#[error(
"the public values in the sp1 proof do not match the public values in the inner proof"
)]
InvalidPublicValues,
}

/// The verifying key for the program wrapping an SP1 proof into a SNARK friendly format.
pub const WRAP_VK_BYTES: &[u8] = include_bytes!("../wrap_vk.bin");

Expand Down Expand Up @@ -828,7 +836,7 @@ pub fn verify_public_values(
if sha256_public_values_hash != expected_public_values_hash {
let blake3_public_values_hash = public_values.hash_bn254_with_fn(blake3_hash);
if blake3_public_values_hash != expected_public_values_hash {
return Err(Groth16VerificationError::InvalidPublicValues.into());
return Err(PublicValuesVerificationError::InvalidPublicValues.into());
}
}

Expand Down
Loading