Instrument tracing on block production code path (#8017)

Partially #7814. Instrument block production code path.

New root spans:
* `produce_block_v3`
* `produce_block_v2`

Example traces:

<img width="518" height="432" alt="image" src="https://github.com/user-attachments/assets/a9413d25-501c-49dc-95cc-623db5988981" />


  


Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
This commit is contained in:
Jimmy Chen
2025-09-10 13:30:51 +10:00
committed by GitHub
parent 2b22903fba
commit 8a4f6cf0d5
7 changed files with 101 additions and 50 deletions

View File

@@ -523,6 +523,7 @@ where
///
/// You *must* call `get_head` for the proposal slot prior to calling this function and pass
/// in the result of `get_head` as `canonical_head`.
#[instrument(level = "debug", skip_all)]
pub fn get_proposer_head(
&self,
current_slot: Slot,

View File

@@ -26,7 +26,7 @@ impl From<ArithError> for Error {
/// If the root of the supplied `state` is known, then it can be passed as `state_root`. If
/// `state_root` is `None`, the root of `state` will be computed using a cached tree hash.
/// Providing the `state_root` makes this function several orders of magnitude faster.
#[instrument(skip_all)]
#[instrument(level = "debug", skip_all)]
pub fn per_slot_processing<E: EthSpec>(
state: &mut BeaconState<E>,
state_root: Option<Hash256>,