Skip to content

Commit

Permalink
refactor(gossipsub): send more specific messages to ConnectionHandler
Browse files Browse the repository at this point in the history
Previously, the `NetworkBehaviour` constructed a `proto::RPC` type and sent that into an unbounded queue to the `ConnectionHandler`. With such a broad type, the `ConnectionHandler` cannot do any prioritization on which messages to drop if a connection slows down.

To enable a more fine-granular handling of messages, we make the interface between `NetworkBehaviour` and `ConnectionHandler` more specific by introducing an `RpcOut` type that differentiates between `Publish`, `Forward`, `Subscribe`, etc.

Related: #4667.

Pull-Request: #4811.
  • Loading branch information
jxs authored Nov 22, 2023
1 parent 3e30c20 commit bb2b798
Show file tree
Hide file tree
Showing 5 changed files with 374 additions and 692 deletions.
Loading

0 comments on commit bb2b798

Please sign in to comment.