PR manually raised the hard-coded per-peer and global limits in share/shwap/p2p/shrex/limits.go because a public-facing bridge on mocha was rejecting ~13.7k shrex streams per hour and the existing caps were not tunable. That PR is a point-fix: new defaults that work better for public-facing infra, but still baked into the binary.
This issue tracks the structural follow-up: make those same knobs configurable so the next operator with a different traffic profile does not need another manual bump and a custom build.
Problem
Per-peer stream and memory caps, per-protocol per-peer caps, and the service-global multiplier all live in code. A private bridge serving a handful of internal light nodes and a public-facing infra bridge configured to serve hundreds of community clients run the same binary and inherit the same caps regardless of workload, hardware, or operator preference.
Proposal
Add a [P2P.Shrex] section to nodebuilder/p2p/config.go that surfaces the existing knobs:
ServicePeerBaseStreams, ServicePeerStreamIncrease
ServicePeerBaseMemory, ServicePeerMemoryIncrease
GlobalLimitMultiplier
PeerStreamsPerProtocol (map: protocol name → int)
PR manually raised the hard-coded per-peer and global limits in
share/shwap/p2p/shrex/limits.gobecause a public-facing bridge on mocha was rejecting ~13.7k shrex streams per hour and the existing caps were not tunable. That PR is a point-fix: new defaults that work better for public-facing infra, but still baked into the binary.This issue tracks the structural follow-up: make those same knobs configurable so the next operator with a different traffic profile does not need another manual bump and a custom build.
Problem
Per-peer stream and memory caps, per-protocol per-peer caps, and the service-global multiplier all live in code. A private bridge serving a handful of internal light nodes and a public-facing infra bridge configured to serve hundreds of community clients run the same binary and inherit the same caps regardless of workload, hardware, or operator preference.
Proposal
Add a
[P2P.Shrex]section tonodebuilder/p2p/config.gothat surfaces the existing knobs:ServicePeerBaseStreams,ServicePeerStreamIncreaseServicePeerBaseMemory,ServicePeerMemoryIncreaseGlobalLimitMultiplierPeerStreamsPerProtocol(map: protocol name → int)