Skip to content

Commit

Permalink
refactor: sample verifier
Browse files Browse the repository at this point in the history
  • Loading branch information
zkfriendly committed Jul 15, 2024
1 parent 3d7d2a9 commit aa04c2d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/rust-verifier/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pub mod verifier;
pub mod sample_verifier;
pub mod verifier_utils;
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use ark_serialize::Compress;
use ark_serialize::SerializationError;
use ark_serialize::Validate;

/// This is a sample verifier generated based on proof of twitter circuit.
pub fn verify(proof: &[u8], public_inputs: &[u8]) -> Result<bool, SerializationError> {
// no need to check serialization since it's hardcoded and known to be correct
let vk = VerifyingKey::<Bn254>::deserialize_compressed_unchecked(
Expand Down
2 changes: 1 addition & 1 deletion packages/rust-verifier/tests/verifier_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mod tests {

use ark_crypto_primitives::snark::SNARK;
use ark_serialize::CanonicalSerialize;
use utils::verifier::verify;
use utils::sample_verifier::verify;
use utils::verifier_utils::{GrothBn, GrothBnProof, GrothBnVkey, JsonDecoder, PublicInputs};

#[test]
Expand Down

0 comments on commit aa04c2d

Please sign in to comment.