Skip to content

Add KIP-0023: DNS-resolved peer addresses#40

Open
demisrael wants to merge 1 commit intokaspanet:masterfrom
demisrael:kip-0016-addpeer-hostnames
Open

Add KIP-0023: DNS-resolved peer addresses#40
demisrael wants to merge 1 commit intokaspanet:masterfrom
demisrael:kip-0016-addpeer-hostnames

Conversation

@demisrael
Copy link
Copy Markdown

@demisrael demisrael commented May 6, 2026

This PR adds KIP-0023: DNS-resolved peer addresses to the registry.

What it proposes

Extend kaspad's --addpeer / --connect CLI flags, kaspa-cli's interactive addpeer command, and the RPC AddPeer method 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 -addnode semantics.

The behavioural contract is tolerant: an unresolvable hostname does not abort kaspad startup and does not return an error to RPC AddPeer callers; the endpoint is registered and retried periodically until it resolves. Wire compatibility for the wRPC AddPeerRequest borsh frame is preserved via a u16 version 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 via kaspa-cli getmetrics.

Reference implementation

kaspanet/rusty-kaspa#988 — head 9b84f01f. 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 --addpeer unblocks operational patterns that today require a second-tier proxy (DNS resolution outside the node, IP injected via init script): k8s StatefulSet pod-to-pod peering, Compose-network peering, dynamic DNS for home operators, ephemeral testnet topologies. Bitcoin Core has supported tolerant hostname -addnode since at least 0.10; this KIP brings kaspad to the same operator UX.

Closes

Files 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>

@demisrael demisrael force-pushed the kip-0016-addpeer-hostnames branch from 1dd9909 to b511e1b Compare May 6, 2026 08:00
@demisrael demisrael changed the title Add KIP-0016: DNS-resolved peer addresses Add KIP-0023: DNS-resolved peer addresses May 6, 2026
@demisrael demisrael force-pushed the kip-0016-addpeer-hostnames branch 3 times, most recently from cd30e2f to 479c300 Compare May 6, 2026 08:03
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant