From b69645dae11a527bc8bcbdb4954b860a33d1a8e2 Mon Sep 17 00:00:00 2001 From: Eugen Zalinescu Date: Tue, 27 May 2025 15:22:40 +0200 Subject: [PATCH 1/2] DAL/Node: supress event about commitment not found in cache --- src/lib_dal_node/event.ml | 12 ------------ src/lib_dal_node/slot_manager.ml | 22 ++++------------------ 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/src/lib_dal_node/event.ml b/src/lib_dal_node/event.ml index d2cc0d4f2040..e108d9c20740 100644 --- a/src/lib_dal_node/event.ml +++ b/src/lib_dal_node/event.ml @@ -1008,15 +1008,6 @@ open struct ~level:Notice () - let commitment_not_found_in_cache = - declare_1 - ~section - ~prefix_name_with_section:true - ~name:"commitment_not_found_in_cache" - ~msg:"commitment {commitment} was not found in the cache" - ~level:Warning - ("commitment", Cryptobox.Commitment.encoding) - let slot_from_http_backup_has_unexpected_size = declare_5 ~section @@ -1353,6 +1344,3 @@ let emit_start_catchup ~start_level ~end_level ~levels_to_clean_up = let emit_catching_up ~current_level = emit catching_up current_level let emit_end_catchup () = emit end_catchup () - -let emit_commitment_not_found_in_cache ~commitment = - emit commitment_not_found_in_cache commitment diff --git a/src/lib_dal_node/slot_manager.ml b/src/lib_dal_node/slot_manager.ml index 86450eb98b81..3e8063ac80c3 100644 --- a/src/lib_dal_node/slot_manager.ml +++ b/src/lib_dal_node/slot_manager.ml @@ -477,7 +477,7 @@ let publish_proved_shards ctxt (slot_id : Types.slot_id) ~level_committee return_unit) (** This function publishes the shards of a commitment that is waiting - for attestion on L1 if this node has those shards and their proofs + for attestation on L1 if this node has those shards and their proofs in memory. *) let publish_slot_data ctxt ~level_committee ~slot_size gs_worker proto_parameters commitment slot_id = @@ -486,23 +486,9 @@ 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 -> - 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 + (* The commitment was likely published by a different node. It would be + bad if the slot was posted on this node, and the commitment was lost; + however, this is not easy to check. *) return_unit | Some (slot, shares, shard_proofs) -> let shards = -- GitLab From 17f785cb3b9d0444f89f3bf1daa62d59065247ae Mon Sep 17 00:00:00 2001 From: Eugen Zalinescu Date: Tue, 27 May 2025 15:39:35 +0200 Subject: [PATCH 2/2] DAL/Test: also bench polynomial_to_slot --- tezt/tests/dal.ml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tezt/tests/dal.ml b/tezt/tests/dal.ml index 5796b3aeccdf..6d2f10254680 100644 --- a/tezt/tests/dal.ml +++ b/tezt/tests/dal.ml @@ -7161,6 +7161,10 @@ let dal_crypto_benchmark () = Profiler.record_f Profiler.main Debug ("polynomial from slot", []) @@ fun () -> polynomial_from_slot dal slot in + let _slot = + Profiler.record_f Profiler.main Debug ("polynomial to slot", []) + @@ fun () -> polynomial_to_slot dal polynomial + in let*? commitment = Profiler.record_f Profiler.main Debug ("commit", []) @@ fun () -> commit dal polynomial -- GitLab