Handle changes in the latest version of Confutils

This commit is contained in:
Zahary Karadjov 2021-05-17 20:44:57 +03:00
parent b9924214ab
commit f6a1f602b4
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
2 changed files with 66 additions and 50 deletions

View File

@ -86,8 +86,8 @@ type
BeaconNodeConf* = object BeaconNodeConf* = object
logLevel* {. logLevel* {.
desc: "Sets the log level for process and topics (e.g. \"DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none\")"
defaultValue: "INFO" defaultValue: "INFO"
desc: "Sets the log level for process and topics (e.g. \"DEBUG; TRACE:discv5,libp2p; REQUIRED:none; DISABLED:none\") [=INFO]"
name: "log-level" }: string name: "log-level" }: string
logFile* {. logFile* {.
@ -95,12 +95,14 @@ type
name: "log-file" }: Option[OutFile] name: "log-file" }: Option[OutFile]
eth2Network* {. eth2Network* {.
desc: "The Eth2 network to join [=mainnet]" desc: "The Eth2 network to join"
defaultValueDesc: "mainnet"
name: "network" }: Option[string] name: "network" }: Option[string]
dataDir* {. dataDir* {.
defaultValue: config.defaultDataDir()
desc: "The directory where nimbus will store all blockchain data" desc: "The directory where nimbus will store all blockchain data"
defaultValue: config.defaultDataDir()
defaultValueDesc: ""
abbr: "d" abbr: "d"
name: "data-dir" }: OutDir name: "data-dir" }: OutDir
@ -131,15 +133,14 @@ type
name: "non-interactive" }: bool name: "non-interactive" }: bool
netKeyFile* {. netKeyFile* {.
defaultValue: "random",
desc: "Source of network (secp256k1) private key file " & desc: "Source of network (secp256k1) private key file " &
"(random|<path>) [=random]" "(random|<path>)"
defaultValue: "random",
name: "netkey-file" }: string name: "netkey-file" }: string
netKeyInsecurePassword* {. netKeyInsecurePassword* {.
desc: "Use pre-generated INSECURE password for network private key file"
defaultValue: false, defaultValue: false,
desc: "Use pre-generated INSECURE password for network private key " &
"file [=false]"
name: "insecure-netkey-password" }: bool name: "insecure-netkey-password" }: bool
agentString* {. agentString* {.
@ -155,13 +156,14 @@ type
slashingDbKind* {. slashingDbKind* {.
hidden hidden
defaultValue: SlashingDbKind.v2 defaultValue: SlashingDbKind.v2
desc: "The slashing DB flavour to use (v2) [=v2]" desc: "The slashing DB flavour to use"
name: "slashing-db-kind" }: SlashingDbKind name: "slashing-db-kind" }: SlashingDbKind
stateDbKind* {. stateDbKind* {.
hidden hidden
desc: "State DB kind (sql, file)"
defaultValue: StateDbKind.sql defaultValue: StateDbKind.sql
desc: "State DB kind (sql, file) [=sql]" defaultValueDesc: "sql"
name: "state-db-kind" }: StateDbKind name: "state-db-kind" }: StateDbKind
case cmd* {. case cmd* {.
@ -175,42 +177,45 @@ type
name: "bootstrap-node" }: seq[string] name: "bootstrap-node" }: seq[string]
bootstrapNodesFile* {. bootstrapNodesFile* {.
defaultValue: ""
desc: "Specifies a line-delimited file of bootstrap Ethereum network addresses" desc: "Specifies a line-delimited file of bootstrap Ethereum network addresses"
defaultValue: ""
name: "bootstrap-file" }: InputFile name: "bootstrap-file" }: InputFile
listenAddress* {. listenAddress* {.
desc: "Listening address for the Ethereum LibP2P and Discovery v5 traffic"
defaultValue: defaultListenAddress defaultValue: defaultListenAddress
desc: "Listening address for the Ethereum LibP2P and Discovery v5 " & defaultValueDesc: "0.0.0.0"
"traffic [=0.0.0.0]"
name: "listen-address" }: ValidIpAddress name: "listen-address" }: ValidIpAddress
tcpPort* {. tcpPort* {.
desc: "Listening TCP port for Ethereum LibP2P traffic"
defaultValue: defaultEth2TcpPort defaultValue: defaultEth2TcpPort
desc: "Listening TCP port for Ethereum LibP2P traffic [=9000]" defaultValueDesc: "9000"
name: "tcp-port" }: Port name: "tcp-port" }: Port
udpPort* {. udpPort* {.
desc: "Listening UDP port for node discovery"
defaultValue: defaultEth2TcpPort defaultValue: defaultEth2TcpPort
desc: "Listening UDP port for node discovery [=9000]" # defaultValueDesc: 9000
name: "udp-port" }: Port name: "udp-port" }: Port
maxPeers* {. maxPeers* {.
desc: "The maximum number of peers to connect to"
defaultValue: 160 # 5 (fanout) * 64 (subnets) / 2 (subs) for a heathy mesh defaultValue: 160 # 5 (fanout) * 64 (subnets) / 2 (subs) for a heathy mesh
desc: "The maximum number of peers to connect to [=160]"
name: "max-peers" }: int name: "max-peers" }: int
nat* {. nat* {.
desc: "Specify method to use for determining public address. " & desc: "Specify method to use for determining public address. " &
"Must be one of: any, none, upnp, pmp, extip:<IP>" "Must be one of: any, none, upnp, pmp, extip:<IP>"
defaultValue: NatConfig(hasExtIp: false, nat: NatAny) defaultValue: NatConfig(hasExtIp: false, nat: NatAny)
defaultValueDesc: "any"
name: "nat" .}: NatConfig name: "nat" .}: NatConfig
enrAutoUpdate* {. enrAutoUpdate* {.
defaultValue: false
desc: "Discovery can automatically update its ENR with the IP address " & desc: "Discovery can automatically update its ENR with the IP address " &
"and UDP port as seen by other nodes it communicates with. " & "and UDP port as seen by other nodes it communicates with. " &
"This option allows to enable/disable this functionality" "This option allows to enable/disable this functionality"
defaultValue: false
name: "enr-auto-update" .}: bool name: "enr-auto-update" .}: bool
weakSubjectivityCheckpoint* {. weakSubjectivityCheckpoint* {.
@ -226,9 +231,9 @@ type
name: "finalized-checkpoint-block" }: Option[InputFile] name: "finalized-checkpoint-block" }: Option[InputFile]
nodeName* {. nodeName* {.
defaultValue: ""
desc: "A name for this node that will appear in the logs. " & desc: "A name for this node that will appear in the logs. " &
"If you set this to 'auto', a persistent automatically generated ID will be selected for each --data-dir folder" "If you set this to 'auto', a persistent automatically generated ID will be selected for each --data-dir folder"
defaultValue: ""
name: "node-name" }: string name: "node-name" }: string
graffiti* {. graffiti* {.
@ -237,88 +242,94 @@ type
name: "graffiti" }: Option[GraffitiBytes] name: "graffiti" }: Option[GraffitiBytes]
verifyFinalization* {. verifyFinalization* {.
defaultValue: false
desc: "Specify whether to verify finalization occurs on schedule, for testing" desc: "Specify whether to verify finalization occurs on schedule, for testing"
defaultValue: false
name: "verify-finalization" }: bool name: "verify-finalization" }: bool
stopAtEpoch* {. stopAtEpoch* {.
defaultValue: 0
desc: "A positive epoch selects the epoch at which to stop" desc: "A positive epoch selects the epoch at which to stop"
defaultValue: 0
name: "stop-at-epoch" }: uint64 name: "stop-at-epoch" }: uint64
metricsEnabled* {. metricsEnabled* {.
desc: "Enable the metrics server"
defaultValue: false defaultValue: false
desc: "Enable the metrics server [=false]"
name: "metrics" }: bool name: "metrics" }: bool
metricsAddress* {. metricsAddress* {.
desc: "Listening address of the metrics server"
defaultValue: defaultAdminListenAddress defaultValue: defaultAdminListenAddress
desc: "Listening address of the metrics server [=127.0.0.1]" defaultValueDesc: "127.0.0.1"
name: "metrics-address" }: ValidIpAddress name: "metrics-address" }: ValidIpAddress
metricsPort* {. metricsPort* {.
desc: "Listening HTTP port of the metrics server"
defaultValue: 8008 defaultValue: 8008
desc: "Listening HTTP port of the metrics server [=8008]"
name: "metrics-port" }: Port name: "metrics-port" }: Port
statusBarEnabled* {. statusBarEnabled* {.
defaultValue: true
desc: "Display a status bar at the bottom of the terminal screen" desc: "Display a status bar at the bottom of the terminal screen"
defaultValue: true
name: "status-bar" }: bool name: "status-bar" }: bool
statusBarContents* {. statusBarContents* {.
desc: "Textual template for the contents of the status bar"
defaultValue: "peers: $connected_peers;" & defaultValue: "peers: $connected_peers;" &
"finalized: $finalized_root:$finalized_epoch;" & "finalized: $finalized_root:$finalized_epoch;" &
"head: $head_root:$head_epoch:$head_epoch_slot;" & "head: $head_root:$head_epoch:$head_epoch_slot;" &
"time: $epoch:$epoch_slot ($slot);" & "time: $epoch:$epoch_slot ($slot);" &
"sync: $sync_status|" & "sync: $sync_status|" &
"ETH: $attached_validators_balance" "ETH: $attached_validators_balance"
desc: "Textual template for the contents of the status bar" defaultValueDesc: ""
name: "status-bar-contents" }: string name: "status-bar-contents" }: string
rpcEnabled* {. rpcEnabled* {.
desc: "Enable the JSON-RPC server"
defaultValue: false defaultValue: false
desc: "Enable the JSON-RPC server [=false]"
name: "rpc" }: bool name: "rpc" }: bool
rpcPort* {. rpcPort* {.
desc: "HTTP port for the JSON-RPC service"
defaultValue: defaultEth2RpcPort defaultValue: defaultEth2RpcPort
desc: "HTTP port for the JSON-RPC service [=9190]" defaultValueDesc: "9190"
name: "rpc-port" }: Port name: "rpc-port" }: Port
rpcAddress* {. rpcAddress* {.
desc: "Listening address of the RPC server"
defaultValue: defaultAdminListenAddress defaultValue: defaultAdminListenAddress
desc: "Listening address of the RPC server [=127.0.0.1]" defaultValueDesc: "127.0.0.1"
name: "rpc-address" }: ValidIpAddress name: "rpc-address" }: ValidIpAddress
restEnabled* {. restEnabled* {.
desc: "Enable the REST (BETA version) server"
defaultValue: false defaultValue: false
desc: "Enable the REST (BETA version) server [=false]"
name: "rest" }: bool name: "rest" }: bool
restPort* {. restPort* {.
desc: "Port for the REST (BETA version) server"
defaultValue: DefaultEth2RestPort defaultValue: DefaultEth2RestPort
desc: "Port for the REST (BETA version) server [=5052]" defaultValueDesc: "5052"
name: "rest-port" }: Port name: "rest-port" }: Port
restAddress* {. restAddress* {.
desc: "Listening address of the REST (BETA version) server"
defaultValue: defaultAdminListenAddress defaultValue: defaultAdminListenAddress
desc: "Listening address of the REST (BETA version) server [=127.0.0.1]" defaultValueDesc: "127.0.0.1"
name: "rest-address" }: ValidIpAddress name: "rest-address" }: ValidIpAddress
inProcessValidators* {. inProcessValidators* {.
defaultValue: true # the use of the nimbus_signing_process binary by default will be delayed until async I/O over stdin/stdout is developed for the child process.
desc: "Disable the push model (the beacon node tells a signing process with the private keys of the validators what to sign and when) and load the validators in the beacon node itself" desc: "Disable the push model (the beacon node tells a signing process with the private keys of the validators what to sign and when) and load the validators in the beacon node itself"
defaultValue: true # the use of the nimbus_signing_process binary by default will be delayed until async I/O over stdin/stdout is developed for the child process.
name: "in-process-validators" }: bool name: "in-process-validators" }: bool
discv5Enabled* {. discv5Enabled* {.
desc: "Enable Discovery v5"
defaultValue: true defaultValue: true
desc: "Enable Discovery v5 [=true]"
name: "discv5" }: bool name: "discv5" }: bool
dumpEnabled* {. dumpEnabled* {.
desc: "Write SSZ dumps of blocks, attestations and states to data dir"
defaultValue: false defaultValue: false
desc: "Write SSZ dumps of blocks, attestations and states to data dir [=false]"
name: "dump" }: bool name: "dump" }: bool
directPeers* {. directPeers* {.
@ -326,8 +337,8 @@ type
name: "direct-peer" .}: seq[string] name: "direct-peer" .}: seq[string]
doppelgangerDetection* {. doppelgangerDetection* {.
desc: "Whether to detect whether another validator is be running the same validator keys"
defaultValue: true defaultValue: true
desc: "Whether to detect whether another validator is be running the same validator keys [=true]"
name: "doppelganger-detection" name: "doppelganger-detection"
}: bool }: bool
@ -341,18 +352,20 @@ type
name: "total-validators" }: uint64 name: "total-validators" }: uint64
bootstrapAddress* {. bootstrapAddress* {.
defaultValue: init(ValidIpAddress, "127.0.0.1")
desc: "The public IP address that will be advertised as a bootstrap node for the testnet" desc: "The public IP address that will be advertised as a bootstrap node for the testnet"
defaultValue: init(ValidIpAddress, "127.0.0.1")
defaultValueDesc: "127.0.0.1"
name: "bootstrap-address" }: ValidIpAddress name: "bootstrap-address" }: ValidIpAddress
bootstrapPort* {. bootstrapPort* {.
defaultValue: defaultEth2TcpPort
desc: "The TCP/UDP port that will be used by the bootstrap node" desc: "The TCP/UDP port that will be used by the bootstrap node"
defaultValue: defaultEth2TcpPort
defaultValueDesc: "9000"
name: "bootstrap-port" }: Port name: "bootstrap-port" }: Port
genesisOffset* {. genesisOffset* {.
defaultValue: 5
desc: "Seconds from now to add to genesis time" desc: "Seconds from now to add to genesis time"
defaultValue: 5
name: "genesis-offset" }: int name: "genesis-offset" }: int
outputGenesis* {. outputGenesis* {.
@ -360,8 +373,8 @@ type
name: "output-genesis" }: OutFile name: "output-genesis" }: OutFile
withGenesisRoot* {. withGenesisRoot* {.
defaultValue: false
desc: "Include a genesis root in 'network.json'" desc: "Include a genesis root in 'network.json'"
defaultValue: false
name: "with-genesis-root" }: bool name: "with-genesis-root" }: bool
outputBootstrapFile* {. outputBootstrapFile* {.
@ -405,8 +418,8 @@ type
case depositsCmd* {.command.}: DepositsCmd case depositsCmd* {.command.}: DepositsCmd
of DepositsCmd.createTestnetDeposits: of DepositsCmd.createTestnetDeposits:
totalDeposits* {. totalDeposits* {.
defaultValue: 1
desc: "Number of deposits to generate" desc: "Number of deposits to generate"
defaultValue: 1
name: "count" }: int name: "count" }: int
existingWalletId* {. existingWalletId* {.
@ -414,13 +427,13 @@ type
name: "wallet" }: Option[WalletName] name: "wallet" }: Option[WalletName]
outValidatorsDir* {. outValidatorsDir* {.
defaultValue: "validators"
desc: "Output folder for validator keystores" desc: "Output folder for validator keystores"
defaultValue: "validators"
name: "out-validators-dir" }: string name: "out-validators-dir" }: string
outSecretsDir* {. outSecretsDir* {.
defaultValue: "secrets"
desc: "Output folder for randomly generated keystore passphrases" desc: "Output folder for randomly generated keystore passphrases"
defaultValue: "secrets"
name: "out-secrets-dir" }: string name: "out-secrets-dir" }: string
outDepositsFile* {. outDepositsFile* {.
@ -451,9 +464,10 @@ type
desc: "Validator index or a public key of the exited validator" }: string desc: "Validator index or a public key of the exited validator" }: string
rpcUrlForExit* {. rpcUrlForExit* {.
name: "rpc-url" desc: "URL of the beacon node JSON-RPC service"
defaultValue: parseUri("http://localhost:" & $defaultEth2RpcPort) defaultValue: parseUri("http://localhost:" & $defaultEth2RpcPort)
desc: "URL of the beacon node JSON-RPC service" }: Uri defaultValueDesc: "http://localhost:9190"
name: "rpc-url" }: Uri
exitAtEpoch* {. exitAtEpoch* {.
name: "epoch" name: "epoch"
@ -475,8 +489,8 @@ type
name: "udp-port" .}: Port name: "udp-port" .}: Port
seqNumber* {. seqNumber* {.
defaultValue: 1,
desc: "Record sequence number" desc: "Record sequence number"
defaultValue: 1,
name: "seq-number" .}: uint name: "seq-number" .}: uint
fields* {. fields* {.
@ -515,8 +529,8 @@ type
ValidatorClientConf* = object ValidatorClientConf* = object
logLevel* {. logLevel* {.
desc: "Sets the log level"
defaultValue: "INFO" defaultValue: "INFO"
desc: "Sets the log level [=INFO]"
name: "log-level" }: string name: "log-level" }: string
logFile* {. logFile* {.
@ -524,8 +538,9 @@ type
name: "log-file" }: Option[OutFile] name: "log-file" }: Option[OutFile]
dataDir* {. dataDir* {.
defaultValue: config.defaultDataDir()
desc: "The directory where nimbus will store all blockchain data" desc: "The directory where nimbus will store all blockchain data"
defaultValue: config.defaultDataDir()
defaultValueDesc: ""
abbr: "d" abbr: "d"
name: "data-dir" }: OutDir name: "data-dir" }: OutDir
@ -552,13 +567,14 @@ type
name: "graffiti" }: Option[GraffitiBytes] name: "graffiti" }: Option[GraffitiBytes]
stopAtEpoch* {. stopAtEpoch* {.
defaultValue: 0
desc: "A positive epoch selects the epoch at which to stop" desc: "A positive epoch selects the epoch at which to stop"
defaultValue: 0
name: "stop-at-epoch" }: uint64 name: "stop-at-epoch" }: uint64
rpcPort* {. rpcPort* {.
desc: "HTTP port of the server to connect to for RPC"
defaultValue: defaultEth2RpcPort defaultValue: defaultEth2RpcPort
desc: "HTTP port of the server to connect to for RPC [=9190]" defaultValueDesc: "9190"
name: "rpc-port" }: Port name: "rpc-port" }: Port
rpcAddress* {. rpcAddress* {.
@ -568,8 +584,8 @@ type
name: "rpc-address" }: ValidIpAddress name: "rpc-address" }: ValidIpAddress
retryDelay* {. retryDelay* {.
defaultValue: 10
desc: "Delay in seconds between retries after unsuccessful attempts to connect to a beacon node [=10]" desc: "Delay in seconds between retries after unsuccessful attempts to connect to a beacon node [=10]"
defaultValue: 10
name: "retry-delay" }: int name: "retry-delay" }: int
proc defaultDataDir*(config: BeaconNodeConf|ValidatorClientConf): string = proc defaultDataDir*(config: BeaconNodeConf|ValidatorClientConf): string =

@ -1 +1 @@
Subproject commit 5f2f882151fee87471514bb74c1311856c636594 Subproject commit 5f7cfa8d98f6333fc835d49d77b8786d73cd11bb