Agartha-Software / Agartha-Software/Wormhole
Swarm: Reduce usage of substreams
- Lingua principale
- Rust
- Stelle
- 12
- Fork
- 3
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Currently we rely on libp2p::request_response to handle all network messages, and each one creates a substream.
We're limited by reason, a software quota, and the fundamental limits of TCP ports to a number of simultaneous streams
The current implementation cleanly handles simultaneous outbound streams by allocating them with a semaphore and delaying until budget is available,
but we can't do that for incoming streams and excessive inbound connections will cause failures
This shouldn't happen in normal circumstances of excessive use, only if multiple excessive use peers are hammering one receiver
We currently aren't equipped to handle message failures, so any such failure is lossy and potentially corrupting the network
We should be batching things such as broadcasts anyway to limit the number of simultaneous streams
- [ ] handle inbound limits gracefully
- [ ] chunk multiple broadcast messages into a single message
- [ ] retry outbound failures
We will also need to be able to deal with an unresponsive peer, but this is a further step and not planned for this issue
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.