mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 01:05:47 +00:00
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:
@@ -439,7 +439,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
/// emit metrics and logs on a per-validator basis (rather than just an
|
/// emit metrics and logs on a per-validator basis (rather than just an
|
||||||
/// aggregated basis).
|
/// aggregated basis).
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -450,7 +449,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Add some validators to `self` for additional monitoring.
|
/// Add some validators to `self` for additional monitoring.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -473,7 +471,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Add an unaggregated attestation
|
/// Add an unaggregated attestation
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -492,7 +489,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
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
|
/// Reads information from the given `state`. The `state` *must* be valid (i.e, able to be
|
||||||
/// imported).
|
/// imported).
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -622,7 +617,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Add missed non-finalized blocks for the monitored validators
|
/// Add missed non-finalized blocks for the monitored validators
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -724,7 +718,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -743,7 +736,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
/// Process the unaggregated attestations generated by the service `attestation_simulator_service`
|
/// 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
|
/// and check if the attestation qualifies for a reward matching the flags source/target/head
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -821,7 +813,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
/// We allow disabling tracking metrics on an individual validator basis
|
/// We allow disabling tracking metrics on an individual validator basis
|
||||||
/// since it can result in untenable cardinality with high validator counts.
|
/// since it can result in untenable cardinality with high validator counts.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -835,7 +826,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1118,7 +1108,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1131,7 +1120,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Returns the number of validators monitored by `self`.
|
/// Returns the number of validators monitored by `self`.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1142,7 +1130,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Return the `id`'s of all monitored validators.
|
/// Return the `id`'s of all monitored validators.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1152,7 +1139,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1166,7 +1152,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1179,7 +1164,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1191,7 +1175,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
/// If `self.auto_register == true`, add the `validator_index` to `self.monitored_validators`.
|
/// If `self.auto_register == true`, add the `validator_index` to `self.monitored_validators`.
|
||||||
/// Otherwise, do nothing.
|
/// Otherwise, do nothing.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1219,7 +1202,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Process a block received on gossip.
|
/// Process a block received on gossip.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1236,7 +1218,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Process a block received on the HTTP API from a local validator.
|
/// Process a block received on the HTTP API from a local validator.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1252,7 +1233,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1297,7 +1277,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Register an attestation seen on the gossip network.
|
/// Register an attestation seen on the gossip network.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1318,7 +1297,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Register an attestation seen on the HTTP API.
|
/// Register an attestation seen on the HTTP API.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1338,7 +1316,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1430,7 +1407,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1554,7 +1530,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
///
|
///
|
||||||
/// Note: Blocks that get orphaned will skew the inclusion distance calculation.
|
/// Note: Blocks that get orphaned will skew the inclusion distance calculation.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
)]
|
)]
|
||||||
@@ -1634,7 +1609,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Register a sync committee message received over gossip.
|
/// Register a sync committee message received over gossip.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1655,7 +1629,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Register a sync committee message received over the http api.
|
/// Register a sync committee message received over the http api.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1676,7 +1649,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Register a sync committee message.
|
/// Register a sync committee message.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1731,7 +1703,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Register a sync committee contribution received over gossip.
|
/// Register a sync committee contribution received over gossip.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1754,7 +1725,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Register a sync committee contribution received over the http api.
|
/// Register a sync committee contribution received over the http api.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1777,7 +1747,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Register a sync committee contribution.
|
/// Register a sync committee contribution.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1865,7 +1834,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Register that the `sync_aggregate` was included in a *valid* `BeaconBlock`.
|
/// Register that the `sync_aggregate` was included in a *valid* `BeaconBlock`.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1908,7 +1876,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Register an exit from the gossip network.
|
/// Register an exit from the gossip network.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1919,7 +1886,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Register an exit from the HTTP API.
|
/// Register an exit from the HTTP API.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1930,7 +1896,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Register an exit included in a *valid* beacon block.
|
/// Register an exit included in a *valid* beacon block.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1940,7 +1905,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1969,7 +1933,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Register a proposer slashing from the gossip network.
|
/// Register a proposer slashing from the gossip network.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1980,7 +1943,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Register a proposer slashing from the HTTP API.
|
/// Register a proposer slashing from the HTTP API.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1991,7 +1953,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Register a proposer slashing included in a *valid* `BeaconBlock`.
|
/// Register a proposer slashing included in a *valid* `BeaconBlock`.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -2001,7 +1962,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -2040,7 +2000,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Register an attester slashing from the gossip network.
|
/// Register an attester slashing from the gossip network.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -2051,7 +2010,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Register an attester slashing from the HTTP API.
|
/// Register an attester slashing from the HTTP API.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -2062,7 +2020,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
|
|
||||||
/// Register an attester slashing included in a *valid* `BeaconBlock`.
|
/// Register an attester slashing included in a *valid* `BeaconBlock`.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -2072,7 +2029,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -2119,7 +2075,6 @@ impl<E: EthSpec> ValidatorMonitor<E> {
|
|||||||
///
|
///
|
||||||
/// Should be called whenever Prometheus is scraping Lighthouse.
|
/// Should be called whenever Prometheus is scraping Lighthouse.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "validator_monitor"),
|
fields(service = "validator_monitor"),
|
||||||
name = "validator_monitor",
|
name = "validator_monitor",
|
||||||
skip_all
|
skip_all
|
||||||
|
|||||||
@@ -228,7 +228,6 @@ impl<T: BeaconChainTypes> SubnetService<T> {
|
|||||||
/// This returns a result simply for the ergonomics of using ?. The result can be
|
/// This returns a result simply for the ergonomics of using ?. The result can be
|
||||||
/// safely dropped.
|
/// safely dropped.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "subnet_service"),
|
fields(service = "subnet_service"),
|
||||||
name = "subnet_service",
|
name = "subnet_service",
|
||||||
skip_all
|
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
|
/// Checks if we have subscribed aggregate validators for the subnet. If not, checks the gossip
|
||||||
/// verification, re-propagates and returns false.
|
/// verification, re-propagates and returns false.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "subnet_service"),
|
fields(service = "subnet_service"),
|
||||||
name = "subnet_service",
|
name = "subnet_service",
|
||||||
skip_all
|
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
|
/// Adds an event to the event queue and notifies that this service is ready to be polled
|
||||||
/// again.
|
/// again.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "subnet_service"),
|
fields(service = "subnet_service"),
|
||||||
name = "subnet_service",
|
name = "subnet_service",
|
||||||
skip_all
|
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.
|
/// 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.
|
// NOTE: Sending early subscriptions results in early searching for peers on subnets.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
name = "subnet_service",
|
name = "subnet_service",
|
||||||
skip_all
|
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.
|
// Subscribes to the subnet if it should be done immediately, or schedules it if required.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "subnet_service"),
|
fields(service = "subnet_service"),
|
||||||
name = "subnet_service",
|
name = "subnet_service",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -525,7 +520,6 @@ impl<T: BeaconChainTypes> SubnetService<T> {
|
|||||||
|
|
||||||
/// Adds a subscription event to the sync subnet.
|
/// Adds a subscription event to the sync subnet.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "subnet_service"),
|
fields(service = "subnet_service"),
|
||||||
name = "subnet_service",
|
name = "subnet_service",
|
||||||
skip_all
|
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
|
/// already subscribed, extends the timeout if necessary. If this is a new subscription, we send
|
||||||
/// out the appropriate events.
|
/// out the appropriate events.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "subnet_service"),
|
fields(service = "subnet_service"),
|
||||||
name = "subnet_service",
|
name = "subnet_service",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -641,7 +634,6 @@ impl<T: BeaconChainTypes> SubnetService<T> {
|
|||||||
|
|
||||||
// Unsubscribes from a subnet that was removed.
|
// Unsubscribes from a subnet that was removed.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "subnet_service"),
|
fields(service = "subnet_service"),
|
||||||
name = "subnet_service",
|
name = "subnet_service",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -664,7 +656,6 @@ impl<T: BeaconChainTypes> Stream for SubnetService<T> {
|
|||||||
type Item = SubnetServiceMessage;
|
type Item = SubnetServiceMessage;
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "subnet_service"),
|
fields(service = "subnet_service"),
|
||||||
name = "subnet_service",
|
name = "subnet_service",
|
||||||
skip_all
|
skip_all
|
||||||
|
|||||||
@@ -192,7 +192,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
|||||||
|
|
||||||
/// Pauses the backfill sync if it's currently syncing.
|
/// Pauses the backfill sync if it's currently syncing.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -209,7 +208,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
|||||||
/// If resuming is successful, reports back the current syncing metrics.
|
/// 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"]
|
#[must_use = "A failure here indicates the backfill sync has failed and the global sync state should be updated"]
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
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
|
/// 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.
|
/// the failed sync on the next attempt.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -304,7 +301,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
|||||||
/// A peer has disconnected.
|
/// A peer has disconnected.
|
||||||
/// If the peer has active batches, those are considered failed and re-requested.
|
/// If the peer has active batches, those are considered failed and re-requested.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -324,7 +320,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
|||||||
///
|
///
|
||||||
/// If the batch exists it is re-requested.
|
/// If the batch exists it is re-requested.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -367,7 +362,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
|||||||
/// join the system.
|
/// join the system.
|
||||||
/// The sync manager should update the global sync state on failure.
|
/// The sync manager should update the global sync state on failure.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -424,7 +418,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
|||||||
///
|
///
|
||||||
/// This resets past variables, to allow for a fresh start when resuming.
|
/// This resets past variables, to allow for a fresh start when resuming.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -461,7 +454,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
|||||||
/// Processes the batch with the given id.
|
/// Processes the batch with the given id.
|
||||||
/// The batch must exist and be ready for processing
|
/// The batch must exist and be ready for processing
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -525,7 +517,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
|||||||
/// of the batch processor.
|
/// of the batch processor.
|
||||||
/// If an error is returned the BackFill sync has failed.
|
/// If an error is returned the BackFill sync has failed.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -683,7 +674,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
|||||||
|
|
||||||
/// Processes the next ready batch.
|
/// Processes the next ready batch.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
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
|
/// If a previous batch has been validated and it had been re-processed, penalize the original
|
||||||
/// peer.
|
/// peer.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
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
|
/// have received are incorrect or invalid. This indicates the peer has not performed as
|
||||||
/// intended and can result in downvoting a peer.
|
/// intended and can result in downvoting a peer.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -906,7 +894,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
|||||||
|
|
||||||
/// Requests the batch assigned to the given id from a given peer.
|
/// Requests the batch assigned to the given id from a given peer.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
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
|
/// When resuming a chain, this function searches for batches that need to be re-downloaded and
|
||||||
/// transitions their state to redownload the batch.
|
/// transitions their state to redownload the batch.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
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
|
/// 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.
|
/// pool and left over batches until the batch buffer is reached or all peers are exhausted.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
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,
|
/// Creates the next required batch from the chain. If there are no more batches required,
|
||||||
/// `false` is returned.
|
/// `false` is returned.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
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
|
/// This errors if the beacon chain indicates that backfill sync has already completed or is
|
||||||
/// not required.
|
/// not required.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1129,7 +1112,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
|||||||
|
|
||||||
/// Checks with the beacon chain if backfill sync has completed.
|
/// Checks with the beacon chain if backfill sync has completed.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1150,7 +1132,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
|||||||
|
|
||||||
/// Checks if backfill would complete by syncing to `start_epoch`.
|
/// Checks if backfill would complete by syncing to `start_epoch`.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1165,7 +1146,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
|||||||
|
|
||||||
/// Updates the global network state indicating the current state of a backfill sync.
|
/// Updates the global network state indicating the current state of a backfill sync.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1175,7 +1155,6 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "backfill_sync"),
|
fields(service = "backfill_sync"),
|
||||||
name = "backfill_sync",
|
name = "backfill_sync",
|
||||||
skip_all
|
skip_all
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ use lighthouse_network::service::api_types::Id;
|
|||||||
pub(crate) type BlockLookupSummary = (Id, Hash256, Option<Hash256>, Vec<PeerId>);
|
pub(crate) type BlockLookupSummary = (Id, Hash256, Option<Hash256>, Vec<PeerId>);
|
||||||
|
|
||||||
impl<T: BeaconChainTypes> BlockLookups<T> {
|
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 {
|
pub fn new() -> Self {
|
||||||
Self {
|
Self {
|
||||||
failed_chains: LRUTimeCache::new(Duration::from_secs(
|
failed_chains: LRUTimeCache::new(Duration::from_secs(
|
||||||
@@ -149,7 +149,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -160,7 +159,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
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)
|
/// Returns a vec of all parent lookup chains by tip, in descending slot order (tip first)
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -196,7 +193,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
///
|
///
|
||||||
/// Returns true if the lookup is created or already exists
|
/// Returns true if the lookup is created or already exists
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -235,7 +231,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
///
|
///
|
||||||
/// Returns true if the lookup is created or already exists
|
/// Returns true if the lookup is created or already exists
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -257,7 +252,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
///
|
///
|
||||||
/// Returns true if the lookup is created or already exists
|
/// Returns true if the lookup is created or already exists
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -365,7 +359,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
/// constructed.
|
/// constructed.
|
||||||
/// Returns true if the lookup is created or already exists
|
/// Returns true if the lookup is created or already exists
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -474,7 +467,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
|
|
||||||
/// Process a block or blob response received from a single lookup request.
|
/// Process a block or blob response received from a single lookup request.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -565,7 +557,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
/* Error responses */
|
/* Error responses */
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -579,7 +570,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
/* Processing responses */
|
/* Processing responses */
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -605,7 +595,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -800,7 +789,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -831,7 +819,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
|
|
||||||
/// Makes progress on the immediate children of `block_root`
|
/// Makes progress on the immediate children of `block_root`
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
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
|
/// the parent to make progress to resolve, therefore we must drop them if the parent is
|
||||||
/// dropped.
|
/// dropped.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -892,7 +878,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
/// Common handler a lookup request error, drop it and update metrics
|
/// Common handler a lookup request error, drop it and update metrics
|
||||||
/// Returns true if the lookup is created or already exists
|
/// Returns true if the lookup is created or already exists
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -935,7 +920,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
|
|
||||||
/// Drops all the single block requests and returns how many requests were dropped.
|
/// Drops all the single block requests and returns how many requests were dropped.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -947,7 +931,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -961,7 +944,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
|
|
||||||
/// Perform some prune operations on lookups on some interval
|
/// Perform some prune operations on lookups on some interval
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
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
|
/// 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!).
|
/// regularly prune them, it should not be a memory concern (TODO: maybe yes!).
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1033,7 +1014,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
/// - One single clear warn level log per stuck incident
|
/// - 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
|
/// - If the original bug is sporadic, it reduces the time a node is stuck from forever to 15 min
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -1076,7 +1056,6 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
|
|
||||||
/// Recursively find the oldest ancestor lookup of another lookup
|
/// Recursively find the oldest ancestor lookup of another lookup
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
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
|
/// 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
|
/// to duplicate the code to add peers to a lookup
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "lookup_sync"),
|
fields(service = "lookup_sync"),
|
||||||
name = "lookup_sync",
|
name = "lookup_sync",
|
||||||
skip_all
|
skip_all
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ pub struct Sampling<T: BeaconChainTypes> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<T: BeaconChainTypes> Sampling<T> {
|
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 {
|
pub fn new(sampling_config: SamplingConfig) -> Self {
|
||||||
Self {
|
Self {
|
||||||
requests: <_>::default(),
|
requests: <_>::default(),
|
||||||
@@ -49,7 +49,6 @@ impl<T: BeaconChainTypes> Sampling<T> {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "sampling"),
|
fields(service = "sampling"),
|
||||||
name = "sampling",
|
name = "sampling",
|
||||||
skip_all
|
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.
|
/// - `Some`: Request completed, won't make more progress. Expect requester to act on the result.
|
||||||
/// - `None`: Request still active, requester should do no action
|
/// - `None`: Request still active, requester should do no action
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "sampling"),
|
fields(service = "sampling"),
|
||||||
name = "sampling",
|
name = "sampling",
|
||||||
skip_all
|
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.
|
/// - `Some`: Request completed, won't make more progress. Expect requester to act on the result.
|
||||||
/// - `None`: Request still active, requester should do no action
|
/// - `None`: Request still active, requester should do no action
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "sampling"),
|
fields(service = "sampling"),
|
||||||
name = "sampling",
|
name = "sampling",
|
||||||
skip_all
|
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.
|
/// - `Some`: Request completed, won't make more progress. Expect requester to act on the result.
|
||||||
/// - `None`: Request still active, requester should do no action
|
/// - `None`: Request still active, requester should do no action
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "sampling"),
|
fields(service = "sampling"),
|
||||||
name = "sampling",
|
name = "sampling",
|
||||||
skip_all
|
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
|
/// conveniently), to an Option first format to use an `if let Some() { act on result }` pattern
|
||||||
/// in the sync manager.
|
/// in the sync manager.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(service = "sampling"),
|
fields(service = "sampling"),
|
||||||
name = "sampling",
|
name = "sampling",
|
||||||
skip_all
|
skip_all
|
||||||
|
|||||||
@@ -159,19 +159,19 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Get the chain's id.
|
/// 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 {
|
pub fn id(&self) -> ChainId {
|
||||||
self.id
|
self.id
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Peers currently syncing this chain.
|
/// 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> + '_ {
|
pub fn peers(&self) -> impl Iterator<Item = PeerId> + '_ {
|
||||||
self.peers.iter().cloned()
|
self.peers.iter().cloned()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Progress in epochs made by the chain
|
/// 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 {
|
pub fn processed_epochs(&self) -> u64 {
|
||||||
self.processing_target
|
self.processing_target
|
||||||
.saturating_sub(self.start_epoch)
|
.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
|
/// 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 {
|
pub fn pending_blocks(&self) -> usize {
|
||||||
self.batches
|
self.batches
|
||||||
.values()
|
.values()
|
||||||
@@ -189,7 +189,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
|
|||||||
|
|
||||||
/// Removes a peer from the chain.
|
/// Removes a peer from the chain.
|
||||||
/// If the peer has active batches, those are considered failed and re-requested.
|
/// 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 {
|
pub fn remove_peer(&mut self, peer_id: &PeerId) -> ProcessingResult {
|
||||||
self.peers.remove(peer_id);
|
self.peers.remove(peer_id);
|
||||||
|
|
||||||
@@ -201,7 +201,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the latest slot number that has been processed.
|
/// 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 {
|
fn current_processed_slot(&self) -> Slot {
|
||||||
// the last slot we processed was included in the previous batch, and corresponds to the
|
// the last slot we processed was included in the previous batch, and corresponds to the
|
||||||
// first slot of the current target epoch
|
// first slot of the current target epoch
|
||||||
@@ -258,7 +258,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
|
|||||||
|
|
||||||
/// Processes the batch with the given id.
|
/// Processes the batch with the given id.
|
||||||
/// The batch must exist and be ready for processing
|
/// 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(
|
fn process_batch(
|
||||||
&mut self,
|
&mut self,
|
||||||
network: &mut SyncNetworkContext<T>,
|
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.
|
/// 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(
|
fn process_completed_batches(
|
||||||
&mut self,
|
&mut self,
|
||||||
network: &mut SyncNetworkContext<T>,
|
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
|
/// The block processor has completed processing a batch. This function handles the result
|
||||||
/// of the batch processor.
|
/// 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(
|
pub fn on_batch_process_result(
|
||||||
&mut self,
|
&mut self,
|
||||||
network: &mut SyncNetworkContext<T>,
|
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(
|
fn reject_optimistic_batch(
|
||||||
&mut self,
|
&mut self,
|
||||||
network: &mut SyncNetworkContext<T>,
|
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
|
/// If a previous batch has been validated and it had been re-processed, penalize the original
|
||||||
/// peer.
|
/// peer.
|
||||||
#[allow(clippy::modulo_one)]
|
#[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) {
|
fn advance_chain(&mut self, network: &mut SyncNetworkContext<T>, validating_epoch: Epoch) {
|
||||||
// make sure this epoch produces an advancement
|
// make sure this epoch produces an advancement
|
||||||
if validating_epoch <= self.start_epoch {
|
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
|
/// 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
|
/// have received are incorrect or invalid. This indicates the peer has not performed as
|
||||||
/// intended and can result in downvoting a peer.
|
/// 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(
|
fn handle_invalid_batch(
|
||||||
&mut self,
|
&mut self,
|
||||||
network: &mut SyncNetworkContext<T>,
|
network: &mut SyncNetworkContext<T>,
|
||||||
@@ -770,7 +770,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
|
|||||||
/// This chain has been requested to start syncing.
|
/// This chain has been requested to start syncing.
|
||||||
///
|
///
|
||||||
/// This could be new chain, or an old chain that is being resumed.
|
/// 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(
|
pub fn start_syncing(
|
||||||
&mut self,
|
&mut self,
|
||||||
network: &mut SyncNetworkContext<T>,
|
network: &mut SyncNetworkContext<T>,
|
||||||
@@ -809,7 +809,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
|
|||||||
/// Add a peer to the chain.
|
/// Add a peer to the chain.
|
||||||
///
|
///
|
||||||
/// If the chain is active, this starts requesting batches from this peer.
|
/// 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(
|
pub fn add_peer(
|
||||||
&mut self,
|
&mut self,
|
||||||
network: &mut SyncNetworkContext<T>,
|
network: &mut SyncNetworkContext<T>,
|
||||||
@@ -822,7 +822,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
|
|||||||
/// An RPC error has occurred.
|
/// An RPC error has occurred.
|
||||||
///
|
///
|
||||||
/// If the batch exists it is re-requested.
|
/// 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(
|
pub fn inject_error(
|
||||||
&mut self,
|
&mut self,
|
||||||
network: &mut SyncNetworkContext<T>,
|
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.
|
/// 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(
|
pub fn send_batch(
|
||||||
&mut self,
|
&mut self,
|
||||||
network: &mut SyncNetworkContext<T>,
|
network: &mut SyncNetworkContext<T>,
|
||||||
@@ -959,7 +959,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Returns true if this chain is currently syncing.
|
/// 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 {
|
pub fn is_syncing(&self) -> bool {
|
||||||
match self.state {
|
match self.state {
|
||||||
ChainSyncingState::Syncing => true,
|
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
|
/// Kickstarts the chain by sending for processing batches that are ready and requesting more
|
||||||
/// batches if needed.
|
/// 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(
|
pub fn resume(
|
||||||
&mut self,
|
&mut self,
|
||||||
network: &mut SyncNetworkContext<T>,
|
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
|
/// 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.
|
/// 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 {
|
fn request_batches(&mut self, network: &mut SyncNetworkContext<T>) -> ProcessingResult {
|
||||||
if !matches!(self.state, ChainSyncingState::Syncing) {
|
if !matches!(self.state, ChainSyncingState::Syncing) {
|
||||||
return Ok(KeepChain);
|
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,
|
/// Creates the next required batch from the chain. If there are no more batches required,
|
||||||
/// `false` is returned.
|
/// `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> {
|
fn include_next_batch(&mut self, network: &mut SyncNetworkContext<T>) -> Option<BatchId> {
|
||||||
// don't request batches beyond the target head slot
|
// don't request batches beyond the target head slot
|
||||||
if self
|
if self
|
||||||
@@ -1115,7 +1115,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
|
|||||||
/// This produces a string of the form: [D,E,E,E,E]
|
/// 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
|
/// 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.
|
/// 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 {
|
fn visualize_batch_state(&self) -> String {
|
||||||
let mut visualization_string = String::with_capacity((BATCH_BUFFER_SIZE * 3) as usize);
|
let mut visualization_string = String::with_capacity((BATCH_BUFFER_SIZE * 3) as usize);
|
||||||
|
|
||||||
|
|||||||
@@ -103,7 +103,6 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(component = "range_sync"),
|
fields(component = "range_sync"),
|
||||||
name = "range_sync",
|
name = "range_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -118,7 +117,6 @@ where
|
|||||||
/// chain, this may result in a different finalized chain from syncing as finalized chains are
|
/// chain, this may result in a different finalized chain from syncing as finalized chains are
|
||||||
/// prioritised by peer-pool size.
|
/// prioritised by peer-pool size.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(component = "range_sync"),
|
fields(component = "range_sync"),
|
||||||
name = "range_sync",
|
name = "range_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -218,7 +216,6 @@ where
|
|||||||
/// This function finds the chain that made this request. Once found, processes the result.
|
/// 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.
|
/// This request could complete a chain or simply add to its progress.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(component = "range_sync"),
|
fields(component = "range_sync"),
|
||||||
name = "range_sync",
|
name = "range_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -254,7 +251,6 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(component = "range_sync"),
|
fields(component = "range_sync"),
|
||||||
name = "range_sync",
|
name = "range_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -292,7 +288,6 @@ where
|
|||||||
/// A peer has disconnected. This removes the peer from any ongoing chains and mappings. A
|
/// A peer has disconnected. This removes the peer from any ongoing chains and mappings. A
|
||||||
/// disconnected peer could remove a chain
|
/// disconnected peer could remove a chain
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(component = "range_sync"),
|
fields(component = "range_sync"),
|
||||||
name = "range_sync",
|
name = "range_sync",
|
||||||
skip_all
|
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
|
/// 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.
|
/// retries. In this case, we need to remove the chain.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(component = "range_sync"),
|
fields(component = "range_sync"),
|
||||||
name = "range_sync",
|
name = "range_sync",
|
||||||
skip_all
|
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
|
/// 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.
|
/// been too many failed attempts for the batch, remove the chain.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(component = "range_sync"),
|
fields(component = "range_sync"),
|
||||||
name = "range_sync",
|
name = "range_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -370,7 +363,6 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(component = "range_sync"),
|
fields(component = "range_sync"),
|
||||||
name = "range_sync",
|
name = "range_sync",
|
||||||
skip_all
|
skip_all
|
||||||
@@ -424,7 +416,6 @@ where
|
|||||||
|
|
||||||
/// Kickstarts sync.
|
/// Kickstarts sync.
|
||||||
#[instrument(parent = None,
|
#[instrument(parent = None,
|
||||||
level = "info",
|
|
||||||
fields(component = "range_sync"),
|
fields(component = "range_sync"),
|
||||||
name = "range_sync",
|
name = "range_sync",
|
||||||
skip_all
|
skip_all
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ impl TaskExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Clones the task executor adding a service name.
|
/// Clones the task executor adding a service name.
|
||||||
#[instrument(parent = None,level = "info", fields(service = service_name), name = "task_executor", skip_all)]
|
#[instrument(parent = None, fields(service = service_name), name = "task_executor", skip_all)]
|
||||||
pub fn clone_with_name(&self, service_name: String) -> Self {
|
pub fn clone_with_name(&self, service_name: String) -> Self {
|
||||||
TaskExecutor {
|
TaskExecutor {
|
||||||
handle_provider: self.handle_provider.clone(),
|
handle_provider: self.handle_provider.clone(),
|
||||||
@@ -124,7 +124,7 @@ impl TaskExecutor {
|
|||||||
/// The purpose of this function is to create a compile error if some function which previously
|
/// The purpose of this function is to create a compile error if some function which previously
|
||||||
/// returned `()` starts returning something else. Such a case may otherwise result in
|
/// returned `()` starts returning something else. Such a case may otherwise result in
|
||||||
/// accidental error suppression.
|
/// accidental error suppression.
|
||||||
#[instrument(parent = None,level = "info", fields(service = self.service_name), name = "task_executor", skip_all)]
|
#[instrument(parent = None, fields(service = self.service_name), name = "task_executor", skip_all)]
|
||||||
pub fn spawn_ignoring_error(
|
pub fn spawn_ignoring_error(
|
||||||
&self,
|
&self,
|
||||||
task: impl Future<Output = Result<(), ()>> + Send + 'static,
|
task: impl Future<Output = Result<(), ()>> + Send + 'static,
|
||||||
@@ -136,7 +136,7 @@ impl TaskExecutor {
|
|||||||
/// Spawn a task to monitor the completion of another task.
|
/// Spawn a task to monitor the completion of another task.
|
||||||
///
|
///
|
||||||
/// If the other task exits by panicking, then the monitor task will shut down the executor.
|
/// If the other task exits by panicking, then the monitor task will shut down the executor.
|
||||||
#[instrument(parent = None,level = "info", fields(service = self.service_name), name = "task_executor", skip_all)]
|
#[instrument(parent = None, fields(service = self.service_name), name = "task_executor", skip_all)]
|
||||||
fn spawn_monitor<R: Send>(
|
fn spawn_monitor<R: Send>(
|
||||||
&self,
|
&self,
|
||||||
task_handle: impl Future<Output = Result<R, tokio::task::JoinError>> + Send + 'static,
|
task_handle: impl Future<Output = Result<R, tokio::task::JoinError>> + Send + 'static,
|
||||||
@@ -175,7 +175,7 @@ impl TaskExecutor {
|
|||||||
/// of a panic, the executor will be shut down via `self.signal_tx`.
|
/// of a panic, the executor will be shut down via `self.signal_tx`.
|
||||||
///
|
///
|
||||||
/// This function generates prometheus metrics on number of tasks and task duration.
|
/// This function generates prometheus metrics on number of tasks and task duration.
|
||||||
#[instrument(parent = None,level = "info", fields(service = self.service_name), name = "task_executor", skip_all)]
|
#[instrument(parent = None, fields(service = self.service_name), name = "task_executor", skip_all)]
|
||||||
pub fn spawn(&self, task: impl Future<Output = ()> + Send + 'static, name: &'static str) {
|
pub fn spawn(&self, task: impl Future<Output = ()> + Send + 'static, name: &'static str) {
|
||||||
if let Some(task_handle) = self.spawn_handle(task, name) {
|
if let Some(task_handle) = self.spawn_handle(task, name) {
|
||||||
self.spawn_monitor(task_handle, name)
|
self.spawn_monitor(task_handle, name)
|
||||||
@@ -191,7 +191,7 @@ impl TaskExecutor {
|
|||||||
/// This is useful in cases where the future to be spawned needs to do additional cleanup work when
|
/// This is useful in cases where the future to be spawned needs to do additional cleanup work when
|
||||||
/// the task is completed/canceled (e.g. writing local variables to disk) or the task is created from
|
/// the task is completed/canceled (e.g. writing local variables to disk) or the task is created from
|
||||||
/// some framework which does its own cleanup (e.g. a hyper server).
|
/// some framework which does its own cleanup (e.g. a hyper server).
|
||||||
#[instrument(parent = None,level = "info", fields(service = self.service_name), name = "task_executor", skip_all)]
|
#[instrument(parent = None, fields(service = self.service_name), name = "task_executor", skip_all)]
|
||||||
pub fn spawn_without_exit(
|
pub fn spawn_without_exit(
|
||||||
&self,
|
&self,
|
||||||
task: impl Future<Output = ()> + Send + 'static,
|
task: impl Future<Output = ()> + Send + 'static,
|
||||||
@@ -235,7 +235,7 @@ impl TaskExecutor {
|
|||||||
/// The task is cancelled when the corresponding async-channel is dropped.
|
/// The task is cancelled when the corresponding async-channel is dropped.
|
||||||
///
|
///
|
||||||
/// This function generates prometheus metrics on number of tasks and task duration.
|
/// This function generates prometheus metrics on number of tasks and task duration.
|
||||||
#[instrument(parent = None,level = "info", fields(service = self.service_name), name = "task_executor", skip_all)]
|
#[instrument(parent = None, fields(service = self.service_name), name = "task_executor", skip_all)]
|
||||||
pub fn spawn_handle<R: Send + 'static>(
|
pub fn spawn_handle<R: Send + 'static>(
|
||||||
&self,
|
&self,
|
||||||
task: impl Future<Output = R> + Send + 'static,
|
task: impl Future<Output = R> + Send + 'static,
|
||||||
@@ -283,7 +283,7 @@ impl TaskExecutor {
|
|||||||
/// The Future returned behaves like the standard JoinHandle which can return an error if the
|
/// The Future returned behaves like the standard JoinHandle which can return an error if the
|
||||||
/// task failed.
|
/// task failed.
|
||||||
/// This function generates prometheus metrics on number of tasks and task duration.
|
/// This function generates prometheus metrics on number of tasks and task duration.
|
||||||
#[instrument(parent = None,level = "info", fields(service = self.service_name), name = "task_executor", skip_all)]
|
#[instrument(parent = None, fields(service = self.service_name), name = "task_executor", skip_all)]
|
||||||
pub fn spawn_blocking_handle<F, R>(
|
pub fn spawn_blocking_handle<F, R>(
|
||||||
&self,
|
&self,
|
||||||
task: F,
|
task: F,
|
||||||
@@ -332,7 +332,7 @@ impl TaskExecutor {
|
|||||||
/// a `tokio` context present in the thread-local storage due to some `rayon` funkiness. Talk to
|
/// a `tokio` context present in the thread-local storage due to some `rayon` funkiness. Talk to
|
||||||
/// @paulhauner if you plan to use this function in production. He has put metrics in here to
|
/// @paulhauner if you plan to use this function in production. He has put metrics in here to
|
||||||
/// track any use of it, so don't think you can pull a sneaky one on him.
|
/// track any use of it, so don't think you can pull a sneaky one on him.
|
||||||
#[instrument(parent = None,level = "info", fields(service = self.service_name), name = "task_executor", skip_all)]
|
#[instrument(parent = None, fields(service = self.service_name), name = "task_executor", skip_all)]
|
||||||
pub fn block_on_dangerous<F: Future>(
|
pub fn block_on_dangerous<F: Future>(
|
||||||
&self,
|
&self,
|
||||||
future: F,
|
future: F,
|
||||||
@@ -368,7 +368,7 @@ impl TaskExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a `Handle` to the current runtime.
|
/// Returns a `Handle` to the current runtime.
|
||||||
#[instrument(parent = None,level = "info", fields(service = self.service_name), name = "task_executor", skip_all)]
|
#[instrument(parent = None, fields(service = self.service_name), name = "task_executor", skip_all)]
|
||||||
pub fn handle(&self) -> Option<Handle> {
|
pub fn handle(&self) -> Option<Handle> {
|
||||||
self.handle_provider.handle()
|
self.handle_provider.handle()
|
||||||
}
|
}
|
||||||
@@ -383,7 +383,7 @@ impl TaskExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Get a channel to request shutting down.
|
/// Get a channel to request shutting down.
|
||||||
#[instrument(parent = None,level = "info", fields(service = self.service_name), name = "task_executor", skip_all)]
|
#[instrument(parent = None, fields(service = self.service_name), name = "task_executor", skip_all)]
|
||||||
pub fn shutdown_sender(&self) -> Sender<ShutdownReason> {
|
pub fn shutdown_sender(&self) -> Sender<ShutdownReason> {
|
||||||
self.signal_tx.clone()
|
self.signal_tx.clone()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user