Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat(lightpush): peer management for protocols #2003
feat(lightpush): peer management for protocols #2003
Changes from all commits
9e27195
48f9dc4
7d155af
538408f
d5c8214
c6cc978
c4df182
f28f94f
28fa0b6
7eeb52b
9853159
57e3b06
61b101f
e894d85
2819c9a
a79a637
fbe6cd1
59033ea
8b96562
910d5d3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 37 in packages/core/src/lib/connection_manager.ts
GitHub Actions / check
Check warning on line 37 in packages/core/src/lib/connection_manager.ts
GitHub Actions / proto
Check warning on line 264 in packages/core/src/lib/connection_manager.ts
GitHub Actions / check
Check warning on line 264 in packages/core/src/lib/connection_manager.ts
GitHub Actions / proto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in general -
getPeers
fromBaseProtocolCore
will get peer only those we are connected tois it sufficient? it seems that in some cases we need to initiate new connections, if existing are not enough or not good
or we rely on connection manager to automatically add one after it being dropped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ConnectionManager
keeps on trying to connect to as many peers, as we keep discovering this.The upper limit on max connections is 100: https://github.com/libp2p/js-libp2p/blob/169c9d85e7c9cd65be964b5d08bd618d950f70ee/doc/LIMITS.md?plain=1#L39
This is more than enough. We can assume that when a connection is dropped, we can find new peers (if they were discovered), or we will connect to them as soon as we discover them.
There does not seem to be an apparent action js-waku can take to connect to new peers, other than what's already happening through discoveries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it seems to be 300
I think we can document it somewhere, at least, in comment section - mentioning that assumption is to have connection manager to populate connected peers.