fix(libs/utils): rely on DNS for rpc/grpc requests to core #3624
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refs #3570 and I believe solves the issue well enough
previously, on start, node would resolve DNS hostnames to IP when validating. This is somewhat legitimate and necessary when building multiaddr format, but the same code was being used for configuring http clients for RPC/gRPC connections.
This meant, that in the event of some server administration or an incident, if DNS was updated for a "core" node (as configured via
--core.ip
) this meant a long running node would suddenly lose it's destination and get stuck failing and retrying.Instead, this seeks to separate validation, for validating --core.ip for rpc/grpc clients do NOT resolve to IP on start/validate, then should make requests over the DNS using hostname, meaning a core node moving, should eventually resolve again properly, preventing need for a restart.
We had to take care NOT to accidentally cause multiaddr to remain hostnames. The original issue suggests wanting to update all p2p networking to be host based, I feel that is probably unnecessary