-
Notifications
You must be signed in to change notification settings - Fork 4
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
Multiple questions and datapoints on PubSub (FloodSub, Gossipsub, gerbil-simsub) #19
Comments
gossipsub is intended to be the baseline of the "meshsub" family of protocols.
we are working with why on this, it's not a solo effort.
Uhm, we are currently lacking on that department. I will put something together for the specs repo.
Yes, it's the MVP. It is designed to be general purpose, robust, scalable, and simple to implement. We are planning to integrate additional protocols on top for specific applicaiton profiles.
It's very alpha. It's been simulated, reviewed and unit tested.
It should scale quite well, modulo bugs. The amplification factor with the current design parameters is about 6.4.
Not yet, but having one is probably a good idea.
It's not based on a specific academic paper, because this is not an academic project. We have extensively reviewed the literature, and strived to design a practical protocol that is robust, scalable, and simple to implement.
As a general purpose protocol basis, i would say yes.
that is correct.
There is no persistence for messages; they are buffered for 5s, but gossiped for 3s.
It's backwards compatible, meaning that it advertises the floodsub protocol and will behave like one towards floodsub peers.
Yes.
there is interest from other projects as well; perhaps it's time to start testing the protocol in the wild.
None; but this won't affect deployment, as we will act like floodsub towards js peers.
Hrm, i don't know how that would work; but then again i am only an intermediate gopher and not a pythonista.
Not that I know of. |
Thanks for all the answers @vyzo :) I'll supplement a few things:
Libp2p pubsub research has many different tendrils, thinking about things at many different layers. Floodsub and gossipsub are part of our 'foundational' pubsub work. These protocols are meant to be the lowest layer that other protocols can build on top of, the 'UDP of pubsub'. No guarantees around ordering or reliability are made, instead we expect them to be implemented on top of these. Other research efforts (like pulsarcast) look into how to build these other guarantees. It's fair to say that gossipsub is our current research focus for this low layer pubsub work.
Are you looking for python api bindings to go? Or python bindings that call into go code directly? You should be able to do both, the second one is a bit trickier, but should be possible. |
I think our next steps for gossipsub are:
|
Thanks for all the answers :)
For future reference there's a relevant writeup here.
What is the definition of amplification factor? Does an amplification factor of 6.4 mean that every message that is published causes an average of 6.4 networking events per node?
Ok I see the
One of the main sharding implementations is in Python, so Python support of pubsub is pretty high up our list of requirements. I guess API bindings to the Go code would suffice. Do you know of projects that have done this? Another possibility would be to implement libp2p and gossipsub from scratch in Python. What do you think of that? Also, would it be fair to say that the XTP project to "containarise" the transport layer (e.g. for reuse from Python) is currently in hibernation?
Under what adversarial model is the protocol robust? At first glance, because there is no spam protection, it looks like an attacker may be able to DoS the network with junk. Another worry is a Sybil attack targeting a victim node. How easy would it be for an attacker to completely isolate the victim from the rest of the network, allowing for arbitrary inbound or outbound censorship by the attacker? Besides the DoS and censorship attacks, what other attacks should we be weary of? Further questions looking at the code:
|
Yes, it means that each message is published on average 6.4 times.
They already have the relevant messages with high probability, that's just gossip overhead.
These are the direct peers in the topic mesh (overlay) -- we only push messages to those peers in steady state flow.
Natural network events (churn, failures, etc); for the threat model I like to consider what I call Rational Adversarial Actors.
We support topic specific validators that control whether a message is accepted -- see libp2p/go-libp2p-pubsub#55.
A peer participating in multiple topic meshes can combine gossip with regular message flow; this minimizes the traffic impact of gossip messages in dense overlays.
We use auto-discovery with peer connection events. Initial connectivity and bootstrap are outside the scope of the protocol.
More or less. fanout is indeed for sources that publish without joing the overlay. The mesh peers are the gossipsub peers that have joined the topic and for which we have grafted mesh links. |
@JustinDrake Implementing just enough of libp2p to implement gossipsub should be a reasonably sized endeavor (meaning, it should be doable pretty quickly). If you know of any talented python devs with experience in writing networked applications, definitely connect us. Though, that endeavor can be separate from getting python bindings to libp2p |
This thread is pretty insightful (to me too) 👍 let's keep it open until pubsub is better documented and roadmapped.
While you can get something working reasonably quickly, It'll take a significant amount of continuous effort to make it really solid and bug-free. We want to get a standalone go-libp2p daemon started very soon, and that'll let you attach transports, listen/connect, attach protocols, subscribe to topics, publish, etc. (for starters maybe with an API similar to IPFS's). |
It will be fantastic if the Is there existing discussion or reference to the |
rust-libp2p, implemented by ParityTech, uses floodsub, not gossip-sub, and doesn't seem to have plans to implement it and other features (libp2p/rust-libp2p#187). It would be easier for me to work with what rust-libp2p has capability for. I could port go-floodsub and other go-libp2p stuff if needed, but it'd be better to write stuff in Rust, due to it's memory safety guarantees and performance. If implementing libp2p features that rust-libp2p doesn't have becomes more of an issue, I can address that, although at the moment it is difficult for me to tell—I'll need to read more. |
that's a feature, not a bug. don't put all eggs in one basket. |
From https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/README.md:
This is good for reducing latency, but by prioritizing nearer nodes, it reduces randomness and potentially security, even with certain countermeasures / changes to Kademlia (not sure if they are applicable to this protocol yet) such as:
|
From https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/README.md:
This is good for reducing latency, but by prioritizing nearer nodes, it reduces randomness and potentially security, even with certain countermeasures / changes to Kademlia (not sure if they are applicable to this protocol yet) such as:
Also from https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/README.md:
I think this may actually be possible with the tokio crate in Rust. Not sure if that means, for compatibility, that a single background timer should still be implemented. |
Great notes on the security issues of peer sampling. I think the quoted bit from the spec there is referring to a future implementation based on epidemic broadcast trees, but i'm not sure. Will have to dig in a bit more. As for the timer issue, i'm sure we can find an economical way to implement that in go. It just might be a little more complicated than using standard system timers. |
Right, if it's for a future optimization, it may be best to make that explicit. |
|
Since it was first brought up in this issue, I am sure you'd like to know that we have started work in the libp2p daemon: https://github.com/libp2p/go-libp2p-daemon Initial barebones implementation already in place: libp2p/go-libp2p-daemon#4 |
Hi there :) This is Justin from Ethereum. I am doing some due diligence on libp2p's pubsub to see if we can potentially use it for the sharding (Ethereum 2.0) gossip feeds.
IHAVE
messages flooded?Various links (to help me for future reference)
Gossipsub notes
https://gist.github.com/vyzo/3e42cd92becd9972e007c8bffb1ea298
Gossipsub simulator
https://github.com/vyzo/gerbil-simsub
Gossipsub pull request
libp2p/go-libp2p-pubsub#67
Reliable and/or Persistent Pubsub
libp2p/go-libp2p-pubsub#42
PulsarCast M.Sc Thesis - Scaling libp2p PubSub
ipfs/notes#266
Take a look at pubsub on IPFS
https://ipfs.io/blog/25-pubsub
Pubsub research
https://github.com/libp2p/research-pubsub
XL peer-to-peer PubSub systems (pubsub survey)
http://dl.acm.org/citation.cfm?id=2543583
The text was updated successfully, but these errors were encountered: