Skip to content

Commit

Permalink
Revert "debug" (Cardinal-Cryptography#164)
Browse files Browse the repository at this point in the history
This reverts commit e1ff059
  • Loading branch information
pmikolajczyk41 authored and Version autobump committed Dec 13, 2021
1 parent e1ff059 commit 5491677
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down
5 changes: 0 additions & 5 deletions src/member.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -247,8 +246,6 @@ where
}

fn send_unit_message(&mut self, message: UnitMessage<H, D, S>, recipient: Recipient) {
error!(target: "AlephBFT-DEBUG", "RESPONDING WITH {:?} {:?} {:?}", message, self.index(), recipient);

if self
.unit_messages_for_network
.unbounded_send((message, recipient))
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
},
Expand Down
10 changes: 0 additions & 10 deletions src/runway.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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);
}
},
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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;
}

Expand All @@ -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
Expand All @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 5491677

Please sign in to comment.