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

GossipSub messages relayed back to source on 3 node network #1081

Open
cskiraly opened this issue Apr 8, 2024 · 5 comments
Open

GossipSub messages relayed back to source on 3 node network #1081

cskiraly opened this issue Apr 8, 2024 · 5 comments

Comments

@cskiraly
Copy link
Contributor

cskiraly commented Apr 8, 2024

Setting up a 3 node network (nodes A,B,C) and a single GS topic. When A is sending a message to B and C, these are then relayed between them, finally sent back to A. That last step is not supposed to happen, since on that link the same message already travelled and was received.

Message sequence
A->B , A->C
B->C, C->B
C->A, B->A

@cskiraly
Copy link
Contributor Author

cskiraly commented Apr 8, 2024

@diegomrsantos
Copy link
Collaborator

Could you please point out what part of the spec does it violate?

@cskiraly
Copy link
Contributor Author

cskiraly commented Apr 8, 2024

Ok, so the correct permanent link to the offending line is

discard g.validationSeen.pop(msgIdSalted, seenPeers)

Regarding what it violates:

 In all pubsub implementations, we can first check the seen cache before forwarding messages to avoid wastefully republishing the same message multiple times.

I would qualify this as wasteful republishing.

@diegomrsantos
Copy link
Collaborator

Thank you for the clarification. I believe the seen cache is checked here https://github.com/vacp2p/nim-libp2p/blob/unstable/libp2p/protocols/pubsub/gossipsub.nim#L517.

@diegomrsantos
Copy link
Collaborator

It'd be great if you could reproduce it with a failing test similar to the ones in tests/pubsub folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Pipeline
Development

No branches or pull requests

2 participants