snarkOS
snarkOS copied to clipboard
feat: Add support for both ip and hostname for peers
Motivation
It is convinent to be able to specify both IPs and hostnames as peers. Especially, when you are building ephemeral testnets and want to specify peers as
./snarkos start --peers "validator0:4130,client0:4130"
Where you can populate the /etc/hosts file with subnet hostnames.
Test Plan
Added unit-tests but can be tested on the commandline
Related PRs
None.
Though its a small and useful change, let's make sure there's buy-in and awareness from all dev orgs that the nodes now also rely on DNS, incurring a small new privacy and security risk.
Also worth looking at geth's recent addition, which apparently also picks the first ip if multiple are defined. :) https://github.com/ethereum/go-ethereum/pull/18524
@vicsn I agree :100: , we should make sure that this feature is wanted and accepted :+1:
And great link to geth :pray: :sunny: