From 8d2363740d7e8df9aca44bbbea835edd39c123dd Mon Sep 17 00:00:00 2001 From: Albin Coquereau Date: Thu, 11 Jul 2024 11:50:55 +0200 Subject: [PATCH 1/3] alpha/baker: remove deprecated (pre)endorse for commands --- .../lib_delegate/baking_commands.ml | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/src/proto_alpha/lib_delegate/baking_commands.ml b/src/proto_alpha/lib_delegate/baking_commands.ml index 033f49198187..15178b08ab14 100644 --- a/src/proto_alpha/lib_delegate/baking_commands.ml +++ b/src/proto_alpha/lib_delegate/baking_commands.ml @@ -453,16 +453,6 @@ let delegate_commands () : Protocol_client_context.full Tezos_clic.command list (fun force pkhs cctxt -> let* delegates = get_delegates cctxt pkhs in Baking_lib.attest ~force cctxt delegates); - command - ~group - ~desc: - "Deprecated, use **attest for** instead. Forge and inject an \ - attestation operation." - (args1 attestation_force_switch_arg) - (prefixes ["endorse"; "for"] @@ sources_param) - (fun force pkhs cctxt -> - let* delegates = get_delegates cctxt pkhs in - Baking_lib.attest ~force cctxt delegates); command ~group ~desc:"Forge and inject a preattestation operation." @@ -471,16 +461,6 @@ let delegate_commands () : Protocol_client_context.full Tezos_clic.command list (fun force pkhs cctxt -> let* delegates = get_delegates cctxt pkhs in Baking_lib.preattest ~force cctxt delegates); - command - ~group - ~desc: - "Deprecated, use **preattest for** instead. Forge and inject a \ - preattestation operation." - (args1 attestation_force_switch_arg) - (prefixes ["preendorse"; "for"] @@ sources_param) - (fun force pkhs cctxt -> - let* delegates = get_delegates cctxt pkhs in - Baking_lib.preattest ~force cctxt delegates); command ~group ~desc:"Send a Tenderbake proposal" -- GitLab From fe887fa06379610129fbd27e6bf6bd9f01cfcd44 Mon Sep 17 00:00:00 2001 From: Albin Coquereau Date: Thu, 11 Jul 2024 11:53:35 +0200 Subject: [PATCH 2/3] tezt/lib_tezos: remove (pre)endorse for command usage --- tezt/lib_tezos/client.ml | 19 ++++--------------- tezt/lib_tezos/client.mli | 6 ++---- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/tezt/lib_tezos/client.ml b/tezt/lib_tezos/client.ml index b3a6c847d0b0..afc8141d7270 100644 --- a/tezt/lib_tezos/client.ml +++ b/tezt/lib_tezos/client.ml @@ -906,30 +906,19 @@ let bake_until_level ~target_level ?keys ?node client = (* Handle attesting and preattesting similarly *) type tenderbake_action = Preattest | Attest | Propose -let tenderbake_action_to_string ~use_legacy_attestation_name = function - | Preattest -> - if use_legacy_attestation_name then "preendorse" else "preattest" - | Attest -> if use_legacy_attestation_name then "endorse" else "attest" +let tenderbake_action_to_string = function + | Preattest -> "preattest" + | Attest -> "attest" | Propose -> "propose" let spawn_tenderbake_action_for ~tenderbake_action ?endpoint ?protocol ?(key = [Constant.bootstrap1.alias]) ?(minimal_timestamp = false) ?(force = false) client = - let use_legacy_attestation_name = - match protocol with - | None -> false - | Some protocol -> Protocol.(number protocol < 018) - in spawn_command ?endpoint client (optional_arg "protocol" Protocol.hash protocol - @ [ - tenderbake_action_to_string - ~use_legacy_attestation_name - tenderbake_action; - "for"; - ] + @ [tenderbake_action_to_string tenderbake_action; "for"] @ key @ (if minimal_timestamp then ["--minimal-timestamp"] else []) @ if force then ["--force"] else []) diff --git a/tezt/lib_tezos/client.mli b/tezt/lib_tezos/client.mli index cb7b01b1fe79..2a7ffef63308 100644 --- a/tezt/lib_tezos/client.mli +++ b/tezt/lib_tezos/client.mli @@ -671,8 +671,7 @@ val bake_until_cycle : val bake_until_cycle_end : target_cycle:int -> ?keys:string list -> ?node:Node.t -> t -> unit Lwt.t -(** Run [octez-client attest for]. Run [octez-client endorse for] for protocol - older than 018. +(** Run [octez-client attest for]. Default [key] is {!Constant.bootstrap1.alias}. *) val attest_for : @@ -692,8 +691,7 @@ val spawn_attest_for : t -> Process.t -(** Run [octez-client preattest for]. Run [octez-client preendorse for] for - protocol older than 018. +(** Run [octez-client preattest for]. Default [key] is {!Constant.bootstrap1.alias}. *) val preattest_for : -- GitLab From 94f597ded14e7cd2eeaf74cadb25385ebd712cc2 Mon Sep 17 00:00:00 2001 From: Albin Coquereau Date: Thu, 11 Jul 2024 11:59:25 +0200 Subject: [PATCH 3/3] changes: add entry for (pre)endorse deprecated commands removal --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 5f5a27af5754..771af57d5992 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -109,6 +109,9 @@ Baker parent block. This is done to avoid having consensus operation branched on block that are not part of the canonical chain anymore.(MR :gl:`!13619`) +- Remove ``preendorse for`` and ``endorse for`` deprecated commands from baker. + (MR :gl:`!14096`) + Accuser ------- -- GitLab