Clarify that the deposit cretion tools are intended for testnets

This commit is contained in:
Zahary Karadjov 2021-04-08 14:35:58 +03:00 committed by zah
parent 40859e4cdc
commit 61669f269d
6 changed files with 15 additions and 12 deletions

View File

@ -22,8 +22,8 @@ if possible.
* The metrics support is now compiled by default thanks to a new and more secure HTTP back-end. * The metrics support is now compiled by default thanks to a new and more secure HTTP back-end.
* Command-line tools for generating keystores and JSON deposit files suitable for use with the * Command-line tools for generating testnet keystores and JSON deposit files suitable for use
official network launchpads. with the official network launchpads.
* `setGraffiti` JSON-RPC call for modifying the graffiti bytes of the client at run-time. * `setGraffiti` JSON-RPC call for modifying the graffiti bytes of the client at run-time.

View File

@ -394,7 +394,7 @@ define CONNECT_TO_NETWORK_WITH_VALIDATOR_CLIENT
endef endef
define MAKE_DEPOSIT_DATA define MAKE_DEPOSIT_DATA
build/nimbus_beacon_node deposits create \ build/nimbus_beacon_node deposits createTestnetDeposits \
--network=$(1) \ --network=$(1) \
--new-wallet-file=build/data/shared_$(1)_$(NODE_ID)/wallet.json \ --new-wallet-file=build/data/shared_$(1)_$(NODE_ID)/wallet.json \
--out-validators-dir=build/data/shared_$(1)_$(NODE_ID)/validators \ --out-validators-dir=build/data/shared_$(1)_$(NODE_ID)/validators \
@ -404,7 +404,7 @@ define MAKE_DEPOSIT_DATA
endef endef
define MAKE_DEPOSIT define MAKE_DEPOSIT
build/nimbus_beacon_node deposits create \ build/nimbus_beacon_node deposits createTestnetDeposits \
--network=$(1) \ --network=$(1) \
--out-deposits-file=nbc-$(1)-deposits.json \ --out-deposits-file=nbc-$(1)-deposits.json \
--new-wallet-file=build/data/shared_$(1)_$(NODE_ID)/wallet.json \ --new-wallet-file=build/data/shared_$(1)_$(NODE_ID)/wallet.json \

View File

@ -45,7 +45,7 @@ type
list = "Lists details about all wallets" list = "Lists details about all wallets"
DepositsCmd* {.pure.} = enum DepositsCmd* {.pure.} = enum
create = "Creates validator keystores and deposits" createTestnetDeposits = "Creates validator keystores and deposits for testnet usage"
`import` = "Imports password-protected keystores interactively" `import` = "Imports password-protected keystores interactively"
# status = "Displays status information about all deposits" # status = "Displays status information about all deposits"
exit = "Submits a validator voluntary exit" exit = "Submits a validator voluntary exit"
@ -378,7 +378,7 @@ type
of deposits: of deposits:
case depositsCmd* {.command.}: DepositsCmd case depositsCmd* {.command.}: DepositsCmd
of DepositsCmd.create: of DepositsCmd.createTestnetDeposits:
totalDeposits* {. totalDeposits* {.
defaultValue: 1 defaultValue: 1
desc: "Number of deposits to generate" desc: "Number of deposits to generate"
@ -654,7 +654,7 @@ func outWalletName*(config: BeaconNodeConf): Option[WalletName] =
of WalletsCmd.list: fail() of WalletsCmd.list: fail()
of deposits: of deposits:
case config.depositsCmd case config.depositsCmd
of DepositsCmd.create: config.newWalletNameFlag of DepositsCmd.createTestnetDeposits: config.newWalletNameFlag
else: fail() else: fail()
else: else:
fail() fail()
@ -671,7 +671,7 @@ func outWalletFile*(config: BeaconNodeConf): Option[OutFile] =
of WalletsCmd.list: fail() of WalletsCmd.list: fail()
of deposits: of deposits:
case config.depositsCmd case config.depositsCmd
of DepositsCmd.create: config.newWalletFileFlag of DepositsCmd.createTestnetDeposits: config.newWalletFileFlag
else: fail() else: fail()
else: else:
fail() fail()

View File

@ -1751,7 +1751,10 @@ proc findWalletWithoutErrors(config: BeaconNodeConf,
proc doDeposits(config: BeaconNodeConf, rng: var BrHmacDrbgContext) {. proc doDeposits(config: BeaconNodeConf, rng: var BrHmacDrbgContext) {.
raises: [Defect, CatchableError].} = raises: [Defect, CatchableError].} =
case config.depositsCmd case config.depositsCmd
of DepositsCmd.create: of DepositsCmd.createTestnetDeposits:
if config.eth2Network.isNone:
fatal "Please specify the intended testnet for the deposits"
quit 1
let metadata = config.loadEth2Network() let metadata = config.loadEth2Network()
var seed: KeySeed var seed: KeySeed
defer: burnMem(seed) defer: burnMem(seed)

View File

@ -65,7 +65,7 @@ if [ "$ETH1_PRIVATE_KEY" != "" ]; then
echo "Done: $DEPOSIT_CONTRACT_ADDRESS" echo "Done: $DEPOSIT_CONTRACT_ADDRESS"
fi fi
echo "Building a local nimbus_beacon_node instance for 'deposits create' and 'createTestnet'" echo "Building a local nimbus_beacon_node instance for 'deposits createTestnetDeposits' and 'createTestnet'"
make -j2 NIMFLAGS="-d:testnet_servers_image ${NETWORK_NIM_FLAGS}" nimbus_beacon_node nimbus_signing_process process_dashboard make -j2 NIMFLAGS="-d:testnet_servers_image ${NETWORK_NIM_FLAGS}" nimbus_beacon_node nimbus_signing_process process_dashboard
echo "Generating Grafana dashboards for remote testnet servers" echo "Generating Grafana dashboards for remote testnet servers"
@ -83,7 +83,7 @@ echo "Building Docker image..."
# in docker/Makefile, and are enabled by default. # in docker/Makefile, and are enabled by default.
make build make build
../build/nimbus_beacon_node deposits create \ ../build/nimbus_beacon_node deposits createTestnetDeposits \
--count=$TOTAL_VALIDATORS \ --count=$TOTAL_VALIDATORS \
--out-validators-dir="$VALIDATORS_DIR_ABS" \ --out-validators-dir="$VALIDATORS_DIR_ABS" \
--out-secrets-dir="$SECRETS_DIR_ABS" \ --out-secrets-dir="$SECRETS_DIR_ABS" \

View File

@ -1 +1 @@
deposits create --network=spadina --new-wallet-file=build/data/shared_spadina_0/wallet.json --out-validators-dir=build/data/shared_spadina_0/validators --out-secrets-dir=build/data/shared_spadina_0/secrets --out-deposits-file=spadina-deposits_data-20201001212925.json --count=1 deposits createTestnetDeposits --network=spadina --new-wallet-file=build/data/shared_spadina_0/wallet.json --out-validators-dir=build/data/shared_spadina_0/validators --out-secrets-dir=build/data/shared_spadina_0/secrets --out-deposits-file=spadina-deposits_data-20201001212925.json --count=1