Use consistent naming for the synonyms 'deposits-dir' and 'validators-dir'

This commit is contained in:
Zahary Karadjov 2020-08-01 21:32:41 +03:00 committed by zah
parent 2a94f6eca6
commit d58668157a
5 changed files with 20 additions and 25 deletions

View File

@ -207,7 +207,7 @@ medalla-deposit-data: | beacon_node deposit_contract
build/beacon_node deposits create \
--network=medalla \
--new-wallet-file=build/data/shared_medalla_$(NODE_ID)/wallet.json \
--out-deposits-dir=build/data/shared_medalla_$(NODE_ID)/validators \
--out-validators-dir=build/data/shared_medalla_$(NODE_ID)/validators \
--out-secrets-dir=build/data/shared_medalla_$(NODE_ID)/secrets \
--out-deposits-file=medalla-deposits_data-$$(date +"%Y%m%d%H%M%S").json \
--count=$(VALIDATORS)
@ -217,7 +217,7 @@ medalla-deposit: | beacon_node deposit_contract
--network=medalla \
--out-deposits-file=nbc-medalla-deposits.json \
--new-wallet-file=build/data/shared_medalla_$(NODE_ID)/wallet.json \
--out-deposits-dir=build/data/shared_medalla_$(NODE_ID)/validators \
--out-validators-dir=build/data/shared_medalla_$(NODE_ID)/validators \
--out-secrets-dir=build/data/shared_medalla_$(NODE_ID)/secrets \
--count=$(VALIDATORS)

View File

@ -54,6 +54,10 @@ type
abbr: "d"
name: "data-dir" }: OutDir
validatorsDirFlag* {.
desc: "A directory containing validator keystores"
name: "validators-dir" }: Option[InputDir]
walletsDirFlag* {.
desc: "A directory containing wallet files"
name: "wallets-dir" }: Option[InputDir]
@ -121,10 +125,6 @@ type
abbr: "v"
name: "validator" }: seq[ValidatorKeyPath]
validatorsDirFlag* {.
desc: "A directory containing validator keystores"
name: "validators-dir" }: Option[InputDir]
secretsDirFlag* {.
desc: "A directory containing validator keystore passwords"
name: "secrets-dir" }: Option[InputDir]
@ -290,11 +290,6 @@ type
discard
of deposits:
depositsDir* {.
defaultValue: "validators"
desc: "A folder with validator metadata created by the `deposits create` command"
name: "deposits-dir" }: string
case depositsCmd* {.command.}: DepositsCmd
of DepositsCmd.create:
totalDeposits* {.
@ -308,8 +303,8 @@ type
outValidatorsDir* {.
defaultValue: "validators"
desc: "Output folder for validator keystores and deposits"
name: "out-deposits-dir" }: string
desc: "Output folder for validator keystores"
name: "out-validators-dir" }: string
outSecretsDir* {.
defaultValue: "secrets"

View File

@ -9,9 +9,9 @@ type
CliConfig = object
network: string
depositsDir {.
defaultValue: "deposits"
name: "deposits-dir" }: string
validatorsDir {.
defaultValue: "validators"
name: "validators-dir" }: string
case cmd {.command.}: Command
of restart_nodes:
@ -40,7 +40,7 @@ var conf = load CliConfig
var
serverCount = 6
instancesCount = 1
validators = listDirs(conf.depositsDir).mapIt(splitPath(it)[1])
validators = listDirs(conf.validatorsDir).mapIt(splitPath(it)[1])
sort(validators)
@ -120,7 +120,7 @@ of reset_network:
for i in firstValidator ..< lastValidator:
validatorDirs.add " "
validatorDirs.add conf.depositsDir / validators[i]
validatorDirs.add conf.validatorsDir / validators[i]
secretFiles.add " "
secretFiles.add conf.secretsDir / validators[i]

View File

@ -144,7 +144,7 @@ The following options are available:
--count Number of deposits to generate.
--wallet An existing wallet ID. If not specified, a new wallet will be created.
--out-deposits-dir Output folder for validator keystores and deposits.
--out-validatorss-dir Output folder for validator keystores and deposits.
--out-secrets-dir Output folder for randomly generated keystore passphrases.
--dont-send By default, all created deposits are also immediately sent to the validator
deposit contract. You can use this option to prevent this behavior. Use the
@ -157,7 +157,7 @@ Sends prepared deposits to the validator deposit contract.
The following options are available:
--deposits-dir A folder with validator metadata created by the `deposits create` command.
--validators-dir A folder with validator metadata created by the `deposits create` command.
--min-delay Minimum possible delay between making two deposits (in seconds).
--max-delay Maximum possible delay between making two deposits (in seconds).

View File

@ -45,7 +45,7 @@ git clone --quiet --depth=1 $ETH2_TESTNETS_GIT_URL "$ETH2_TESTNETS"
ETH2_TESTNETS_ABS=$(cd "$ETH2_TESTNETS"; pwd)
NETWORK_DIR_ABS="$ETH2_TESTNETS_ABS/nimbus/$NETWORK"
DATA_DIR_ABS=$(mkdir -p "$DATA_DIR"; cd "$DATA_DIR"; pwd)
DEPOSITS_DIR_ABS="$DATA_DIR_ABS/deposits"
VALIDATORS_DIR_ABS="$DATA_DIR_ABS/validators"
SECRETS_DIR_ABS="$DATA_DIR_ABS/secrets"
DEPOSIT_CONTRACT_ADDRESS=""
DEPOSIT_CONTRACT_ADDRESS_ARG=""
@ -54,7 +54,7 @@ if [ "$WEB3_URL" != "" ]; then
WEB3_URL_ARG="--web3-url=$WEB3_URL"
fi
mkdir -p "$DEPOSITS_DIR_ABS"
mkdir -p "$VALIDATORS_DIR_ABS"
mkdir -p "$SECRETS_DIR_ABS"
if [ "$ETH1_PRIVATE_KEY" != "" ]; then
@ -85,13 +85,13 @@ make build
../build/beacon_node deposits create \
--count=$TOTAL_VALIDATORS \
--out-deposits-dir="$DEPOSITS_DIR_ABS" \
--out-validators-dir="$VALIDATORS_DIR_ABS" \
--out-secrets-dir="$SECRETS_DIR_ABS" \
--dont-send
../build/beacon_node createTestnet \
--data-dir="$DATA_DIR_ABS" \
--validators-dir="$DEPOSITS_DIR_ABS" \
--validators-dir="$VALIDATORS_DIR_ABS" \
--total-validators=$TOTAL_VALIDATORS \
--last-user-validator=$USER_VALIDATORS \
--output-genesis="$NETWORK_DIR_ABS/genesis.ssz" \
@ -115,7 +115,7 @@ if [[ $PUBLISH_TESTNET_RESETS != "0" ]]; then
../env.sh nim --verbosity:0 --hints:off manage_testnet_hosts.nims reset_network \
--network=$NETWORK \
--deposits-dir="$DEPOSITS_DIR_ABS" \
--validators-dir="$VALIDATORS_DIR_ABS" \
--secrets-dir="$SECRETS_DIR_ABS" \
--network-data-dir="$NETWORK_DIR_ABS" \
--user-validators=$USER_VALIDATORS \