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

Not filling mesh peers if there are less than D of them when joining a topic #194

Closed
NIC619 opened this issue Jul 15, 2019 · 6 comments · Fixed by #196
Closed

Not filling mesh peers if there are less than D of them when joining a topic #194

NIC619 opened this issue Jul 15, 2019 · 6 comments · Fixed by #196
Assignees

Comments

@NIC619
Copy link

NIC619 commented Jul 15, 2019

What is wrong?

In GossipSubRouter.Join() if there are fanout peers but not enough of them, it won't selects the remaining number of peers (D-x) from peers.gossipsub[topic] as suggested in the spec.

gmap, ok = gs.fanout[topic]
if ok {
gs.mesh[topic] = gmap
delete(gs.fanout, topic)
delete(gs.lastpub, topic)
} else {

@raulk
Copy link
Member

raulk commented Jul 16, 2019

Hey @vyzo, is there a misalignment between implementation and spec?

@vyzo
Copy link
Collaborator

vyzo commented Jul 16, 2019

it's a minor bug I would say.

@raulk
Copy link
Member

raulk commented Jul 16, 2019

@vyzo

it's a minor bug I would say.

Please elaborate. OP probably wants to understand impact and where the bug is: in the spec or the implementation.

@vyzo
Copy link
Collaborator

vyzo commented Jul 16, 2019

The bug is in the implementation.
The mesh should be filled at D peers if the fanout peers are less, which is what the spec says.
The impact is minimal, the next heartbeat will fill the mesh.

@raulk
Copy link
Member

raulk commented Jul 20, 2019

@vyzo — let’s fix the implementation promptly. Several teams are using this as the reference implementation, and it creates confusion, despite the impact being minimal, in theory.

@vyzo
Copy link
Collaborator

vyzo commented Aug 13, 2019

Added some code to handle this in #196.

@vyzo vyzo closed this as completed in #196 Oct 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants