Open Sword-Smith opened 1 day ago
However, this could prevent users from running multiple nodes from the same NAT'ed IPv4. Maybe this is a bad idea? Do you have a pronounced opinion, @dan-da?
I decided to implement peer discovery such that new IPs are favored, but if there are no other options, we connect to peers with repeated nodes.
However, this could prevent users from running multiple nodes from the same NAT'ed IPv4. Maybe this is a bad idea? Do you have a pronounced opinion, @dan-da?
there are many reasons why a user might want to run nodes on the same machine. Many of those involve dev/testing/simulation, etc. Even a non-developer may want to run a local net for practicing payment flows before sending to the real network, for learning/teaching, or for their own reasons.
In short, whatever we implement, there should be config option(s) that allow for such scenarios. I don't have a strong opinion about the default of such setting(s).
Currently, we only check for duplicated connections by considering socket (IP + port + protocol (IPv4 vs IPv6)) and instance ID. We should, furthermore, also avoid making multiple connections to the same IP.