Skip to content

deps: update iroh and moq#41

Open
Frando wants to merge 8 commits into
mainfrom
update-iroh-moq
Open

deps: update iroh and moq#41
Frando wants to merge 8 commits into
mainfrom
update-iroh-moq

Conversation

@Frando

@Frando Frando commented Jun 17, 2026

Copy link
Copy Markdown
Member

This updates iroh to 1.0, all iroh-related crates to the latest version, and all moq/hang crates to the latest released versions. We no longer need git dependencies on moq crates.

@Frando Frando force-pushed the update-iroh-moq branch from 400f37d to dfda7f8 Compare June 17, 2026 10:34
@Frando Frando force-pushed the update-iroh-moq branch from dfda7f8 to 9050ed4 Compare June 17, 2026 10:37
Frando added 7 commits June 17, 2026 13:33
The relay builds its own iroh endpoint to use a stable secret key, then
hands it to moq_native via with_iroh. ALPNs are fixed at bind time, so
with_iroh cannot add them: the endpoint rejected every iroh-native MoQ
client with "peer doesn't support any known protocol" (error 120),
breaking the browser-to-CLI and CLI-to-browser bridge e2e tests.

Register the same ALPN set that moq_native::iroh::EndpointConfig::bind
uses: every MoQ-lite/IETF version plus the WebTransport-over-HTTP/3 ALPN.
Gate the `codec` import in publish.rs so it is not flagged as unused when
the crate builds without any codec features. Add a `reason` to the two
`allow(dead_code)` attributes that were missing one.
Replace the hand-rolled CatalogProducer, CatalogConsumer, and Catalog with
moq-mux's generic catalog stack. The chat and user sections become an
IrohLiveExt extension and the catalog is now Catalog<IrohLiveExt>, published
and consumed through moq_mux::catalog::Producer/Consumer.

This routes catalog publishing through moq-json (one snapshot per group today,
with merge-patch deltas available when upstream enables them), removes the
snapshot-dropping race in the old hand-rolled select! loop, and extends hang's
catalog through the documented serde flatten / CatalogExt pattern so new hang
sections deserialize automatically instead of being dropped by an inlined copy.
moq-lite-04 is the current wire version. It carries real origin ids in announce
hop chains and supports AnnounceInterest.exclude_hop for sender-side loop
suppression, where lite-03 sent anonymous UNKNOWN placeholders and relied on
receiver-side checks. Peers and the relay already negotiate lite-04.

No backward compatibility with lite-03-only peers is retained.
Create the node's Origin once in Moq::new and thread it through the actor,
protocol handler, and MoqSession::connect/session_connect/session_accept,
rather than minting a fresh Origin::random() in every session. This matches
the per-node identity relays use: the id is stable across every session the
node opens or accepts, so announce hop chains attribute broadcasts to one
consistent node identity for loop detection and shortest-path routing.
Drop the commented-out hang::container::Frame -> MediaPacket impl and the now
unused EncodedFrame::to_hang_frame method. The transport layer builds
moq_mux::container::Frame directly, so neither conversion has any callers.
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