Add KIP-0023: DNS-resolved peer addresses#40
Open
demisrael wants to merge 1 commit intokaspanet:masterfrom
Open
Add KIP-0023: DNS-resolved peer addresses#40demisrael wants to merge 1 commit intokaspanet:masterfrom
demisrael wants to merge 1 commit intokaspanet:masterfrom
Conversation
1dd9909 to
b511e1b
Compare
cd30e2f to
479c300
Compare
Adds hostname support to kaspad's `--addpeer` / `--connect` CLI flags and the `AddPeer` RPC, mirroring Bitcoin Core's tolerant `addnode` semantics. Hostnames are resolved at dial time, tolerated when DNS fails, and re-resolved periodically so a running node tracks DNS changes for the lifetime of the configured peer. Reference implementation under review at kaspanet/rusty-kaspa#988. Signed-off-by: Dmitry Perchanov <demisrael@gmail.com>
479c300 to
bdd3abd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds KIP-0023: DNS-resolved peer addresses to the registry.
What it proposes
Extend
kaspad's--addpeer/--connectCLI flags,kaspa-cli's interactiveaddpeercommand, and the RPCAddPeermethod to accept hostnames in addition to numeric IP addresses. Hostnames are resolved at dial time (not parse time), re-resolved on dial failure, and re-resolved periodically on a configurable interval, mirroring Bitcoin Core's-addnodesemantics.The behavioural contract is tolerant: an unresolvable hostname does not abort
kaspadstartup and does not return an error to RPCAddPeercallers; the endpoint is registered and retried periodically until it resolves. Wire compatibility for the wRPCAddPeerRequestborsh frame is preserved via au16version dispatch (v1 IP-only ↔ v2 string-form), so v1 clients in mixed-version clusters continue to work unchanged.Three new metrics (
peer_hostname_resolutions_total,peer_hostname_active,peer_hostname_refresh_failures) track resolution outcomes and active hostname state viakaspa-cli getmetrics.Reference implementation
kaspanet/rusty-kaspa#988— head9b84f01f. CI 8/8 green. Validator full SDLC PASS plus a 5-hour on-target node-log observation (0 warning-pattern hits across 2581 lines).Motivation
Hostname
--addpeerunblocks operational patterns that today require a second-tier proxy (DNS resolution outside the node, IP injected via init script): k8sStatefulSetpod-to-pod peering, Compose-network peering, dynamic DNS for home operators, ephemeral testnet topologies. Bitcoin Core has supported tolerant hostname-addnodesince at least 0.10; this KIP bringskaspadto the same operator UX.Closes
kaspanet/rusty-kaspa#947Files changed
kip-0023.md(new, 292 lines)README.md(1 row added to the KIP index table)Status
Proposed.
Authors
Dmitry Perchanov <demisrael@gmail.com>