From df9299c26b7956dc002f586ed75fa801f74e4e3d Mon Sep 17 00:00:00 2001 From: Jack Zampolin Date: Wed, 1 Jul 2026 15:32:59 -0700 Subject: [PATCH] feat(p2p): log the resolved iroh relay set at endpoint spawn MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit During the defra-agent#588 incident the host was flooded by relay open_path retries against n0 canary relays — and nothing in the logs showed which relay infrastructure the endpoint was pointed at. Log the resolved relay URL set once at spawn so canary/staging vs production is visible in every deployment. (The iroh 1.0.1 bump originally on this branch landed via #1084.) Co-Authored-By: Claude Fable 5 --- crates/p2p/src/iroh/endpoint.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/p2p/src/iroh/endpoint.rs b/crates/p2p/src/iroh/endpoint.rs index 4dd378ab..99f9dc28 100644 --- a/crates/p2p/src/iroh/endpoint.rs +++ b/crates/p2p/src/iroh/endpoint.rs @@ -111,6 +111,13 @@ pub async fn spawn_endpoint( alpns.push(iroh_gossip::net::GOSSIP_ALPN.to_vec()); let relay_mode = relay_mode_from_config(&config.relay_mode)?; + let relay_urls: Vec = relay_mode + .relay_map() + .urls::>() + .iter() + .map(|u| u.to_string()) + .collect(); + tracing::info!(?relay_urls, "iroh endpoint relay configuration"); let mut builder = Endpoint::builder(iroh::endpoint::presets::Minimal) .relay_mode(relay_mode) .secret_key(config.secret_key.clone())