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

Improvements related to Gossipsub 1.2 #1131

Closed
diegomrsantos opened this issue Jun 19, 2024 · 3 comments · Fixed by #1135
Closed

Improvements related to Gossipsub 1.2 #1131

diegomrsantos opened this issue Jun 19, 2024 · 3 comments · Fixed by #1135

Comments

@diegomrsantos
Copy link
Contributor

diegomrsantos commented Jun 19, 2024

@diegomrsantos
Copy link
Contributor Author

diegomrsantos commented Jun 24, 2024

@kaiserd the spec https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/gossipsub-v1.1.md#spam-protection-measures says:

In flight IWANT requests, sent as a response to an IHAVE advertisement, are probabilistically tracked. For each IHAVE advertisement which elicits an IWANT request, the router tracks a random message ID within the advertised set. If the message is not received (from any peer) within a period of time, then a behavioural penalty is applied to the advertising peer through P₇. This measure helps protect against spam IHAVE floods by quickly flagging and graylisting peers who advertise bogus message IDs and/or do not follow up to the IWANT requests.

I believe this hasn't been implemented. #943 tried to do something similar, but it seems to me it goes against the spec. In order to implement https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/gossipsub-v1.2.md#cancelling-iwant, we need to track in-flight IWANT messages. I am going to remove the last point here and create an issue for keeping track of in-flight IWANT messages.

See #1136.

@diegomrsantos
Copy link
Contributor Author

diegomrsantos commented Jun 24, 2024

I won't implement the second point either. We process IWANT messages synchronously and there won't be any opportunity for an IDONTWANT to arrive before we schedule the requested msg to be sent. It's better to just check the idontwants when we pop a msg from the non-prio queue.

See #1137.

@kaiserd
Copy link
Collaborator

kaiserd commented Jun 25, 2024

Thanks for the update :).

@github-project-automation github-project-automation bot moved this from In Progress to done in nim-libp2p Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants