diff --git a/CHANGES.rst b/CHANGES.rst index bd71bf6c4d7fb9a3fdf00cbfcd696f0e6552b082..f403c6c42a4ddf454d206a75c1ade095d71c600d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -147,9 +147,14 @@ DAL node (``0.0.0.0:11733``). The new default value is ``None``, so no metrics are exported by default. - - **Breaking change** Removed the baker daemon's ``--dal-node-timeout-percentage`` argument. (MR :gl:`!15554`) +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 a93b021ec3f826eed9eb55cdad938b1b13e49c16..917dd451db2ff7330c62ad14bd3748042be94b98 100644 --- a/src/proto_020_PsParisC/lib_delegate/baking_actions.ml +++ b/src/proto_020_PsParisC/lib_delegate/baking_actions.ml @@ -425,7 +425,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 3583a81f623d38487c254de5c5adbc60a83fd148..f1e1f60cf144b702cfaa19f56650b1af2d868dd3 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 bd03a170e2ed8f8ee205e9428b33fb5abbba221f..1abeb7c18eab5666881a8436fd6c670487d1b029 100644 --- a/src/proto_021_PsQuebec/lib_delegate/baking_actions.ml +++ b/src/proto_021_PsQuebec/lib_delegate/baking_actions.ml @@ -427,7 +427,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 2af25ddcea358c49a0215d52d884ee2ba3b90c42..42c97ef65371df46cceccf57a7590c1cc4a2ccb8 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 cfc52997caa42a17301e3b7ef806821c523da727..6c909301079af1534cb71d26d5ca798b82eb9145 100644 --- a/src/proto_alpha/lib_delegate/baking_actions.ml +++ b/src/proto_alpha/lib_delegate/baking_actions.ml @@ -435,7 +435,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 2af25ddcea358c49a0215d52d884ee2ba3b90c42..42c97ef65371df46cceccf57a7590c1cc4a2ccb8 100644 --- a/src/proto_alpha/lib_delegate/baking_events.ml +++ b/src/proto_alpha/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