Proto/Client: update register key CLI with companion and consensus keys args
This MR adds companion-key and consensus-key as arguments for the register key as delegate client command:
octez-client register key <manager_key> as delegate --consensus-key <consensus_key> --companion-key <companion_key>
instead of providing two additional client commands for setting companion keys:
octez-client register key <manager_key> as delegate with companion key <companion_key>
octez-client register key <manager_key> as delegate with consensus key <consensus_key> and companion key <companion_key>
The client command can also take proof-of-possession arguments for tz4 consensus and companion keys:
octez-client register key <manager_key> as delegate --consensus-key <consensus_key> --companion-key <companion_key> --consensus-key-pop <consensus_key_pop> --companion-key <companion_key>
Manually testing the MR
- launch sandbox and activate the alpha protocol
./src/bin_node/octez-sandboxed-node.sh 1 --connections 0
eval $(./src/bin_client/octez-init-sandboxed-client.sh 1)
octez-activate-alpha
- generate 3 keys:
main,consensusandcompanion
octez-client gen keys main
octez-client gen keys consensus -s bls
octez-client gen keys companion -s bls
octez-client list known addresses
- fund the
mainaccount
octez-client --wait none transfer 3000000 from bootstrap2 to main --burn-cap 1
octez-client bake for --minimal-timestamp
- register
mainas delegate and setconsensusas a consensus key andcompanionas a companion key
octez-client --wait none register key main as delegate --consensus-key consensus --companion-key companion
octez-client bake for --minimal-timestamp
- check that
consensusandcompanionkeys are pending keys forconsensus_keyandcompanion_keyrespectively
octez-client rpc get /chains/main/blocks/head/context/delegates/<main_pkh>
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Marina Polubelova