temporarily comment out PersistenceCmd until `prover` is back in
This commit is contained in:
parent
3b2bbc294c
commit
8bb35af7ac
|
@ -21,7 +21,8 @@ type
|
||||||
configs*: seq[CodexConfig]
|
configs*: seq[CodexConfig]
|
||||||
CodexConfig* = object
|
CodexConfig* = object
|
||||||
cliOptions: Table[StartUpCmd, Table[string, CliOption]]
|
cliOptions: Table[StartUpCmd, Table[string, CliOption]]
|
||||||
cliPersistenceOptions: Table[PersistenceCmd, Table[string, CliOption]]
|
# TODO: uncomment once PersistenceCmd is added
|
||||||
|
# cliPersistenceOptions: Table[PersistenceCmd, Table[string, CliOption]]
|
||||||
debugEnabled*: bool
|
debugEnabled*: bool
|
||||||
CodexConfigError* = object of CatchableError
|
CodexConfigError* = object of CatchableError
|
||||||
|
|
||||||
|
@ -63,22 +64,24 @@ proc buildConfig(
|
||||||
## TODO: remove once proper exception handling added to nim-confutils
|
## TODO: remove once proper exception handling added to nim-confutils
|
||||||
raiseCodexConfigError msg & e.msg.postFix
|
raiseCodexConfigError msg & e.msg.postFix
|
||||||
|
|
||||||
proc addCliOption*(
|
# TODO: uncomment once PersistenceCmd is added
|
||||||
config: var CodexConfig,
|
# proc addCliOption*(
|
||||||
group = PersistenceCmd.noCmd,
|
# config: var CodexConfig,
|
||||||
cliOption: CliOption) {.raises: [CodexConfigError].} =
|
# group = PersistenceCmd.noCmd,
|
||||||
|
# cliOption: CliOption) {.raises: [CodexConfigError].} =
|
||||||
|
|
||||||
var options = config.cliPersistenceOptions.getOrDefault(group)
|
# var options = config.cliPersistenceOptions.getOrDefault(group)
|
||||||
options[cliOption.key] = cliOption # overwrite if already exists
|
# options[cliOption.key] = cliOption # overwrite if already exists
|
||||||
config.cliPersistenceOptions[group] = options
|
# config.cliPersistenceOptions[group] = options
|
||||||
discard config.buildConfig("Invalid cli arg " & $cliOption)
|
# discard config.buildConfig("Invalid cli arg " & $cliOption)
|
||||||
|
|
||||||
proc addCliOption*(
|
# TODO: uncomment once PersistenceCmd is added
|
||||||
config: var CodexConfig,
|
# proc addCliOption*(
|
||||||
group = PersistenceCmd.noCmd,
|
# config: var CodexConfig,
|
||||||
key: string, value = "") {.raises: [CodexConfigError].} =
|
# group = PersistenceCmd.noCmd,
|
||||||
|
# key: string, value = "") {.raises: [CodexConfigError].} =
|
||||||
|
|
||||||
config.addCliOption(group, CliOption(key: key, value: value))
|
# config.addCliOption(group, CliOption(key: key, value: value))
|
||||||
|
|
||||||
proc addCliOption*(
|
proc addCliOption*(
|
||||||
config: var CodexConfig,
|
config: var CodexConfig,
|
||||||
|
@ -123,12 +126,13 @@ proc cliArgs*(
|
||||||
var opts = config.cliOptions[cmd].values.toSeq
|
var opts = config.cliOptions[cmd].values.toSeq
|
||||||
args = args.concat( opts.map(o => $o) )
|
args = args.concat( opts.map(o => $o) )
|
||||||
|
|
||||||
for cmd in PersistenceCmd:
|
# TODO: uncomment once PersistenceCmd is added
|
||||||
if config.cliPersistenceOptions.hasKey(cmd):
|
# for cmd in PersistenceCmd:
|
||||||
if cmd != PersistenceCmd.noCmd:
|
# if config.cliPersistenceOptions.hasKey(cmd):
|
||||||
args.add $cmd
|
# if cmd != PersistenceCmd.noCmd:
|
||||||
var opts = config.cliPersistenceOptions[cmd].values.toSeq
|
# args.add $cmd
|
||||||
args = args.concat( opts.map(o => $o) )
|
# var opts = config.cliPersistenceOptions[cmd].values.toSeq
|
||||||
|
# args = args.concat( opts.map(o => $o) )
|
||||||
|
|
||||||
return args
|
return args
|
||||||
|
|
||||||
|
|
|
@ -204,9 +204,10 @@ template multinodesuite*(name: string, body: untyped) =
|
||||||
var config = conf
|
var config = conf
|
||||||
config.addCliOption("--bootstrap-node", bootstrap)
|
config.addCliOption("--bootstrap-node", bootstrap)
|
||||||
config.addCliOption(StartUpCmd.persistence, "--eth-account", $accounts[running.len])
|
config.addCliOption(StartUpCmd.persistence, "--eth-account", $accounts[running.len])
|
||||||
config.addCliOption(PersistenceCmd.prover, "--circom-r1cs", "tests/circuits/fixtures/proof_main.r1cs")
|
# TODO: uncomment once PersistenceCmd is added
|
||||||
config.addCliOption(PersistenceCmd.prover, "--circom-wasm", "tests/circuits/fixtures/proof_main.wasm")
|
# config.addCliOption(PersistenceCmd.prover, "--circom-r1cs", "tests/circuits/fixtures/proof_main.r1cs")
|
||||||
config.addCliOption(PersistenceCmd.prover, "--circom-zkey", "tests/circuits/fixtures/proof_main.zkey")
|
# config.addCliOption(PersistenceCmd.prover, "--circom-wasm", "tests/circuits/fixtures/proof_main.wasm")
|
||||||
|
# config.addCliOption(PersistenceCmd.prover, "--circom-zkey", "tests/circuits/fixtures/proof_main.zkey")
|
||||||
|
|
||||||
return await newCodexProcess(providerIdx, config, Role.Provider)
|
return await newCodexProcess(providerIdx, config, Role.Provider)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue