From 6d2cfced45b4eb9a5f9a00c892c7d194185d0e63 Mon Sep 17 00:00:00 2001 From: Oleksandr Brezhniev Date: Wed, 16 Oct 2024 15:54:45 +0100 Subject: [PATCH] Verify proofs for both multithreaded and singlethreaded generation --- test/fullprocess.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/fullprocess.js b/test/fullprocess.js index 4278e817..21b312be 100644 --- a/test/fullprocess.js +++ b/test/fullprocess.js @@ -124,6 +124,14 @@ describe("Full process", function () { publicSignalsWithAlias[1] = BigInt(res.publicSignals[1]) + 21888242871839275222246405745257275088548364400416034343698204186575808495617n; }); + it ("groth16 verify", async () => { + const res = await snarkjs.groth16.verify(vKey, publicSignals, proof); + assert(res == true); + + const res2 = await snarkjs.groth16.verify(vKey, publicSignalsWithAlias, proof); + assert(res2 == false); + }); + it ("groth16 proof singleThreaded", async () => { const res = await snarkjs.groth16.prove(zkey_final, wtns, undefined, {singleThread: true}); proof = res.proof; @@ -132,7 +140,7 @@ describe("Full process", function () { publicSignalsWithAlias[1] = BigInt(res.publicSignals[1]) + 21888242871839275222246405745257275088548364400416034343698204186575808495617n; }); - it ("groth16 verify", async () => { + it ("groth16 verify (proof singleThreaded)", async () => { const res = await snarkjs.groth16.verify(vKey, publicSignals, proof); assert(res == true);