Adds a fuzzing test for the validator client CLI
Also removes an obsolete way to add validators through the command line
This commit is contained in:
parent
8ce0fc3a89
commit
02a3770803
|
@ -136,12 +136,6 @@ type
|
|||
"Must be one of: any, none, upnp, pmp, extip:<IP>"
|
||||
defaultValue: "any" }: string
|
||||
|
||||
validators* {.
|
||||
required
|
||||
desc: "Path to a validator keystore"
|
||||
abbr: "v"
|
||||
name: "validator" }: seq[ValidatorKeyPath]
|
||||
|
||||
weakSubjectivityCheckpoint* {.
|
||||
desc: "Weak subjectivity checkpoint in the format block_root:epoch_number"
|
||||
name: "weak-subjectivity-checkpoint" }: Option[Checkpoint]
|
||||
|
@ -378,12 +372,6 @@ type
|
|||
desc: "Do not display interative prompts. Quit on missing configuration"
|
||||
name: "non-interactive" }: bool
|
||||
|
||||
validators* {.
|
||||
required
|
||||
desc: "Attach a validator by supplying a keystore path"
|
||||
abbr: "v"
|
||||
name: "validator" }: seq[ValidatorKeyPath]
|
||||
|
||||
validatorsDirFlag* {.
|
||||
desc: "A directory containing validator keystores"
|
||||
name: "validators-dir" }: Option[InputDir]
|
||||
|
|
|
@ -243,14 +243,6 @@ iterator validatorKeysFromDirs*(validatorsDir, secretsDir: string): ValidatorPri
|
|||
quit 1
|
||||
|
||||
iterator validatorKeys*(conf: BeaconNodeConf|ValidatorClientConf): ValidatorPrivKey =
|
||||
for validatorKeyFile in conf.validators:
|
||||
try:
|
||||
yield validatorKeyFile.load
|
||||
except CatchableError as err:
|
||||
error "Failed to load validator private key",
|
||||
file = validatorKeyFile.string, err = err.msg
|
||||
quit 1
|
||||
|
||||
let validatorsDir = conf.validatorsDir
|
||||
try:
|
||||
for kind, file in walkDir(validatorsDir):
|
||||
|
|
|
@ -460,7 +460,7 @@ type
|
|||
EVRESULT_IGNORE = 2
|
||||
|
||||
func shortValidatorKey*(state: BeaconState, validatorIdx: int): string =
|
||||
($state.validators[validatorIdx].pubkey)[0..7]
|
||||
($state.validators[validatorIdx].pubkey)[0..7]
|
||||
|
||||
func getDepositMessage*(depositData: DepositData): DepositMessage =
|
||||
result.pubkey = depositData.pubkey
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
--log-level=TRACE --log-file:"foo/bar.log" --data-dir=/tmp/data --non-interactive --secrets-dir:secrets --graffiti:"some message" --graffiti:0xaa2311aa21 --stop-at-epoch:4 --rpc-port:10000 --rpc-address:127.0.0.1 --retry-delay:10
|
|
@ -0,0 +1 @@
|
|||
--help
|
|
@ -0,0 +1 @@
|
|||
build/validator_client --log-level=INFO --log-file=build/data/shared_medalla_0/nbc_vc_20201009202103.log --data-dir=build/data/shared_medalla_0 --rpc-port=9190
|
|
@ -0,0 +1 @@
|
|||
--version
|
|
@ -0,0 +1,10 @@
|
|||
import
|
||||
# TODO These imports shouldn't be necessary here
|
||||
# (this is a variation of the sandwich problem)
|
||||
stew/shims/net, chronicles, ../../../beacon_chain/spec/network,
|
||||
|
||||
confutils/cli_parsing_fuzzer,
|
||||
../../../beacon_chain/conf
|
||||
|
||||
fuzzCliParsing ValidatorClientConf
|
||||
|
Loading…
Reference in New Issue