Replies: 1 comment
-
See this snippet: rust-libp2p/protocols/gossipsub/src/behaviour.rs Lines 2762 to 2850 in c32f03c The sender can choose what to set this field to. In an untrusted environment, you can only trust it when it comes with a signature as well. If you have a small mesh, then yes, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Recently I observed that network packets in gossipsub are not delivered occasionally. This happens mostly on slow VMs with low CPU resource. My application uses a protocol , where most of messages are broadcast to small fixed amount of parties, e.g 3-4. The protocol stopped occasionally after a timeout, because some of broadcasts did not seem to reach the destination.
After close examination of inputs, I found that a node subscribed to a topic receives all messages from that topic, however sometimes Gossipsub forwards messages via another node, even in very small fully connected mesh. As a result, the field propagation_source in GossipsubEvent::Message will be set to the peer id of a forwarder. Therefore the field is useless to identify a message sender.
To fix the problem I looked into the GossipsubMessage, where I found the field source, which is Option, but it seems to be set all the time to correct source id, at least for now and in my case.
I guess the forwarding is a feature of Gossipsub architecture aimed to build sparse meshes, so the field in the Event enum is just an identity of the forwarder. If message is forwarded and the field in GossipsubMessage is set to None, it leaves receiver w/o chance to identify a sender. Under what condition the field becomes None?
Finally, the floodsub protocol must be significantly simpler than gossipsub , just guessing from the implementation.
Can the entire problem with the identification of the source be avoided by using floodsub instead?
Beta Was this translation helpful? Give feedback.
All reactions