oasisprotocol / oasisprotocol/oasis-core
Allow use of DNS name in place of IP addresses
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 369
- Forks
- 151
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 6
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with go/registry/api/api.go and its VerifyAddress() entry point, then trace the outgoing Dial() calls and any related address validation. Review related issue #242 for context. Done means DNS names are accepted where IP addresses are currently required without making unresolved names invalid prematurely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100