🎯 Problem to be solved
Charon accepts effectively unbounded traffic from cluster peers on its libp2p protocols. The default wire read limit is 128MB per message, and nothing bounds message rate or the number of concurrent inbound streams a peer can open: charon runs with libp2p.ResourceManager(new(network.NullResourceManager)), and yamux delegates concurrent stream limits to the resource manager.
A compromised or buggy peer can therefore make a node allocate and verify unbounded work. Local kurtosis testing also shows honest peers legitimately reaching 65-128 concurrent in-flight parsigex messages when the receiving node processes slowly, so naive limits would risk cutting off honest traffic on degraded hosts.
🛠️ Proposed solution
Introduce per-peer, per-protocol transport limits, sized from fleet data so they never touch honest traffic:
🎯 Problem to be solved
Charon accepts effectively unbounded traffic from cluster peers on its libp2p protocols. The default wire read limit is 128MB per message, and nothing bounds message rate or the number of concurrent inbound streams a peer can open: charon runs with
libp2p.ResourceManager(new(network.NullResourceManager)), and yamux delegates concurrent stream limits to the resource manager.A compromised or buggy peer can therefore make a node allocate and verify unbounded work. Local kurtosis testing also shows honest peers legitimately reaching 65-128 concurrent in-flight
parsigexmessages when the receiving node processes slowly, so naive limits would risk cutting off honest traffic on degraded hosts.🛠️ Proposed solution
Introduce per-peer, per-protocol transport limits, sized from fleet data so they never touch honest traffic:
parsigexat 32MB;priorityand the DKG protocols still use the 128MB default.