Backport release/v6.3: Add Rate limit and concurrency control for RPC with proof queries#2953
Conversation
|
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-2951-to-release/v6.3
git worktree add --checkout .worktree/backport-2951-to-release/v6.3 backport-2951-to-release/v6.3
cd .worktree/backport-2951-to-release/v6.3
git reset --hard HEAD^
git cherry-pick -x f4b318c1a986200e0fef42af3ace4787c140b758
git push --force-with-lease |
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is
❌ Your project status has failed because the head coverage (38.49%) is below the target coverage (40.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## release/v6.3 #2953 +/- ##
================================================
+ Coverage 42.30% 43.48% +1.18%
================================================
Files 1520 1866 +346
Lines 121058 155469 +34411
================================================
+ Hits 51208 67612 +16404
- Misses 65367 81814 +16447
- Partials 4483 6043 +1560
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
) Introduce limits to control the rate of calls to LoadVersion as well as maximum in-flight LoadVersion at any given point in time. This is because, such calls are expensive, and excessive call to RPC for these calls can cause an RPC node to fall behind. (cherry picked from commit f4b318c)
df689de to
637cba6
Compare
There was a problem hiding this comment.
Pull request overview
This PR backports rate limiting and concurrency control for historical proof queries from the main branch to the release/v6.3 branch. The changes introduce three new configuration parameters to limit the rate and concurrency of expensive LoadVersion calls that can cause RPC nodes to fall behind under heavy query load.
Changes:
- Added configuration options for historical proof query rate limiting and concurrency control
- Implemented rate limiting using token bucket algorithm and concurrency control using semaphore pattern
- Added comprehensive test coverage for the new functionality
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| sei-db/config/config.go | Added three new configuration fields and constants for historical proof rate limiting and concurrency control |
| sei-db/config/toml.go | Added configuration template entries for the new historical proof settings |
| sei-cosmos/storev2/rootmulti/store.go | Implemented rate limiter and semaphore-based concurrency control for historical proof queries |
| sei-cosmos/storev2/rootmulti/store_test.go | Added comprehensive tests for rate limiting, concurrency control, and edge cases |
| app/seidb.go | Added flag definitions and configuration parsing for the new settings |
| app/seidb_test.go | Added test to verify configuration parsing of historical proof flags |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Backport of #2951 to
release/v6.3.