benchmarks
This commit is contained in:
parent
234287d4b5
commit
86de7718cc
|
@ -69,7 +69,13 @@ proc runBenchmark(args: CircArgs) =
|
|||
inputData = inputs.readFile()
|
||||
inputJson = !JsonNode.parse(inputData)
|
||||
proofInputs = Poseidon2Hash.jsonToProofInput(inputJson)
|
||||
circom = CircomCompat.init(r1cs, wasm, zkey)
|
||||
circom = CircomCompat.init(
|
||||
r1cs,
|
||||
wasm,
|
||||
zkey,
|
||||
slotDepth = args.depth,
|
||||
numSamples = args.nsamples,
|
||||
)
|
||||
defer:
|
||||
circom.release() # this comes from the rust FFI
|
||||
|
||||
|
|
|
@ -99,7 +99,10 @@ proc downloadPtau*(ptauPath, ptauUrl: string) =
|
|||
discard execShellCmd(fmt"curl -LOC - {ptauDefUrl}")
|
||||
|
||||
proc getCircuitBenchPath*(args: CircArgs): string =
|
||||
absolutePath("benchmarks/circuit_bench_" & $cast[uint](hash(args)))
|
||||
var an = ""
|
||||
for f, v in fieldPairs(args):
|
||||
an &= "_" & f & $v
|
||||
absolutePath("benchmarks/circuit_bench" & an)
|
||||
|
||||
proc generateCircomAndSamples*(args: CircArgs, name: string) =
|
||||
## run nim circuit and sample generator
|
||||
|
|
Loading…
Reference in New Issue