Skip to content
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

The current Gossipsub spec does not correspond to the current implementation of GossipSubRouter in go-floodsub #83

Closed
mhchia opened this issue Aug 2, 2018 · 7 comments

Comments

@mhchia
Copy link
Contributor

mhchia commented Aug 2, 2018

We have two versions of pubsub router now, FloodSubRouter and GossipSubRouter respectively. It is clear that FloodSubRouter just floods messages. However, the current GossipSubRouter does not perform the same way as the Gossipsub spec described. It is more like performing normal gossiping on each topic. Its algorithm is quite the same as the protocol in gerbil-simsub. For me, it is quite confusing that the implementation is a lot different from the spec.

IMO the name "gossipsub" is suitable for the current implementation of GossipSubRouter in the repo go-floodsub, i.e. the gerbil-simsub's protocol. And the one described in the Gossipsub spec should be the spec for "Proximity Aware Epidemic PubSub". So it will be clearer if we have specs for "gossipsub" and "Proximity Aware Epidemic PubSub" respectively.

Is there a plan already that the current gossipsub implementation will be used, or it will be changed to "Proximity Aware Epidemic PubSub" soon? It is actually discussed in libp2p/libp2p#33 (comment) and I really appreciate the answer from @whyrusleeping. Just want to confirm again, since "Proximity Aware Epidemic PubSub" seems to be more experimental, for its broadcast tree, random walks for joining, and passive view exchange. In contrast, the current "gossipsub" in go-floodsub seems more safe.

Thank you for reading!

@mhchia mhchia changed the title go-floodsub does not have an implementation of the current Gossipsub spec The current Gossipsub spec does not correspond to the current implementation of GossipSubRouter in go-floodsub Aug 2, 2018
@whyrusleeping
Copy link
Contributor

@mhchia (also responded in the other issue)

Sorry for the delay, was at the decentralized web summit all last week.

The gossipsub spec draft is still a draft (review welcome!) and should probably renamed something other than gossipsub (because its much more than a simple gossip).

The gossipsub implemented in go and gerbil is version 1 (where floodsub is version 0) of the libp2p base pubsub. The change from floodsub to gossipsub introduces some new features at the wire protocol level, allowing us to have better control over peer set selection. The randomized peer selection gossipsub implementation exercises these new features. More sophisticated protocols that we want to build (namely, proximity aware epidemic pubsub type things) should be able to be built using this wire protocol.

That said, the gossipsub (random peers) implementation should be pretty robust and work quite well. We're going to get it turned on in go-ipfs soon, and run some 'real world' test simulations (hopefully) soon.

@vyzo
Copy link
Contributor

vyzo commented Aug 8, 2018

Yes, this is indeed the case!

The gossipsub document in the specs repo is not actually gossipsub!
It's an earlier proposal for episub, which is still on the roadmap as a custom gossipsub router.

@ghost
Copy link

ghost commented Aug 8, 2018

It sounds like a reasonable fix here is just to rename the current spec, including changing the directory name and maybe putting an "WIP" or "Draft" label on the spec README.md.

If no one objects, I'll open a PR to do this.

@vyzo
Copy link
Contributor

vyzo commented Aug 8, 2018

already done in #84 -- renamed the current spec to episub, which is the protocol it describes.

@ghost
Copy link

ghost commented Aug 8, 2018

Awesome - hadn't seen that. Shall we close this issue?

@mhchia
Copy link
Contributor Author

mhchia commented Aug 9, 2018

@whyrusleeping
Thanks a lot for the explanation. I think it makes sense that "the gossipsub (random peers) implementation" serves as the baseline of the pubsub.
@vyzo
Thank you for the correction. I think it also makes sense if the description of the protocol in https://github.com/vyzo/gerbil-simsub#the-gossipsub-protocol is added to https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/README.md

@mhchia
Copy link
Contributor Author

mhchia commented Sep 1, 2018

Closed by #87
Thanks a lot for the work!

@mhchia mhchia closed this as completed Sep 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants