snarkOS icon indicating copy to clipboard operation
snarkOS copied to clipboard

feat: Add support for both ip and hostname for peers

Open Raphexion opened this issue 1 year ago • 2 comments

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.

Raphexion avatar Nov 08 '24 14:11 Raphexion

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 avatar Nov 11 '24 15:11 vicsn

@vicsn I agree :100: , we should make sure that this feature is wanted and accepted :+1:

And great link to geth :pray: :sunny:

Raphexion avatar Nov 12 '24 07:11 Raphexion