feat(core): migrate iroh 0.35 -> 1.0.2

Cargo.toml: iroh = { version = "1.0", optional = true, default-features = false, features = ["tls-aws-lc-rs"] }

6 API changes in endpoint.rs + types.rs:
- Endpoint::builder() -> builder(presets::Minimal) (mandatory crypto_provider)
- SecretKey::from_bytes() now returns SecretKey directly, not Result
- SecretKey::generate() takes no rng arg (OsRng internal)
- Connection::remote_node_id() -> remote_id() (returns PublicKey, not Result)
- Connection::alpn() returns &[u8] directly, not Option<&[u8]>
- tls-aws-lc-rs feature matches quinn path's existing crypto provider

Unblocks alknet-blobs (depends on iroh-blobs 0.103 which pulls iroh 1.0
transitively). See docs/research/iroh-update/findings.md for the full trace.
This commit is contained in:
glm-5.2 committed 2026-07-09 06:58:07 +00:00
1 parent 668d777ef0
commit acd049e8b2
4 files changed
+854 -1130

No files matched your search

Generated
+849 -1124
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -18,7 +18,7 @@ acme = ["dep:rustls-acme"]
[dependencies]
tokio = { version = "1", features = ["full"] }
quinn = { version = "0.11", optional = true }
iroh = { version = "0.35", optional = true }
iroh = { version = "1.0", optional = true, default-features = false, features = ["tls-aws-lc-rs"] }
rustls = "0.23"
rustls-pki-types = "1"
rustls-pemfile = "2"
+3 -4
View File
@@ -467,7 +467,7 @@ fn dispatch_iroh(
#[cfg(feature = "iroh")]
fn extract_iroh_client_fingerprint(connection: &iroh::endpoint::Connection) -> Option<String> {
let node_id = connection.remote_node_id().ok()?;
let node_id = connection.remote_id();
Some(format!("ed25519:{}", node_id))
}
@@ -678,14 +678,13 @@ async fn build_iroh_endpoint(
static_config: &StaticConfig,
alpns: &[Vec<u8>],
) -> Result<iroh::Endpoint, EndpointError> {
let mut builder = iroh::Endpoint::builder();
let mut builder = iroh::Endpoint::builder(iroh::endpoint::presets::Minimal);
if let Some(TlsIdentity::RawKey(secret_key)) = static_config.tls_identity.as_ref() {
let iroh_key = iroh::SecretKey::from_bytes(&secret_key.as_bytes());
builder = builder.secret_key(iroh_key);
} else {
let mut csprng = rand::rngs::OsRng;
builder = builder.secret_key(iroh::SecretKey::generate(&mut csprng));
builder = builder.secret_key(iroh::SecretKey::generate());
}
builder = builder.alpns(alpns.to_vec());
+1 -1
View File
@@ -397,7 +397,7 @@ impl Connection {
#[cfg(feature = "iroh")]
pub fn from_iroh(conn: iroh::endpoint::Connection) -> Self {
let alpn = conn.alpn().unwrap_or_default();
let alpn = conn.alpn().to_vec();
Self {
kind: ConnectionKind::Iroh(conn),
alpn,