Skip to content

Backport release/v6.3: Add Rate limit and concurrency control for RPC with proof queries#2953

Merged
masih merged 1 commit intorelease/v6.3from
backport-2951-to-release/v6.3
Feb 22, 2026
Merged

Backport release/v6.3: Add Rate limit and concurrency control for RPC with proof queries#2953
masih merged 1 commit intorelease/v6.3from
backport-2951-to-release/v6.3

Conversation

@seidroid
Copy link

@seidroid seidroid bot commented Feb 22, 2026

Backport of #2951 to release/v6.3.

@seidroid seidroid bot added the backport label Feb 22, 2026
@seidroid seidroid bot assigned masih Feb 22, 2026
@seidroid
Copy link
Author

seidroid bot commented Feb 22, 2026

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

@github-actions
Copy link

github-actions bot commented Feb 22, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedFeb 22, 2026, 4:23 AM

@codecov
Copy link

codecov bot commented Feb 22, 2026

Codecov Report

❌ Patch coverage is 77.77778% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.48%. Comparing base (ac53eb9) to head (637cba6).
⚠️ Report is 1 commits behind head on release/v6.3.

Files with missing lines Patch % Lines
sei-db/config/config.go 0.00% 10 Missing ⚠️
sei-cosmos/storev2/rootmulti/store.go 89.28% 2 Missing and 4 partials ⚠️

❌ 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

Impacted file tree graph

@@               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     
Flag Coverage Δ
sei-chain 42.54% <100.00%> (+0.01%) ⬆️
sei-cosmos 38.25% <89.28%> (+0.03%) ⬆️
sei-db 45.69% <0.00%> (+0.05%) ⬆️
sei-ibc-go 55.96% <ø> (ø)
sei-tendermint 47.59% <ø> (?)
sei-wasmd 41.56% <ø> (ø)
sei-wasmvm 39.88% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
app/seidb.go 84.74% <100.00%> (+1.72%) ⬆️
sei-cosmos/storev2/rootmulti/store.go 42.64% <89.28%> (+3.45%) ⬆️
sei-db/config/config.go 0.00% <0.00%> (ø)

... and 350 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

)

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)
@masih masih force-pushed the backport-2951-to-release/v6.3 branch from df689de to 637cba6 Compare February 22, 2026 04:19
@masih masih requested a review from Copilot February 22, 2026 04:26
@masih masih marked this pull request as ready for review February 22, 2026 04:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@masih masih enabled auto-merge (squash) February 22, 2026 04:33
@masih masih merged commit ab9b582 into release/v6.3 Feb 22, 2026
56 of 59 checks passed
@masih masih deleted the backport-2951-to-release/v6.3 branch February 22, 2026 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants