From 59300059b4864f81031863865e675c23d6395bf5 Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Mon, 3 Jun 2024 14:34:21 +0100 Subject: [PATCH] verifier failing now --- codex/slots/proofs/backends/asynccircoms.nim | 7 +++++-- tests/codex/slots/testprover.nim | 4 ++-- vendor/nim-circom-compat | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/codex/slots/proofs/backends/asynccircoms.nim b/codex/slots/proofs/backends/asynccircoms.nim index db281dfa..ecb17f03 100644 --- a/codex/slots/proofs/backends/asynccircoms.nim +++ b/codex/slots/proofs/backends/asynccircoms.nim @@ -68,7 +68,10 @@ proc prove*[H]( success(proof) proc verifyTask[H](args: ptr VerifierArgs[H], results: SignalQueuePtr[?!bool]) = - let verified = args.circom.verify(args.proof, args.inputs) + let circom = args.circom + let proof = args.proof + let inputs = args.inputs + let verified = circom.verify(proof, inputs) if (let sent = results.send(verified); sent.isErr()): error "Error sending verification results", msg = sent.error().msg @@ -85,7 +88,7 @@ proc verify*[H]( GC_ref(args) proc spawnTask() = - self.tp.spawn verifyTask(args[].addr, inputs, queue) + self.tp.spawn verifyTask(args[].addr, queue) spawnTask() diff --git a/tests/codex/slots/testprover.nim b/tests/codex/slots/testprover.nim index b17af8cb..802b9973 100644 --- a/tests/codex/slots/testprover.nim +++ b/tests/codex/slots/testprover.nim @@ -88,10 +88,10 @@ suite "Test Prover": prover = Prover.new(store, circomBackend, samples) var proofs = newSeq[Future[?!(AnyProofInputs, AnyProof)]]() - for i in 1..50: + for i in 1..10: echo "PROVE: ", i let - challenge = (1234567+i).toF.toBytes.toArray32 + challenge = (1234567).toF.toBytes.toArray32 proofs.add(prover.prove(1, verifiable, challenge)) diff --git a/vendor/nim-circom-compat b/vendor/nim-circom-compat index 4467e310..5fbd14aa 160000 --- a/vendor/nim-circom-compat +++ b/vendor/nim-circom-compat @@ -1 +1 @@ -Subproject commit 4467e310b75aa0749ff28c1572a84ffce57d7c1c +Subproject commit 5fbd14aab035e570e22a27999ddf13b071245e69