Skip to content

Commit

Permalink
Fix local testnet to generate keys in the correct folders (#4752)
Browse files Browse the repository at this point in the history
Fix local testnet to generate keys in the correct folders when `BN_COUNT` and `VC_COUNT` don't match.

The current script place the generated validator keys in validator folders based on the `BN_COUNT` config, e.g. `node_1/validators`, `node_2/validators`..etc. We should be using `VC_COUNT` here instead, otherwise the number of validator clients may not match the number of directories generated, and would result in either:
1. a VC not having any keys  (when `BN_COUNT` < `VC_COUNT`)
2. a validator key directory not being used (when `BN_COUNT` > `VC_COUNT`).
  • Loading branch information
jimmygchen committed Sep 21, 2023
1 parent f9a3c00 commit fe3bd03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/local_testnet/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ lcli \
insecure-validators \
--count $VALIDATOR_COUNT \
--base-dir $DATADIR \
--node-count $BN_COUNT
--node-count $VC_COUNT

echo Validators generated with keystore passwords at $DATADIR.

0 comments on commit fe3bd03

Please sign in to comment.