Merge pull request #667 from Orbis-Tertius/fix-plonk-test

Don't use `include_bytes!` for `plonk_api` test
This commit is contained in:
Daira Hopwood 2022-10-07 15:14:38 +01:00 committed by GitHub
commit 21a79182ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -459,13 +459,14 @@ fn plonk_api() {
.expect("proof generation should not fail");
let proof: Vec<u8> = transcript.finalize();
std::fs::write("plonk_api_proof.bin", &proof[..])
std::fs::write("./tests/plonk_api_proof.bin", &proof[..])
.expect("should succeed to write new proof");
}
{
// Check that a hardcoded proof is satisfied
let proof = include_bytes!("plonk_api_proof.bin");
let proof =
std::fs::read("./tests/plonk_api_proof.bin").expect("should succeed to read proof");
let strategy = SingleVerifier::new(&params);
let mut transcript = Blake2bRead::<_, _, Challenge255<_>>::init(&proof[..]);
assert!(verify_proof(