make `verifier` a cmd option
This commit is contained in:
parent
189ba80635
commit
cba998fc12
|
@ -70,8 +70,8 @@ type
|
||||||
persistence
|
persistence
|
||||||
|
|
||||||
PersistenceCmd* {.pure.} = enum
|
PersistenceCmd* {.pure.} = enum
|
||||||
|
noCmd
|
||||||
prover
|
prover
|
||||||
validator
|
|
||||||
|
|
||||||
LogKind* {.pure.} = enum
|
LogKind* {.pure.} = enum
|
||||||
Auto = "auto"
|
Auto = "auto"
|
||||||
|
@ -275,15 +275,21 @@ type
|
||||||
hidden
|
hidden
|
||||||
.}: int
|
.}: int
|
||||||
|
|
||||||
case persistenceCmd* {.
|
validator* {.
|
||||||
command }: PersistenceCmd
|
desc: "Enables validator, requires an Ethereum node"
|
||||||
|
defaultValue: false
|
||||||
|
name: "validator"
|
||||||
|
.}: bool
|
||||||
|
|
||||||
of PersistenceCmd.validator:
|
validatorMaxSlots* {.
|
||||||
validatorMaxSlots* {.
|
desc: "Maximum number of slots that the validator monitors"
|
||||||
desc: "Maximum number of slots that the validator monitors"
|
defaultValue: 1000
|
||||||
defaultValue: 1000
|
name: "validator-max-slots"
|
||||||
name: "validator-max-slots"
|
.}: int
|
||||||
.}: int
|
|
||||||
|
case persistenceCmd* {.
|
||||||
|
defaultValue: noCmd
|
||||||
|
command }: PersistenceCmd
|
||||||
|
|
||||||
of PersistenceCmd.prover:
|
of PersistenceCmd.prover:
|
||||||
circomR1cs* {.
|
circomR1cs* {.
|
||||||
|
@ -343,6 +349,8 @@ type
|
||||||
defaultValue: DefaultCellElms
|
defaultValue: DefaultCellElms
|
||||||
defaultValueDesc: $DefaultCellElms
|
defaultValueDesc: $DefaultCellElms
|
||||||
name: "max-cell-elements" }: int
|
name: "max-cell-elements" }: int
|
||||||
|
of PersistenceCmd.noCmd:
|
||||||
|
discard
|
||||||
|
|
||||||
of StartUpCmd.noCmd:
|
of StartUpCmd.noCmd:
|
||||||
discard # end of persistence
|
discard # end of persistence
|
||||||
|
@ -355,9 +363,6 @@ logutils.formatIt(LogFormat.json, EthAddress): %it
|
||||||
func persistence*(self: CodexConf): bool =
|
func persistence*(self: CodexConf): bool =
|
||||||
self.cmd == StartUpCmd.persistence
|
self.cmd == StartUpCmd.persistence
|
||||||
|
|
||||||
func validator*(self: CodexConf): bool =
|
|
||||||
self.persistence and self.persistenceCmd == PersistenceCmd.validator
|
|
||||||
|
|
||||||
func prover*(self: CodexConf): bool =
|
func prover*(self: CodexConf): bool =
|
||||||
self.persistence and self.persistenceCmd == PersistenceCmd.prover
|
self.persistence and self.persistenceCmd == PersistenceCmd.prover
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue