Remove instrumenting log level (#7636)

https://github.com/sigp/lighthouse/issues/7155


  Theres some additional places we set instrumenting log levels that wasn't covered in #7620
This commit is contained in:
Eitan Seri-Levi
2025-06-24 09:29:10 +03:00
committed by GitHub
parent fd643c310c
commit 56b2d4b525
8 changed files with 33 additions and 144 deletions

View File

@@ -439,7 +439,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// emit metrics and logs on a per-validator basis (rather than just an
/// aggregated basis).
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -450,7 +449,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Add some validators to `self` for additional monitoring.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -473,7 +471,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Add an unaggregated attestation
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -492,7 +489,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
}
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -504,7 +500,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Reads information from the given `state`. The `state` *must* be valid (i.e, able to be
/// imported).
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -622,7 +617,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Add missed non-finalized blocks for the monitored validators
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -724,7 +718,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
}
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -743,7 +736,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Process the unaggregated attestations generated by the service `attestation_simulator_service`
/// and check if the attestation qualifies for a reward matching the flags source/target/head
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -821,7 +813,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// We allow disabling tracking metrics on an individual validator basis
/// since it can result in untenable cardinality with high validator counts.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -835,7 +826,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
}
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1118,7 +1108,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
}
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1131,7 +1120,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Returns the number of validators monitored by `self`.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1142,7 +1130,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Return the `id`'s of all monitored validators.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1152,7 +1139,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
}
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1166,7 +1152,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
}
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1179,7 +1164,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
}
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1191,7 +1175,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// If `self.auto_register == true`, add the `validator_index` to `self.monitored_validators`.
/// Otherwise, do nothing.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1219,7 +1202,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Process a block received on gossip.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1236,7 +1218,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Process a block received on the HTTP API from a local validator.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1252,7 +1233,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
}
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1297,7 +1277,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Register an attestation seen on the gossip network.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1318,7 +1297,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Register an attestation seen on the HTTP API.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1338,7 +1316,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
}
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1430,7 +1407,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
}
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1554,7 +1530,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
///
/// Note: Blocks that get orphaned will skew the inclusion distance calculation.
#[instrument(parent = None,
level = "info",
name = "validator_monitor",
skip_all
)]
@@ -1634,7 +1609,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Register a sync committee message received over gossip.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1655,7 +1629,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Register a sync committee message received over the http api.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1676,7 +1649,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Register a sync committee message.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1731,7 +1703,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Register a sync committee contribution received over gossip.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1754,7 +1725,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Register a sync committee contribution received over the http api.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1777,7 +1747,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Register a sync committee contribution.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1865,7 +1834,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Register that the `sync_aggregate` was included in a *valid* `BeaconBlock`.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1908,7 +1876,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Register an exit from the gossip network.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1919,7 +1886,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Register an exit from the HTTP API.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1930,7 +1896,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Register an exit included in a *valid* beacon block.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1940,7 +1905,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
}
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1969,7 +1933,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Register a proposer slashing from the gossip network.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1980,7 +1943,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Register a proposer slashing from the HTTP API.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -1991,7 +1953,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Register a proposer slashing included in a *valid* `BeaconBlock`.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -2001,7 +1962,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
}
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -2040,7 +2000,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Register an attester slashing from the gossip network.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -2051,7 +2010,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Register an attester slashing from the HTTP API.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -2062,7 +2020,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
/// Register an attester slashing included in a *valid* `BeaconBlock`.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -2072,7 +2029,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
}
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all
@@ -2119,7 +2075,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
///
/// Should be called whenever Prometheus is scraping Lighthouse.
#[instrument(parent = None,
level = "info",
fields(service = "validator_monitor"),
name = "validator_monitor",
skip_all

View File

@@ -228,7 +228,6 @@ impl<T: BeaconChainTypes> SubnetService<T> {
/// This returns a result simply for the ergonomics of using ?. The result can be
/// safely dropped.
#[instrument(parent = None,
level = "info",
fields(service = "subnet_service"),
name = "subnet_service",
skip_all
@@ -368,7 +367,6 @@ impl<T: BeaconChainTypes> SubnetService<T> {
/// Checks if we have subscribed aggregate validators for the subnet. If not, checks the gossip
/// verification, re-propagates and returns false.
#[instrument(parent = None,
level = "info",
fields(service = "subnet_service"),
name = "subnet_service",
skip_all
@@ -398,7 +396,6 @@ impl<T: BeaconChainTypes> SubnetService<T> {
/// Adds an event to the event queue and notifies that this service is ready to be polled
/// again.
#[instrument(parent = None,
level = "info",
fields(service = "subnet_service"),
name = "subnet_service",
skip_all
@@ -415,7 +412,6 @@ impl<T: BeaconChainTypes> SubnetService<T> {
/// If there is sufficient time, queues a peer discovery request for all the required subnets.
// NOTE: Sending early subscriptions results in early searching for peers on subnets.
#[instrument(parent = None,
level = "info",
name = "subnet_service",
skip_all
)]
@@ -467,7 +463,6 @@ impl<T: BeaconChainTypes> SubnetService<T> {
// Subscribes to the subnet if it should be done immediately, or schedules it if required.
#[instrument(parent = None,
level = "info",
fields(service = "subnet_service"),
name = "subnet_service",
skip_all
@@ -525,7 +520,6 @@ impl<T: BeaconChainTypes> SubnetService<T> {
/// Adds a subscription event to the sync subnet.
#[instrument(parent = None,
level = "info",
fields(service = "subnet_service"),
name = "subnet_service",
skip_all
@@ -580,7 +574,6 @@ impl<T: BeaconChainTypes> SubnetService<T> {
/// already subscribed, extends the timeout if necessary. If this is a new subscription, we send
/// out the appropriate events.
#[instrument(parent = None,
level = "info",
fields(service = "subnet_service"),
name = "subnet_service",
skip_all
@@ -641,7 +634,6 @@ impl<T: BeaconChainTypes> SubnetService<T> {
// Unsubscribes from a subnet that was removed.
#[instrument(parent = None,
level = "info",
fields(service = "subnet_service"),
name = "subnet_service",
skip_all
@@ -664,7 +656,6 @@ impl<T: BeaconChainTypes> Stream for SubnetService<T> {
type Item = SubnetServiceMessage;
#[instrument(parent = None,
level = "info",
fields(service = "subnet_service"),
name = "subnet_service",
skip_all

View File

@@ -192,7 +192,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
/// Pauses the backfill sync if it's currently syncing.
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -209,7 +208,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
/// If resuming is successful, reports back the current syncing metrics.
#[must_use = "A failure here indicates the backfill sync has failed and the global sync state should be updated"]
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -290,7 +288,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
/// If we are in a failed state, update a local variable to indicate we are able to restart
/// the failed sync on the next attempt.
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -304,7 +301,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
/// A peer has disconnected.
/// If the peer has active batches, those are considered failed and re-requested.
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -324,7 +320,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
///
/// If the batch exists it is re-requested.
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -367,7 +362,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
/// join the system.
/// The sync manager should update the global sync state on failure.
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -424,7 +418,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
///
/// This resets past variables, to allow for a fresh start when resuming.
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -461,7 +454,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
/// Processes the batch with the given id.
/// The batch must exist and be ready for processing
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -525,7 +517,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
/// of the batch processor.
/// If an error is returned the BackFill sync has failed.
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -683,7 +674,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
/// Processes the next ready batch.
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -752,7 +742,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
/// If a previous batch has been validated and it had been re-processed, penalize the original
/// peer.
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -849,7 +838,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
/// have received are incorrect or invalid. This indicates the peer has not performed as
/// intended and can result in downvoting a peer.
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -906,7 +894,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
/// Requests the batch assigned to the given id from a given peer.
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -983,7 +970,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
/// When resuming a chain, this function searches for batches that need to be re-downloaded and
/// transitions their state to redownload the batch.
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -1013,7 +999,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
/// Attempts to request the next required batches from the peer pool if the chain is syncing. It will exhaust the peer
/// pool and left over batches until the batch buffer is reached or all peers are exhausted.
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -1043,7 +1028,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
/// Creates the next required batch from the chain. If there are no more batches required,
/// `false` is returned.
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -1110,7 +1094,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
/// This errors if the beacon chain indicates that backfill sync has already completed or is
/// not required.
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -1129,7 +1112,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
/// Checks with the beacon chain if backfill sync has completed.
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -1150,7 +1132,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
/// Checks if backfill would complete by syncing to `start_epoch`.
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -1165,7 +1146,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
/// Updates the global network state indicating the current state of a backfill sync.
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all
@@ -1175,7 +1155,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
}
#[instrument(parent = None,
level = "info",
fields(service = "backfill_sync"),
name = "backfill_sync",
skip_all

View File

@@ -127,7 +127,7 @@ use lighthouse_network::service::api_types::Id;
pub(crate) type BlockLookupSummary = (Id, Hash256, Option<Hash256>, Vec<PeerId>);
impl<T: BeaconChainTypes> BlockLookups<T> {
#[instrument(parent = None,level = "info", fields(service = "lookup_sync"), name = "lookup_sync")]
#[instrument(parent = None, fields(service = "lookup_sync"), name = "lookup_sync")]
pub fn new() -> Self {
Self {
failed_chains: LRUTimeCache::new(Duration::from_secs(
@@ -149,7 +149,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
#[cfg(test)]
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -160,7 +159,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
#[cfg(test)]
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -174,7 +172,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
/// Returns a vec of all parent lookup chains by tip, in descending slot order (tip first)
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -196,7 +193,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
///
/// Returns true if the lookup is created or already exists
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -235,7 +231,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
///
/// Returns true if the lookup is created or already exists
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -257,7 +252,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
///
/// Returns true if the lookup is created or already exists
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -365,7 +359,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
/// constructed.
/// Returns true if the lookup is created or already exists
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -474,7 +467,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
/// Process a block or blob response received from a single lookup request.
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -565,7 +557,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
/* Error responses */
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -579,7 +570,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
/* Processing responses */
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -605,7 +595,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
}
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -800,7 +789,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
}
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -831,7 +819,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
/// Makes progress on the immediate children of `block_root`
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -862,7 +849,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
/// the parent to make progress to resolve, therefore we must drop them if the parent is
/// dropped.
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -892,7 +878,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
/// Common handler a lookup request error, drop it and update metrics
/// Returns true if the lookup is created or already exists
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -935,7 +920,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
/// Drops all the single block requests and returns how many requests were dropped.
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -947,7 +931,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
}
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -961,7 +944,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
/// Perform some prune operations on lookups on some interval
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -990,7 +972,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
/// Instead there's no negative for keeping lookups with no peers around for some time. If we
/// regularly prune them, it should not be a memory concern (TODO: maybe yes!).
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -1033,7 +1014,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
/// - One single clear warn level log per stuck incident
/// - If the original bug is sporadic, it reduces the time a node is stuck from forever to 15 min
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -1076,7 +1056,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
/// Recursively find the oldest ancestor lookup of another lookup
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all
@@ -1106,7 +1085,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
/// Note: Takes a `lookup_id` as argument to allow recursion on mutable lookups, without having
/// to duplicate the code to add peers to a lookup
#[instrument(parent = None,
level = "info",
fields(service = "lookup_sync"),
name = "lookup_sync",
skip_all

View File

@@ -29,7 +29,7 @@ pub struct Sampling<T: BeaconChainTypes> {
}
impl<T: BeaconChainTypes> Sampling<T> {
#[instrument(parent = None,level = "info", fields(service = "sampling"), name = "sampling")]
#[instrument(parent = None, fields(service = "sampling"), name = "sampling")]
pub fn new(sampling_config: SamplingConfig) -> Self {
Self {
requests: <_>::default(),
@@ -49,7 +49,6 @@ impl<T: BeaconChainTypes> Sampling<T> {
#[cfg(test)]
#[instrument(parent = None,
level = "info",
fields(service = "sampling"),
name = "sampling",
skip_all
@@ -72,7 +71,6 @@ impl<T: BeaconChainTypes> Sampling<T> {
/// - `Some`: Request completed, won't make more progress. Expect requester to act on the result.
/// - `None`: Request still active, requester should do no action
#[instrument(parent = None,
level = "info",
fields(service = "sampling"),
name = "sampling",
skip_all
@@ -123,7 +121,6 @@ impl<T: BeaconChainTypes> Sampling<T> {
/// - `Some`: Request completed, won't make more progress. Expect requester to act on the result.
/// - `None`: Request still active, requester should do no action
#[instrument(parent = None,
level = "info",
fields(service = "sampling"),
name = "sampling",
skip_all
@@ -153,7 +150,6 @@ impl<T: BeaconChainTypes> Sampling<T> {
/// - `Some`: Request completed, won't make more progress. Expect requester to act on the result.
/// - `None`: Request still active, requester should do no action
#[instrument(parent = None,
level = "info",
fields(service = "sampling"),
name = "sampling",
skip_all
@@ -178,7 +174,6 @@ impl<T: BeaconChainTypes> Sampling<T> {
/// conveniently), to an Option first format to use an `if let Some() { act on result }` pattern
/// in the sync manager.
#[instrument(parent = None,
level = "info",
fields(service = "sampling"),
name = "sampling",
skip_all

View File

@@ -159,19 +159,19 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
}
/// Get the chain's id.
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
pub fn id(&self) -> ChainId {
self.id
}
/// Peers currently syncing this chain.
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
pub fn peers(&self) -> impl Iterator<Item = PeerId> + '_ {
self.peers.iter().cloned()
}
/// Progress in epochs made by the chain
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
pub fn processed_epochs(&self) -> u64 {
self.processing_target
.saturating_sub(self.start_epoch)
@@ -179,7 +179,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
}
/// Returns the total count of pending blocks in all the batches of this chain
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
pub fn pending_blocks(&self) -> usize {
self.batches
.values()
@@ -189,7 +189,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
/// Removes a peer from the chain.
/// If the peer has active batches, those are considered failed and re-requested.
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
pub fn remove_peer(&mut self, peer_id: &PeerId) -> ProcessingResult {
self.peers.remove(peer_id);
@@ -201,7 +201,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
}
/// Returns the latest slot number that has been processed.
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
fn current_processed_slot(&self) -> Slot {
// the last slot we processed was included in the previous batch, and corresponds to the
// first slot of the current target epoch
@@ -258,7 +258,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
/// Processes the batch with the given id.
/// The batch must exist and be ready for processing
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
fn process_batch(
&mut self,
network: &mut SyncNetworkContext<T>,
@@ -306,7 +306,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
}
/// Processes the next ready batch, prioritizing optimistic batches over the processing target.
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
fn process_completed_batches(
&mut self,
network: &mut SyncNetworkContext<T>,
@@ -416,7 +416,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
/// The block processor has completed processing a batch. This function handles the result
/// of the batch processor.
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
pub fn on_batch_process_result(
&mut self,
network: &mut SyncNetworkContext<T>,
@@ -571,7 +571,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
}
}
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
fn reject_optimistic_batch(
&mut self,
network: &mut SyncNetworkContext<T>,
@@ -606,7 +606,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
/// If a previous batch has been validated and it had been re-processed, penalize the original
/// peer.
#[allow(clippy::modulo_one)]
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
fn advance_chain(&mut self, network: &mut SyncNetworkContext<T>, validating_epoch: Epoch) {
// make sure this epoch produces an advancement
if validating_epoch <= self.start_epoch {
@@ -710,7 +710,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
/// These events occur when a peer has successfully responded with blocks, but the blocks we
/// have received are incorrect or invalid. This indicates the peer has not performed as
/// intended and can result in downvoting a peer.
#[instrument(parent = None,level = "info", fields(service = self.id, network), skip_all)]
#[instrument(parent = None, fields(service = self.id, network), skip_all)]
fn handle_invalid_batch(
&mut self,
network: &mut SyncNetworkContext<T>,
@@ -770,7 +770,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
/// This chain has been requested to start syncing.
///
/// This could be new chain, or an old chain that is being resumed.
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
pub fn start_syncing(
&mut self,
network: &mut SyncNetworkContext<T>,
@@ -809,7 +809,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
/// Add a peer to the chain.
///
/// If the chain is active, this starts requesting batches from this peer.
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
pub fn add_peer(
&mut self,
network: &mut SyncNetworkContext<T>,
@@ -822,7 +822,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
/// An RPC error has occurred.
///
/// If the batch exists it is re-requested.
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
pub fn inject_error(
&mut self,
network: &mut SyncNetworkContext<T>,
@@ -880,7 +880,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
}
/// Requests the batch assigned to the given id from a given peer.
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
pub fn send_batch(
&mut self,
network: &mut SyncNetworkContext<T>,
@@ -959,7 +959,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
}
/// Returns true if this chain is currently syncing.
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
pub fn is_syncing(&self) -> bool {
match self.state {
ChainSyncingState::Syncing => true,
@@ -969,7 +969,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
/// Kickstarts the chain by sending for processing batches that are ready and requesting more
/// batches if needed.
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
pub fn resume(
&mut self,
network: &mut SyncNetworkContext<T>,
@@ -982,7 +982,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
/// Attempts to request the next required batches from the peer pool if the chain is syncing. It will exhaust the peer
/// pool and left over batches until the batch buffer is reached or all peers are exhausted.
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
fn request_batches(&mut self, network: &mut SyncNetworkContext<T>) -> ProcessingResult {
if !matches!(self.state, ChainSyncingState::Syncing) {
return Ok(KeepChain);
@@ -1052,7 +1052,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
/// Creates the next required batch from the chain. If there are no more batches required,
/// `false` is returned.
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
fn include_next_batch(&mut self, network: &mut SyncNetworkContext<T>) -> Option<BatchId> {
// don't request batches beyond the target head slot
if self
@@ -1115,7 +1115,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
/// This produces a string of the form: [D,E,E,E,E]
/// to indicate the current buffer state of the chain. The symbols are defined on each of the
/// batch states. See [BatchState::visualize] for symbol definitions.
#[instrument(parent = None,level = "info", fields(chain = self.id , service = "range_sync"), skip_all)]
#[instrument(parent = None, fields(chain = self.id , service = "range_sync"), skip_all)]
fn visualize_batch_state(&self) -> String {
let mut visualization_string = String::with_capacity((BATCH_BUFFER_SIZE * 3) as usize);

View File

@@ -103,7 +103,6 @@ where
}
#[instrument(parent = None,
level = "info",
fields(component = "range_sync"),
name = "range_sync",
skip_all
@@ -118,7 +117,6 @@ where
/// chain, this may result in a different finalized chain from syncing as finalized chains are
/// prioritised by peer-pool size.
#[instrument(parent = None,
level = "info",
fields(component = "range_sync"),
name = "range_sync",
skip_all
@@ -218,7 +216,6 @@ where
/// This function finds the chain that made this request. Once found, processes the result.
/// This request could complete a chain or simply add to its progress.
#[instrument(parent = None,
level = "info",
fields(component = "range_sync"),
name = "range_sync",
skip_all
@@ -254,7 +251,6 @@ where
}
#[instrument(parent = None,
level = "info",
fields(component = "range_sync"),
name = "range_sync",
skip_all
@@ -292,7 +288,6 @@ where
/// A peer has disconnected. This removes the peer from any ongoing chains and mappings. A
/// disconnected peer could remove a chain
#[instrument(parent = None,
level = "info",
fields(component = "range_sync"),
name = "range_sync",
skip_all
@@ -310,7 +305,6 @@ where
/// for this peer. If so we mark the batch as failed. The batch may then hit it's maximum
/// retries. In this case, we need to remove the chain.
#[instrument(parent = None,
level = "info",
fields(component = "range_sync"),
name = "range_sync",
skip_all
@@ -334,7 +328,6 @@ where
/// Check to see if the request corresponds to a pending batch. If so, re-request it if possible, if there have
/// been too many failed attempts for the batch, remove the chain.
#[instrument(parent = None,
level = "info",
fields(component = "range_sync"),
name = "range_sync",
skip_all
@@ -370,7 +363,6 @@ where
}
#[instrument(parent = None,
level = "info",
fields(component = "range_sync"),
name = "range_sync",
skip_all
@@ -424,7 +416,6 @@ where
/// Kickstarts sync.
#[instrument(parent = None,
level = "info",
fields(component = "range_sync"),
name = "range_sync",
skip_all