Skip to content

refactor(iroh)!: select rind TLS provider - #493

Draft
kixelated wants to merge 2 commits into
mainfrom
quest/a1/rind/iroh
Draft

kixelated wants to merge 2 commits into
mainfrom
quest/a1/rind/iroh

Conversation

@kixelated

@kixelated kixelated commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Draft migration of web-transport-iroh to rind. Not ready: iroh reaches the same upstream packet-key incompatibility as the Noq migration, and BLAKE3 retains a C-toolchain dependency in the shipped graph.

Changes

  • Add crypto::default_provider(): reuse the installed rustls provider, otherwise construct rind-rustls's provider after its CPU check. Return CryptoError::UnsupportedCpu with the original error; do not install a process-wide provider.
  • Remove this crate's aws-lc-rs/ring features. Keep iroh defaults disabled and require iroh 1.4 for the provider interface.
  • Remove the dev-only iroh TLS-provider dependency. No fixture needs a relay server. All direct-connection fixtures use presets::Empty and the explicit provider, so they expose the upstream runtime failure rather than accidentally using ring.
  • Document configuration, feature migration and CPU requirements inline. Keep the quest and epic link because implementation and validation remain unfinished; record both outside waits in the quest.

Compatibility and choices

Breaking Rust API/configuration change: remove the aws-lc-rs and ring Cargo features; callers configure their endpoints with the fallible provider helper. Iroh's Minimal/N0 presets are gated on its built-in provider features, so the example uses presets::Empty; applications configure relays/address lookup explicitly. The remaining features are metrics, portmapper and qlog.

This crate already accepts caller-created endpoints and owns no endpoint builder. The recommended implementation therefore exposes the small composable provider helper at endpoint configuration time instead of introducing a parallel builder. Client::new() stays infallible. There are no direct rind primitives requiring a CPU check when an installed provider wins. rind supports x86_64, aarch64 and 32-bit ARM; aarch64 requires NEON, and other architectures including WASM cannot compile rind.

No version bump or intended QUIC/HTTP/3 wire change. The current stable rind provider cannot perform the iroh handshake, so this draft must not ship. No local packet-suite adapter, provider fallback, test suppression, pinned harness change or graph exception has been added.

Waiting

  • moq-dev/rind: publish a stable rind-rustls release implementing rustls QUIC PacketKey::encrypt_in_place_for_path and decrypt_in_place_for_path. Stable 0.23.0 lacks both. iroh 1.4.1 depends on Noq 1.4.0, which calls the encryption method even for path 0 and unwraps its default EncryptError at noq-proto/src/crypto/rustls.rs:649. Require the fixed release, complete CPU-refusal coverage, rerun raw QUIC/H3 and repository checks, then run /quest-review. An upstream implementation plus stable publication is recommended; no local duplicate adapter is authorized.
  • BLAKE3-team/BLAKE3 / n0-computer/iroh: provide a stable dependency path without BLAKE3's unconditional cc build dependency. Both iroh 1.4.1 and iroh-relay 1.4.1 reach blake3 1.8.7 -> cc 1.11.1. BLAKE3's pure feature still retains cc, so it does not meet the rind epic's literal normal/build graph requirement. Recommend resolving this upstream and preserving the no-C-crypto criterion. Narrowing the epic to TLS providers would require a maintainer decision.

Validation

All local commands ran in the Nix shell; builds/tests used the installed quest gate.

  • just fix: passed.
  • cargo test -p web-transport-iroh --test crypto: passed. The dedicated integration-test process verifies rind fallback, no global installation and exact installed-provider precedence.
  • Focused doctests, complete feature powerset and Clippy with warnings denied: passed.
  • Normal/build graph resolution: all 8 feature combinations across 14 Linux GNU/musl, Windows, macOS, iOS and Android release targets exclude ring, aws-lc-rs, aws-lc-sys, iroh's test-utils and iroh-relay's server feature. This is dependency resolution, not cross-compilation. cc remains through BLAKE3, so the full epic graph goal fails.
  • cargo test -p web-transport-iroh --all-features tests::h3_smoke -- --exact --nocapture: compiled, then failed with EncryptError at Noq's unwrap; poisoned-lock cleanup caused SIGABRT.
  • Full unmodified just test: failed with the same error in tests::quic_smoke; subsequent suites did not run. This is a migration blocker, not a passing/pre-existing-failure exception.
  • Full unmodified just check: failed at the pinned quest check before compilation, because that older CLI rejects the required ## Waiting heading (allowed: Goal, Plan, Required, Closes, Related). The installed Quest binary accepts it: quest check --base origin/main passes. The pinned tool and runner remain unchanged; no altered full run is reported as passing.
  • git diff --check: passed. The Python wheel runner was not run; it is unaffected and unchanged.

Runtime reproduction:

thread 'tests::h3_smoke' panicked at noq-proto-1.4.0/src/crypto/rustls.rs:649:14:
called `Result::unwrap()` on an `Err` value: EncryptError
...
panic in a destructor during cleanup
thread caused non-unwinding panic. aborting.
process didn't exit successfully ... (signal: 6, SIGABRT)

Remaining inverse graph:

cc v1.11.1
[build-dependencies]
└── blake3 v1.8.7
    ├── iroh v1.4.1
    │   └── web-transport-iroh v0.8.4
    └── iroh-relay v1.4.1
        └── iroh v1.4.1

Review

Local cross-vendor quest review and readiness are deferred because the migration is unfinished and its transport tests abort with the current stable provider. No review skip or approval is claimed. Run /quest-iterate after the outside conditions clear, complete validation, then /quest-review before marking ready.

Suggested follow-ups

  • Update the repository's Quest pin to a release supporting the workflow's Waiting format and local quest review command. No pin change is included in this crate migration.
  • The upstream packet-key and BLAKE3 work are required blockers above, rather than optional work deferred out of this quest. No upstream post was made outside the approved organizations.

(Written by GPT-6.1 Sol with xhigh)

kixelated and others added 2 commits November 7, 2026 03:02
Quest-Claim: e6429dc8ef058b93
Preserve the draft migration and upstream packet-key and BLAKE3 blockers before readiness.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
@kixelated kixelated changed the title Run iroh on rind refactor(iroh)!: select rind TLS provider Nov 7, 2026

This branch has not been deployed

No deployments
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