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

fix: Potential fix for interop with rust subscriptions #418

Closed
wants to merge 2 commits into from

Conversation

maschad
Copy link
Contributor

@maschad maschad commented Mar 24, 2023

No description provided.

@what-the-diff
Copy link

what-the-diff bot commented Mar 24, 2023

PR Summary

  • Improved message distribution in topic mesh The code now checks if there are more peers in a topic mesh than the number of subscribers, ensuring messages reach more users and not just direct neighbors. This change might lead to receiving duplicate messages, as others are also implementing the same logic.

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 50.00% and project coverage change: +0.01 🎉

Comparison is base (a959b09) 82.98% compared to head (4a0bf4b) 83.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #418      +/-   ##
==========================================
+ Coverage   82.98%   83.00%   +0.01%     
==========================================
  Files          48       48              
  Lines       11874    11878       +4     
  Branches     1280     1283       +3     
==========================================
+ Hits         9854     9859       +5     
+ Misses       2020     2019       -1     
Impacted Files Coverage Δ
src/index.ts 70.38% <50.00%> (+0.07%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -2066,6 +2066,8 @@ export class GossipSub extends EventEmitter<GossipsubEvents> implements PubSub<G
}
throw Error('PublishError.Duplicate')
}
// For testing purposes only, see https://filecoinproject.slack.com/archives/C04UFPHSM7S/p1679682078799899?thread_ts=1679674509.496669&cid=C04UFPHSM7S
Copy link
Contributor

Choose a reason for hiding this comment

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

This conversation can only be viewed if you sign up. Can you add more detail of what's going on?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The discussion is in a public channel #libp2p-implementers on Filecoin slack (which is bridged to IPFS Discord/Matrix).

The problem has been resolved now so this is no longer relevant. Essentially in debugging I had found that there was an issue of rust-libp2p sending subscription messages to js-libp2p-gossipsub after GRAFT messages over webRTC

@maschad maschad closed this Mar 28, 2023
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.

3 participants