-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
New 0.4.20 swarm connect "important" functionality doesn't work. #6271
Comments
Thoughts:
|
I also observed this same behavior. The workaround is to run Note: this also happens when the two nodes were synchronizing data between the two of them. The connection was heavily used! (10 MB/s) Behavior was the same in both directions. (one connecting to the other and viceversa) |
libp2p/go-libp2p-connmgr#39 may help. |
…tion manager Hopefully helps fix #6271 and a bunch of other related issues.
Reopening till we can confirm. |
Confirmed fixed. |
I am still seeing this error with 0.4.21:
the daemon was alive the whole time - no errors there |
@ligi Did you run |
no - why do I need to do so? I just want to keep this connection alive to not constantly having to do "ipfs swarm connect" - also from the other side it is not really possible as the other host is behind a NAT - only one (the "server") has a public IP |
@ligi This is a mechanism to protect nodes against connection abuse. For example, think of a high profile node like the main ipfs.io gateway nodes. If possible, everybody would try and maintain a connection to it. But the ipfs.io node most likely doesn't want to stay connected to every node on the planet. By requiring both nodes to run this command to connect to each other, high profile nodes are protected against forcefully maintaining a connection to every node that runs swarm connect against them. |
ah I see - that makes sense - thanks. But could another way to fight abuse not be that I whitelist my client nodes (that then can have a changing IP - but are identified by a signature with their private key?) |
@obo20 How large is the window between both nodes running it? If one connects, and then another runs the command an hour later, will it still work? 5 minutes later? A day? |
@makeworld-the-better-one I'm not entirely sure on that. That's probably more of a question for the libp2p team. We always run our connections on node startup, so I can't give you too much insight into how this behaves in non-ideal scenarios |
@obo20 @Stebalien sorry to revive an old thread, but I'm wondering about this idea of both nodes having to run the command. Can you explain some scenarios to me, and whether the connection will succeed or not? I worry I've misunderstood things, as atm I think that a human needs to be running a command on both ends within 30 seconds of each other to actually achieve an intentional connection with a node.
|
In this case, the connection should stick.
B will drop the connection after the grace period if it isn't useful. |
Thanks for the quick reply! My follow up question is what determines useful, and why is it "should" haha |
You may run into libp2p/go-libp2p-connmgr#46 (#6558), unfortunately. |
(feel free to try running that branch (which will be merged to master soon)) |
Thanks! I'm still wondering how a node determines a connection is useful though. @Stebalien |
Services using the connection assign "weight" to every connection they need. We then sum these weights and sort the connections to find the least useful ones. Idle connections should have the least weight so we should trim connections we aren't using first. |
Version information:
go-ipfs version: 0.4.20-
Repo version: 7
System version: amd64/linux
Golang version: go1.11.5
Type: Bug
Description:
In the newest release 0.4.20, swarm connection has a new feature stated here:
I ran ipfs swarm connect to manually connect two nodes of mine that are both running 0.4.20, and they disconnected minutes later. I've been able to test this multiple times.
The text was updated successfully, but these errors were encountered: