| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
LibP2P.Protocol.GossipSub.Extensions
Description
GossipSub v1.3 extension advertisement and dispatch.
Synopsis
- attachExtensionsToHello :: GossipSubRouter -> PeerProtocol -> RPC -> IO RPC
- markExtensionAdvertisementSent :: GossipSubRouter -> PeerId -> IO ()
- handleExtensionAdvertisement :: GossipSubRouter -> PeerId -> RPC -> IO ()
- handlePartialMessageRPC :: GossipSubRouter -> PeerId -> RPC -> IO ()
- peerSupportsPartialExtension :: GossipSubRouter -> PeerId -> IO Bool
- peerRequestsPartial :: GossipSubRouter -> PeerId -> Topic -> IO Bool
- peerSupportsSendingPartial :: GossipSubRouter -> PeerId -> Topic -> IO Bool
- localPartialMode :: GossipSubRouter -> Topic -> IO (Maybe PartialTopicMode)
- runPartialHeartbeat :: GossipSubRouter -> IO ()
- emitPartialGossip :: GossipSubRouter -> Topic -> [PeerId] -> IO ()
- notifyPartialPeerDisconnected :: GossipSubRouter -> PeerId -> IO ()
Documentation
attachExtensionsToHello :: GossipSubRouter -> PeerProtocol -> RPC -> IO RPC Source #
Add our supported extensions to the first outbound v1.3 RPC.
markExtensionAdvertisementSent :: GossipSubRouter -> PeerId -> IO () Source #
Record that our extension advertisement was successfully sent.
handleExtensionAdvertisement :: GossipSubRouter -> PeerId -> RPC -> IO () Source #
Record the first v1.3 extension advertisement and penalize repeats.
handlePartialMessageRPC :: GossipSubRouter -> PeerId -> RPC -> IO () Source #
Dispatch a partial-message RPC only when both peers advertised support.
peerSupportsPartialExtension :: GossipSubRouter -> PeerId -> IO Bool Source #
Whether a peer advertised the partial-messages extension on v1.3.
peerRequestsPartial :: GossipSubRouter -> PeerId -> Topic -> IO Bool Source #
Whether a peer requested partial messages for a topic.
peerSupportsSendingPartial :: GossipSubRouter -> PeerId -> Topic -> IO Bool Source #
Whether a peer can send partial messages for a topic.
localPartialMode :: GossipSubRouter -> Topic -> IO (Maybe PartialTopicMode) Source #
Local partial-message mode for a subscribed topic.
runPartialHeartbeat :: GossipSubRouter -> IO () Source #
Run partial-message state expiry during the GossipSub heartbeat.
emitPartialGossip :: GossipSubRouter -> Topic -> [PeerId] -> IO () Source #
Ask the partial-message runtime to gossip groups to selected peers.
notifyPartialPeerDisconnected :: GossipSubRouter -> PeerId -> IO () Source #
Remove per-peer partial-message state after disconnect.