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

Set topicID on outbound IHAVE and ignore inbound IHAVE for unknown topic #365

Merged
merged 6 commits into from
May 22, 2024

Conversation

StefanBratanov
Copy link
Collaborator

@StefanBratanov StefanBratanov commented May 15, 2024

fixes #361

@Nashatyrev
Copy link
Collaborator

I think we would need to group IHAVEs in the resulting message produced by GossipRpcPartsQueue else we might get significant message size overhead

@StefanBratanov
Copy link
Collaborator Author

I think we would need to group IHAVEs in the resulting message produced by GossipRpcPartsQueue else we might get significant message size overhead

Isn't that what the GossipRouter does in emitGossip on a heartbeat and only then enqueues it?

val shuffledMessageIds = ids.shuffled(random).take(params.maxIHaveLength)

I suppose we could be more efficient when flushing the queue. Is it worth to make this improvement a separate PR?

@Nashatyrev
Copy link
Collaborator

Please check here: StefanBratanov#1
Fixing the case has also addressed the grouping question

@StefanBratanov
Copy link
Collaborator Author

Please check here: StefanBratanov#1 Fixing the case has also addressed the grouping question

Thanks. I agree with the change. I have missed that part. Thanks.

@Nashatyrev
Copy link
Collaborator

Added another minor improvement

Copy link
Collaborator

@Nashatyrev Nashatyrev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StefanBratanov StefanBratanov merged commit 640cc5d into libp2p:develop May 22, 2024
2 checks passed
@StefanBratanov StefanBratanov deleted the ihave_improvements branch May 22, 2024 07:49
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

Successfully merging this pull request may close these issues.

Possible Bug on GossipSub implementation that makes sharing IHAVE control messages with empty topics
2 participants