mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 01:35:41 +00:00
remove tracing::intrument annotations (#3197)
* remove tracing::intrument annotations * remove unused param and leftover * more leftovers
This commit is contained in:
@@ -1102,7 +1102,6 @@ impl State {
|
||||
|
||||
|
||||
/// Modify the reputation of a peer based on its behavior.
|
||||
#[tracing::instrument(level = "trace", skip(ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn modify_reputation(
|
||||
ctx: &mut impl SubsystemContext<Message = ApprovalDistributionMessage>,
|
||||
peer_id: PeerId,
|
||||
@@ -1126,7 +1125,6 @@ impl ApprovalDistribution {
|
||||
Self { metrics }
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self, ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn run<Context>(self, ctx: Context)
|
||||
where
|
||||
Context: SubsystemContext<Message = ApprovalDistributionMessage>,
|
||||
@@ -1136,7 +1134,6 @@ impl ApprovalDistribution {
|
||||
}
|
||||
|
||||
/// Used for testing.
|
||||
#[tracing::instrument(skip(self, ctx, state), fields(subsystem = LOG_TARGET))]
|
||||
async fn run_inner<Context>(self, mut ctx: Context, state: &mut State)
|
||||
where
|
||||
Context: SubsystemContext<Message = ApprovalDistributionMessage>,
|
||||
|
||||
@@ -176,7 +176,6 @@ impl FetchTask {
|
||||
/// Start fetching a chunk.
|
||||
///
|
||||
/// A task handling the fetching of the configured chunk will be spawned.
|
||||
#[tracing::instrument(level = "trace", skip(config, ctx), fields(subsystem = LOG_TARGET))]
|
||||
pub async fn start<Context>(config: FetchTaskConfig, ctx: &mut Context) -> Result<Self>
|
||||
where
|
||||
Context: SubsystemContext,
|
||||
@@ -249,7 +248,6 @@ enum TaskError {
|
||||
}
|
||||
|
||||
impl RunningTask {
|
||||
#[tracing::instrument(level = "trace", skip(self, kill), fields(subsystem = LOG_TARGET))]
|
||||
async fn run(self, kill: oneshot::Receiver<()>) {
|
||||
// Wait for completion/or cancel.
|
||||
let run_it = self.run_inner();
|
||||
|
||||
@@ -78,7 +78,6 @@ impl Requester {
|
||||
///
|
||||
/// You must feed it with `ActiveLeavesUpdate` via `update_fetching_heads` and make it progress
|
||||
/// by advancing the stream.
|
||||
#[tracing::instrument(level = "trace", skip(metrics), fields(subsystem = LOG_TARGET))]
|
||||
pub fn new(metrics: Metrics) -> Self {
|
||||
let (tx, rx) = mpsc::channel(1);
|
||||
Requester {
|
||||
@@ -92,7 +91,6 @@ impl Requester {
|
||||
/// Update heads that need availability distribution.
|
||||
///
|
||||
/// For all active heads we will be fetching our chunks for availability distribution.
|
||||
#[tracing::instrument(level = "trace", skip(self, ctx, runtime, update), fields(subsystem = LOG_TARGET))]
|
||||
pub async fn update_fetching_heads<Context>(
|
||||
&mut self,
|
||||
ctx: &mut Context,
|
||||
|
||||
@@ -95,7 +95,6 @@ impl SessionCache {
|
||||
///
|
||||
/// Use this function over any `fetch_session_info` if all you need is a reference to
|
||||
/// `SessionInfo`, as it avoids an expensive clone.
|
||||
#[tracing::instrument(level = "trace", skip(self, ctx, runtime, with_info), fields(subsystem = LOG_TARGET))]
|
||||
pub async fn with_session_info<Context, F, R>(
|
||||
&mut self,
|
||||
ctx: &mut Context,
|
||||
@@ -146,7 +145,6 @@ impl SessionCache {
|
||||
///
|
||||
/// We assume validators in a group are tried in reverse order, so the reported bad validators
|
||||
/// will be put at the beginning of the group.
|
||||
#[tracing::instrument(level = "trace", skip(self, report), fields(subsystem = LOG_TARGET))]
|
||||
pub fn report_bad(&mut self, report: BadValidators) -> crate::Result<()> {
|
||||
let session = self
|
||||
.session_info_cache
|
||||
|
||||
@@ -149,7 +149,6 @@ where
|
||||
}
|
||||
|
||||
/// Query chunk from the availability store.
|
||||
#[tracing::instrument(level = "trace", skip(ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn query_chunk<Context>(
|
||||
ctx: &mut Context,
|
||||
candidate_hash: CandidateHash,
|
||||
@@ -178,7 +177,6 @@ where
|
||||
}
|
||||
|
||||
/// Query PoV from the availability store.
|
||||
#[tracing::instrument(level = "trace", skip(ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn query_available_data<Context>(
|
||||
ctx: &mut Context,
|
||||
candidate_hash: CandidateHash,
|
||||
|
||||
@@ -608,11 +608,9 @@ async fn handle_signal(
|
||||
}
|
||||
|
||||
/// Machinery around launching interactions into the background.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, state), fields(subsystem = LOG_TARGET))]
|
||||
async fn launch_interaction(
|
||||
state: &mut State,
|
||||
ctx: &mut impl SubsystemContext<Message = AvailabilityRecoveryMessage>,
|
||||
session_index: SessionIndex,
|
||||
session_info: SessionInfo,
|
||||
receipt: CandidateReceipt,
|
||||
backing_group: Option<GroupIndex>,
|
||||
@@ -663,7 +661,6 @@ async fn launch_interaction(
|
||||
}
|
||||
|
||||
/// Handles an availability recovery request.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, state), fields(subsystem = LOG_TARGET))]
|
||||
async fn handle_recover(
|
||||
state: &mut State,
|
||||
ctx: &mut impl SubsystemContext<Message = AvailabilityRecoveryMessage>,
|
||||
@@ -706,7 +703,6 @@ async fn handle_recover(
|
||||
launch_interaction(
|
||||
state,
|
||||
ctx,
|
||||
session_index,
|
||||
session_info,
|
||||
receipt,
|
||||
backing_group,
|
||||
@@ -727,7 +723,6 @@ async fn handle_recover(
|
||||
}
|
||||
|
||||
/// Queries a chunk from av-store.
|
||||
#[tracing::instrument(level = "trace", skip(ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn query_full_data(
|
||||
ctx: &mut impl SubsystemContext<Message = AvailabilityRecoveryMessage>,
|
||||
candidate_hash: CandidateHash,
|
||||
|
||||
@@ -152,7 +152,6 @@ impl BitfieldDistribution {
|
||||
}
|
||||
|
||||
/// Start processing work as passed on from the Overseer.
|
||||
#[tracing::instrument(skip(self, ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn run<Context>(self, mut ctx: Context)
|
||||
where
|
||||
Context: SubsystemContext<Message = BitfieldDistributionMessage>,
|
||||
@@ -234,7 +233,6 @@ impl BitfieldDistribution {
|
||||
}
|
||||
|
||||
/// Modify the reputation of a peer based on its behavior.
|
||||
#[tracing::instrument(level = "trace", skip(ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn modify_reputation<Context>(
|
||||
ctx: &mut Context,
|
||||
peer: PeerId,
|
||||
@@ -254,7 +252,6 @@ where
|
||||
/// Distribute a given valid and signature checked bitfield message.
|
||||
///
|
||||
/// For this variant the source is this node.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, metrics), fields(subsystem = LOG_TARGET))]
|
||||
async fn handle_bitfield_distribution<Context>(
|
||||
ctx: &mut Context,
|
||||
state: &mut ProtocolState,
|
||||
@@ -308,7 +305,6 @@ where
|
||||
/// Distribute a given valid and signature checked bitfield message.
|
||||
///
|
||||
/// Can be originated by another subsystem or received via network from another peer.
|
||||
#[tracing::instrument(level = "trace", skip(ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn relay_message<Context>(
|
||||
ctx: &mut Context,
|
||||
job_data: &mut PerRelayParentData,
|
||||
@@ -385,7 +381,6 @@ where
|
||||
}
|
||||
|
||||
/// Handle an incoming message from a peer.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, metrics), fields(subsystem = LOG_TARGET))]
|
||||
async fn process_incoming_peer_message<Context>(
|
||||
ctx: &mut Context,
|
||||
state: &mut ProtocolState,
|
||||
@@ -506,7 +501,6 @@ where
|
||||
|
||||
/// Deal with network bridge updates and track what needs to be tracked
|
||||
/// which depends on the message type received.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, metrics), fields(subsystem = LOG_TARGET))]
|
||||
async fn handle_network_msg<Context>(
|
||||
ctx: &mut Context,
|
||||
state: &mut ProtocolState,
|
||||
@@ -561,7 +555,6 @@ where
|
||||
}
|
||||
|
||||
/// Handle the changes necessary when our view changes.
|
||||
#[tracing::instrument(level = "trace", fields(subsystem = LOG_TARGET))]
|
||||
fn handle_our_view_change(state: &mut ProtocolState, view: OurView) {
|
||||
let old_view = std::mem::replace(&mut (state.view), view);
|
||||
|
||||
@@ -584,7 +577,6 @@ fn handle_our_view_change(state: &mut ProtocolState, view: OurView) {
|
||||
|
||||
// Send the difference between two views which were not sent
|
||||
// to that particular peer.
|
||||
#[tracing::instrument(level = "trace", skip(ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn handle_peer_view_change<Context>(
|
||||
ctx: &mut Context,
|
||||
state: &mut ProtocolState,
|
||||
@@ -637,7 +629,6 @@ where
|
||||
}
|
||||
|
||||
/// Send a gossip message and track it in the per relay parent data.
|
||||
#[tracing::instrument(level = "trace", skip(ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn send_tracked_gossip_message<Context>(
|
||||
ctx: &mut Context,
|
||||
state: &mut ProtocolState,
|
||||
@@ -693,7 +684,6 @@ where
|
||||
}
|
||||
|
||||
/// Query our validator set and signing context for a particular relay parent.
|
||||
#[tracing::instrument(level = "trace", skip(ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn query_basics<Context>(
|
||||
ctx: &mut Context,
|
||||
relay_parent: Hash,
|
||||
|
||||
@@ -827,7 +827,6 @@ async fn handle_network_messages<AD: validator_discovery::AuthorityDiscovery>(
|
||||
/// #fn is_send<T: Send>();
|
||||
/// #is_send::<parking_lot::MutexGuard<'static, ()>();
|
||||
/// ```
|
||||
#[tracing::instrument(skip(bridge, ctx, network_stream), fields(subsystem = LOG_TARGET))]
|
||||
async fn run_network<N, AD>(
|
||||
bridge: NetworkBridge<N, AD>,
|
||||
mut ctx: impl SubsystemContext<Message=NetworkBridgeMessage>,
|
||||
@@ -924,7 +923,6 @@ fn construct_view(live_heads: impl DoubleEndedIterator<Item = Hash>, finalized_n
|
||||
)
|
||||
}
|
||||
|
||||
#[tracing::instrument(level = "trace", skip(net, ctx, shared, metrics), fields(subsystem = LOG_TARGET))]
|
||||
async fn update_our_view(
|
||||
net: &mut impl Network,
|
||||
ctx: &mut impl SubsystemContext<Message = NetworkBridgeMessage>,
|
||||
@@ -997,7 +995,6 @@ async fn update_our_view(
|
||||
|
||||
// Handle messages on a specific peer-set. The peer is expected to be connected on that
|
||||
// peer-set.
|
||||
#[tracing::instrument(level = "trace", skip(peers, messages, metrics), fields(subsystem = LOG_TARGET))]
|
||||
fn handle_peer_messages<M>(
|
||||
peer: PeerId,
|
||||
peer_set: PeerSet,
|
||||
@@ -1048,7 +1045,6 @@ fn handle_peer_messages<M>(
|
||||
(outgoing_messages, reports)
|
||||
}
|
||||
|
||||
#[tracing::instrument(level = "trace", skip(net, peers, metrics), fields(subsystem = LOG_TARGET))]
|
||||
async fn send_validation_message<I>(
|
||||
net: &mut impl Network,
|
||||
peers: I,
|
||||
@@ -1062,7 +1058,6 @@ async fn send_validation_message<I>(
|
||||
send_message(net, peers, PeerSet::Validation, message, metrics).await
|
||||
}
|
||||
|
||||
#[tracing::instrument(level = "trace", skip(net, peers, metrics), fields(subsystem = LOG_TARGET))]
|
||||
async fn send_collation_message<I>(
|
||||
net: &mut impl Network,
|
||||
peers: I,
|
||||
@@ -1109,7 +1104,6 @@ fn dispatch_collation_event_to_all_unbounded(
|
||||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(level = "trace", skip(events, ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn dispatch_validation_events_to_all<I>(
|
||||
events: I,
|
||||
ctx: &mut impl SubsystemSender
|
||||
@@ -1121,7 +1115,6 @@ async fn dispatch_validation_events_to_all<I>(
|
||||
ctx.send_messages(events.into_iter().flat_map(AllMessages::dispatch_iter)).await
|
||||
}
|
||||
|
||||
#[tracing::instrument(level = "trace", skip(events, ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn dispatch_collation_events_to_all<I>(
|
||||
events: I,
|
||||
ctx: &mut impl SubsystemSender
|
||||
|
||||
@@ -192,7 +192,6 @@ impl Network for Arc<NetworkService<Block, Hash>> {
|
||||
sc_network::NetworkService::remove_from_peers_set(&**self, protocol, multiaddresses)
|
||||
}
|
||||
|
||||
#[tracing::instrument(level = "trace", skip(self), fields(subsystem = LOG_TARGET))]
|
||||
fn action_sink<'a>(
|
||||
&'a mut self,
|
||||
) -> Pin<Box<dyn Sink<NetworkAction, Error = SubsystemError> + Send + 'a>> {
|
||||
|
||||
@@ -258,7 +258,6 @@ impl State {
|
||||
/// or the relay-parent isn't in the active-leaves set, we ignore the message
|
||||
/// as it must be invalid in that case - although this indicates a logic error
|
||||
/// elsewhere in the node.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, runtime, state, pov), fields(subsystem = LOG_TARGET))]
|
||||
async fn distribute_collation(
|
||||
ctx: &mut impl SubsystemContext,
|
||||
runtime: &mut RuntimeInfo,
|
||||
@@ -357,7 +356,6 @@ async fn distribute_collation(
|
||||
|
||||
/// Get the Id of the Core that is assigned to the para being collated on if any
|
||||
/// and the total number of cores.
|
||||
#[tracing::instrument(level = "trace", skip(ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn determine_core(
|
||||
ctx: &mut impl SubsystemContext,
|
||||
para_id: ParaId,
|
||||
@@ -387,7 +385,6 @@ struct GroupValidators {
|
||||
/// Figure out current and next group of validators assigned to the para being collated on.
|
||||
///
|
||||
/// Returns [`ValidatorId`]'s of current and next group as determined based on the `relay_parent`.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, runtime), fields(subsystem = LOG_TARGET))]
|
||||
async fn determine_our_validators(
|
||||
ctx: &mut impl SubsystemContext,
|
||||
runtime: &mut RuntimeInfo,
|
||||
@@ -424,7 +421,6 @@ async fn determine_our_validators(
|
||||
}
|
||||
|
||||
/// Issue a `Declare` collation message to the given `peer`.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, state), fields(subsystem = LOG_TARGET))]
|
||||
async fn declare(
|
||||
ctx: &mut impl SubsystemContext<Message = CollatorProtocolMessage>,
|
||||
state: &mut State,
|
||||
@@ -450,7 +446,6 @@ async fn declare(
|
||||
|
||||
/// Issue a connection request to a set of validators and
|
||||
/// revoke the previous connection request.
|
||||
#[tracing::instrument(level = "trace", skip(ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn connect_to_validators(
|
||||
ctx: &mut impl SubsystemContext,
|
||||
validator_ids: Vec<AuthorityDiscoveryId>,
|
||||
@@ -467,7 +462,6 @@ async fn connect_to_validators(
|
||||
///
|
||||
/// This will only advertise a collation if there exists one for the given `relay_parent` and the given `peer` is
|
||||
/// set as validator for our para at the given `relay_parent`.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, state), fields(subsystem = LOG_TARGET))]
|
||||
async fn advertise_collation(
|
||||
ctx: &mut impl SubsystemContext,
|
||||
state: &mut State,
|
||||
@@ -528,7 +522,6 @@ async fn advertise_collation(
|
||||
}
|
||||
|
||||
/// The main incoming message dispatching switch.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, runtime, state), fields(subsystem = LOG_TARGET))]
|
||||
async fn process_msg(
|
||||
ctx: &mut impl SubsystemContext<Message = CollatorProtocolMessage>,
|
||||
runtime: &mut RuntimeInfo,
|
||||
@@ -635,7 +628,6 @@ async fn process_msg(
|
||||
}
|
||||
|
||||
/// Issue a response to a previously requested collation.
|
||||
#[tracing::instrument(level = "trace", skip(state, pov), fields(subsystem = LOG_TARGET))]
|
||||
async fn send_collation(
|
||||
state: &mut State,
|
||||
request: IncomingRequest<CollationFetchingRequest>,
|
||||
@@ -652,7 +644,6 @@ async fn send_collation(
|
||||
}
|
||||
|
||||
/// A networking messages switch.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, runtime, state), fields(subsystem = LOG_TARGET))]
|
||||
async fn handle_incoming_peer_message(
|
||||
ctx: &mut impl SubsystemContext,
|
||||
runtime: &mut RuntimeInfo,
|
||||
@@ -724,7 +715,6 @@ async fn handle_incoming_peer_message(
|
||||
}
|
||||
|
||||
/// Our view has changed.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, state), fields(subsystem = LOG_TARGET))]
|
||||
async fn handle_peer_view_change(
|
||||
ctx: &mut impl SubsystemContext<Message = CollatorProtocolMessage>,
|
||||
state: &mut State,
|
||||
@@ -743,7 +733,6 @@ async fn handle_peer_view_change(
|
||||
}
|
||||
|
||||
/// Bridge messages switch.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, runtime, state), fields(subsystem = LOG_TARGET))]
|
||||
async fn handle_network_msg(
|
||||
ctx: &mut impl SubsystemContext<Message = CollatorProtocolMessage>,
|
||||
runtime: &mut RuntimeInfo,
|
||||
@@ -809,7 +798,6 @@ async fn handle_network_msg(
|
||||
}
|
||||
|
||||
/// Handles our view changes.
|
||||
#[tracing::instrument(level = "trace", skip(state), fields(subsystem = LOG_TARGET))]
|
||||
async fn handle_our_view_change(
|
||||
state: &mut State,
|
||||
view: OurView,
|
||||
@@ -851,7 +839,6 @@ async fn handle_our_view_change(
|
||||
}
|
||||
|
||||
/// The collator protocol collator side main loop.
|
||||
#[tracing::instrument(skip(ctx, collator_pair, metrics), fields(subsystem = LOG_TARGET))]
|
||||
pub(crate) async fn run(
|
||||
mut ctx: impl SubsystemContext<Message = CollatorProtocolMessage>,
|
||||
local_peer_id: PeerId,
|
||||
|
||||
@@ -90,7 +90,6 @@ impl CollatorProtocolSubsystem {
|
||||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self, ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn run<Context>(self, ctx: Context) -> Result<()>
|
||||
where
|
||||
Context: SubsystemContext<Message = CollatorProtocolMessage>,
|
||||
@@ -130,7 +129,6 @@ where
|
||||
}
|
||||
|
||||
/// Modify the reputation of a peer based on its behavior.
|
||||
#[tracing::instrument(level = "trace", skip(ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn modify_reputation<Context>(ctx: &mut Context, peer: PeerId, rep: Rep)
|
||||
where
|
||||
Context: SubsystemContext,
|
||||
|
||||
@@ -513,7 +513,6 @@ async fn disconnect_peer(ctx: &mut impl SubsystemContext, peer_id: PeerId) {
|
||||
}
|
||||
|
||||
/// Another subsystem has requested to fetch collations on a particular leaf for some para.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, state, tx, pc), fields(subsystem = LOG_TARGET))]
|
||||
async fn fetch_collation<Context>(
|
||||
ctx: &mut Context,
|
||||
state: &mut State,
|
||||
@@ -530,7 +529,6 @@ where
|
||||
}
|
||||
|
||||
/// Report a collator for some malicious actions.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, peer_data), fields(subsystem = LOG_TARGET))]
|
||||
async fn report_collator<Context>(
|
||||
ctx: &mut Context,
|
||||
peer_data: &HashMap<PeerId, PeerData>,
|
||||
@@ -545,7 +543,6 @@ where
|
||||
}
|
||||
|
||||
/// Some other subsystem has reported a collator as a good one, bump reputation.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, peer_data), fields(subsystem = LOG_TARGET))]
|
||||
async fn note_good_collation<Context>(
|
||||
ctx: &mut Context,
|
||||
peer_data: &HashMap<PeerId, PeerData>,
|
||||
@@ -560,7 +557,6 @@ where
|
||||
}
|
||||
|
||||
/// Notify a collator that its collation got seconded.
|
||||
#[tracing::instrument(level = "trace", skip(ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn notify_collation_seconded(
|
||||
ctx: &mut impl SubsystemContext<Message = CollatorProtocolMessage>,
|
||||
peer_id: PeerId,
|
||||
@@ -581,7 +577,6 @@ async fn notify_collation_seconded(
|
||||
/// A peer's view has changed. A number of things should be done:
|
||||
/// - Ongoing collation requests have to be cancelled.
|
||||
/// - Advertisements by this peer that are no longer relevant have to be removed.
|
||||
#[tracing::instrument(level = "trace", skip(state), fields(subsystem = LOG_TARGET))]
|
||||
async fn handle_peer_view_change(
|
||||
state: &mut State,
|
||||
peer_id: PeerId,
|
||||
@@ -602,7 +597,6 @@ async fn handle_peer_view_change(
|
||||
/// - Check if the requested collation is in our view.
|
||||
/// - Update PerRequest records with the `result` field if necessary.
|
||||
/// And as such invocations of this function may rely on that.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, state, result), fields(subsystem = LOG_TARGET))]
|
||||
async fn request_collation<Context>(
|
||||
ctx: &mut Context,
|
||||
state: &mut State,
|
||||
@@ -671,7 +665,6 @@ where
|
||||
}
|
||||
|
||||
/// Networking message has been received.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, state), fields(subsystem = LOG_TARGET))]
|
||||
async fn process_incoming_peer_message<Context>(
|
||||
ctx: &mut Context,
|
||||
state: &mut State,
|
||||
@@ -806,7 +799,6 @@ where
|
||||
/// A leaf has become inactive so we want to
|
||||
/// - Cancel all ongoing collation requests that are on top of that leaf.
|
||||
/// - Remove all stored collations relevant to that leaf.
|
||||
#[tracing::instrument(level = "trace", skip(state), fields(subsystem = LOG_TARGET))]
|
||||
async fn remove_relay_parent(
|
||||
state: &mut State,
|
||||
relay_parent: Hash,
|
||||
@@ -822,7 +814,6 @@ async fn remove_relay_parent(
|
||||
}
|
||||
|
||||
/// Our view has changed.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, state, keystore), fields(subsystem = LOG_TARGET))]
|
||||
async fn handle_our_view_change(
|
||||
ctx: &mut impl SubsystemContext,
|
||||
state: &mut State,
|
||||
@@ -874,7 +865,6 @@ async fn handle_our_view_change(
|
||||
}
|
||||
|
||||
/// Bridge event switch.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, state, keystore), fields(subsystem = LOG_TARGET))]
|
||||
async fn handle_network_msg<Context>(
|
||||
ctx: &mut Context,
|
||||
state: &mut State,
|
||||
@@ -910,7 +900,6 @@ where
|
||||
}
|
||||
|
||||
/// The main message receiver switch.
|
||||
#[tracing::instrument(level = "trace", skip(ctx, keystore, state), fields(subsystem = LOG_TARGET))]
|
||||
async fn process_msg<Context>(
|
||||
ctx: &mut Context,
|
||||
keystore: &SyncCryptoStorePtr,
|
||||
@@ -1003,7 +992,6 @@ async fn wait_until_next_check(last_poll: Instant) -> Instant {
|
||||
}
|
||||
|
||||
/// The main run loop.
|
||||
#[tracing::instrument(skip(ctx, keystore, metrics), fields(subsystem = LOG_TARGET))]
|
||||
pub(crate) async fn run<Context>(
|
||||
mut ctx: Context,
|
||||
keystore: SyncCryptoStorePtr,
|
||||
|
||||
@@ -232,7 +232,6 @@ impl PeerRelayParentKnowledge {
|
||||
///
|
||||
/// This returns `true` if this is the first time the peer has become aware of a
|
||||
/// candidate with the given hash.
|
||||
#[tracing::instrument(level = "trace", skip(self), fields(subsystem = LOG_TARGET))]
|
||||
fn send(&mut self, fingerprint: &(CompactStatement, ValidatorIndex)) -> bool {
|
||||
debug_assert!(
|
||||
self.can_send(fingerprint),
|
||||
@@ -295,7 +294,6 @@ impl PeerRelayParentKnowledge {
|
||||
///
|
||||
/// This returns `Ok(true)` if this is the first time the peer has become aware of a
|
||||
/// candidate with given hash.
|
||||
#[tracing::instrument(level = "trace", skip(self), fields(subsystem = LOG_TARGET))]
|
||||
fn receive(
|
||||
&mut self,
|
||||
fingerprint: &(CompactStatement, ValidatorIndex),
|
||||
@@ -422,7 +420,6 @@ impl PeerData {
|
||||
///
|
||||
/// This returns `true` if this is the first time the peer has become aware of a
|
||||
/// candidate with the given hash.
|
||||
#[tracing::instrument(level = "trace", skip(self), fields(subsystem = LOG_TARGET))]
|
||||
fn send(
|
||||
&mut self,
|
||||
relay_parent: &Hash,
|
||||
@@ -466,7 +463,6 @@ impl PeerData {
|
||||
///
|
||||
/// This returns `Ok(true)` if this is the first time the peer has become aware of a
|
||||
/// candidate with given hash.
|
||||
#[tracing::instrument(level = "trace", skip(self), fields(subsystem = LOG_TARGET))]
|
||||
fn receive(
|
||||
&mut self,
|
||||
relay_parent: &Hash,
|
||||
@@ -664,7 +660,6 @@ impl ActiveHeadData {
|
||||
///
|
||||
/// Any other statements or those that reference a candidate we are not aware of cannot be accepted
|
||||
/// and will return `NotedStatement::NotUseful`.
|
||||
#[tracing::instrument(level = "trace", skip(self), fields(subsystem = LOG_TARGET))]
|
||||
fn note_statement(&mut self, statement: SignedFullStatement) -> NotedStatement {
|
||||
let validator_index = statement.validator_index();
|
||||
let comparator = StoredStatementComparator {
|
||||
@@ -844,7 +839,6 @@ fn check_statement_signature(
|
||||
/// circulates the statement to all peers who have not seen it yet, and
|
||||
/// sends all statements dependent on that statement to peers who could previously not receive
|
||||
/// them but now can.
|
||||
#[tracing::instrument(level = "trace", skip(peers, ctx, active_heads, metrics), fields(subsystem = LOG_TARGET))]
|
||||
async fn circulate_statement_and_dependents(
|
||||
peers: &mut HashMap<PeerId, PeerData>,
|
||||
active_heads: &mut HashMap<Hash, ActiveHeadData>,
|
||||
@@ -945,7 +939,6 @@ fn is_statement_large(statement: &SignedFullStatement) -> bool {
|
||||
|
||||
/// Circulates a statement to all peers who have not seen it yet, and returns
|
||||
/// an iterator over peers who need to have dependent statements sent.
|
||||
#[tracing::instrument(level = "trace", skip(peers, ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn circulate_statement<'a>(
|
||||
peers: &mut HashMap<PeerId, PeerData>,
|
||||
ctx: &mut impl SubsystemContext,
|
||||
@@ -1022,7 +1015,6 @@ async fn circulate_statement<'a>(
|
||||
}
|
||||
|
||||
/// Send all statements about a given candidate hash to a peer.
|
||||
#[tracing::instrument(level = "trace", skip(peer_data, ctx, active_head, metrics), fields(subsystem = LOG_TARGET))]
|
||||
async fn send_statements_about(
|
||||
peer: PeerId,
|
||||
peer_data: &mut PeerData,
|
||||
@@ -1060,7 +1052,6 @@ async fn send_statements_about(
|
||||
}
|
||||
|
||||
/// Send all statements at a given relay-parent to a peer.
|
||||
#[tracing::instrument(level = "trace", skip(peer_data, ctx, active_head, metrics), fields(subsystem = LOG_TARGET))]
|
||||
async fn send_statements(
|
||||
peer: PeerId,
|
||||
peer_data: &mut PeerData,
|
||||
@@ -1450,7 +1441,6 @@ async fn handle_incoming_message<'a>(
|
||||
}
|
||||
|
||||
/// Update a peer's view. Sends all newly unlocked statements based on the previous
|
||||
#[tracing::instrument(level = "trace", skip(peer_data, ctx, active_heads, metrics), fields(subsystem = LOG_TARGET))]
|
||||
async fn update_peer_view_and_send_unlocked(
|
||||
peer: PeerId,
|
||||
peer_data: &mut PeerData,
|
||||
@@ -1560,7 +1550,6 @@ async fn handle_network_update(
|
||||
}
|
||||
|
||||
impl StatementDistribution {
|
||||
#[tracing::instrument(skip(self, ctx), fields(subsystem = LOG_TARGET))]
|
||||
async fn run(
|
||||
self,
|
||||
mut ctx: impl SubsystemContext<Message = StatementDistributionMessage>,
|
||||
|
||||
Reference in New Issue
Block a user