You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In charon create cluster, the number of validators to add is a critical decision the user should make. Defaulting to 1 doesn't mean that the user actually wants 1 validator, especially if they then provide 4 addresses.
🛠️ Proposed solution
Remove the --num-validators default value and error if 0, requesting the user explicitly provide the value.
🧪 Tests
Tested by new automated unit/integration/smoke tests
Manually tested on core team/canary/test clusters
Manually tested on local compose simnet
The text was updated successfully, but these errors were encountered:
This PR refactors `create cluster` logic to make it slightly simpler.
New behaviors:
- if `--split-existing-keys` is enabled, `--num-validators` cannot be set
- `--num-validators` must be present unless `--split-existing-keys` is enabled, otherwise `create cluster` exits with error
- split key generation and disk read
- don't fill in with random keys when splitting: during `--split-existing-keys` before this PR, if the user specified a `--num-validators` greater than the amount of keys contained in `--split-keys-dir` Charon would fill in the blanks with random keys
- if definition file validator amount and `--num-validators` don't match, the creation process stops
category: refactor
ticket: #2341
🎯 Problem to be solved
Users do not understand how default values of flags work, see https://discord.com/channels/849256203614945310/1084021363406274560/1120691357766398003.
In
charon create cluster
, the number of validators to add is a critical decision the user should make. Defaulting to 1 doesn't mean that the user actually wants 1 validator, especially if they then provide 4 addresses.🛠️ Proposed solution
Remove the
--num-validators
default value and error if 0, requesting the user explicitly provide the value.🧪 Tests
The text was updated successfully, but these errors were encountered: