Skip to content

fix(iroh): use tokio transport for quic rpc #2408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ missing_debug_implementations = "warn"

[workspace.lints.clippy]
unused-async = "warn"

[patch.crates-io]
quic-rpc = { git = "https://github.com/n0-computer/quic-rpc", branch = "feat-async-channel" }
2 changes: 1 addition & 1 deletion iroh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ iroh-docs = { version = "0.18.0", path = "../iroh-docs" }
iroh-gossip = { version = "0.18.0", path = "../iroh-gossip" }
parking_lot = "0.12.1"
postcard = { version = "1", default-features = false, features = ["alloc", "use-std", "experimental-derive"] }
quic-rpc = { version = "0.10.2", default-features = false, features = ["flume-transport", "quinn-transport"] }
quic-rpc = { version = "0.10.2", default-features = false, features = ["flume-transport", "tokio-mpsc-transport", "quinn-transport"] }
quinn = { package = "iroh-quinn", version = "0.10" }
rand = "0.8"
serde = { version = "1", features = ["derive"] }
Expand Down
6 changes: 3 additions & 3 deletions iroh/src/node/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use iroh_net::{
};
use quic_rpc::{
transport::{
flume::FlumeServerEndpoint, misc::DummyServerEndpoint, quinn::QuinnServerEndpoint,
misc::DummyServerEndpoint, quinn::QuinnServerEndpoint, tokio_mpsc::ServerEndpoint,
},
ServiceEndpoint,
};
Expand Down Expand Up @@ -494,7 +494,7 @@ where
.await?;

// Initialize the internal RPC connection.
let (internal_rpc, controller) = quic_rpc::transport::flume::connection(1);
let (internal_rpc, controller) = quic_rpc::transport::tokio_mpsc::connection(1);
// box the controller. Boxing has a special case for the flume channel that avoids allocations,
// so this has zero overhead.
let controller = quic_rpc::transport::boxed::Connection::new(controller);
Expand Down Expand Up @@ -538,7 +538,7 @@ where
#[derive(derive_more::Debug)]
pub struct ProtocolBuilder<D, E> {
inner: Arc<NodeInner<D>>,
internal_rpc: FlumeServerEndpoint<RpcService>,
internal_rpc: ServerEndpoint<RpcService>,
external_rpc: E,
protocols: ProtocolMap,
#[debug("callback")]
Expand Down
Loading