mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-02-21 17:18:22 +00:00
don't use ufcs
This commit is contained in:
parent
83c3aa07d2
commit
5b58a137b1
@ -261,27 +261,31 @@ proc new*(
|
|||||||
|
|
||||||
prover = if config.persistence:
|
prover = if config.persistence:
|
||||||
if not fileAccessible($config.circomR1cs, {AccessFlags.Read}) and
|
if not fileAccessible($config.circomR1cs, {AccessFlags.Read}) and
|
||||||
$(config.circomR1cs).endsWith(".r1cs"):
|
endsWith($config.circomR1cs, ".r1cs"):
|
||||||
error "Circom R1CS file not accessible"
|
error "Circom R1CS file not accessible"
|
||||||
raise (ref Defect)(
|
raise (ref Defect)(
|
||||||
msg: "r1cs file not readable, doesn't exist or wrong extension (.r1cs)")
|
msg: "r1cs file not readable, doesn't exist or wrong extension (.r1cs)")
|
||||||
|
|
||||||
if not fileAccessible($config.circomWasm, {AccessFlags.Read}) and
|
if not fileAccessible($config.circomWasm, {AccessFlags.Read}) and
|
||||||
$(config.circomWasm).endsWith(".wasm"):
|
endsWith($config.circomWasm, ".wasm"):
|
||||||
error "Circom wasm file not accessible"
|
error "Circom wasm file not accessible"
|
||||||
raise (ref Defect)(
|
raise (ref Defect)(
|
||||||
msg: "wasm file not readable, doesn't exist or wrong extension (.wasm)")
|
msg: "wasm file not readable, doesn't exist or wrong extension (.wasm)")
|
||||||
|
|
||||||
let zkey = if not config.circomNoZkey:
|
let zkey = if not config.circomNoZkey:
|
||||||
if not fileAccessible($config.circomZkey, {AccessFlags.Read}) and
|
if not fileAccessible($config.circomZkey, {AccessFlags.Read}) and
|
||||||
$(config.circomZkey).endsWith(".zkey"):
|
endsWith($config.circomZkey, ".zkey"):
|
||||||
error "Circom zkey file not accessible"
|
error "Circom zkey file not accessible"
|
||||||
raise (ref Defect)(
|
raise (ref Defect)(
|
||||||
msg: "zkey file not readable, doesn't exist or wrong extension (.zkey)")
|
msg: "zkey file not readable, doesn't exist or wrong extension (.zkey)")
|
||||||
|
|
||||||
$config.circomZkey
|
$config.circomZkey
|
||||||
else: ""
|
else: ""
|
||||||
|
|
||||||
some Prover.new(store, CircomCompat.init($config.circomR1cs, $config.circomWasm, zkey))
|
some Prover.new(
|
||||||
|
store,
|
||||||
|
CircomCompat.init($config.circomR1cs, $config.circomWasm, zkey),
|
||||||
|
config.numProofSamples)
|
||||||
else:
|
else:
|
||||||
none Prover
|
none Prover
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user