Update logs + do not downscore peers if WE time out (#1901)

## Issue Addressed

- RPC Errors were being logged twice: first in the peer manager and then again in the router, so leave just the peer manager's one 
- The "reduce peer count" warn message gets thrown to the user for every missed chunk, so instead print it when the request times out and also do not include there info that is not relevant to the user
- The processor didn't have the service tag so add it
- Impl `KV` for status message
- Do not downscore peers if we are the ones that timed out

Other small improvements
This commit is contained in:
divma
2020-11-16 04:06:14 +00:00
parent 6a7d221f72
commit eb56140582
8 changed files with 74 additions and 68 deletions

View File

@@ -392,6 +392,22 @@ impl std::fmt::Display for BlocksByRangeRequest {
}
}
impl slog::KV for StatusMessage {
fn serialize(
&self,
record: &slog::Record,
serializer: &mut dyn slog::Serializer,
) -> slog::Result {
use slog::Value;
serializer.emit_str("fork_digest", &format!("{:?}", self.fork_digest))?;
Value::serialize(&self.finalized_epoch, record, "finalized_epoch", serializer)?;
serializer.emit_str("finalized_root", &self.finalized_root.to_string())?;
Value::serialize(&self.head_slot, record, "head_slot", serializer)?;
serializer.emit_str("head_root", &self.head_root.to_string())?;
slog::Result::Ok(())
}
}
impl slog::Value for RequestId {
fn serialize(
&self,