From 54f5343478ba829619effa32762f6066270493c5 Mon Sep 17 00:00:00 2001 From: Grzegorz Prusak Date: Wed, 12 Jun 2024 18:03:24 +0200 Subject: [PATCH] removed tracing::instrument --- node/actors/bft/src/leader/replica_commit.rs | 2 -- node/actors/bft/src/leader/replica_prepare.rs | 2 -- node/actors/bft/src/leader/state_machine.rs | 4 +--- node/actors/bft/src/replica/leader_commit.rs | 2 -- node/actors/bft/src/replica/leader_prepare.rs | 2 -- node/actors/bft/src/replica/new_view.rs | 2 -- node/actors/bft/src/replica/replica_prepare.rs | 2 -- node/actors/bft/src/replica/timer.rs | 2 -- node/actors/executor/src/io.rs | 2 -- 9 files changed, 1 insertion(+), 19 deletions(-) diff --git a/node/actors/bft/src/leader/replica_commit.rs b/node/actors/bft/src/leader/replica_commit.rs index 741ef5be..46ee0504 100644 --- a/node/actors/bft/src/leader/replica_commit.rs +++ b/node/actors/bft/src/leader/replica_commit.rs @@ -3,7 +3,6 @@ use super::StateMachine; use crate::metrics; use std::collections::HashSet; -use tracing::instrument; use zksync_concurrency::{ctx, metrics::LatencyHistogramExt as _}; use zksync_consensus_network::io::{ConsensusInputMessage, Target}; use zksync_consensus_roles::validator; @@ -37,7 +36,6 @@ pub(crate) enum Error { } impl StateMachine { - #[instrument(level = "trace", skip(self), ret)] pub(crate) fn process_replica_commit( &mut self, ctx: &ctx::Ctx, diff --git a/node/actors/bft/src/leader/replica_prepare.rs b/node/actors/bft/src/leader/replica_prepare.rs index eb8350ea..70614006 100644 --- a/node/actors/bft/src/leader/replica_prepare.rs +++ b/node/actors/bft/src/leader/replica_prepare.rs @@ -1,7 +1,6 @@ //! Handler of a ReplicaPrepare message. use super::StateMachine; use std::collections::HashSet; -use tracing::instrument; use zksync_concurrency::{ctx, error::Wrap}; use zksync_consensus_roles::validator; @@ -49,7 +48,6 @@ impl Wrap for Error { } impl StateMachine { - #[instrument(level = "trace", skip(self), ret)] pub(crate) async fn process_replica_prepare( &mut self, ctx: &ctx::Ctx, diff --git a/node/actors/bft/src/leader/state_machine.rs b/node/actors/bft/src/leader/state_machine.rs index 6f26e866..0be48689 100644 --- a/node/actors/bft/src/leader/state_machine.rs +++ b/node/actors/bft/src/leader/state_machine.rs @@ -1,6 +1,5 @@ use crate::{metrics, Config, OutputSender}; use std::{collections::BTreeMap, sync::Arc, unreachable}; -use tracing::instrument; use zksync_concurrency::{ ctx, error::Wrap as _, @@ -48,8 +47,7 @@ impl StateMachine { /// Returns a tuple containing: /// * The newly created [`StateMachine`] instance. /// * A sender handle that should be used to send values to be processed by the instance, asynchronously. - #[instrument(level = "trace")] - pub fn new( + pub(crate) fn new( ctx: &ctx::Ctx, config: Arc, outbound_pipe: OutputSender, diff --git a/node/actors/bft/src/replica/leader_commit.rs b/node/actors/bft/src/replica/leader_commit.rs index c450352b..d60b99b3 100644 --- a/node/actors/bft/src/replica/leader_commit.rs +++ b/node/actors/bft/src/replica/leader_commit.rs @@ -1,6 +1,5 @@ //! Handler of a LeaderCommit message. use super::StateMachine; -use tracing::instrument; use zksync_concurrency::{ctx, error::Wrap}; use zksync_consensus_roles::validator; @@ -49,7 +48,6 @@ impl Wrap for Error { impl StateMachine { /// Processes a leader commit message. We can approve this leader message even if we /// don't have the block proposal stored. It is enough to see the justification. - #[instrument(level = "trace", err)] pub(crate) async fn process_leader_commit( &mut self, ctx: &ctx::Ctx, diff --git a/node/actors/bft/src/replica/leader_prepare.rs b/node/actors/bft/src/replica/leader_prepare.rs index 1343cd03..14d86c7f 100644 --- a/node/actors/bft/src/replica/leader_prepare.rs +++ b/node/actors/bft/src/replica/leader_prepare.rs @@ -1,6 +1,5 @@ //! Handler of a LeaderPrepare message. use super::StateMachine; -use tracing::instrument; use zksync_concurrency::{ctx, error::Wrap}; use zksync_consensus_network::io::{ConsensusInputMessage, Target}; use zksync_consensus_roles::validator; @@ -65,7 +64,6 @@ impl Wrap for Error { impl StateMachine { /// Processes a leader prepare message. - #[instrument(level = "trace", ret)] pub(crate) async fn process_leader_prepare( &mut self, ctx: &ctx::Ctx, diff --git a/node/actors/bft/src/replica/new_view.rs b/node/actors/bft/src/replica/new_view.rs index ee7b5993..16403136 100644 --- a/node/actors/bft/src/replica/new_view.rs +++ b/node/actors/bft/src/replica/new_view.rs @@ -1,13 +1,11 @@ use super::StateMachine; use crate::metrics; -use tracing::instrument; use zksync_concurrency::{ctx, error::Wrap as _}; use zksync_consensus_network::io::{ConsensusInputMessage, Target}; use zksync_consensus_roles::validator; impl StateMachine { /// This blocking method is used whenever we start a new view. - #[instrument(level = "trace", err)] pub(crate) async fn start_new_view(&mut self, ctx: &ctx::Ctx) -> ctx::Result<()> { // Update the state machine. self.view = self.view.next(); diff --git a/node/actors/bft/src/replica/replica_prepare.rs b/node/actors/bft/src/replica/replica_prepare.rs index 34543170..cf6bbd48 100644 --- a/node/actors/bft/src/replica/replica_prepare.rs +++ b/node/actors/bft/src/replica/replica_prepare.rs @@ -1,6 +1,5 @@ //! Handler of a ReplicaPrepare message. use super::StateMachine; -use tracing::instrument; use zksync_concurrency::{ctx, error::Wrap}; use zksync_consensus_roles::validator; @@ -45,7 +44,6 @@ impl Wrap for Error { } impl StateMachine { - #[instrument(level = "trace", skip(self), ret)] pub(crate) async fn process_replica_prepare( &mut self, ctx: &ctx::Ctx, diff --git a/node/actors/bft/src/replica/timer.rs b/node/actors/bft/src/replica/timer.rs index 1bb6ee1f..75570d2d 100644 --- a/node/actors/bft/src/replica/timer.rs +++ b/node/actors/bft/src/replica/timer.rs @@ -1,6 +1,5 @@ use super::StateMachine; use crate::metrics; -use tracing::instrument; use zksync_concurrency::{ctx, metrics::LatencyGaugeExt as _, time}; use zksync_consensus_roles::validator; @@ -14,7 +13,6 @@ impl StateMachine { /// Resets the timer. On every timeout we double the duration, starting from a given base duration. /// This is a simple exponential backoff. - #[instrument(level = "trace", ret)] pub(crate) fn reset_timer(&mut self, ctx: &ctx::Ctx) { let final_view = match self.high_qc.as_ref() { Some(qc) => qc.view().number.next(), diff --git a/node/actors/executor/src/io.rs b/node/actors/executor/src/io.rs index 4a578f58..914ec4b8 100644 --- a/node/actors/executor/src/io.rs +++ b/node/actors/executor/src/io.rs @@ -1,5 +1,4 @@ //! Module to manage the communication between actors. It simply converts and forwards messages from and to each different actor. -use tracing::instrument; use zksync_concurrency::{ ctx::{self, channel}, scope, @@ -37,7 +36,6 @@ impl Dispatcher { } /// Method to start the IO dispatcher. It is simply a loop to receive messages from the actors and then forward them. - #[instrument(level = "trace", ret)] pub(super) async fn run(mut self, ctx: &ctx::Ctx) -> anyhow::Result<()> { scope::run!(ctx, |ctx, s| async { // Start a task to handle the messages from the consensus actor.