harden(server): cap concurrent gRPC streams per connection - #99
Merged
Conversation
The kernel gRPC server had no stream limit, so a peer could park an unbounded number of concurrent long-lived handlers. Legitimate load is a single co-located consensus client, so cap streams per connection at 64.
0xHansLee
requested review from
barry-peng-story,
jdubpark,
lucas2brh,
stevemilk,
wo-o and
yingyangxu2026
as code owners
August 4, 2026 03:15
|
No high-confidence issues found. The change is minimal and correct: Review iteration 1 · Commit 4a8b918 · 2026-08-04T03:15:36Z |
wo-o
approved these changes
Aug 4, 2026
wo-o
left a comment
Collaborator
There was a problem hiding this comment.
No issues found — see summary comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The kernel gRPC server sets no stream limit, so a single peer connection can park an unbounded number of concurrent long-lived handlers.
Fix
Set
grpc.MaxConcurrentStreams(64). Legitimate load is a single co-located consensus client whose peak is ~10 parallel partial-decrypt streams plus a handful of lifecycle RPCs, far below the cap.Tests
No new tests — declarative server option; existing suite passes.
issue: none