diff --git a/CHANGES.rst b/CHANGES.rst index 8924dcd34caad2b6499e5bb187761ea83ecaf747..ac2815c4e13e54334041ded75d4d332d754e3cc6 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -186,7 +186,6 @@ DAL node - Fixed file descriptor leak in resto affecting connections to the L1 node. (MR :gl:`!15322`) - - **Breaking change** The baker daemon ``--dal-node-timeout-percentage`` argument has been removed. (MR :gl:`!15554`) @@ -197,5 +196,11 @@ Protocol is not valid when the feature flag for DAL incentives is turned off. (MR :gl:`!15677`) +Baker +~~~~~ + +- Emit event at Notice level when the delegate is not in the DAL committee, that + is, it has no assigned shards at the current level. (:gl:`!15846`) + Miscellaneous ------------- diff --git a/src/proto_020_PsParisC/lib_delegate/baking_actions.ml b/src/proto_020_PsParisC/lib_delegate/baking_actions.ml index f81e10cdec8734e4094bb4f35c782b5a157d62e0..7da52063ad067a508bb517be1e11f448898c7692 100644 --- a/src/proto_020_PsParisC/lib_delegate/baking_actions.ml +++ b/src/proto_020_PsParisC/lib_delegate/baking_actions.ml @@ -474,7 +474,9 @@ let process_dal_rpc_result state delegate level round = return_none | `RPC_result (Ok res) -> ( match res with - | Tezos_dal_node_services.Types.Not_in_committee -> return_none + | Tezos_dal_node_services.Types.Not_in_committee -> + let*! () = Events.(emit not_in_dal_committee (delegate, level)) in + return_none | Attestable_slots {slots; published_level} -> let number_of_slots = state.global_state.constants.parametric.dal.number_of_slots diff --git a/src/proto_020_PsParisC/lib_delegate/baking_events.ml b/src/proto_020_PsParisC/lib_delegate/baking_events.ml index 3e1a0306847910d0d765f51202a1f0f13288397b..54cf06abf989827863d2eca19458a272d58892a2 100644 --- a/src/proto_020_PsParisC/lib_delegate/baking_events.ml +++ b/src/proto_020_PsParisC/lib_delegate/baking_events.ml @@ -885,6 +885,15 @@ module Actions = struct issue." () + let not_in_dal_committee = + declare_2 + ~section + ~name:"not_in_dal_committee" + ~level:Notice + ~msg:"{delegate} has no assigned DAL shards at level {attestation_level}" + ("delegate", Signature.Public_key_hash.encoding) + ("attestation_level", Data_encoding.int32) + let synchronizing_round = declare_1 ~section diff --git a/src/proto_021_PsQuebec/lib_delegate/baking_actions.ml b/src/proto_021_PsQuebec/lib_delegate/baking_actions.ml index d544ced05ab4f47d87aa12cbdf6f1fa41fdc0334..90cbfa113784a0ad5de50a3057b5a8387a8fe65e 100644 --- a/src/proto_021_PsQuebec/lib_delegate/baking_actions.ml +++ b/src/proto_021_PsQuebec/lib_delegate/baking_actions.ml @@ -476,7 +476,9 @@ let process_dal_rpc_result state delegate level round = return_none | `RPC_result (Ok res) -> ( match res with - | Tezos_dal_node_services.Types.Not_in_committee -> return_none + | Tezos_dal_node_services.Types.Not_in_committee -> + let*! () = Events.(emit not_in_dal_committee (delegate, level)) in + return_none | Attestable_slots {slots; published_level} -> let number_of_slots = state.global_state.constants.parametric.dal.number_of_slots diff --git a/src/proto_021_PsQuebec/lib_delegate/baking_events.ml b/src/proto_021_PsQuebec/lib_delegate/baking_events.ml index b6098d68c87b82d36586b63458f0b3b856d4fb22..334fc83fefaef060364a520737422ba4bce743f5 100644 --- a/src/proto_021_PsQuebec/lib_delegate/baking_events.ml +++ b/src/proto_021_PsQuebec/lib_delegate/baking_events.ml @@ -885,6 +885,15 @@ module Actions = struct issue." () + let not_in_dal_committee = + declare_2 + ~section + ~name:"not_in_dal_committee" + ~level:Notice + ~msg:"{delegate} has no assigned DAL shards at level {attestation_level}" + ("delegate", Signature.Public_key_hash.encoding) + ("attestation_level", Data_encoding.int32) + let synchronizing_round = declare_1 ~section diff --git a/src/proto_alpha/lib_delegate/baking_actions.ml b/src/proto_alpha/lib_delegate/baking_actions.ml index 617def10e474ee566bd51bb375d1d34dd7aa1187..a141ef812d428cfea2a6eef946b96532cff13278 100644 --- a/src/proto_alpha/lib_delegate/baking_actions.ml +++ b/src/proto_alpha/lib_delegate/baking_actions.ml @@ -484,7 +484,9 @@ let process_dal_rpc_result state delegate level round = return_none | `RPC_result (Ok res) -> ( match res with - | Tezos_dal_node_services.Types.Not_in_committee -> return_none + | Tezos_dal_node_services.Types.Not_in_committee -> + let*! () = Events.(emit not_in_dal_committee (delegate, level)) in + return_none | Attestable_slots {slots; published_level} -> let number_of_slots = state.global_state.constants.parametric.dal.number_of_slots diff --git a/src/proto_alpha/lib_delegate/baking_events.ml b/src/proto_alpha/lib_delegate/baking_events.ml index b6098d68c87b82d36586b63458f0b3b856d4fb22..fde49c5171c22400ca39e27d737c7e8ebab673a6 100644 --- a/src/proto_alpha/lib_delegate/baking_events.ml +++ b/src/proto_alpha/lib_delegate/baking_events.ml @@ -875,15 +875,14 @@ module Actions = struct ("attestation_level", Data_encoding.int32) ("round", Round.encoding) - let warning_dal_timeout_old_round = - declare_0 + let not_in_dal_committee = + declare_2 ~section - ~name:"warning_dal_timeout_old_round" - ~level:Warning - ~msg: - "The DAL timeout computed was for an old round. Please report this \ - issue." - () + ~name:"not_in_dal_committee" + ~level:Notice + ~msg:"{delegate} has no assigned DAL shards at level {attestation_level}" + ("delegate", Signature.Public_key_hash.encoding) + ("attestation_level", Data_encoding.int32) let synchronizing_round = declare_1