-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subscribe to the "mailbox topics" of close peers #12
Comments
@manngayin612 will verify our understanding of this problem. |
The followings are the findings from gossipsub spec. This explains when they first join a topic, the peer will Edit: After Jonas' testing, it seems like its a misunderstanding from the documentation. For the first point, according to the source code, it is supposed to mean: When a peer join a topic, it will find some connected peers, that are already in the topics, to graft.
As highlighted, the peers we know in a topic which is not in our mesh, will be metadata-only peers.
The question in my mind after reading this is:
|
There was a question during our discussion: From libp2p::behaviour sourcecode: Every time when a peer is subscribing/ unsubscribing to a topic, it will send a RPC to all the connected peers ( And at the end of Edit: After reading the source code carefully, the above paragraph is not true. In join(), it will only graft either peers from the fanout connection of that topic or connected peers that subscribed to the same topic. |
Background
Right now, the only peer which subscribes to a particular "mailbox topic" (the topic associated with a particular Public Address) is the replica which is identified by that Public Address.
This means that unicast messages are never sent eagerly and through full-message pairings. Instead, for a unicast message to arrive at its recipient:
This makes the sending of unicast messages slow.
Reference: libp2p pubsub overview.
Proposed solution
Peers should subscribe to the individual topics of other peers that are close to them. This greatly increases the likelihood that a sending peer which is sending a unicast message has a full-message peering for the mailbox topic of the recipient, and therefore will send the message immediately.
The text was updated successfully, but these errors were encountered: