mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-23 06:44:35 +00:00
Add missing event in PendingComponent span and clean up sync logs (#8033)
I was looking into some long `PendingComponents` span and noticed the block event wasn't added to the span, so it wasn't possible to see when the block was added from the trace view, this PR fixes this. <img width="637" height="430" alt="image" src="https://github.com/user-attachments/assets/65040b1c-11e7-43ac-951b-bdfb34b665fb" /> Additionally I've noticed a lot of noises and confusion in sync logs due to the initial`peer_id` being included as part of the syncing chain span, causing all logs under the span to have that `peer_id`, which may not be accurate for some sync logs, I've removed `peer_id` from the `SyncingChain` span, and also cleaned up a bunch of spans to use `%` (display) for slots and epochs to make logs easier to read. Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
This commit is contained in:
@@ -2061,7 +2061,7 @@ impl BlockBlobError for GossipDataColumnError {
|
||||
/// and `Cow::Borrowed(state)` will be returned. Otherwise, the state will be cloned, cheaply
|
||||
/// advanced and then returned as a `Cow::Owned`. The end result is that the given `state` is never
|
||||
/// mutated to be invalid (in fact, it is never changed beyond a simple committee cache build).
|
||||
#[instrument(skip(state, spec), level = "debug")]
|
||||
#[instrument(skip_all, fields(?state_root_opt, %block_slot), level = "debug")]
|
||||
pub fn cheap_state_advance_to_obtain_committees<'a, E: EthSpec, Err: BlockBlobError>(
|
||||
state: &'a mut BeaconState<E>,
|
||||
state_root_opt: Option<Hash256>,
|
||||
|
||||
@@ -666,11 +666,13 @@ impl<T: BeaconChainTypes> DataAvailabilityCheckerInner<T> {
|
||||
None
|
||||
};
|
||||
|
||||
debug!(
|
||||
component = "block",
|
||||
status = pending_components.status_str(num_expected_columns_opt),
|
||||
"Component added to data availability checker"
|
||||
);
|
||||
pending_components.span.in_scope(|| {
|
||||
debug!(
|
||||
component = "block",
|
||||
status = pending_components.status_str(num_expected_columns_opt),
|
||||
"Component added to data availability checker"
|
||||
);
|
||||
});
|
||||
|
||||
self.check_availability_and_cache_components(
|
||||
block_root,
|
||||
|
||||
Reference in New Issue
Block a user