From 93100f221f2e6897cee823d6213c57d3be2c4e00 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Mon, 7 Jun 2021 02:34:09 +0000 Subject: [PATCH] Make less logs for attn with unknown head (#2395) ## Issue Addressed NA ## Proposed Changes I am starting to see a lot of slog-async overflows (i.e., too many logs) on Prater whenever we see attestations for an unknown block. Since these logs are identical (except for peer id) and we expose volume/count of these errors via `metrics::GOSSIP_ATTESTATION_ERRORS_PER_TYPE`, I took the following actions to remove them from `DEBUG` logs: - Push the "Attestation for unknown block" log to trace. - Add a debug log in `search_for_block`. In effect, this should serve as a de-duped version of the previous, downgraded log. ## Additional Info TBC --- .../network/src/beacon_processor/worker/gossip_methods.rs | 2 +- beacon_node/network/src/sync/manager.rs | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/beacon_node/network/src/beacon_processor/worker/gossip_methods.rs b/beacon_node/network/src/beacon_processor/worker/gossip_methods.rs index 4b3fd716b5a..f184f0576aa 100644 --- a/beacon_node/network/src/beacon_processor/worker/gossip_methods.rs +++ b/beacon_node/network/src/beacon_processor/worker/gossip_methods.rs @@ -797,7 +797,7 @@ impl Worker { // TODO: Maintain this attestation and re-process once sync completes // TODO: We then score based on whether we can download the block and re-process. - debug!( + trace!( self.log, "Attestation for unknown block"; "peer_id" => %peer_id, diff --git a/beacon_node/network/src/sync/manager.rs b/beacon_node/network/src/sync/manager.rs index 3b092846ff1..8f4a238b232 100644 --- a/beacon_node/network/src/sync/manager.rs +++ b/beacon_node/network/src/sync/manager.rs @@ -554,6 +554,13 @@ impl SyncManager { return; } + debug!( + self.log, + "Searching for block"; + "peer_id" => %peer_id, + "block" => %block_hash + ); + let request = BlocksByRootRequest { block_roots: VariableList::from(vec![block_hash]), };