From ecdf5f20402b38bc0a0d644c27863237e9b41e48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cramfox=E2=80=9D?= <“kasey@n0.computer”> Date: Wed, 8 Oct 2025 11:58:23 -0400 Subject: [PATCH 1/3] chore: add patch for `iroh` dependencies Updates the following dependencies to use their main branches: - `irpc` from `https://github.com/n0-computer/irpc.git` --- Cargo.lock | 8 +++----- Cargo.toml | 1 + deny.toml | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6d93ad87a..1de94cf0f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2055,8 +2055,7 @@ dependencies = [ [[package]] name = "irpc" version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "092c0b20697bbc7de4839eebcb49be975cc09221021626d301eea55fc10bfeb7" +source = "git+https://github.com/n0-computer/irpc.git?branch=main#2cdc1a0d6524fcde3645f960964b7ddbc2ba8aa4" dependencies = [ "anyhow", "futures-buffered", @@ -2078,8 +2077,7 @@ dependencies = [ [[package]] name = "irpc-derive" version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209d38d83c0f7043916e90de2d3a8d01035db3a2f49ea7d5fb41b8f43e889924" +source = "git+https://github.com/n0-computer/irpc.git?branch=main#2cdc1a0d6524fcde3645f960964b7ddbc2ba8aa4" dependencies = [ "proc-macro2", "quote", @@ -4744,7 +4742,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 38fedb61c..1c1f31547 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -72,3 +72,4 @@ fs-store = ["dep:redb", "dep:reflink-copy"] [patch.crates-io] iroh = { git = "https://github.com/n0-computer/iroh", branch = "main" } iroh-base = { git = "https://github.com/n0-computer/iroh", branch = "main" } +irpc = { git = "https://github.com/n0-computer/irpc.git", branch = "main" } diff --git a/deny.toml b/deny.toml index 85be20882..cd2b9a32c 100644 --- a/deny.toml +++ b/deny.toml @@ -43,4 +43,5 @@ path = "LICENSE" [sources] allow-git = [ "https://github.com/n0-computer/iroh", -] \ No newline at end of file + "https://github.com/n0-computer/irpc.git", +] From be552194373917d388047808ac006db4b0dea167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cramfox=E2=80=9D?= <“kasey@n0.computer”> Date: Wed, 8 Oct 2025 18:11:23 -0400 Subject: [PATCH 2/3] chore: upgrade to latest iroh and irpc --- Cargo.lock | 40 +++++++--------------------------------- Cargo.toml | 4 ++-- src/api.rs | 36 +++++++++++++++++++++++++----------- src/provider/events.rs | 12 ++++++++++-- 4 files changed, 44 insertions(+), 48 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1de94cf0f..8a24ba841 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1761,7 +1761,7 @@ dependencies = [ "igd-next", "instant", "iroh-base", - "iroh-metrics 0.36.1", + "iroh-metrics", "iroh-quinn", "iroh-quinn-proto", "iroh-quinn-udp", @@ -1839,7 +1839,7 @@ dependencies = [ "iroh", "iroh-base", "iroh-io", - "iroh-metrics 0.35.0", + "iroh-metrics", "iroh-quinn", "iroh-test", "irpc", @@ -1883,27 +1883,13 @@ dependencies = [ "tokio", ] -[[package]] -name = "iroh-metrics" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8922c169f1b84d39d325c02ef1bbe1419d4de6e35f0403462b3c7e60cc19634" -dependencies = [ - "iroh-metrics-derive 0.2.0", - "itoa", - "postcard", - "serde", - "snafu", - "tracing", -] - [[package]] name = "iroh-metrics" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "090161e84532a0cb78ab13e70abb882b769ec67cf5a2d2dcea39bd002e1f7172" dependencies = [ - "iroh-metrics-derive 0.3.0", + "iroh-metrics-derive", "itoa", "postcard", "ryu", @@ -1912,18 +1898,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "iroh-metrics-derive" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d12f5c45c4ed2436302a4e03cad9a0ad34b2962ad0c5791e1019c0ee30eeb09" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.104", -] - [[package]] name = "iroh-metrics-derive" version = "0.3.0" @@ -2008,7 +1982,7 @@ dependencies = [ "hyper", "hyper-util", "iroh-base", - "iroh-metrics 0.36.1", + "iroh-metrics", "iroh-quinn", "iroh-quinn-proto", "lru 0.16.1", @@ -2055,7 +2029,7 @@ dependencies = [ [[package]] name = "irpc" version = "0.8.0" -source = "git+https://github.com/n0-computer/irpc.git?branch=main#2cdc1a0d6524fcde3645f960964b7ddbc2ba8aa4" +source = "git+https://github.com/n0-computer/irpc.git?branch=iroh-0-93#e6905093e971de2e3480fb55ddf146bfdc495796" dependencies = [ "anyhow", "futures-buffered", @@ -2077,7 +2051,7 @@ dependencies = [ [[package]] name = "irpc-derive" version = "0.6.0" -source = "git+https://github.com/n0-computer/irpc.git?branch=main#2cdc1a0d6524fcde3645f960964b7ddbc2ba8aa4" +source = "git+https://github.com/n0-computer/irpc.git?branch=iroh-0-93#e6905093e971de2e3480fb55ddf146bfdc495796" dependencies = [ "proc-macro2", "quote", @@ -2870,7 +2844,7 @@ dependencies = [ "futures-util", "hyper-util", "igd-next", - "iroh-metrics 0.36.1", + "iroh-metrics", "libc", "nested_enum_utils", "netwatch", diff --git a/Cargo.toml b/Cargo.toml index 1c1f31547..ac6213bba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,7 @@ self_cell = "1.1.0" genawaiter = { version = "0.99.1", features = ["futures03"] } iroh-base = "0.92" irpc = { version = "0.8.0", features = ["rpc", "quinn_endpoint_setup", "spans", "stream", "derive"], default-features = false } -iroh-metrics = { version = "0.35" } +iroh-metrics = { version = "0.36" } redb = { version = "2.6.3", optional = true } reflink-copy = { version = "0.1.24", optional = true } @@ -72,4 +72,4 @@ fs-store = ["dep:redb", "dep:reflink-copy"] [patch.crates-io] iroh = { git = "https://github.com/n0-computer/iroh", branch = "main" } iroh-base = { git = "https://github.com/n0-computer/iroh", branch = "main" } -irpc = { git = "https://github.com/n0-computer/irpc.git", branch = "main" } +irpc = { git = "https://github.com/n0-computer/irpc.git", branch = "iroh-0-93" } diff --git a/src/api.rs b/src/api.rs index 117c59e25..3abb13bdb 100644 --- a/src/api.rs +++ b/src/api.rs @@ -70,8 +70,8 @@ impl From for RequestError { } } -impl From for RequestError { - fn from(value: irpc::channel::RecvError) -> Self { +impl From for RequestError { + fn from(value: irpc::channel::mpsc::RecvError) -> Self { RpcSnafu.into_error(value.into()) } } @@ -89,8 +89,14 @@ pub type RequestResult = std::result::Result; pub enum ExportBaoError { #[snafu(display("send error: {source}"))] Send { source: irpc::channel::SendError }, - #[snafu(display("recv error: {source}"))] - Recv { source: irpc::channel::RecvError }, + #[snafu(display("mpsc recv error: {source}"))] + MpscRecv { + source: irpc::channel::mpsc::RecvError, + }, + #[snafu(display("oneshot recv error: {source}"))] + OneshotRecv { + source: irpc::channel::oneshot::RecvError, + }, #[snafu(display("request error: {source}"))] Request { source: irpc::RequestError }, #[snafu(display("io error: {source}"))] @@ -105,7 +111,8 @@ impl From for Error { fn from(e: ExportBaoError) -> Self { match e { ExportBaoError::Send { source, .. } => Self::Io(source.into()), - ExportBaoError::Recv { source, .. } => Self::Io(source.into()), + ExportBaoError::MpscRecv { source, .. } => Self::Io(source.into()), + ExportBaoError::OneshotRecv { source, .. } => Self::Io(source.into()), ExportBaoError::Request { source, .. } => Self::Io(source.into()), ExportBaoError::ExportBaoIo { source, .. } => Self::Io(source), ExportBaoError::ExportBaoInner { source, .. } => Self::Io(source.into()), @@ -117,7 +124,8 @@ impl From for Error { impl From for ExportBaoError { fn from(e: irpc::Error) -> Self { match e { - irpc::Error::Recv(e) => RecvSnafu.into_error(e), + irpc::Error::MpscRecv(e) => MpscRecvSnafu.into_error(e), + irpc::Error::OneshotRecv(e) => OneshotRecvSnafu.into_error(e), irpc::Error::Send(e) => SendSnafu.into_error(e), irpc::Error::Request(e) => RequestSnafu.into_error(e), irpc::Error::Write(e) => ExportBaoIoSnafu.into_error(e.into()), @@ -131,9 +139,15 @@ impl From for ExportBaoError { } } -impl From for ExportBaoError { - fn from(value: irpc::channel::RecvError) -> Self { - RecvSnafu.into_error(value) +impl From for ExportBaoError { + fn from(value: irpc::channel::mpsc::RecvError) -> Self { + MpscRecvSnafu.into_error(value) + } +} + +impl From for ExportBaoError { + fn from(value: irpc::channel::oneshot::RecvError) -> Self { + OneshotRecvSnafu.into_error(value) } } @@ -200,8 +214,8 @@ impl From for Error { } } -impl From for Error { - fn from(e: irpc::channel::RecvError) -> Self { +impl From for Error { + fn from(e: irpc::channel::mpsc::RecvError) -> Self { Self::Io(e.into()) } } diff --git a/src/provider/events.rs b/src/provider/events.rs index 85a4dbcb2..7287fd1a1 100644 --- a/src/provider/events.rs +++ b/src/provider/events.rs @@ -138,8 +138,16 @@ impl From for ProgressError { } } -impl From for ProgressError { - fn from(value: irpc::channel::RecvError) -> Self { +impl From for ProgressError { + fn from(value: irpc::channel::mpsc::RecvError) -> Self { + ProgressError::Internal { + source: value.into(), + } + } +} + +impl From for ProgressError { + fn from(value: irpc::channel::oneshot::RecvError) -> Self { ProgressError::Internal { source: value.into(), } From 5b8b7859b39134c70e636faab1dceb9824c88d30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cramfox=E2=80=9D?= <“kasey@n0.computer”> Date: Wed, 8 Oct 2025 21:18:45 -0400 Subject: [PATCH 3/3] chore: upgrade irpc, iroh --- Cargo.lock | 27 ++++++++++++++++----------- Cargo.toml | 13 ++++--------- deny.toml | 6 ------ 3 files changed, 20 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8a24ba841..a4f94ccd2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1741,8 +1741,9 @@ dependencies = [ [[package]] name = "iroh" -version = "0.92.0" -source = "git+https://github.com/n0-computer/iroh?branch=main#b6c60d39ca2234fbe5fa45812d6733a2ba96fad2" +version = "0.93.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50369f3db3f3fbc2cc14fc1baab2f3ee16e0abd89eca0b814258d02a6a13040c" dependencies = [ "aead", "backon", @@ -1802,8 +1803,9 @@ dependencies = [ [[package]] name = "iroh-base" -version = "0.92.0" -source = "git+https://github.com/n0-computer/iroh?branch=main#b6c60d39ca2234fbe5fa45812d6733a2ba96fad2" +version = "0.93.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "929fbe14046dfb01b41ccccaa5b476549924daa54438518bda11a9ab1598b2a9" dependencies = [ "curve25519-dalek", "data-encoding", @@ -1967,8 +1969,9 @@ dependencies = [ [[package]] name = "iroh-relay" -version = "0.92.0" -source = "git+https://github.com/n0-computer/iroh?branch=main#b6c60d39ca2234fbe5fa45812d6733a2ba96fad2" +version = "0.93.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbc49e535c2cf410d19f82d46dac2b3d0bff1763759a28cd1c67870085f2fc4" dependencies = [ "blake3", "bytes", @@ -2028,8 +2031,9 @@ dependencies = [ [[package]] name = "irpc" -version = "0.8.0" -source = "git+https://github.com/n0-computer/irpc.git?branch=iroh-0-93#e6905093e971de2e3480fb55ddf146bfdc495796" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e3fc4aa2bc2c1002655fab4254390f016f8b9bb65390600f9d8b11f9bdac76d" dependencies = [ "anyhow", "futures-buffered", @@ -2050,8 +2054,9 @@ dependencies = [ [[package]] name = "irpc-derive" -version = "0.6.0" -source = "git+https://github.com/n0-computer/irpc.git?branch=iroh-0-93#e6905093e971de2e3480fb55ddf146bfdc495796" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f5706d47257e3f40b9e7dbc1934942b5792cc6a8670b7dda8856c2f5709cf98" dependencies = [ "proc-macro2", "quote", @@ -4716,7 +4721,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index ac6213bba..30ef9ef14 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,11 +36,11 @@ chrono = "0.4.39" nested_enum_utils = "0.2.1" ref-cast = "1.0.24" arrayvec = "0.7.6" -iroh = "0.92" +iroh = "0.93" self_cell = "1.1.0" genawaiter = { version = "0.99.1", features = ["futures03"] } -iroh-base = "0.92" -irpc = { version = "0.8.0", features = ["rpc", "quinn_endpoint_setup", "spans", "stream", "derive"], default-features = false } +iroh-base = "0.93" +irpc = { version = "0.9.0", features = ["rpc", "quinn_endpoint_setup", "spans", "stream", "derive"], default-features = false } iroh-metrics = { version = "0.36" } redb = { version = "2.6.3", optional = true } reflink-copy = { version = "0.1.24", optional = true } @@ -59,7 +59,7 @@ tracing-subscriber = { version = "0.3.20", features = ["fmt"] } tracing-test = "0.2.5" walkdir = "2.5.0" atomic_refcell = "0.1.13" -iroh = { version = "0.92", features = ["discovery-local-network"]} +iroh = { version = "0.93", features = ["discovery-local-network"]} async-compression = { version = "0.4.30", features = ["lz4", "tokio"] } concat_const = "0.2.0" @@ -68,8 +68,3 @@ hide-proto-docs = [] metrics = [] default = ["hide-proto-docs", "fs-store"] fs-store = ["dep:redb", "dep:reflink-copy"] - -[patch.crates-io] -iroh = { git = "https://github.com/n0-computer/iroh", branch = "main" } -iroh-base = { git = "https://github.com/n0-computer/iroh", branch = "main" } -irpc = { git = "https://github.com/n0-computer/irpc.git", branch = "iroh-0-93" } diff --git a/deny.toml b/deny.toml index cd2b9a32c..bb2a4118f 100644 --- a/deny.toml +++ b/deny.toml @@ -39,9 +39,3 @@ name = "ring" [[licenses.clarify.license-files]] hash = 3171872035 path = "LICENSE" - -[sources] -allow-git = [ - "https://github.com/n0-computer/iroh", - "https://github.com/n0-computer/irpc.git", -]