Hi there, I read the doc about pub/sub and gossipsub at https://docs.libp2p.io/concepts/publish-subscribe/ and have the following questions:
- It says the
unsubscribemessages go hand-in-hand with
prunemessages, and when a peer unsubscribes from a topic it will prune its connection with peers still subscribed to the topic back to a metadata-only peering. My question is – why do we keep metadata-only peerings even with peers outside of the topic instead of just cutting the connection (or, I guess, “downgrade” it to a non-pubsub connection)? Since in my understanding the metadata only peering was to assist with message delivery through the
IWANTmessages, peers outside of the topic wouldn’t be useful there?
- It says that when a peer gets an
IWANTmessage, it’ll send those messages to the requesting peer. My question is – in the doc it didn’t mention that any “grafting” happens before sending the full message to the requesting peer, was that an oversight OR the full-message is actually sent through a metadata-only connection in this case?
- What’s the motivation/use case behind fan-out? If we allow any peers to send messages to any topics, wouldn’t that make flooding topics with non-sense messages much easier for bad actors? and how would one generally control what peers can subscribe to what topic?