From 5491677a3be9a5f80530225cf70c4f1a50a4ff05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Miko=C5=82ajczyk?= Date: Mon, 13 Dec 2021 12:23:11 +0100 Subject: [PATCH] Revert "debug" (#164) This reverts commit e1ff059ef17a29bdd83ec5800bfccc4ccee09822 --- Cargo.toml | 2 +- src/member.rs | 5 ----- src/runway.rs | 10 ---------- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 575d0970..c2da0e47 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aleph-bft" -version = "0.8.1" +version = "0.8.2" edition = "2018" authors = ["Cardinal Cryptography"] categories = ["algorithms", "data-structures", "cryptography", "database"] diff --git a/src/member.rs b/src/member.rs index fc5191d1..b6baa432 100644 --- a/src/member.rs +++ b/src/member.rs @@ -209,7 +209,6 @@ where } fn on_request_newest(&mut self, salt: u64) { - error!(target: "AlephBFT-DEBUG", "RECEIVED NEWESTUNIT WITH SALT {:?} FROM {:?}", salt, self.index()); let curr_time = time::Instant::now(); let task = ScheduledTask::new(Task::RequestNewest(salt), curr_time); self.task_queue.push(task); @@ -247,8 +246,6 @@ where } fn send_unit_message(&mut self, message: UnitMessage, recipient: Recipient) { - error!(target: "AlephBFT-DEBUG", "RESPONDING WITH {:?} {:?} {:?}", message, self.index(), recipient); - if self .unit_messages_for_network .unbounded_send((message, recipient)) @@ -293,7 +290,6 @@ where (message, preferred_recipient) } Task::RequestNewest(salt) => { - error!(target: "AlephBFT-DEBUG", "TASK NEWESTUNIT WITH SALT {:?} FROM {:?} ({:?})", *salt, self.index(), self.newest_unit_resolved); if self.newest_unit_resolved { return None; } @@ -369,7 +365,6 @@ where Request::Coord(coord) => { self.not_resolved_coords.remove(&coord); }, Request::Parents(u_hash) => { self.not_resolved_parents.remove(&u_hash); }, Request::NewestUnit(_) => { - error!(target: "AlephBFT-DEBUG", "NEWESTUNIT RESOLVED FROM {:?}", self.index()); self.newest_unit_resolved = true; } }, diff --git a/src/runway.rs b/src/runway.rs index 72e03b71..c46f6785 100644 --- a/src/runway.rs +++ b/src/runway.rs @@ -225,7 +225,6 @@ where self.on_request_parents(node_id, u_hash) } Request::NewestUnit(salt) => { - error!(target: "AlephBFT-DEBUG", "{:?} Newest unit request received {:?}.", self.index(), salt); trace!(target: "AlephBFT-runway", "{:?} Newest unit request received {:?}.", self.index(), salt); self.on_request_newest(node_id, salt).await } @@ -242,7 +241,6 @@ where Response::NewestUnit(response) => { let salt = response.as_signable().salt; trace!(target: "AlephBFT-runway", "{:?} Response parents received {:?}.", self.index(), salt); - error!(target: "AlephBFT-DEBUG", "{:?} Response parents received {:?}.", self.index(), salt); self.on_newest_response(response); } }, @@ -426,7 +424,6 @@ where unit, salt, }; - error!(target: "AlephBFT-DEBUG", "RESPONDING WITH {:?} {:?} {:?} {:?}", requester, self.index(), unit, salt); let signed_response = Signed::sign(response, self.keybox).await.into_unchecked(); @@ -514,21 +511,18 @@ where ) { if self.starting_round_sender.is_none() { log::debug!(target: "AlephBFT-member", "Starting round already sent, ignoring newest unit response"); - log::error!(target: "AlephBFT-DEBUG", "Starting round already sent, ignoring newest unit response"); return; } let response = match unchecked_response.check(self.keybox) { Ok(checked) => checked.into_signable(), Err(e) => { log::debug!(target: "AlephBFT-member", "incorrectly signed response: {:?}", e); - log::error!(target: "AlephBFT-DEBUG", "incorrectly signed response: {:?}", e); return; } }; if response.salt != self.salt { debug!(target: "AlephBFT-member", "Ignoring newest unit response with an unknown salt: {:?}", response); - error!(target: "AlephBFT-DEBUG", "Ignoring newest unit response with an unknown salt: {:?}", response); return; } @@ -537,13 +531,11 @@ where Some(unit) => unit, None => { log::debug!(target: "AlephBFT-member", "ivalid unit in response"); - log::error!(target: "AlephBFT-DEBUG", "ivalid unit in response"); return; } }; if checked_unit.as_signable().creator() != self.index() { log::debug!(target: "AlephBFT-member", "Not our unit in a response: {:?}", checked_unit.into_signable()); - log::error!(target: "AlephBFT-DEBUG", "Not our unit in a response: {:?}", checked_unit.into_signable()); return; } if self @@ -556,7 +548,6 @@ where if starting_round_candidate > self.starting_round_value { self.starting_round_value = starting_round_candidate; } - log::error!(target: "AlephBFT-DEBUG", "Best round: {:?} {:?}", self.index(), self.starting_round_value); } } self.newest_unit_responders.insert(response.responder); @@ -752,7 +743,6 @@ where info!(target: "AlephBFT-runway", "{:?} Runway starting.", index); - error!(target: "AlephBFT-DEBUG", "SENDING NEWESTUNIT WITH SALT {:?} FROM {:?}", self.salt, index); let notification = RunwayNotificationOut::Request(Request::NewestUnit(self.salt), Recipient::Everyone); if let Err(e) = self.unit_messages_for_network.unbounded_send(notification) {