Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(libs/utils): rely on DNS for rpc/grpc requests to core #3624

Merged
merged 4 commits into from
Aug 6, 2024

Conversation

ramin
Copy link
Contributor

@ramin ramin commented Aug 5, 2024

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

libs/utils/address.go Outdated Show resolved Hide resolved
libs/utils/address.go Outdated Show resolved Hide resolved
Copy link
Member

@renaynay renaynay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree with @cristaloleg comments

@renaynay renaynay added v0.15.0 Intended for v0.15.0 release kind:fix Attached to bug-fixing PRs and removed kind:chore labels Aug 5, 2024
Copy link
Contributor

@cristaloleg cristaloleg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@renaynay renaynay changed the title chore: rely on DNS for rpc/grpc requests to core fix(libs/utils): rely on DNS for rpc/grpc requests to core Aug 6, 2024
Copy link
Member

@Wondertan Wondertan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with p2p networking reasoning. Thanks!

@renaynay renaynay enabled auto-merge (squash) August 6, 2024 12:57
@renaynay renaynay merged commit 780423d into main Aug 6, 2024
27 checks passed
@renaynay renaynay deleted the feat/remove-ip-resolution branch August 6, 2024 14:00
sebasti810 pushed a commit to sebasti810/celestia-node that referenced this pull request Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:fix Attached to bug-fixing PRs v0.15.0 Intended for v0.15.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants