Baker: Add profiling for Dal_attestable_slots_worker
What
Parent MR: !19880 (merged)
Adds some profiling calls in the worker, as well as for the get_dal_attestable_slots endpoint needed by the baker.
Why
For better statistics with respect to the newly added DAL attestable_slots worker.
How
Manually testing the MR
From a tezt_cloud scenario:
get_dal_attestable_slots : tz1PQadzUQtWwVgdbDcCsUTXgxorkjcHdkYn ........ 1 11.356ms 46%
in the baker_profiling file.
And, from the dal_slots_worker_profiling:
2025-10-31T17:52:17.523-00:00
monitor_attestable_slots : tz1WbphJRn2F4JnN3Wrqc7opcTktUgHyVdhu ................ 1 1.764ms 57%
2025-10-31T17:52:17.525-00:00
consume_backfill_stream : tz1WbphJRn2F4JnN3Wrqc7opcTktUgHyVdhu ................. 1 46.078ms 13%
(at startup)
And then for each attestation_level:
attestation_level : 18 ......................................................... 1 5980.619ms 2%
update_cache_with_attestable_slot ............................................ 31 0.344ms 118%
update_streams_subscriptions ................................................. 1 0.010ms 110%
prune_cache_before ........................................................... 1 0.004ms 99%
2025-10-31T17:55:00.447-00:00
attestation_level : 19 ......................................................... 1 5998.796ms 2%
update_cache_with_attestable_slot ............................................ 32 0.382ms 119%
update_streams_subscriptions ................................................. 1 0.009ms 100%
prune_cache_before ........................................................... 1 0.004ms 124%
2025-10-31T17:55:06.446-00:00
attestation_level : 20 ......................................................... 1 6031.187ms 2%
update_cache_with_attestable_slot ............................................ 32 0.367ms 123%
update_streams_subscriptions ................................................. 1 0.010ms 100%
prune_cache_before ........................................................... 1 0.005ms 120%
(this is with Debug verbosity)
Results of the experiment are also amazing, with 100% ratios for published and attested commitments with attestation_lag = 3 (the new lowest limit we can go for with this improvement). You can find them here.
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Gabriel Moise