You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
iroh: support multiple relays + self-hosted discovery for isolated deployments #795
PR #794 wired the node's iroh endpoint to honor a single [network] relay_url
(env DECDN_RELAY_URL): when set, it swaps the public n0 relay map for one
self-hosted relay via RelayMode::Custom(RelayMap::from(url)), with a TCP
reachability probe at bring-up (probe_relay in crates/node/src/runtime/mod.rs). That's enough for a single-relay internal
testnet.
Two gaps remain for production / fully-isolated deployments:
1. Multiple relays
RelayMap already supports multiple entries (RelayMap::try_from_iter), but the
config surface is a single relay_url: Option<String>. We should accept a list
(e.g. relay_urls: Vec<String>, keeping relay_url as a back-compat alias) so
operators get relay redundancy / failover rather than a single point of failure.
Decide reachability semantics for N relays — e.g. require ≥1 reachable at boot
rather than all.
2. Self-hosted discovery (full n0 independence)
Even with a custom relay, presets::N0 keeps the n0 DNS (pkarr) address-lookup
for NodeId→address resolution, so an isolated network still depends on n0
infrastructure for discovery. For true isolation we'd swap in a self-hosted
pkarr/DNS lookup (or a static EndpointAddr provider) instead of PkarrPublisher::n0_dns() / DnsAddressLookup::n0_dns().
Also consider
The gossip endpoint (crates/gossip/src/service.rs) uses presets::Minimal
(no relay, no discovery) — decide whether it should share the same relay
config.
An official/maintained iroh-relay container image (the contracts/local rig
currently requires operators to supply IROH_RELAY_IMAGE themselves).
Tracked out of PR #794, this issue extends the single-relay config to support relay redundancy and full n0-independence for isolated deployments. Two distinct sub-problems: (1) widening the config surface to relay_urls: Vec<String> with back-compat alias and multi-relay reachability semantics, and (2) replacing PkarrPublisher::n0_dns() / DnsAddressLookup::n0_dns() with a self-hosted or static discovery provider. Secondary question on whether the gossip endpoint (presets::Minimal) should share relay config.
📊 Assessment
Dimension
Value
Reasoning
Type
Feature
Capability gap, no existing regression; extends config surface and iroh wiring
Labels
enhancement, technical, prod-blocking, rust
Production-isolation requirement; affects crates/node and crates/gossip Rust code; not needed for PoC single-relay testnet but required for fully self-hosted prod
Coding agent
Needs more info
Scope 1 (multi-relay config) is well-defined and mechanical. Scope 2 (self-hosted discovery) requires a design decision on which pkarr/DNS provider to use and whether to introduce a new config key — that decision isn't captured yet.
Config schema (crates/common/src/config/): add relay_urls: Vec<String>, keep relay_url: Option<String> as a deprecated alias that, if set, is merged into relay_urls. Update config-types if OriginUrl/validation types are reused.
Endpoint builder (crates/node/src/runtime/mod.rs): call RelayMap::try_from_iter over the list; keep the existing TCP probe_relay loop but change semantics to "≥1 reachable at boot" (log a warning for unreachable relays rather than hard-failing).
Self-hosted discovery (Scope 2 — needs design decision first): add discovery_url: Option<String> or similar; wire PkarrPublisher::from_url() / DnsAddressLookup::from_url() when set, falling back to n0 DNS when absent. Confirm iroh API surface before coding.
Gossip endpoint (crates/gossip/src/service.rs): decide and document whether presets::Minimal should be upgraded to share relay config (likely yes for isolated deployments, but gossip currently has no relay config plumbing).
iroh-relay image: consider pinning an official/community iroh-relay image reference in contracts/local/docker-compose.yml so operators don't need to supply IROH_RELAY_IMAGE.
Docs / ADR: if discovery provider becomes operator-configurable, a short ADR note or appendix update is warranted.
Design note on reachability semantics: failing hard if all relays are unreachable is correct; logging and continuing if ≥1 is up matches how most relay-backed systems behave. Recommend surfacing unreachable relay URLs in the admin RPC health endpoint.
Activity
feat(node): honor network.relay_url with custom relay + reachability …
github-actions commentedon Jun 3, 2026
🎯 Triage report
Tracked out of PR #794, this issue extends the single-relay config to support relay redundancy and full n0-independence for isolated deployments. Two distinct sub-problems: (1) widening the config surface to
relay_urls: Vec<String>with back-compat alias and multi-relay reachability semantics, and (2) replacingPkarrPublisher::n0_dns()/DnsAddressLookup::n0_dns()with a self-hosted or static discovery provider. Secondary question on whether the gossip endpoint (presets::Minimal) should share relay config.📊 Assessment
enhancement,technical,prod-blocking,rustcrates/nodeandcrates/gossipRust code; not needed for PoC single-relay testnet but required for fully self-hosted prod🔗 Similar issues
💡 Notes and suggestions
Sub-task checklist
crates/common/src/config/): addrelay_urls: Vec<String>, keeprelay_url: Option<String>as a deprecated alias that, if set, is merged intorelay_urls. Updateconfig-typesifOriginUrl/validation types are reused.crates/node/src/runtime/mod.rs): callRelayMap::try_from_iterover the list; keep the existing TCPprobe_relayloop but change semantics to "≥1 reachable at boot" (log a warning for unreachable relays rather than hard-failing).discovery_url: Option<String>or similar; wirePkarrPublisher::from_url()/DnsAddressLookup::from_url()when set, falling back to n0 DNS when absent. Confirm iroh API surface before coding.crates/gossip/src/service.rs): decide and document whetherpresets::Minimalshould be upgraded to share relay config (likely yes for isolated deployments, but gossip currently has no relay config plumbing).contracts/local/docker-compose.ymlso operators don't need to supplyIROH_RELAY_IMAGE.Design note on reachability semantics: failing hard if all relays are unreachable is correct; logging and continuing if ≥1 is up matches how most relay-backed systems behave. Recommend surfacing unreachable relay URLs in the admin RPC health endpoint.
Add this agentic workflows to your repo
To install this agentic workflow, run
feat(node): multi-relay config + reachability-gated endpoint bring-up (…