libp2p / libp2p/go-libp2p-pubsub

Sending only one IWANT at a time

Open
#606 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
364
Forks
221
PR merge metrics
No merged PRs in 30d

Description

From what I see in the function `handleIhave` in gossipsub.go
https://github.com/libp2p/go-libp2p-pubsub/blob/master/gossipsub.go#L757

The logic is that when you receive IHAVE, you check if you have seen the message already or not. If not, just send IWANT right away.

This makes it possible that you will send many IWANTs for a single message which results to receiving many copies of the message.

AFAIU currently rust-libp2p sends only one IWANT per message so that it doesn't receive too many copies. Should go-libp2p-pubsub do the same?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in gossipsub.go at handleIhave, where the issue identifies the current IHAVE-to-IWANT logic. Review the existing message-seen checks and compare the behavior with the described rust-libp2p approach; done should mean a message produces only one IWANT and does not result in unnecessary duplicate copies.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.