-
Notifications
You must be signed in to change notification settings - Fork 4
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 hole punching to work in both directions #605
Comments
The local node graph is out of date. The signalling node has the up to date information. The local node's node graph isn't GCing the old node record. And we are not getting information. The existing records could be wrong. |
We are going to be moving to a node only connecting to one of the seed node. This is necessary for scalability, we can't have a node connecting to every node. We will need to find the common seed node to do this, if source node is connected to seed node A, and target node is connected to seed node B. Then right now source node has to connect to seed node B to do the hole punching. Afterwards during a hole punching request to the seed node on the response you could get new information about the target node, which may be more up to date than your current information. If it does update the current node record, then the current hole punching request has to be cancelled, and restarted with the new node record. In general we need a better policy for getting up to date node records. |
Up to date node records:
|
I have a better understanding of what's happening now. During testing between the office and a VM running on my home NAS I can see the same behaviour. I've observed the following.
So I think it's a combination of two problems
Moving forward I can merge #624 and fix up #614. This should address the current problems I'm seeing. |
So they are connected together! |
Ok, so after merging #624 and running some testing. I can now start the connection from either side without issue. I can see that the problem with #614 is resolved now. Moving forward we should do some more extensive testing between different kinds of nat. It would be useful to create a diagnostic command to easily profile the kind of nat we're dealing with and how it behaves. This can just be a CLI command that reports some useful information about a connection. EG, local host and port, remote host and port, and the same information from the peer's side. We can look into methods of identifying the kind of NAT or if the node is publicly accessible. |
Two main things were done to address this issue.
I'm considering this done now unless any other hole punching issues come up. But they will be a new issue. |
Specification
While testing the testnet and hole punching. We found that while a connection could be punched between the two test machines. The connection could be established with hole punching from
NodeA
->NodeB
just fine. But starting the connection in reverse with hole punchingNodeB
->NodeA
could not be done.With this we can conclude that the hole punching does work, we can see it working with the forward case. But there is some flaw with the hole punching procedure that prevents it working with certain kinds of
NAT
s.Before we can move forward with testing this, other things need to be cleaned up.
INFO
level.Then we can move on to Identifying why connections can only be punched one way. I first guess is that we are not providing the correct information when signalling. Right now the signalling protocol provides the src host:port to the target, but I don't think it's providing the target information back to the src node. That is one thing to look into.
Additional context
Tasks
The text was updated successfully, but these errors were encountered: