Merge pull request #501 from zcash/hardcoded-proof

Add hardcoded proof to plonk_api test
This commit is contained in:
str4d 2022-02-14 16:07:52 +00:00 committed by GitHub
commit 552c5beb23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -431,6 +431,21 @@ fn plonk_api() {
};
assert_eq!(prover.verify(), Ok(()));
{
// Check that a hardcoded proof is satisfied
let proof = include_bytes!("plonk_api_proof.bin");
let strategy = SingleVerifier::new(&params);
let mut transcript = Blake2bRead::<_, _, Challenge255<_>>::init(&proof[..]);
assert!(verify_proof(
&params,
pk.get_vk(),
strategy,
&[&[&pubinputs[..]], &[&pubinputs[..]]],
&mut transcript,
)
.is_ok());
}
for _ in 0..10 {
let mut transcript = Blake2bWrite::<_, _, Challenge255<_>>::init(vec![]);
// Create a proof

Binary file not shown.