Skip to content

Commit

Permalink
Make less logs for attn with unknown head (#2395)
Browse files Browse the repository at this point in the history
## 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
  • Loading branch information
paulhauner committed Jun 7, 2021
1 parent 502402c commit 93100f2
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -797,7 +797,7 @@ impl<T: BeaconChainTypes> Worker<T> {

// 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,
7 changes: 7 additions & 0 deletions beacon_node/network/src/sync/manager.rs
Original file line number Diff line number Diff line change
@@ -554,6 +554,13 @@ impl<T: BeaconChainTypes> SyncManager<T> {
return;
}

debug!(
self.log,
"Searching for block";
"peer_id" => %peer_id,
"block" => %block_hash
);

let request = BlocksByRootRequest {
block_roots: VariableList::from(vec![block_hash]),
};

0 comments on commit 93100f2

Please sign in to comment.