Skip to content

Commit

Permalink
Fix incorrect inbound request count causing rate limiting.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmygchen committed Jul 1, 2024
1 parent 7206909 commit b711f09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 1 addition & 3 deletions beacon_node/lighthouse_network/src/rpc/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,7 @@ pub struct DataColumnsByRangeRequest {

impl DataColumnsByRangeRequest {
pub fn max_requested<E: EthSpec>(&self) -> u64 {
self.count
.saturating_mul(E::max_blobs_per_block() as u64)
.saturating_mul(self.columns.len() as u64)
self.count.saturating_mul(self.columns.len() as u64)
}

pub fn ssz_min_len() -> usize {
Expand Down
2 changes: 2 additions & 0 deletions beacon_node/lighthouse_network/src/rpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,10 @@ where
protocol,
Protocol::BlocksByRange
| Protocol::BlobsByRange
| Protocol::DataColumnsByRange
| Protocol::BlocksByRoot
| Protocol::BlobsByRoot
| Protocol::DataColumnsByRoot
) {
debug!(self.log, "Request too large to process"; "request" => %req, "protocol" => %protocol);
} else {
Expand Down

0 comments on commit b711f09

Please sign in to comment.