diff --git a/Cargo.lock b/Cargo.lock index 6d93ad87a..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", @@ -1761,7 +1762,7 @@ dependencies = [ "igd-next", "instant", "iroh-base", - "iroh-metrics 0.36.1", + "iroh-metrics", "iroh-quinn", "iroh-quinn-proto", "iroh-quinn-udp", @@ -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", @@ -1839,7 +1841,7 @@ dependencies = [ "iroh", "iroh-base", "iroh-io", - "iroh-metrics 0.35.0", + "iroh-metrics", "iroh-quinn", "iroh-test", "irpc", @@ -1883,27 +1885,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 +1900,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" @@ -1993,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", @@ -2008,7 +1985,7 @@ dependencies = [ "hyper", "hyper-util", "iroh-base", - "iroh-metrics 0.36.1", + "iroh-metrics", "iroh-quinn", "iroh-quinn-proto", "lru 0.16.1", @@ -2054,9 +2031,9 @@ dependencies = [ [[package]] name = "irpc" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "092c0b20697bbc7de4839eebcb49be975cc09221021626d301eea55fc10bfeb7" +checksum = "3e3fc4aa2bc2c1002655fab4254390f016f8b9bb65390600f9d8b11f9bdac76d" dependencies = [ "anyhow", "futures-buffered", @@ -2077,9 +2054,9 @@ dependencies = [ [[package]] name = "irpc-derive" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209d38d83c0f7043916e90de2d3a8d01035db3a2f49ea7d5fb41b8f43e889924" +checksum = "7f5706d47257e3f40b9e7dbc1934942b5792cc6a8670b7dda8856c2f5709cf98" dependencies = [ "proc-macro2", "quote", @@ -2872,7 +2849,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 38fedb61c..30ef9ef14 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,12 +36,12 @@ 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-metrics = { version = "0.35" } +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,7 +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" } diff --git a/deny.toml b/deny.toml index 85be20882..bb2a4118f 100644 --- a/deny.toml +++ b/deny.toml @@ -39,8 +39,3 @@ name = "ring" [[licenses.clarify.license-files]] hash = 3171872035 path = "LICENSE" - -[sources] -allow-git = [ - "https://github.com/n0-computer/iroh", -] \ No newline at end of file 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(), }