Skip to content

feat: iroh-next server-side connectivity and iroh server side migration#8400

Draft
dpc wants to merge 6 commits intofedimint:masterfrom
dpc:dpc/jj-uxtvnmvykwxl
Draft

feat: iroh-next server-side connectivity and iroh server side migration#8400
dpc wants to merge 6 commits intofedimint:masterfrom
dpc:dpc/jj-uxtvnmvykwxl

Conversation

@dpc
Copy link
Copy Markdown
Contributor

@dpc dpc commented Mar 21, 2026

slop warning: straight of out slop machine, I need to think a bit more about it and review it properly. Don't waste your time just yet.

I don't think we really thought through server side iroh migration. Once iroh 1.0 is available, how are we going to coordinate upgrading to it? We are going to need the server side to run dual stack somehow, and clients to know when and how to connect.

Also we are lagging behind already using semi-stable Iroh 0.35 which is missing a lot of improvements.

It occurred to me that with recently GuardianMetadata we have a freedom of announcing whatever we want, and we can update it easily too.

So why wouldn't we put the exact version of iroh-next that the server side is using, along with a endpoint to connect to, and make the client use it instead of old-Iroh if they have the same version?

TODO:

  • api connectivity has the logic, but p2p still needs it

@dpc dpc force-pushed the dpc/jj-uxtvnmvykwxl branch from 61821d7 to ed71cde Compare March 25, 2026 16:38
dpc and others added 6 commits March 25, 2026 09:50
…h-next fields

- Rename insert_signed_guardian_metadata_if_not_present to
  update_signed_guardian_metadata: always rebuild metadata from config,
  compare tagged_hash with existing, and only write+return true when
  changed. Ensures metadata stays current across restarts.

- Add optional iroh_next_version and iroh_next_endpoint fields to
  GuardianMetadata (serde default + skip_serializing_if for backward
  compat). Populated from broadcast key derivation when iroh-next is
  enabled at runtime.

- Add IROH_NEXT_VERSION constant ("0.90") to broadcast_keys module.

- Disable iroh-next in ConnectorRegistry when running in test/devimint
  environments (no iroh-next server endpoints available).
When a guardian publishes iroh_next_version and iroh_next_endpoint in
its metadata, and the client supports the same iroh-next version,
rewrite iroh:// URLs to use the iroh-next node ID directly. This
avoids dual-stack racing and connects via the preferred iroh-next stack.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Aligns the server-side env var naming with the client-side convention
(FM_IROH_<thing>_<action>).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dpc dpc force-pushed the dpc/jj-uxtvnmvykwxl branch from ed71cde to 1f466c9 Compare March 25, 2026 16:51
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