diff --git a/src/lib_dal_node/block_handler.ml b/src/lib_dal_node/block_handler.ml index c82db241c6e081d0030b82381e5cf1e192380a13..e935a5a246669250785cdf8d40bbf3d4ffc0cf31 100644 --- a/src/lib_dal_node/block_handler.ml +++ b/src/lib_dal_node/block_handler.ml @@ -389,6 +389,9 @@ let process_block_data ctxt cctxt store proto_parameters block_level (* If a slot header was posted to the L1 and we have the corresponding data, post it to gossipsub. Note that this is done independently of the profile. *) + let level_committee = Node_context.fetch_committee ctxt in + let slot_size = proto_parameters.cryptobox_parameters.slot_size in + let gs_worker = Node_context.get_gs_worker ctxt in List.iter_es (fun Dal_plugin.{slot_index; commitment; published_level} -> let slot_id : Types.slot_id = @@ -396,9 +399,9 @@ let process_block_data ctxt cctxt store proto_parameters block_level in Slot_manager.publish_slot_data ctxt - ~level_committee:(Node_context.fetch_committee ctxt) - ~slot_size:proto_parameters.cryptobox_parameters.slot_size - (Node_context.get_gs_worker ctxt) + ~level_committee + ~slot_size + gs_worker proto_parameters commitment slot_id) diff --git a/src/lib_dal_node/slot_manager.ml b/src/lib_dal_node/slot_manager.ml index 25a2f075388a2924e135a76ea7a08fa0beafecd9..68e5dc974f7545f86e22f13a574389d1cbb7a463 100644 --- a/src/lib_dal_node/slot_manager.ml +++ b/src/lib_dal_node/slot_manager.ml @@ -347,12 +347,23 @@ let publish_slot_data ctxt ~level_committee ~slot_size gs_worker let cache = Store.cache node_store in match Store.Commitment_indexed_cache.find_opt cache commitment with | None -> - (* This is unexpected. Either: - 1. The proofs where not stored properly (an invariant is broken) - 2. The node was restarted (unlikely to happen given the time frame) - 3. The cache was full (unlikely to happen if - [shards_proofs_cache_size] is set properly. *) - let*! () = Event.emit_commitment_not_found_in_cache ~commitment in + let*! () = + if + Profile_manager.can_publish_on_slot_index + slot_id.Types.Slot_id.slot_index + (Node_context.get_profile_ctxt ctxt) + then + (* This is unexpected. Either: + 1. The proofs where not stored properly (an invariant is broken) + 2. The node was restarted (unlikely to happen given the time frame) + 3. The cache was full (unlikely to happen if + [shards_proofs_cache_size] is set properly. *) + Event.emit_commitment_not_found_in_cache ~commitment + else + (* The node is likely not concerned with the publication of the shards + of this commit. *) + Lwt.return_unit + in return_unit | Some (slot, shares, shard_proofs) -> let shards =