Skip to content

Commit

Permalink
removed tracing::instrument
Browse files Browse the repository at this point in the history
  • Loading branch information
pompon0 committed Jun 12, 2024
1 parent 9c698e0 commit 54f5343
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 19 deletions.
2 changes: 0 additions & 2 deletions node/actors/bft/src/leader/replica_commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions node/actors/bft/src/leader/replica_prepare.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -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,
Expand Down
4 changes: 1 addition & 3 deletions node/actors/bft/src/leader/state_machine.rs
Original file line number Diff line number Diff line change
@@ -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 _,
Expand Down Expand Up @@ -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<Config>,
outbound_pipe: OutputSender,
Expand Down
2 changes: 0 additions & 2 deletions node/actors/bft/src/replica/leader_commit.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions node/actors/bft/src/replica/leader_prepare.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions node/actors/bft/src/replica/new_view.rs
Original file line number Diff line number Diff line change
@@ -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();
Expand Down
2 changes: 0 additions & 2 deletions node/actors/bft/src/replica/replica_prepare.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions node/actors/bft/src/replica/timer.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -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(),
Expand Down
2 changes: 0 additions & 2 deletions node/actors/executor/src/io.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 54f5343

Please sign in to comment.