-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Backpressure in Gossipsub #4667
Copy link
Copy link
Closed
Labels
difficulty:moderategetting-startedIssues that can be tackled if you don't know the internals of libp2p very wellIssues that can be tackled if you don't know the internals of libp2p very wellhelp wantedpriority:importantThe changes needed are critical for libp2p, or are blocking another projectThe changes needed are critical for libp2p, or are blocking another project
Metadata
Metadata
Labels
difficulty:moderategetting-startedIssues that can be tackled if you don't know the internals of libp2p very wellIssues that can be tackled if you don't know the internals of libp2p very wellhelp wantedpriority:importantThe changes needed are critical for libp2p, or are blocking another projectThe changes needed are critical for libp2p, or are blocking another project
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
See #3078 for tracking issue on backpressure in rust-libp2p in general.
Today
EnabledHandler::send_queuecan grow unboundedly, where the GossipsubNetworkBehavioursends messages faster than the GossipsubEnabledHandlercan process them.rust-libp2p/protocols/gossipsub/src/handler.rs
Lines 99 to 100 in ecdd0ff
I see two solutions:
EnabledHandleroncesend_queuereaches a certain size.NetworkBehaviourandConnectionHandlerand only forward fromNetworkBehaviourtoConnectionHandlerwhen the latter can handle another message. I.e. drop messages for a specific peer inNetworkBehaviourinstead of as suggested in (1) inConnectionHandler.Motivation
See #3078. Prevents past failures like #4572.
Requirements
Bound
send_queue, i.e. make it impossible for it to grow unboundedly.Open questions
No response
Are you planning to do it yourself in a pull request ?
No