mirror of https://github.com/zcash/halo2.git
Merge pull request #501 from zcash/hardcoded-proof
Add hardcoded proof to plonk_api test
This commit is contained in:
commit
552c5beb23
|
@ -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(¶ms);
|
||||
let mut transcript = Blake2bRead::<_, _, Challenge255<_>>::init(&proof[..]);
|
||||
assert!(verify_proof(
|
||||
¶ms,
|
||||
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.
Loading…
Reference in New Issue