Skip to content

Commit 61669f2

Browse files
committed
Clarify that the deposit cretion tools are intended for testnets
1 parent 40859e4 commit 61669f2

File tree

6 files changed

+15
-12
lines changed

6 files changed

+15
-12
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ if possible.
2222

2323
* The metrics support is now compiled by default thanks to a new and more secure HTTP back-end.
2424

25-
* Command-line tools for generating keystores and JSON deposit files suitable for use with the
26-
official network launchpads.
25+
* Command-line tools for generating testnet keystores and JSON deposit files suitable for use
26+
with the official network launchpads.
2727

2828
* `setGraffiti` JSON-RPC call for modifying the graffiti bytes of the client at run-time.
2929

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ define CONNECT_TO_NETWORK_WITH_VALIDATOR_CLIENT
394394
endef
395395

396396
define MAKE_DEPOSIT_DATA
397-
build/nimbus_beacon_node deposits create \
397+
build/nimbus_beacon_node deposits createTestnetDeposits \
398398
--network=$(1) \
399399
--new-wallet-file=build/data/shared_$(1)_$(NODE_ID)/wallet.json \
400400
--out-validators-dir=build/data/shared_$(1)_$(NODE_ID)/validators \
@@ -404,7 +404,7 @@ define MAKE_DEPOSIT_DATA
404404
endef
405405

406406
define MAKE_DEPOSIT
407-
build/nimbus_beacon_node deposits create \
407+
build/nimbus_beacon_node deposits createTestnetDeposits \
408408
--network=$(1) \
409409
--out-deposits-file=nbc-$(1)-deposits.json \
410410
--new-wallet-file=build/data/shared_$(1)_$(NODE_ID)/wallet.json \

beacon_chain/conf.nim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ type
4545
list = "Lists details about all wallets"
4646

4747
DepositsCmd* {.pure.} = enum
48-
create = "Creates validator keystores and deposits"
48+
createTestnetDeposits = "Creates validator keystores and deposits for testnet usage"
4949
`import` = "Imports password-protected keystores interactively"
5050
# status = "Displays status information about all deposits"
5151
exit = "Submits a validator voluntary exit"
@@ -378,7 +378,7 @@ type
378378

379379
of deposits:
380380
case depositsCmd* {.command.}: DepositsCmd
381-
of DepositsCmd.create:
381+
of DepositsCmd.createTestnetDeposits:
382382
totalDeposits* {.
383383
defaultValue: 1
384384
desc: "Number of deposits to generate"
@@ -654,7 +654,7 @@ func outWalletName*(config: BeaconNodeConf): Option[WalletName] =
654654
of WalletsCmd.list: fail()
655655
of deposits:
656656
case config.depositsCmd
657-
of DepositsCmd.create: config.newWalletNameFlag
657+
of DepositsCmd.createTestnetDeposits: config.newWalletNameFlag
658658
else: fail()
659659
else:
660660
fail()
@@ -671,7 +671,7 @@ func outWalletFile*(config: BeaconNodeConf): Option[OutFile] =
671671
of WalletsCmd.list: fail()
672672
of deposits:
673673
case config.depositsCmd
674-
of DepositsCmd.create: config.newWalletFileFlag
674+
of DepositsCmd.createTestnetDeposits: config.newWalletFileFlag
675675
else: fail()
676676
else:
677677
fail()

beacon_chain/nimbus_beacon_node.nim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1751,7 +1751,10 @@ proc findWalletWithoutErrors(config: BeaconNodeConf,
17511751
proc doDeposits(config: BeaconNodeConf, rng: var BrHmacDrbgContext) {.
17521752
raises: [Defect, CatchableError].} =
17531753
case config.depositsCmd
1754-
of DepositsCmd.create:
1754+
of DepositsCmd.createTestnetDeposits:
1755+
if config.eth2Network.isNone:
1756+
fatal "Please specify the intended testnet for the deposits"
1757+
quit 1
17551758
let metadata = config.loadEth2Network()
17561759
var seed: KeySeed
17571760
defer: burnMem(seed)

scripts/reset_testnet.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ if [ "$ETH1_PRIVATE_KEY" != "" ]; then
6565
echo "Done: $DEPOSIT_CONTRACT_ADDRESS"
6666
fi
6767

68-
echo "Building a local nimbus_beacon_node instance for 'deposits create' and 'createTestnet'"
68+
echo "Building a local nimbus_beacon_node instance for 'deposits createTestnetDeposits' and 'createTestnet'"
6969
make -j2 NIMFLAGS="-d:testnet_servers_image ${NETWORK_NIM_FLAGS}" nimbus_beacon_node nimbus_signing_process process_dashboard
7070

7171
echo "Generating Grafana dashboards for remote testnet servers"
@@ -83,7 +83,7 @@ echo "Building Docker image..."
8383
# in docker/Makefile, and are enabled by default.
8484
make build
8585

86-
../build/nimbus_beacon_node deposits create \
86+
../build/nimbus_beacon_node deposits createTestnetDeposits \
8787
--count=$TOTAL_VALIDATORS \
8888
--out-validators-dir="$VALIDATORS_DIR_ABS" \
8989
--out-secrets-dir="$SECRETS_DIR_ABS" \
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +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
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

0 commit comments

Comments
 (0)