libp2p / specs

Technical specifications for the libp2p networking stack
https://libp2p.io
1.58k stars 275 forks source link

gossipsub: specify stream mechanics and lifetime #199

Closed raulk closed 5 years ago

raulk commented 5 years ago

The gossipsub spec does not specify stream mechanics, whether it's:

  1. one ephemeral stream per message, – or –
  2. we keep long-lived streams.

The answer is (2): each gossipsub peer opens a stream to its counter, resulting in a pair of streams, each of which is owned by either peer.

Rationale vs. stream mechanics of the DHT (ephemeral streams): DHTs are speculative and RPC-oriented, while pubsub mechanisms form an overlay for continuous message flow.


This has already led to an incompatibility bug between the Go and Rust implementations: https://github.com/libp2p/rust-libp2p/pull/898/commits/9c56b84dbe6657fa7300b6c97595d9acc8c7a504

raulk commented 5 years ago

Oops, @AgeManning already filed this spec bug in #19

Closing this as a duplicate.