-
Notifications
You must be signed in to change notification settings - Fork 51
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(p2p): fix possible connectivity issue #1996
Conversation
You can find the image built from this PR at
|
You can find the experimental image built from this PR at
|
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.
LGTM! Thanks for it!
# TODO: Temporally disabled. Might be causing connection issues | ||
#if inRelayPeers.len > pm.inRelayPeersTarget: | ||
# await pm.pruneInRelayConns(inRelayPeers.len - pm.inRelayPeersTarget) |
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.
I vote to remove that directly. If we need it in the future we can review this commit and easily restore it back. The TODO is likely to be there forever :)
# TODO: Temporally disabled. Might be causing connection issues | |
#if inRelayPeers.len > pm.inRelayPeersTarget: | |
# await pm.pruneInRelayConns(inRelayPeers.len - pm.inRelayPeersTarget) |
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.
would like to leave it there, since its something I would like to revisit. Some peer prunning in inbound connections is needed, the open question is how.
@@ -101,7 +101,7 @@ proc newWakuSwitch*( | |||
if peerStoreCapacity.isSome(): | |||
b = b.withPeerStore(peerStoreCapacity.get()) | |||
else: | |||
let defaultPeerStoreCapacity = int(round(float64(maxConnections)*1.25)) | |||
let defaultPeerStoreCapacity = int(maxConnections)*5 |
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.
Shall we have a comment indicating why we set the max PeerStoreCapacity to that?
From the PR's comment is clear, but I'd mention that in the code as well
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.
will address it in the future. maybe this shouldn't even be configurable and always harcoded depending on the amount of maxConnections.
@@ -10,6 +10,7 @@ import | |||
chronicles, | |||
metrics, | |||
libp2p/multistream, | |||
libp2p/connmanager, |
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.
Is this really needed?
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.
good catch, fixed
47e3a49
6f7874c
to
47e3a49
Compare
Description:
x
the peerstore size should be way bigger than that. If no, we wont benefit much from the exponential backoff, since after prunning, this state is "forgotten".Test:
waku-simulator