At first glance sn_node seems to be the culprit with the following code in sn_node.rs:
if config.is_local() {
config.listen_on_loopback();
} else {
config.network_config.forward_port = true;
}
This snippet means that we can only use local host (127.0.0.1) or port forwarding. This is an incredible regression with no possibility to use a basic network anymore (like a LAN, a docker network, some VPS directly connected to the Internet, …).
I tried to work around the problem by implementing a new flag to set forward port to false. But I still get the same error (IgdNotSupported).
Then I saw that qp2p has a feature named “no-igd” which looked promising to allow these use cases. I activated this feature but then the error is NoEchoServiceResponse.
Here I said to myself WTF. I also don’t want an echo service, I just want a simple network where I know my IP address. Possibilities to use IGD or an echo service are useful in some circumstances, but this is not a reason to discard the simple use cases I mentioned above.
My fear is that this limitation isn’t just superficial in sn_node but is deeply rooted in qp2p.
I wanted to debug under VS code to see why we get this error in qp2p but I got this one instead:
“Argument short must be unique -l is already in use”.
It happens because there are two conflicting options flagged as short in qp2p Config structure (“local-ip” and “local-port”). Note: I suspect this is the reason why the smoke test has been commented out (see the same error in Unit testing - my first try. Is it me or does one of the sn_node unit tests fail?).
So I tried to remove these 2 short options in qp2p and recompile sn_node using local references for qp2p and sn_routing. But the problem is that current sn_node is not compatible with current qp2p and sn_routing.
I stopped here because I am not able to solve the incompatibilities.
To recap the whole mess:
- standard network not supported anymore,
- duplicate short option
-l
, - unit test commented out instead of correcting the problem,
- incompatible master repos.
I hope all these problems will be corrected shortly.