-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore:
verify_sp1_proof
naming (#1288)
- Loading branch information
1 parent
a9c454d
commit cdee36b
Showing
2 changed files
with
6 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
use crate::syscall_verify_sp1_proof; | ||
|
||
/// Verifies the next proof in the proof input stream given a pkey digest and public values digest. | ||
/// Verifies the next proof in the proof input stream given a verification key digest and public | ||
/// values digest. If the proof is invalid, the function will panic. | ||
/// | ||
/// Note: sp1_zkvm must also have feature `verify` enabled for this function to work. | ||
pub fn verify_sp1_proof(pkey_digest: &[u32; 8], pv_digest: &[u8; 32]) { | ||
/// Enable this function by adding the `verify` feature to both the `sp1-lib` AND `sp1-zkvm` crates. | ||
pub fn verify_sp1_proof(vk_digest: &[u32; 8], pv_digest: &[u8; 32]) { | ||
unsafe { | ||
syscall_verify_sp1_proof(pkey_digest, pv_digest); | ||
syscall_verify_sp1_proof(vk_digest, pv_digest); | ||
} | ||
} |