feat: increase max RPC connections to 1000#6528
Conversation
WalkthroughThis PR adds configurable RPC server connection limits via the FOREST_RPC_MAX_CONNECTIONS environment variable, defaulting to 1000. Changes include implementation, documentation, and changelog entries. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Important Action Needed: IP Allowlist UpdateIf your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:
Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@CHANGELOG.md`:
- Line 56: Update the changelog entry that currently references issue `#6527` so
it references PR `#6528` instead: replace the link text and URL
`[`#6527`](https://github.com/ChainSafe/forest/issues/6527)` with
`[`#6528`](https://github.com/ChainSafe/forest/pull/6528)` in the existing
changelog line that mentions increasing RPC max connections.
In `@src/rpc/mod.rs`:
- Around line 469-476: DEFAULT_MAX_CONNECTIONS currently accepts 0 from
FOREST_RPC_MAX_CONNECTIONS which would disable connections; update the LazyLock
initializer for DEFAULT_MAX_CONNECTIONS so that after parsing the env var you
filter out non‑positive values (e.g., require parsed > 0) and only use the
parsed value when positive, otherwise fall back to the default 1000; refer to
DEFAULT_MAX_CONNECTIONS, the LazyLock::new closure,
env::var("FOREST_RPC_MAX_CONNECTIONS") and the parse handling to locate and
change the logic.
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 8 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Summary of changes
Changes introduced in this pull request:
Reference issue to close (if applicable)
Closes #6527
Other information and links
Change checklist
Outside contributions
Summary by CodeRabbit
New Features
Documentation