From e73ef8b0c3cb622d075c1bdc642841fbd911c6ca Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Wed, 28 May 2025 19:05:45 -0600 Subject: [PATCH] Add ProverBackendCmd enum and update configuration for nimGroth16 and circomCompat backends --- codex/conf.nim | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/codex/conf.nim b/codex/conf.nim index af55861f..40e21c4b 100644 --- a/codex/conf.nim +++ b/codex/conf.nim @@ -87,6 +87,10 @@ type noCmd prover + ProverBackendCmd* {.pure.} = enum + nimGroth16 + circomCompat + LogKind* {.pure.} = enum Auto = "auto" Colors = "colors" @@ -387,12 +391,28 @@ type name: "circom-r1cs" .}: InputFile - circomWasm* {. - desc: "The wasm file for the storage circuit", - defaultValue: $DefaultCircuitDir / "proof_main.wasm", - defaultValueDesc: $DefaultDataDir & "/circuits/proof_main.wasm", - name: "circom-wasm" - .}: InputFile + case proverBackendCmd*: ProverBackendCmd + of ProverBackendCmd.nimGroth16: + nimGroth16Curve* {. + desc: "The curve to use for the storage circuit", + defaultValue: "bn128", + name: "nim-groth16-curve" + .}: string + + circomGraph* {. + desc: "The graph file for the storage circuit", + defaultValue: $DefaultCircuitDir / "graph.bin", + defaultValueDesc: $DefaultDataDir & "/circuits/graph.bin", + name: "nim-groth16-graph" + .}: InputFile + of ProverBackendCmd.circomCompat: + circomWasm* {. + desc: + "The wasm file for the storage circuit - DEPRECATED: use the default nimGroth16 backend", + defaultValue: $DefaultCircuitDir / "proof_main.wasm", + defaultValueDesc: $DefaultDataDir & "/circuits/proof_main.wasm", + name: "circom-wasm" + .}: InputFile circomZkey* {. desc: "The zkey file for the storage circuit",