mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +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:
@@ -610,7 +610,7 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
parent = None,
|
||||
level = "debug",
|
||||
skip_all,
|
||||
fields(slot = ?column_sidecar.slot(), block_root = ?column_sidecar.block_root(), index = column_sidecar.index),
|
||||
fields(slot = %column_sidecar.slot(), block_root = ?column_sidecar.block_root(), index = column_sidecar.index),
|
||||
)]
|
||||
pub async fn process_gossip_data_column_sidecar(
|
||||
self: &Arc<Self>,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use beacon_chain::block_verification_types::RpcBlock;
|
||||
use derivative::Derivative;
|
||||
use lighthouse_network::PeerId;
|
||||
use lighthouse_network::rpc::methods::BlocksByRangeRequest;
|
||||
use lighthouse_network::service::api_types::Id;
|
||||
@@ -96,7 +97,8 @@ pub enum BatchProcessingResult {
|
||||
NonFaultyFailure,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Derivative)]
|
||||
#[derivative(Debug)]
|
||||
/// A segment of a chain.
|
||||
pub struct BatchInfo<E: EthSpec, B: BatchConfig = RangeSyncBatchConfig> {
|
||||
/// Start slot of the batch.
|
||||
@@ -114,6 +116,7 @@ pub struct BatchInfo<E: EthSpec, B: BatchConfig = RangeSyncBatchConfig> {
|
||||
/// Whether this batch contains all blocks or all blocks and blobs.
|
||||
batch_type: ByRangeRequestType,
|
||||
/// Pin the generic
|
||||
#[derivative(Debug = "ignore")]
|
||||
marker: std::marker::PhantomData<B>,
|
||||
}
|
||||
|
||||
|
||||
@@ -131,8 +131,14 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
|
||||
name = SPAN_SYNCING_CHAIN,
|
||||
parent = None,
|
||||
level="debug",
|
||||
skip(id),
|
||||
fields(chain_id = %id)
|
||||
skip_all,
|
||||
fields(
|
||||
chain_id = %id,
|
||||
start_epoch = %start_epoch,
|
||||
target_head_slot = %target_head_slot,
|
||||
target_head_root = %target_head_root,
|
||||
chain_type = ?chain_type,
|
||||
)
|
||||
)]
|
||||
pub fn new(
|
||||
id: Id,
|
||||
|
||||
Reference in New Issue
Block a user