oasis-core icon indicating copy to clipboard operation
oasis-core copied to clipboard

Allow use of DNS name in place of IP addresses

Open Karmastic opened this issue 5 years ago • 2 comments

SUMMARY

In many environments, static IP addresses are difficult to come by and may not be guaranteed to be static. It would simplify automated deployments especially if IP addresses could instead be specified as DNS names. This decouples deploying validators from its sentries, for example, where validators now need to have sentries deployed before a IP addresses can be acquired, and these IP addresses need to be communicated to the validator somehow. All of the issues are solvable but make the process overly complicated; and having DNS names that get resolved before each connection attempt, the system is resilient to nodes being reassigned IP addresses (eg if a sentry crashes and needs to be restarted).

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

go/registry/api

ADDITIONAL INFORMATION

I expect in most if not all cases, you're using Dial() to establish outgoing connections. This works fine with DNS names, so I think it might be a matter of adjusting any address validation being done. One such location is go/registry/api/api.go:VerifyAddress(). I can understand having some trivial rejection of obviously bogus addresses. Are there concerns around users specifying invalid / problematic DNS names? For validation you could use a regex to trivially reject, and if desired, do your own DNS lookup (though in some cases DNS names make become valid later - so lookup failures shouldn't cause you to assume it's invalid).

This is related, but not equivalent, to #242

Karmastic avatar Mar 18 '20 14:03 Karmastic

Tendermint's p2p code does not support this.

See: https://github.com/tendermint/tendermint/issues/1521

Yawning avatar Mar 24 '20 05:03 Yawning

Depending on p2p is a non-starter anyway; proper DNS support should be baked in from the start, and not an afterthought. Given the state of IPv4 exhaustion, depending on it being static is a terrible design decision

nyetwurk avatar Mar 04 '21 16:03 nyetwurk