Skip to content

Conversation

@fridrik01
Copy link
Contributor

@fridrik01 fridrik01 commented Oct 30, 2025

Extension to #2938

This PR adds rate limiting and reputation tracking to the blob reactor to defend against malicious peers attempting to DoS the node through excessive or invalid blob requests.

More specifically this PR includes:

  1. Rate limiting: Implements per-peer rate limiting and global rate limiting across all peer. Once peers exceed this rate limit they are banned for a configured period.
  2. Reputation system: Each peer gets assegned a score which changes based on peer behavior. Peers lose points for protocol violations and gain points for successful blob exchanges. When score drops to 0, peers are banned for a configured perioed (only at the blob reactor level only). Scores reset to maximum when bans expire to prevent ban loops.

TODO: Tune configs to sensible values

@fridrik01 fridrik01 self-assigned this Oct 30, 2025
@fridrik01 fridrik01 force-pushed the blobreactor-ratelimit-reputation branch from b010a11 to 6041531 Compare October 30, 2025 14:33
@fridrik01 fridrik01 force-pushed the blobreactor-ratelimit-reputation branch from 6041531 to e7b3a30 Compare October 30, 2025 14:49
@fridrik01 fridrik01 marked this pull request as ready for review October 30, 2025 15:18
@fridrik01 fridrik01 requested a review from a team as a code owner October 30, 2025 15:18
@fridrik01 fridrik01 requested review from calbera and rezbera October 30, 2025 15:19
@fridrik01 fridrik01 assigned abi87 and unassigned abi87 Oct 30, 2025
@fridrik01 fridrik01 requested a review from abi87 October 30, 2025 17:47
@fridrik01 fridrik01 force-pushed the blobreactor branch 2 times, most recently from b62bf9f to 0ef6906 Compare October 31, 2025 15:14
@fridrik01 fridrik01 force-pushed the blobreactor-ratelimit-reputation branch from e7b3a30 to b538a24 Compare October 31, 2025 16:21
@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

❌ Patch coverage is 82.85714% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.54%. Comparing base (cc4ec8a) to head (b538a24).

Files with missing lines Patch % Lines
da/blobreactor/reactor.go 70.73% 23 Missing and 1 partial ⚠️
da/blobreactor/reputation.go 88.88% 12 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           blobreactor    #2969      +/-   ##
===============================================
+ Coverage        63.24%   63.54%   +0.30%     
===============================================
  Files              367      368       +1     
  Lines            18014    18207     +193     
===============================================
+ Hits             11393    11570     +177     
- Misses            5713     5730      +17     
+ Partials           908      907       -1     
Files with missing lines Coverage Δ
da/blobreactor/config.go 100.00% <100.00%> (ø)
node-core/components/blob_reactor.go 100.00% <100.00%> (ø)
da/blobreactor/reputation.go 88.88% <88.88%> (ø)
da/blobreactor/reactor.go 79.13% <70.73%> (+2.86%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants