From ccd230c63371fe5c07a257b4318104d1bca12624 Mon Sep 17 00:00:00 2001 From: Herr Seppia Date: Tue, 8 Oct 2024 19:05:23 +0200 Subject: [PATCH 1/3] node-data: add `iteration` to header debug info --- node-data/src/ledger/header.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/node-data/src/ledger/header.rs b/node-data/src/ledger/header.rs index a4d268edbe..a4b579f8d0 100644 --- a/node-data/src/ledger/header.rs +++ b/node-data/src/ledger/header.rs @@ -88,6 +88,7 @@ impl std::fmt::Debug for Header { f.debug_struct("Header") .field("version", &self.version) .field("height", &self.height) + .field("iteration", &self.iteration) .field("timestamp", ×tamp) .field("prev_block_hash", &to_str(&self.prev_block_hash)) .field("seed", &to_str(self.seed.inner())) From 236336ba40f4472a41d5464e8a4e2f4535261324 Mon Sep 17 00:00:00 2001 From: Herr Seppia Date: Tue, 8 Oct 2024 19:06:15 +0200 Subject: [PATCH 2/3] consensus: change debug log for candidate message - Remove txs bytes from log - Add signature to the log --- consensus/src/proposal/block_generator.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consensus/src/proposal/block_generator.rs b/consensus/src/proposal/block_generator.rs index e6f3684720..59427e6701 100644 --- a/consensus/src/proposal/block_generator.rs +++ b/consensus/src/proposal/block_generator.rs @@ -62,12 +62,12 @@ impl Generator { dur = format!("{:?}ms", start.elapsed().as_millis()), ); - debug!("block: {:?}", &candidate); - let mut candidate = Candidate { candidate }; candidate.sign(&ru.secret_key, ru.pubkey_bls.inner()); + debug!(event = "candidate singed", header = ?candidate.header()); + Ok(candidate.into()) } From cbf70943d19e69ad3e2f5c9a72eac81c3d2c92fd Mon Sep 17 00:00:00 2001 From: "Mr. Seppia" Date: Tue, 8 Oct 2024 20:47:51 +0200 Subject: [PATCH 3/3] Update block_generator.rs Co-authored-by: Hein Dauven --- consensus/src/proposal/block_generator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consensus/src/proposal/block_generator.rs b/consensus/src/proposal/block_generator.rs index 59427e6701..2f08e03d86 100644 --- a/consensus/src/proposal/block_generator.rs +++ b/consensus/src/proposal/block_generator.rs @@ -66,7 +66,7 @@ impl Generator { candidate.sign(&ru.secret_key, ru.pubkey_bls.inner()); - debug!(event = "candidate singed", header = ?candidate.header()); + debug!(event = "candidate signed", header = ?candidate.header()); Ok(candidate.into()) }