feat(ratelimiter): add RateLimiterRegistry + evmrpc config fields#3507
feat(ratelimiter): add RateLimiterRegistry + evmrpc config fields#3507amir-deris wants to merge 17 commits into
Conversation
PR SummaryMedium Risk Overview
Reviewed by Cursor Bugbot for commit 7c3f6c5. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3507 +/- ##
==========================================
- Coverage 59.05% 58.18% -0.88%
==========================================
Files 2205 2131 -74
Lines 182317 173508 -8809
==========================================
- Hits 107672 100959 -6713
+ Misses 64945 63580 -1365
+ Partials 9700 8969 -731
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cff02e5. Configure here.

Summary
ratelimiterpackage withRegistry: per-IP token-bucket rate limiter backed by an expirable LRU (50k entries, 1h TTL) usinggolang.org/x/time/rateAllow(ctx, ip, plane, method)enforces the limit and increments therpc_rate_limit_rejected_total{plane, method}OTel counter on rejectionIPFromHTTPRequest/IPFromGRPCContextextract the real client IP, honouringX-Forwarded-Foronly whenRemoteAddr/ peer address is within a configured trusted proxy CIDRrate_limiting_enabled,ip_rate_limit_rps, andip_rate_limit_burstfields toevmrpc/config(defaults: enabled, 200 RPS, 400 burst);trusted_proxy_cidrswill be added when request-path wiring lands; existing nodes without these fields inapp.tomlfall back to defaults safely