fixup prover test setup

This commit is contained in:
Jaremy Creechley 2024-05-20 19:33:57 +03:00
parent 9986d22c71
commit 6b161a1716
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300

View File

@ -34,9 +34,10 @@ suite "Test Circom Compat Backend - control inputs":
let
inputData = readFile("tests/circuits/fixtures/input.json")
inputJson = !JsonNode.parse(inputData)
params = CircomCompatParams.init(r1cs, wasm, zkey)
proofInputs = Poseidon2Hash.jsonToProofInput(inputJson)
circom = CircomCompat.init(r1cs, wasm, zkey)
circom = CircomCompat.init(params)
teardown:
circom.release() # this comes from the rust FFI
@ -98,7 +99,8 @@ suite "Test Circom Compat Backend":
builder = Poseidon2Builder.new(store, verifiable).tryGet
sampler = Poseidon2Sampler.new(slotId, store, builder).tryGet
circom = CircomCompat.init(r1cs, wasm, zkey)
let params = CircomCompatParams.init(r1cs, wasm, zkey)
circom = CircomCompat.init(params)
challenge = 1234567.toF.toBytes.toArray32
proofInputs = (await sampler.getProofInput(challenge, samples)).tryGet