Skip to content

Commit

Permalink
Verify proofs for both multithreaded and singlethreaded generation
Browse files Browse the repository at this point in the history
  • Loading branch information
OBrezhniev committed Oct 16, 2024
1 parent 448e2d7 commit 6d2cfce
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/fullprocess.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);

Expand Down

0 comments on commit 6d2cfce

Please sign in to comment.