From 4f871262929f64b68c91754f9fd2d61ccbd8d73d Mon Sep 17 00:00:00 2001 From: Albin Coquereau Date: Thu, 11 Jul 2024 12:31:05 +0200 Subject: [PATCH 1/4] bin_client: fix bash-completion to pass shell-check --- scripts/shellcheck_skips | 1 - src/bin_client/bash-completion.sh | 20 +++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/scripts/shellcheck_skips b/scripts/shellcheck_skips index a0d064ec0594..2a74c933032e 100644 --- a/scripts/shellcheck_skips +++ b/scripts/shellcheck_skips @@ -1,5 +1,4 @@ src/bin_snoop/bash-completion.sh -src/bin_client/bash-completion.sh src/bin_client/octez-init-sandboxed-client.sh src/lib_bls12_381/libblst/build.sh src/lib_bls12_381/libblst/build/refresh.sh diff --git a/src/bin_client/bash-completion.sh b/src/bin_client/bash-completion.sh index 8edc3be16a29..89f2b6e56c91 100755 --- a/src/bin_client/bash-completion.sh +++ b/src/bin_client/bash-completion.sh @@ -1,5 +1,7 @@ +#!/usr/bin/env bash + _octez-client_complete() { - local cur_word prev_word type_list + local cur_word prev_word cur_word="${COMP_WORDS[COMP_CWORD]}" prev_word="${COMP_WORDS[COMP_CWORD - 1]}" @@ -7,9 +9,9 @@ _octez-client_complete() { # Tezos script script=${COMP_WORDS[0]} - reply=$($script bash_autocomplete "$prev_word" "$cur_word" ${COMP_WORDS[@]} 2> /dev/null) + reply=$($script bash_autocomplete "$prev_word" "$cur_word" "${COMP_WORDS[@]}" 2> /dev/null) - COMPREPLY=($(compgen -W "$reply" -- $cur_word)) + COMPREPLY=("$(compgen -W "$reply" -- "$cur_word")") return 0 } @@ -20,16 +22,16 @@ _tezos-alphanet_complete() { cur_word="${COMP_WORDS[COMP_CWORD]}" case "$second" in container) - COMPREPLY=($(compgen -W "start stop status" -- $cur_word)) + COMPREPLY=("$(compgen -W "start stop status" -- "$cur_word")") ;; node) - COMPREPLY=($(compgen -W "start stop status log" -- $cur_word)) + COMPREPLY=("$(compgen -W "start stop status log" -- "$cur_word")") ;; baker) - COMPREPLY=($(compgen -W "start stop status log" -- $cur_word)) + COMPREPLY=("$(compgen -W "start stop status log" -- "$cur_word")") ;; endorser) - COMPREPLY=($(compgen -W "start stop status log" -- $cur_word)) + COMPREPLY=("$(compgen -W "start stop status log" -- "$cur_word")") ;; client) ;; # prev_word="${COMP_WORDS[COMP_CWORD-1]}" @@ -38,10 +40,10 @@ _tezos-alphanet_complete() { # reply=$($script client bash_autocomplete "$prev_word" "$cur_word" ${COMP_WORDS[@]:1}) # COMPREPLY=$($(compgen -W "$reply" -- $cur_word));; *) - COMPREPLY=($(compgen -W "start restart \ + COMPREPLY=("$(compgen -W "start restart \ clear status stop kill head \ go_alpha_go shell client check_script update_script \ - container node baker endorser" -- $cur_word)) + container node baker endorser" -- "$cur_word")") ;; esac return 0 -- GitLab From 153dda72cfa400ed4d0990e8c87135dcfd33826b Mon Sep 17 00:00:00 2001 From: Albin Coquereau Date: Thu, 11 Jul 2024 12:16:39 +0200 Subject: [PATCH 2/4] remove mention of the endorser --- src/bin_client/bash-completion.sh | 5 +---- src/lib_client_base/client_confirmations.mli | 2 +- src/proto_alpha/README.md | 4 ++-- src/proto_beta/README.md | 4 ++-- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/bin_client/bash-completion.sh b/src/bin_client/bash-completion.sh index 89f2b6e56c91..3edbc98c1663 100755 --- a/src/bin_client/bash-completion.sh +++ b/src/bin_client/bash-completion.sh @@ -30,9 +30,6 @@ _tezos-alphanet_complete() { baker) COMPREPLY=("$(compgen -W "start stop status log" -- "$cur_word")") ;; - endorser) - COMPREPLY=("$(compgen -W "start stop status log" -- "$cur_word")") - ;; client) ;; # prev_word="${COMP_WORDS[COMP_CWORD-1]}" # unset COMP_WORDS[0] @@ -43,7 +40,7 @@ _tezos-alphanet_complete() { COMPREPLY=("$(compgen -W "start restart \ clear status stop kill head \ go_alpha_go shell client check_script update_script \ - container node baker endorser" -- "$cur_word")") + container node baker" -- "$cur_word")") ;; esac return 0 diff --git a/src/lib_client_base/client_confirmations.mli b/src/lib_client_base/client_confirmations.mli index 725f2288c44a..159c98fb2a80 100644 --- a/src/lib_client_base/client_confirmations.mli +++ b/src/lib_client_base/client_confirmations.mli @@ -52,7 +52,7 @@ val lookup_operation_in_previous_blocks : Function [retry] specifies how to behave in order to connect to the node. The default is the identity which correspond to simply - calling the RPC. As an example, the endorser tries 5 times with + calling the RPC. As an example, the baker tries 5 times with delays in between attempts when the connection fails. *) val wait_for_bootstrapped : ?retry: diff --git a/src/proto_alpha/README.md b/src/proto_alpha/README.md index cebbc9f27340..ab7e4c388ded 100644 --- a/src/proto_alpha/README.md +++ b/src/proto_alpha/README.md @@ -42,14 +42,14 @@ For a high-level overview of the Tezos economic protocol implementation (in the ### Other components The rest of the implementation is structured in the following subdirectories: -- `bin_accuser/`, `bin_baker/`, and `bin_endorser/`: these directories implement protocol-specific binaries for bakers and other nodes actively participating in the economic protocol. +- `bin_accuser/` and `bin_baker/`: these directories implement protocol-specific binaries for bakers and other nodes actively participating in the economic protocol. - `lib_client/`, `lib_client_commands/`, `lib_client_sapling/` These directories contain the protocol-specific parts of the client. + `lib_client` contains many wrappers around RPC calls from the protocol and the RPC plugin, and also the client part of the Michelson runtime (mostly macro expansion, location translation, and pretty-printing of errors). + `lib_client_commands` contains the command definitions using CLIC. + `lib_client_sapling` is the Sapling part of the client. -- `lib_delegate/`: this directory contains code that is used by node "clients" (the client, the baker, the endorser, the accuser) to interact with the economic protocol and to implement consensus related tasks (like baking). +- `lib_delegate/`: this directory contains code that is used by node "clients" (the client, the baker, the accuser) to interact with the economic protocol and to implement consensus related tasks (like baking). - `lib_parameters/`: this directory defines the global constants that the protocol is instantiated with. - `lib_plugin/` diff --git a/src/proto_beta/README.md b/src/proto_beta/README.md index d106dcd118ef..207847b235aa 100644 --- a/src/proto_beta/README.md +++ b/src/proto_beta/README.md @@ -42,14 +42,14 @@ For a high-level overview of the Tezos economic protocol implementation (in the ### Other components The rest of the implementation is structured in the following subdirectories: -- `bin_accuser/`, `bin_baker/`, and `bin_endorser/`: these directories implement protocol-specific binaries for bakers and other nodes actively participating in the economic protocol. +- `bin_accuser/` and `bin_baker/`: these directories implement protocol-specific binaries for bakers and other nodes actively participating in the economic protocol. - `lib_client/`, `lib_client_commands/`, `lib_client_sapling/` These directories contain the protocol-specific parts of the client. + `lib_client` contains many wrappers around RPC calls from the protocol and the RPC plugin, and also the client part of the Michelson runtime (mostly macro expansion, location translation, and pretty-printing of errors). + `lib_client_commands` contains the command definitions using CLIC. + `lib_client_sapling` is the Sapling part of the client. -- `lib_delegate/`: this directory contains code that is used by node "clients" (the client, the baker, the endorser, the accuser) to interact with the economic protocol and to implement consensus related tasks (like baking). +- `lib_delegate/`: this directory contains code that is used by node "clients" (the client, the baker, the accuser) to interact with the economic protocol and to implement consensus related tasks (like baking). - `lib_parameters/`: this directory defines the global constants that the protocol is instantiated with. - `lib_plugin/` -- GitLab From 9f73a93eb4daff262c644b6c1e360b74f1b692a3 Mon Sep 17 00:00:00 2001 From: Albin Coquereau Date: Thu, 11 Jul 2024 12:34:31 +0200 Subject: [PATCH 3/4] remove endorsement mention in comments --- src/lib_shell_services/preapply_result.mli | 2 +- src/lib_smart_rollup_node/protocol_plugin_sig.ml | 4 ++-- src/lib_store/unix/test/alpha_utils.ml | 2 -- src/proto_alpha/lib_client/injection.ml | 2 +- src/proto_beta/lib_client/injection.ml | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/lib_shell_services/preapply_result.mli b/src/lib_shell_services/preapply_result.mli index 0ae05104776b..a22ba741f9b5 100644 --- a/src/lib_shell_services/preapply_result.mli +++ b/src/lib_shell_services/preapply_result.mli @@ -29,7 +29,7 @@ type 'error t = { refused : (Operation.t * 'error list) Operation_hash.Map.t; (** Refused operations, for example because of an invalid signature *) outdated : (Operation.t * 'error list) Operation_hash.Map.t; - (** Outdated operations, for example a late endorsement *) + (** Outdated operations, for example a late attestation *) branch_refused : (Operation.t * 'error list) Operation_hash.Map.t; (** Branch refused operations, for example because of insufficient balance *) branch_delayed : (Operation.t * 'error list) Operation_hash.Map.t; diff --git a/src/lib_smart_rollup_node/protocol_plugin_sig.ml b/src/lib_smart_rollup_node/protocol_plugin_sig.ml index c88b6256e68c..1feaa80c1781 100644 --- a/src/lib_smart_rollup_node/protocol_plugin_sig.ml +++ b/src/lib_smart_rollup_node/protocol_plugin_sig.ml @@ -33,12 +33,12 @@ module type RPC_DIRECTORY = sig (unit * Rollup_node_services.Arg.block_id) Tezos_rpc.Directory.t end -(** Protocol specific functions to track endorsed DAL slots of L1 blocks. *) +(** Protocol specific functions to track attested DAL slots of L1 blocks. *) module type DAL_SLOTS_TRACKER = sig (** [process_head node_ctxt head] performs the following operations for a given protocol: {ul - {li it reads the endorsements for headers published attestation_lag + {li it reads the attestations for headers published attestation_lag levels preceding [head] from the block metadata, determines which ones the rollup node will download, and stores the results in [Store.Dal_confirmed_slots].} diff --git a/src/lib_store/unix/test/alpha_utils.ml b/src/lib_store/unix/test/alpha_utils.ml index 990242f0e3a6..0bb2165d0b12 100644 --- a/src/lib_store/unix/test/alpha_utils.ml +++ b/src/lib_store/unix/test/alpha_utils.ml @@ -247,8 +247,6 @@ let dispatch_policy rpc_ctxt = function let get_next_baker chain_store ?(policy = By_round 0) = dispatch_policy chain_store policy -let get_endorsing_power _chain_store _b = 0 - module Forge = struct type header = { baker : public_key_hash; diff --git a/src/proto_alpha/lib_client/injection.ml b/src/proto_alpha/lib_client/injection.ml index 8ee944c6907a..2cd1e3948871 100644 --- a/src/proto_alpha/lib_client/injection.ml +++ b/src/proto_alpha/lib_client/injection.ml @@ -251,7 +251,7 @@ let preapply (type t) (cctxt : #Protocol_client_context.full) ~chain ~block | Some src_sk -> let watermark = match contents with - (* TODO-TB sign endorsement? *) + (* TODO-TB sign attestation? *) | _ -> Signature.Generic_operation in let*! () = diff --git a/src/proto_beta/lib_client/injection.ml b/src/proto_beta/lib_client/injection.ml index 8ee944c6907a..2cd1e3948871 100644 --- a/src/proto_beta/lib_client/injection.ml +++ b/src/proto_beta/lib_client/injection.ml @@ -251,7 +251,7 @@ let preapply (type t) (cctxt : #Protocol_client_context.full) ~chain ~block | Some src_sk -> let watermark = match contents with - (* TODO-TB sign endorsement? *) + (* TODO-TB sign attestation? *) | _ -> Signature.Generic_operation in let*! () = -- GitLab From d48c8b439ef6c8ec8b25652829120a225557ce01 Mon Sep 17 00:00:00 2001 From: Albin Coquereau Date: Mon, 22 Jul 2024 11:27:44 +0200 Subject: [PATCH 4/4] docs: remove endorsement mention in the docs --- docs/alpha/adaptive_issuance.rst | 2 +- docs/beta/adaptive_issuance.rst | 2 +- docs/introduction/breaking_changes.rst | 62 ++------------------------ 3 files changed, 5 insertions(+), 61 deletions(-) diff --git a/docs/alpha/adaptive_issuance.rst b/docs/alpha/adaptive_issuance.rst index 0139e8ab544e..76bc20fc0792 100644 --- a/docs/alpha/adaptive_issuance.rst +++ b/docs/alpha/adaptive_issuance.rst @@ -282,7 +282,7 @@ Reward weights The weights for participation rewards are defined as: -- Attestation (formerly, endorsing) rewards: 10,240. +- Attestation rewards: 10,240. - Fixed baking reward: 5,120. - Bonus baking reward: 5,120. - Nonce revelation tip: 1. diff --git a/docs/beta/adaptive_issuance.rst b/docs/beta/adaptive_issuance.rst index 2fc6ccdfaf90..183a6444ca33 100644 --- a/docs/beta/adaptive_issuance.rst +++ b/docs/beta/adaptive_issuance.rst @@ -315,7 +315,7 @@ Reward weights The Adaptive-Issuance/Staking proposal defines the weights for participation rewards as: -- Attestation (formerly, endorsing) rewards: 10,240. +- Attestation rewards: 10,240. - Fixed baking reward: 5,120. - Bonus baking reward: 5,120. - Nonce revelation tip: 1. diff --git a/docs/introduction/breaking_changes.rst b/docs/introduction/breaking_changes.rst index aa01c35401bd..036b19d1682c 100644 --- a/docs/introduction/breaking_changes.rst +++ b/docs/introduction/breaking_changes.rst @@ -17,65 +17,9 @@ In the particular case of RPC changes, you may consult complementary information Attestations ------------ -Starting with the Oxford protocol proposal and the Octez -``v19`` the legacy attestation name ``endorsement`` is now deprecated and -``attestation`` should be used everywhere. Then, ``preendorsement`` is renamed -to ``preattestation``, ``double_preendorsement_evidence`` to -``double_preattestation_evidence``, and ``double_endorsement_evidence`` to -``double_attestation_evidence``. The same goes for operation receipts such as -``lost endorsing rewards``, which are renamed to ``lost attesting rewards``. - -To allow a smooth transition we implemented a deprecation mechanism that will -start with Oxford and Octez ``v19`` and should end in two protocols and two -Octez releases. We were not able to version everything so some changes, detailed -below, are breaking. - -Deprecation -~~~~~~~~~~~ - -For the Oxford and Octez ``v19`` we introduced a new :doc:`version argument -<../introduction/versioning>` ``?version=`` for the following RPCs that can output -``attestation`` (and legacy ``endorsement``): - -* ``POST /chains//blocks//helpers/scripts/run_operation`` -* ``POST /chains//blocks//helpers/scripts/simulate_operation`` -* ``POST /chains//blocks//helpers/preapply/operations`` -* ``POST /chains//blocks//helpers/parse/operations`` -* ``GET /chains//blocks/`` -* ``GET /chains//blocks//operations`` -* ``GET /chains//blocks//operations/`` -* ``GET /chains//blocks//operations//`` -* ``GET /chains//blocks//metadata`` -* ``GET /chains//mempool/monitor_operations`` -* ``GET /chains//mempool/pending_operations`` - -See :doc:`changelog<../CHANGES>` for more details. - -For protocol ``O`` and version ``v19``, using the version ``0``, which is the -default value, will still output the legacy attestation name. Version ``1`` -allows the RPCs to output ``attestation`` instead of the legacy name. - -For a protocol upgrade proposal to succeed Oxford, i.e. for protocol ``P``, and -the next major release of Octez, ``v20.0``, the default value of these RPCs will be -``1`` but the version ``0`` will still be usable. - -Version ``0`` and support for legacy name ("endorsement") will be removed in the -subsequent protocol and major Octez versions -- that is, protocol upgrade -proposal ``Q`` and Octez ``v21.0`` - -As an exception, for the ``GET /chains//mempool/pending_operations`` RPC, -in protocol ``O`` and version ``v19`, due to previous versioning of this RPC, -the legacy version is already ``1`` (currently the default) and you should use -version ``2`` to output ``attestation``. - -Breaking changes -~~~~~~~~~~~~~~~~ - -Starting with protocol Oxford, the protocol -parameters, storage fields and errors that were using the legacy attestation -name now use ``attestation``. The baker and accuser will no longer use the -legacy attestation name in their event messages and errors and will use -``attestation`` instead. +Support for deprecated attestation legacy name ("endorsement"), that was still +usable with RPCs version ``0`` will be removed in the protocol proposal ``Q`` +and Octez ``v21.0``. Opam packages ------------- -- GitLab