Skip to content

Resolve hostname seed nodes and trusted snapshot peers - #156

Merged
On1x merged 1 commit into
masterfrom
p2p-seed-hostnames
Aug 22, 2026
Merged

On1x merged 1 commit into
masterfrom
p2p-seed-hostnames

Conversation

@On1x

@On1x On1x commented Aug 19, 2026

Copy link
Copy Markdown
Member

Problem

fc::resolve() takes a bare host, but the p2p seed parsing (and the
--test-trusted-seeds probe) passed it the whole host:port string. Resolution
therefore always failed, and the failure was swallowed by catch (...) {}.

Consequence for anyone following our own documentation: every seed written as a
hostname is discarded. The shipped share/vizd/config/config_witness.ini
template and the examples in docs/node/{getting-started,configuration,snapshot,validator-node}.md
all use seed3.viz.world:2001, so a node started from them comes up with

DLT P2P node started, connecting to 0 seed nodes
Sync isolation: no active peers

The same string handling made --test-trusted-seeds report perfectly good
hostname peers as ERROR ("error converting std::string to IP endpoint"), even
though the real sync path resolves them (asio_tcp_socket::connect_to_endpoint).

Verified on the current public build

vizblockchain/vizd:latest, empty data dir, config straight from the docs:

seeds in config result
seed3.viz.world:2001, rpc.viz.cx:2001 snapshot loaded (block 82657200), then connecting to 0 seed nodes → sync isolation
175.110.112.214:2001, 178.156.251.126:2001 connected, blocks applied live (head 82658245+)

--test-trusted-seeds: ERROR for both hostname peers, REACHABLE connect=0ms latency=3ms speed=22103KB/s for the same peers written as IPs.

Change

Split host and port before resolving, in both places; reject out-of-range
ports; log a warning instead of dropping a seed without a trace.

Non-consensus: config parsing and a diagnostic path only. Both touched TUs pass
-fsyntax-only on this branch.

fc::resolve() takes a bare host, but both p2p seed parsing and the
--test-trusted-seeds probe fed it a whole "host:port" string. Resolution
always failed, so every hostname seed from the shipped config template and the
docs was dropped silently: the node started with "connecting to 0 seed nodes"
and sat in sync isolation, while the diagnostic reported REACHABLE peers as
ERROR. Split host and port before resolving, reject out-of-range ports, and log
a warning instead of discarding a seed without a trace.

Verified against the public build: with hostname seeds the node loaded the
snapshot but reported 0 seed nodes; with literal IPs it connected and followed
the chain.
@On1x
On1x merged commit f487e74 into master Aug 22, 2026
2 checks passed
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