Added bls-proof-of-possession cli option to blockchain changeWeight command#2759
Added bls-proof-of-possession cli option to blockchain changeWeight command#2759digithrone wants to merge 3 commits intoava-labs:mainfrom
Conversation
… PUBKEY can be added via args
There was a problem hiding this comment.
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
| 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.
this is anyway overwritten during the flow. not needed as it is taken from PChain
cmd/blockchaincmd/change_weight.go
Outdated
| 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.
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.
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"
| 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.
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. |
|
Thank you for the contribution! We've included your change in #2994 with a minor typo fix ("possession" instead of "possesion"). Appreciate you taking the time to contribute! |
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.