mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-22 03:30:38 +00:00
Downgrade rate limited log (#5381)
* Address review comments * Downgrade log for by_root requests
This commit is contained in:
parent
f93844e63b
commit
54b1c229e1
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -9960,7 +9960,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "yamux"
|
name = "yamux"
|
||||||
version = "0.13.1"
|
version = "0.13.1"
|
||||||
source = "git+https://github.com/sigp/rust-yamux.git#6689e227a48258a52347cd1d984adfc94afc6f7a"
|
source = "git+https://github.com/sigp/rust-yamux.git#12a23aa0e34b7807c0c5f87f06b3438f7d6c2ed0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"instant",
|
"instant",
|
||||||
|
@ -310,11 +310,16 @@ where
|
|||||||
Err(RateLimitedErr::TooLarge) => {
|
Err(RateLimitedErr::TooLarge) => {
|
||||||
// we set the batch sizes, so this is a coding/config err for most protocols
|
// we set the batch sizes, so this is a coding/config err for most protocols
|
||||||
let protocol = req.versioned_protocol().protocol();
|
let protocol = req.versioned_protocol().protocol();
|
||||||
if matches!(protocol, Protocol::BlocksByRange)
|
if matches!(
|
||||||
|| matches!(protocol, Protocol::BlobsByRange)
|
protocol,
|
||||||
{
|
Protocol::BlocksByRange
|
||||||
debug!(self.log, "By range request will never be processed"; "request" => %req, "protocol" => %protocol);
|
| Protocol::BlobsByRange
|
||||||
|
| Protocol::BlocksByRoot
|
||||||
|
| Protocol::BlobsByRoot
|
||||||
|
) {
|
||||||
|
debug!(self.log, "Request too large to process"; "request" => %req, "protocol" => %protocol);
|
||||||
} else {
|
} else {
|
||||||
|
// Other protocols shouldn't be sending large messages, we should flag the peer kind
|
||||||
crit!(self.log, "Request size too large to ever be processed"; "protocol" => %protocol);
|
crit!(self.log, "Request size too large to ever be processed"; "protocol" => %protocol);
|
||||||
}
|
}
|
||||||
// send an error code to the peer.
|
// send an error code to the peer.
|
||||||
|
Loading…
Reference in New Issue
Block a user