Skip to content

Conversation

eserilev
Copy link
Member

@eserilev eserilev commented Oct 2, 2025

Currently we have to manually pass spans across threads (i.e. during spawn_blocking_handle invocations). This PR ensures that the current span is always passed across threads for:

  • spawn_blocking_handle
  • spawn_blocking_with_rayon_async
  • spawn_blocking_with_rayon

If there is no current span, nothing will happen

@eserilev eserilev added work-in-progress PR is a work-in-progress code-quality ready-for-review The code is ready for review and removed work-in-progress PR is a work-in-progress labels Oct 2, 2025
Copy link

mergify bot commented Oct 7, 2025

Some required checks have failed. Could you please take a look @eserilev? 🙏

@mergify mergify bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Oct 7, 2025
@eserilev eserilev force-pushed the pass-spans-into-blocking-handles branch from 96975a7 to 1943507 Compare October 7, 2025 23:40

/// Fork choice root spans
pub const SPAN_RECOMPUTE_HEAD: &str = "recompute_head_at_slot";
pub const SPAN_RECOMPUTE_HEAD: &str = "recompute_head_at_slot_internal";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I can delete this


// Filter uninteresting blocks from the chain segment in a blocking task.
let chain = self.clone();
let filter_chain_segment = debug_span!("filter_chain_segment");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if there's a parent span here, might need to keep the debug_span!

@eserilev eserilev added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant