Skip to content
Merged
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
120 changes: 85 additions & 35 deletions Cargo.lock

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

21 changes: 7 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ futures-buffered = "0.2.4"
futures-lite = "2.3.0"
futures-util = { version = "0.3.25" }
hex = "0.4"
iroh-base = { version = "0.33", features = ["ticket"] }
iroh-blobs = { version = "0.33" }
iroh-gossip = { version = "0.33", optional = true, features = ["net"] }
iroh-metrics = { version = "0.31", default-features = false }
iroh = { version = "0.33", optional = true }
iroh-base = { version = "0.34", features = ["ticket"] }
iroh-blobs = { version = "0.34" }
iroh-gossip = { version = "0.34", optional = true, features = ["net"] }
iroh-metrics = { version = "0.32", default-features = false }
iroh = { version = "0.34", optional = true }
num_enum = "0.7"
postcard = { version = "1", default-features = false, features = ["alloc", "use-std", "experimental-derive"] }
rand = "0.8.5"
Expand All @@ -58,8 +58,8 @@ tracing = "0.1"

# rpc
nested_enum_utils = { version = "0.1.0", optional = true }
quic-rpc = { version = "0.18", optional = true }
quic-rpc-derive = { version = "0.18", optional = true }
quic-rpc = { version = "0.19", optional = true }
quic-rpc-derive = { version = "0.19", optional = true }
serde-error = { version = "0.1.3", optional = true }
portable-atomic = { version = "1.9.0", optional = true }

Expand Down Expand Up @@ -117,10 +117,3 @@ rpc = [
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "iroh_docsrs"]

[patch.crates-io]
iroh = { git = "https://github.com/n0-computer/iroh.git", branch = "main" }
quic-rpc = { git = "https://github.com/n0-computer/quic-rpc.git", branch = "main" }
iroh-base = { git = "https://github.com/n0-computer/iroh.git", branch = "main" }
iroh-gossip = { git = "https://github.com/n0-computer/iroh-gossip.git", branch = "main" }
iroh-blobs = { git = "https://github.com/n0-computer/iroh-blobs.git", branch = "main" }
4 changes: 2 additions & 2 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ allow = [
"BSL-1.0", # BOSL license
"ISC",
"MIT",
"OpenSSL",
"Zlib",
"MPL-2.0", # https://fossa.com/blog/open-source-software-licenses-101-mozilla-public-license-2-0/
"Unicode-3.0"
Expand All @@ -34,7 +33,8 @@ license-files = [
ignore = [
"RUSTSEC-2024-0370", # unmaintained, no upgrade available
"RUSTSEC-2024-0384", # unmaintained, no upgrade available
"RUSTSEC-2024-0436", # paste
]

[sources]
allow-git = ["https://github.com/n0-computer/iroh.git", "https://github.com/n0-computer/quic-rpc.git", "https://github.com/n0-computer/iroh-blobs.git", "https://github.com/n0-computer/iroh-gossip.git"]
allow-git = []
2 changes: 1 addition & 1 deletion src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ impl<D: iroh_blobs::store::Store> Engine<D> {
}

/// Handle an incoming iroh-docs connection.
pub async fn handle_connection(&self, conn: iroh::endpoint::Connecting) -> anyhow::Result<()> {
pub async fn handle_connection(&self, conn: iroh::endpoint::Connection) -> anyhow::Result<()> {
self.to_live_actor
.send(ToLiveActor::HandleConnection { conn })
.await?;
Expand Down
4 changes: 2 additions & 2 deletions src/engine/live.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub enum ToLiveActor {
reply: sync::oneshot::Sender<Result<()>>,
},
HandleConnection {
conn: iroh::endpoint::Connecting,
conn: iroh::endpoint::Connection,
},
AcceptSyncRequest {
namespace: NamespaceId,
Expand Down Expand Up @@ -759,7 +759,7 @@ impl<B: iroh_blobs::store::Store> LiveActor<B> {
}

#[instrument("accept", skip_all)]
pub async fn handle_connection(&mut self, conn: iroh::endpoint::Connecting) {
pub async fn handle_connection(&mut self, conn: iroh::endpoint::Connection) {
let to_actor_tx = self.sync_actor_tx.clone();
let accept_request_cb = move |namespace, peer| {
let to_actor_tx = to_actor_tx.clone();
Expand Down
3 changes: 1 addition & 2 deletions src/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,14 @@ pub enum AcceptOutcome {
/// Handle an iroh-docs connection and sync all shared documents in the replica store.
pub async fn handle_connection<F, Fut>(
sync: SyncHandle,
connecting: iroh::endpoint::Connecting,
connection: iroh::endpoint::Connection,
accept_cb: F,
) -> Result<SyncFinished, AcceptError>
where
F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,
{
let t_start = Instant::now();
let connection = connecting.await.map_err(AcceptError::connect)?;
let peer = connection.remote_node_id().map_err(AcceptError::connect)?;
let (mut send_stream, mut recv_stream) = connection
.accept_bi()
Expand Down
4 changes: 2 additions & 2 deletions src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{path::PathBuf, sync::Arc};

use anyhow::Result;
use futures_lite::future::Boxed as BoxedFuture;
use iroh::{endpoint::Connecting, protocol::ProtocolHandler};
use iroh::{endpoint::Connection, protocol::ProtocolHandler};
use iroh_blobs::net_protocol::{Blobs, ProtectCb};
use iroh_gossip::net::Gossip;

Expand All @@ -14,7 +14,7 @@ use crate::{
};

impl<S: iroh_blobs::store::Store> ProtocolHandler for Docs<S> {
fn accept(&self, conn: Connecting) -> BoxedFuture<Result<()>> {
fn accept(&self, conn: Connection) -> BoxedFuture<Result<()>> {
let this = self.engine.clone();
Box::pin(async move { this.handle_connection(conn).await })
}
Expand Down
Loading