feat(iroh): skip undeliverable net_report probes on wasm32-wasip2 - #3
feat(iroh): skip undeliverable net_report probes on wasm32-wasip2#3lann wants to merge 1 commit into
Conversation
On wasi components the relay leg is a host-side websocket pipe, so two probe classes can never complete and only burn PROBES_TIMEOUT: - HTTPS probes have no HTTP client path. Return a nominal latency so home-relay selection proceeds; the relay's actual reachability is proven by the relay dial itself. - QAD probes ride UDP straight to the relay's QUIC socket, which the host cannot deliver. Skip them; external addresses arrive through `Endpoint::add_external_addr` instead. Without this the report stalls for the full probe timeout and home-relay selection and `Endpoint::online` stall behind it. Part of running iroh on wasm32-wasip2 components (polymorph-components/polymorph-iroh#25).
|
Upstream-shape note for the QAD half, found while evaluating shim-side QAD termination: upstream already gates QAD on transport capability — // Set a `QuicConfig` for address discovery (QAD), but only if we have IP transports.
//
// If there are no IP transports configured, then we don't set a QuicConfig.
// If we would, the `noq::Endpoint` passed along will not have IP connectivity,
// and the QAD probes that connect to the relay's QUIC endpoints would time out
// because all outgoing packets to IP destinations would be dropped.
let qad_config = has_ip_transports.then(|| QuicConfig { ... });Same rationale as this PR, in upstream's own words. The synthetic-address overlay defeats the gate by construction: the endpoint does have IP transports (that's the point of the overlay), they just can't reach the relay's QUIC socket. So the upstream conversation for this probe class is better framed as "the existing gate keys on the wrong predicate — Also noting for completeness: shim-side QAD termination was evaluated and rejected — it needs a full QUIC+TLS1.3 server with the address-discovery extension in every host, a shim-minted cert (guest could trust it via the public |
On wasi components the relay leg is a host-side websocket pipe, so two probe classes can never complete and only burn
PROBES_TIMEOUT, stalling the report — and home-relay selection andEndpoint::online()behind it:Endpoint::add_external_addrinstead, so nothing consumed the probe results anyway.Measured effect (join latency, polymorph-components/polymorph-iroh#25): report completion ~3.2s → ~200ms.
Known cost of the nominal-latency form: every relay ties, so home-relay selection among a multi-relay map is no longer latency-driven. The upstream-shaped fix is probably a probe-capability gate ("this target cannot run this probe class") plus treating relay-dial success as reachability — flagged for design discussion rather than baked in here.
Siblings: the iroh-dns resolver-config fallback and the relay datagram-pipe seam. Merged together into the long-lived
polymorph-irohbranch that the component experiments consume.