-
Notifications
You must be signed in to change notification settings - Fork 98
Added bls-proof-of-possession cli option to blockchain changeWeight command #2759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… PUBKEY can be added via args
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currently it is possible to avoid the node to have open http api, CLI asks for pop on
change weight, and remove validator asks for node id or receive it from flags (remove validator does not use bls info).
but change weight was not having a flag for pop, which this PR adds
cmd/blockchaincmd/change_weight.go
Outdated
@@ -64,6 +64,8 @@ The L1 has to be a Proof of Authority L1.`, | |||
cmd.Flags().Uint64Var(&newWeight, "weight", 0, "set the new staking weight of the validator") | |||
cmd.Flags().BoolVarP(&useEwoq, "ewoq", "e", false, "use ewoq key [fuji/devnet only]") | |||
cmd.Flags().StringVar(&nodeIDStr, "node-id", "", "node-id of the validator") | |||
cmd.Flags().StringVar(&publicKey, "bls-public-key", "", "set the BLS public key of the validator to add") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is anyway overwritten during the flow. not needed as it is taken from PChain
cmd/blockchaincmd/change_weight.go
Outdated
@@ -64,6 +64,8 @@ The L1 has to be a Proof of Authority L1.`, | |||
cmd.Flags().Uint64Var(&newWeight, "weight", 0, "set the new staking weight of the validator") | |||
cmd.Flags().BoolVarP(&useEwoq, "ewoq", "e", false, "use ewoq key [fuji/devnet only]") | |||
cmd.Flags().StringVar(&nodeIDStr, "node-id", "", "node-id of the validator") | |||
cmd.Flags().StringVar(&publicKey, "bls-public-key", "", "set the BLS public key of the validator to add") | |||
cmd.Flags().StringVar(&pop, "bls-proof-of-possession", "", "set the BLS proof of possession of the validator to add") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls change the description to something related to the change weight command, eg "BLS proof of possession of the validator that is to change weight"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls change the description to something related to the change weight command, eg "BLS proof of possession of the validator that is to change weight"
@@ -68,6 +68,8 @@ these prompts by providing the values with flags.`, | |||
cmd.Flags().BoolVarP(&useLedger, "ledger", "g", false, "use ledger instead of key (always true on mainnet, defaults to false on fuji)") | |||
cmd.Flags().StringSliceVar(&ledgerAddresses, "ledger-addrs", []string{}, "use the given ledger addresses") | |||
cmd.Flags().StringVar(&nodeIDStr, "node-id", "", "node-id of the validator") | |||
cmd.Flags().StringVar(&publicKey, "bls-public-key", "", "set the BLS public key of the validator to add") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this command does not use this variables at all
… only need pop flag
I removed unnecessary change in removeValidator and also removed public key options so only pop is added to changeWeight command. Also updated PR title and description to properly reflect code changes. |
Please also consider #2759 (comment) |
I changed the description so it is compatible with node-id description. |
avalanche blockchain changeWeight added option to bls proof of possession via cli arg.
Why this should be merged
It allows to automatically execute command without the additional prompt.
How this works
How this was tested
I have performed a rebalancing of testnet environment for the client with single 100 weight node and rebalanced to 5 validator nodes all of weight 100 by using addValidator, changeWeight and removeValidator.
How is this documented
The fixes are trivial so no additional documentation is needed.