From 40fdf848761fc79aeaa879c317d4f8bc166d3901 Mon Sep 17 00:00:00 2001 From: Marina Polubelova Date: Wed, 11 Jun 2025 11:19:52 +0200 Subject: [PATCH 1/6] Proto/Client: make consensus key and companion key as args of register as delegate --- .../client_proto_context_commands.ml | 232 ++++++------------ 1 file changed, 75 insertions(+), 157 deletions(-) diff --git a/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml b/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml index 2f6093225520..808f516928dc 100644 --- a/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml +++ b/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml @@ -2320,138 +2320,86 @@ let commands_rw () = command ~group ~desc:"Register the public key hash as a delegate." - (args4 fee_arg dry_run_switch verbose_signing_switch fee_parameter_args) - (prefixes ["register"; "key"] - @@ Public_key_hash.source_param ~name:"mgr" ~desc:"the delegate key" - @@ prefixes ["as"; "delegate"] - @@ stop) - (fun (fee, dry_run, verbose_signing, fee_parameter) src_pkh cctxt -> - let open Lwt_result_syntax in - let* _, src_pk, src_sk = Client_keys.get_key cctxt src_pkh in - let*! r = - register_as_delegate - cctxt - ~chain:cctxt#chain - ~block:cctxt#block - ?confirmations:cctxt#confirmations - ~dry_run - ~fee_parameter - ~verbose_signing - ?fee - ~manager_sk:src_sk - src_pk - in - match r with - | Ok _ -> return_unit - | Error - [ - Environment.Ecoproto_error - Delegate_storage.Contract.Active_delegate; - ] -> - let*! () = cctxt#message "Delegate already activated." in - return_unit - | Error el -> Lwt.return_error el); - command - ~group - ~desc:"Register the public key hash as a delegate with a consensus key." - (args5 + (args8 fee_arg dry_run_switch verbose_signing_switch fee_parameter_args - consensus_key_pop_arg) + (Public_key.source_arg + ~long:"consensus-key" + ~placeholder:"consensus_key" + ~doc:"Register the consensus key for the delegate" + ()) + (Public_key.source_arg + ~long:"companion-key" + ~placeholder:"companion_key" + ~doc:"Register the companion key for the delegate" + ()) + consensus_key_pop_arg + companion_key_pop_arg) (prefixes ["register"; "key"] @@ Public_key_hash.source_param ~name:"mgr" ~desc:"the delegate key" - @@ prefixes ["as"; "delegate"; "with"; "consensus"; "key"] - @@ Public_key.source_param ~name:"key" ~desc:"the consensus key" + @@ prefixes ["as"; "delegate"] @@ stop) - (fun (fee, dry_run, verbose_signing, fee_parameter, consensus_key_pop) + (fun ( fee, + dry_run, + verbose_signing, + fee_parameter, + consensus_key, + companion_key, + consensus_key_pop, + companion_key_pop ) src_pkh - (name_pk, public_key) cctxt -> let open Lwt_result_syntax in let* _, src_pk, src_sk = Client_keys.get_key cctxt src_pkh in let* consensus_keys = - let* public_key = - match public_key with - | Some pk -> return pk - | None -> Client_keys.public_key name_pk - in - let* pop_material = - match consensus_key_pop with - | Some pop -> return_some @@ Either.left pop - | None -> ( - match public_key with - | Bls _ -> - let pkh = Signature.Public_key.hash public_key in - let* _, _, secret_key_uri = Client_keys.get_key cctxt pkh in - return_some @@ Either.right secret_key_uri - | _ -> return_none) - in - return (public_key, pop_material) - in - let*! r = - register_as_delegate - cctxt - ~chain:cctxt#chain - ~block:cctxt#block - ?confirmations:cctxt#confirmations - ~dry_run - ~fee_parameter - ~verbose_signing - ?fee - ~manager_sk:src_sk - ~consensus_keys - src_pk + match consensus_key with + | None -> return None + | Some (name_pk_consensus, public_key_consensus) -> + let* public_key = + match public_key_consensus with + | Some pk -> return pk + | None -> Client_keys.public_key name_pk_consensus + in + let* pop_material = + match consensus_key_pop with + | Some pop -> return_some @@ Either.left pop + | None -> ( + match public_key with + | Bls _ -> + let pkh = Signature.Public_key.hash public_key in + let* _, _, secret_key_uri = + Client_keys.get_key cctxt pkh + in + return_some @@ Either.right secret_key_uri + | _ -> return_none) + in + return @@ Some (public_key, pop_material) in - match r with - | Ok _ -> return_unit - | Error - [ - Environment.Ecoproto_error - Delegate_storage.Contract.Active_delegate; - ] -> - let*! () = cctxt#message "Delegate already activated." in - return_unit - | Error el -> Lwt.return_error el); - command - ~group - ~desc:"Register the public key hash as a delegate with a companion key." - (args5 - fee_arg - dry_run_switch - verbose_signing_switch - fee_parameter_args - companion_key_pop_arg) - (prefixes ["register"; "key"] - @@ Public_key_hash.source_param ~name:"mgr" ~desc:"the delegate key" - @@ prefixes ["as"; "delegate"; "with"; "companion"; "key"] - @@ Public_key.source_param ~name:"key" ~desc:"the companion key" - @@ stop) - (fun (fee, dry_run, verbose_signing, fee_parameter, companion_key_pop) - src_pkh - (name_pk, public_key) - cctxt -> - let open Lwt_result_syntax in - let* _, src_pk, src_sk = Client_keys.get_key cctxt src_pkh in let* companion_keys = - let* public_key = - match public_key with - | Some pk -> return pk - | None -> Client_keys.public_key name_pk - in - let* pop_material = - match companion_key_pop with - | Some pop -> return_some @@ Either.left pop - | None -> ( - match public_key with - | Bls _ -> - let pkh = Signature.Public_key.hash public_key in - let* _, _, secret_key_uri = Client_keys.get_key cctxt pkh in - return_some @@ Either.right secret_key_uri - | _ -> return_none) - in - return (public_key, pop_material) + match companion_key with + | None -> return None + | Some (name_pk_companion, public_key_companion) -> + let* public_key = + match public_key_companion with + | Some pk -> return pk + | None -> Client_keys.public_key name_pk_companion + in + let* pop_material = + match companion_key_pop with + | Some pop -> return_some @@ Either.left pop + | None -> ( + match public_key with + | Bls _ -> + let pkh = Signature.Public_key.hash public_key in + let* _, _, secret_key_uri = + Client_keys.get_key cctxt pkh + in + return_some @@ Either.right secret_key_uri + | _ -> return_none) + in + return @@ Some (public_key, pop_material) in let*! r = register_as_delegate @@ -2464,7 +2412,8 @@ let commands_rw () = ~verbose_signing ?fee ~manager_sk:src_sk - ~companion_keys + ?consensus_keys + ?companion_keys src_pk in match r with @@ -2479,40 +2428,29 @@ let commands_rw () = | Error el -> Lwt.return_error el); command ~group - ~desc: - "Register the public key hash as a delegate with a consensus and a \ - companion key." - (args6 + ~desc:"Register the public key hash as a delegate with a consensus key." + (args5 fee_arg dry_run_switch verbose_signing_switch fee_parameter_args - consensus_key_pop_arg - companion_key_pop_arg) + consensus_key_pop_arg) (prefixes ["register"; "key"] @@ Public_key_hash.source_param ~name:"mgr" ~desc:"the delegate key" @@ prefixes ["as"; "delegate"; "with"; "consensus"; "key"] @@ Public_key.source_param ~name:"key" ~desc:"the consensus key" - @@ prefixes ["and"; "companion"; "key"] - @@ Public_key.source_param ~name:"key" ~desc:"the companion key" @@ stop) - (fun ( fee, - dry_run, - verbose_signing, - fee_parameter, - consensus_key_pop, - companion_key_pop ) + (fun (fee, dry_run, verbose_signing, fee_parameter, consensus_key_pop) src_pkh - (name_pk_consensus, public_key_consensus) - (name_pk_companion, public_key_companion) + (name_pk, public_key) cctxt -> let open Lwt_result_syntax in let* _, src_pk, src_sk = Client_keys.get_key cctxt src_pkh in let* consensus_keys = let* public_key = - match public_key_consensus with + match public_key with | Some pk -> return pk - | None -> Client_keys.public_key name_pk_consensus + | None -> Client_keys.public_key name_pk in let* pop_material = match consensus_key_pop with @@ -2527,25 +2465,6 @@ let commands_rw () = in return (public_key, pop_material) in - let* companion_keys = - let* public_key = - match public_key_companion with - | Some pk -> return pk - | None -> Client_keys.public_key name_pk_companion - in - let* pop_material = - match companion_key_pop with - | Some pop -> return_some @@ Either.left pop - | None -> ( - match public_key with - | Bls _ -> - let pkh = Signature.Public_key.hash public_key in - let* _, _, secret_key_uri = Client_keys.get_key cctxt pkh in - return_some @@ Either.right secret_key_uri - | _ -> return_none) - in - return (public_key, pop_material) - in let*! r = register_as_delegate cctxt @@ -2558,7 +2477,6 @@ let commands_rw () = ?fee ~manager_sk:src_sk ~consensus_keys - ~companion_keys src_pk in match r with -- GitLab From ca9d683118f0a8d43209e4d962184a784f736973 Mon Sep 17 00:00:00 2001 From: Marina Polubelova Date: Wed, 11 Jun 2025 11:24:29 +0200 Subject: [PATCH 2/6] 023_PtSEouLo/Proto/Client: make consensus key and companion key as args of register as delegate Porting to proto 023_PtSEouLo 042236955cee6071d6b91217b9e6f8f6688289a4 - Proto/Client: make consensus key and companion key as args of register as delegate --- .../client_proto_context_commands.ml | 232 ++++++------------ 1 file changed, 75 insertions(+), 157 deletions(-) diff --git a/src/proto_023_PtSEouLo/lib_client_commands/client_proto_context_commands.ml b/src/proto_023_PtSEouLo/lib_client_commands/client_proto_context_commands.ml index 2f6093225520..808f516928dc 100644 --- a/src/proto_023_PtSEouLo/lib_client_commands/client_proto_context_commands.ml +++ b/src/proto_023_PtSEouLo/lib_client_commands/client_proto_context_commands.ml @@ -2320,138 +2320,86 @@ let commands_rw () = command ~group ~desc:"Register the public key hash as a delegate." - (args4 fee_arg dry_run_switch verbose_signing_switch fee_parameter_args) - (prefixes ["register"; "key"] - @@ Public_key_hash.source_param ~name:"mgr" ~desc:"the delegate key" - @@ prefixes ["as"; "delegate"] - @@ stop) - (fun (fee, dry_run, verbose_signing, fee_parameter) src_pkh cctxt -> - let open Lwt_result_syntax in - let* _, src_pk, src_sk = Client_keys.get_key cctxt src_pkh in - let*! r = - register_as_delegate - cctxt - ~chain:cctxt#chain - ~block:cctxt#block - ?confirmations:cctxt#confirmations - ~dry_run - ~fee_parameter - ~verbose_signing - ?fee - ~manager_sk:src_sk - src_pk - in - match r with - | Ok _ -> return_unit - | Error - [ - Environment.Ecoproto_error - Delegate_storage.Contract.Active_delegate; - ] -> - let*! () = cctxt#message "Delegate already activated." in - return_unit - | Error el -> Lwt.return_error el); - command - ~group - ~desc:"Register the public key hash as a delegate with a consensus key." - (args5 + (args8 fee_arg dry_run_switch verbose_signing_switch fee_parameter_args - consensus_key_pop_arg) + (Public_key.source_arg + ~long:"consensus-key" + ~placeholder:"consensus_key" + ~doc:"Register the consensus key for the delegate" + ()) + (Public_key.source_arg + ~long:"companion-key" + ~placeholder:"companion_key" + ~doc:"Register the companion key for the delegate" + ()) + consensus_key_pop_arg + companion_key_pop_arg) (prefixes ["register"; "key"] @@ Public_key_hash.source_param ~name:"mgr" ~desc:"the delegate key" - @@ prefixes ["as"; "delegate"; "with"; "consensus"; "key"] - @@ Public_key.source_param ~name:"key" ~desc:"the consensus key" + @@ prefixes ["as"; "delegate"] @@ stop) - (fun (fee, dry_run, verbose_signing, fee_parameter, consensus_key_pop) + (fun ( fee, + dry_run, + verbose_signing, + fee_parameter, + consensus_key, + companion_key, + consensus_key_pop, + companion_key_pop ) src_pkh - (name_pk, public_key) cctxt -> let open Lwt_result_syntax in let* _, src_pk, src_sk = Client_keys.get_key cctxt src_pkh in let* consensus_keys = - let* public_key = - match public_key with - | Some pk -> return pk - | None -> Client_keys.public_key name_pk - in - let* pop_material = - match consensus_key_pop with - | Some pop -> return_some @@ Either.left pop - | None -> ( - match public_key with - | Bls _ -> - let pkh = Signature.Public_key.hash public_key in - let* _, _, secret_key_uri = Client_keys.get_key cctxt pkh in - return_some @@ Either.right secret_key_uri - | _ -> return_none) - in - return (public_key, pop_material) - in - let*! r = - register_as_delegate - cctxt - ~chain:cctxt#chain - ~block:cctxt#block - ?confirmations:cctxt#confirmations - ~dry_run - ~fee_parameter - ~verbose_signing - ?fee - ~manager_sk:src_sk - ~consensus_keys - src_pk + match consensus_key with + | None -> return None + | Some (name_pk_consensus, public_key_consensus) -> + let* public_key = + match public_key_consensus with + | Some pk -> return pk + | None -> Client_keys.public_key name_pk_consensus + in + let* pop_material = + match consensus_key_pop with + | Some pop -> return_some @@ Either.left pop + | None -> ( + match public_key with + | Bls _ -> + let pkh = Signature.Public_key.hash public_key in + let* _, _, secret_key_uri = + Client_keys.get_key cctxt pkh + in + return_some @@ Either.right secret_key_uri + | _ -> return_none) + in + return @@ Some (public_key, pop_material) in - match r with - | Ok _ -> return_unit - | Error - [ - Environment.Ecoproto_error - Delegate_storage.Contract.Active_delegate; - ] -> - let*! () = cctxt#message "Delegate already activated." in - return_unit - | Error el -> Lwt.return_error el); - command - ~group - ~desc:"Register the public key hash as a delegate with a companion key." - (args5 - fee_arg - dry_run_switch - verbose_signing_switch - fee_parameter_args - companion_key_pop_arg) - (prefixes ["register"; "key"] - @@ Public_key_hash.source_param ~name:"mgr" ~desc:"the delegate key" - @@ prefixes ["as"; "delegate"; "with"; "companion"; "key"] - @@ Public_key.source_param ~name:"key" ~desc:"the companion key" - @@ stop) - (fun (fee, dry_run, verbose_signing, fee_parameter, companion_key_pop) - src_pkh - (name_pk, public_key) - cctxt -> - let open Lwt_result_syntax in - let* _, src_pk, src_sk = Client_keys.get_key cctxt src_pkh in let* companion_keys = - let* public_key = - match public_key with - | Some pk -> return pk - | None -> Client_keys.public_key name_pk - in - let* pop_material = - match companion_key_pop with - | Some pop -> return_some @@ Either.left pop - | None -> ( - match public_key with - | Bls _ -> - let pkh = Signature.Public_key.hash public_key in - let* _, _, secret_key_uri = Client_keys.get_key cctxt pkh in - return_some @@ Either.right secret_key_uri - | _ -> return_none) - in - return (public_key, pop_material) + match companion_key with + | None -> return None + | Some (name_pk_companion, public_key_companion) -> + let* public_key = + match public_key_companion with + | Some pk -> return pk + | None -> Client_keys.public_key name_pk_companion + in + let* pop_material = + match companion_key_pop with + | Some pop -> return_some @@ Either.left pop + | None -> ( + match public_key with + | Bls _ -> + let pkh = Signature.Public_key.hash public_key in + let* _, _, secret_key_uri = + Client_keys.get_key cctxt pkh + in + return_some @@ Either.right secret_key_uri + | _ -> return_none) + in + return @@ Some (public_key, pop_material) in let*! r = register_as_delegate @@ -2464,7 +2412,8 @@ let commands_rw () = ~verbose_signing ?fee ~manager_sk:src_sk - ~companion_keys + ?consensus_keys + ?companion_keys src_pk in match r with @@ -2479,40 +2428,29 @@ let commands_rw () = | Error el -> Lwt.return_error el); command ~group - ~desc: - "Register the public key hash as a delegate with a consensus and a \ - companion key." - (args6 + ~desc:"Register the public key hash as a delegate with a consensus key." + (args5 fee_arg dry_run_switch verbose_signing_switch fee_parameter_args - consensus_key_pop_arg - companion_key_pop_arg) + consensus_key_pop_arg) (prefixes ["register"; "key"] @@ Public_key_hash.source_param ~name:"mgr" ~desc:"the delegate key" @@ prefixes ["as"; "delegate"; "with"; "consensus"; "key"] @@ Public_key.source_param ~name:"key" ~desc:"the consensus key" - @@ prefixes ["and"; "companion"; "key"] - @@ Public_key.source_param ~name:"key" ~desc:"the companion key" @@ stop) - (fun ( fee, - dry_run, - verbose_signing, - fee_parameter, - consensus_key_pop, - companion_key_pop ) + (fun (fee, dry_run, verbose_signing, fee_parameter, consensus_key_pop) src_pkh - (name_pk_consensus, public_key_consensus) - (name_pk_companion, public_key_companion) + (name_pk, public_key) cctxt -> let open Lwt_result_syntax in let* _, src_pk, src_sk = Client_keys.get_key cctxt src_pkh in let* consensus_keys = let* public_key = - match public_key_consensus with + match public_key with | Some pk -> return pk - | None -> Client_keys.public_key name_pk_consensus + | None -> Client_keys.public_key name_pk in let* pop_material = match consensus_key_pop with @@ -2527,25 +2465,6 @@ let commands_rw () = in return (public_key, pop_material) in - let* companion_keys = - let* public_key = - match public_key_companion with - | Some pk -> return pk - | None -> Client_keys.public_key name_pk_companion - in - let* pop_material = - match companion_key_pop with - | Some pop -> return_some @@ Either.left pop - | None -> ( - match public_key with - | Bls _ -> - let pkh = Signature.Public_key.hash public_key in - let* _, _, secret_key_uri = Client_keys.get_key cctxt pkh in - return_some @@ Either.right secret_key_uri - | _ -> return_none) - in - return (public_key, pop_material) - in let*! r = register_as_delegate cctxt @@ -2558,7 +2477,6 @@ let commands_rw () = ?fee ~manager_sk:src_sk ~consensus_keys - ~companion_keys src_pk in match r with -- GitLab From f72d967788de17dbd65fb89575eae1dad667c1f9 Mon Sep 17 00:00:00 2001 From: Marina Polubelova Date: Wed, 11 Jun 2025 11:25:09 +0200 Subject: [PATCH 3/6] Tezt/Client: update client command for register as delegate --- tezt/lib_tezos/client.ml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tezt/lib_tezos/client.ml b/tezt/lib_tezos/client.ml index 4520439c2756..88f4c2162d0f 100644 --- a/tezt/lib_tezos/client.ml +++ b/tezt/lib_tezos/client.ml @@ -3209,9 +3209,8 @@ let spawn_register_key ?hooks ?consensus ?companion owner client = match (consensus, companion) with | None, None -> [] | Some pk, None -> ["with"; "consensus"; "key"; pk] - | None, Some pk -> ["with"; "companion"; "key"; pk] - | Some pk1, Some pk2 -> - ["with"; "consensus"; "key"; pk1; "and"; "companion"; "key"; pk2]) + | None, Some pk -> ["--companion-key"; pk] + | Some pk1, Some pk2 -> ["--consensus-key"; pk1; "--companion-key"; pk2]) let register_key ?hooks ?expect_failure ?consensus ?companion owner client = spawn_register_key ?hooks ?consensus ?companion owner client -- GitLab From dcfb12da296c475cd1d7e7818609c9ea85045767 Mon Sep 17 00:00:00 2001 From: Marina Polubelova Date: Wed, 11 Jun 2025 11:25:51 +0200 Subject: [PATCH 4/6] Tezt/Tests: reset regressions --- .../Alpha- Test register with consensus key.out | 2 +- .../S023-- Test register with consensus key.out | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tezt/tests/expected/consensus_key.ml/Alpha- Test register with consensus key.out b/tezt/tests/expected/consensus_key.ml/Alpha- Test register with consensus key.out index 2c036306d1e0..e2a2b478db36 100644 --- a/tezt/tests/expected/consensus_key.ml/Alpha- Test register with consensus key.out +++ b/tezt/tests/expected/consensus_key.ml/Alpha- Test register with consensus key.out @@ -2,7 +2,7 @@ ./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' { "balance": "0", "counter": "1" } -./octez-client --wait none register key dummy_account_0 as delegate with consensus key dummy_account_1 and companion key dummy_account_2 +./octez-client --wait none register key dummy_account_0 as delegate --consensus-key dummy_account_1 --companion-key dummy_account_2 Node is bootstrapped. Estimated gas: 178.785 units (will add 0 for safety) Estimated storage: no bytes added diff --git a/tezt/tests/expected/consensus_key.ml/S023-- Test register with consensus key.out b/tezt/tests/expected/consensus_key.ml/S023-- Test register with consensus key.out index 2c036306d1e0..e2a2b478db36 100644 --- a/tezt/tests/expected/consensus_key.ml/S023-- Test register with consensus key.out +++ b/tezt/tests/expected/consensus_key.ml/S023-- Test register with consensus key.out @@ -2,7 +2,7 @@ ./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]' { "balance": "0", "counter": "1" } -./octez-client --wait none register key dummy_account_0 as delegate with consensus key dummy_account_1 and companion key dummy_account_2 +./octez-client --wait none register key dummy_account_0 as delegate --consensus-key dummy_account_1 --companion-key dummy_account_2 Node is bootstrapped. Estimated gas: 178.785 units (will add 0 for safety) Estimated storage: no bytes added -- GitLab From 160d766741cb1310fad91a8b4b016a8091e9e506 Mon Sep 17 00:00:00 2001 From: Marina Polubelova Date: Fri, 13 Jun 2025 11:56:31 +0200 Subject: [PATCH 5/6] Changelog: add an entry for consensus-key and companion-key args --- CHANGES.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 7bae38461f97..339d91e52a4e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -87,12 +87,11 @@ Client - Add a new command ``threshold bls signatures`` to recover a BLS threshold signature. (MR :gl:`!17467`) -- Added ``octez-client register key as delegate with companion key ``, - and ``octez-client register key as delegate with consensus key and companion key ``, - setting a companion key at the same time as registering a given key as a delegate. - (MR :gl:`!17960`) +- Added ``--consensus-key`` and ``--companion-key`` arguments setting + companion or consensus key at the same time as registering a given + key as a delegate. (MRs :gl:`!17960`, :gl:`!18317`) -- Added ``--consensus-key-pop`` and ``--companion-key-pop`` argument when updating +- Added ``--consensus-key-pop`` and ``--companion-key-pop`` arguments when updating bls consensus or companion key. These argument allow to provide a pre-computed proof of possession for the bls key instead of asking the client to compute it. (MR :gl:`!18084`) -- GitLab From 1f96a9c57a43ad2958080ee95f4d7cf27b086767 Mon Sep 17 00:00:00 2001 From: Marina Polubelova Date: Fri, 13 Jun 2025 12:01:08 +0200 Subject: [PATCH 6/6] doc: update client commands for companion keys --- docs/user/key-management.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/user/key-management.rst b/docs/user/key-management.rst index 53ebdacef22f..7ad919ee28b2 100644 --- a/docs/user/key-management.rst +++ b/docs/user/key-management.rst @@ -384,13 +384,13 @@ Since a companion key has to be a tz4, this command will also create a proof of A companion key takes the same amount of time as a consensus key to become activated, which is up to ``CONSENSUS_KEY_ACTIVATION_DELAY + 1`` cycles (see :ref:`cs_constants`). -Alternatively, like for consensus keys, it is possible to register a companion key when registering as a delegate:: +Alternatively, it is possible to register a companion key when registering as a delegate:: - octez-client register key as delegate with companion key + octez-client register key as delegate --companion-key It is even possible to register both a consensus key and a companion key, with the following command:: - octez-client register key as delegate with consensus key and companion key + octez-client register key as delegate --consensus-key --companion-key .. _activate_fundraiser_account: -- GitLab