Skip to content

chore: update to iroh v0.35 #91

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

Merged
merged 4 commits into from
May 12, 2025
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
23 changes: 13 additions & 10 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ genawaiter = { version = "0.99.1", features = ["futures03"] }
hashlink = { version = "0.9.0", optional = true }
hex = "0.4.3"
indicatif = { version = "0.17.8", optional = true }
iroh-base = { git = "https://github.com/n0-computer/iroh", branch = "main" }
iroh-base = "0.35"
iroh-io = { version = "0.6.0", features = ["stats"] }
iroh-metrics = { version = "0.34", default-features = false }
iroh = { git = "https://github.com/n0-computer/iroh", branch = "main" }
iroh = "0.35"
nested_enum_utils = { version = "0.1.0", optional = true }
num_cpus = "1.15.0"
oneshot = "0.1.8"
Expand All @@ -54,8 +54,8 @@ postcard = { version = "1", default-features = false, features = [
"use-std",
"experimental-derive",
] }
quic-rpc = { version = "0.19", optional = true }
quic-rpc-derive = { version = "0.19", optional = true }
quic-rpc = { version = "0.20", optional = true }
quic-rpc-derive = { version = "0.20", optional = true }
rand = "0.8"
range-collections = "0.4.0"
redb = { version = "=2.4", optional = true }
Expand All @@ -80,7 +80,7 @@ tracing-test = "0.2.5"

[dev-dependencies]
http-body = "1.0"
iroh = { git = "https://github.com/n0-computer/iroh", branch = "main", features = ["test-utils"] }
iroh = { version = "0.35", features = ["test-utils"] }
quinn = { package = "iroh-quinn", version = "0.13", features = ["ring"] }
futures-buffered = "0.2.4"
proptest = "1.0.0"
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ async fn main() -> anyhow::Result<()> {
// build the router
let router = Router::builder(endpoint)
.accept(iroh_blobs::ALPN, blobs.clone())
.spawn()
.await?;
.spawn();

// do fun stuff with the blobs protocol!
router.shutdown().await?;
Expand Down
61 changes: 30 additions & 31 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -1,44 +1,43 @@
[advisories]
ignore = [
"RUSTSEC-2024-0370",
"RUSTSEC-2024-0384",
"RUSTSEC-2024-0436",
"RUSTSEC-2023-0089",
]

[bans]
multiple-versions = "allow"
deny = [
"aws-lc",
"aws-lc-rs",
"aws-lc-sys",
"native-tls",
"openssl",
"aws-lc",
"aws-lc-rs",
"aws-lc-sys",
"native-tls",
"openssl",
]
multiple-versions = "allow"

[licenses]
allow = [
"Apache-2.0",
"Apache-2.0 WITH LLVM-exception",
"BSD-2-Clause",
"BSD-3-Clause",
"BSL-1.0", # BOSL license
"ISC",
"MIT",
"Zlib",
"MPL-2.0", # https://fossa.com/blog/open-source-software-licenses-101-mozilla-public-license-2-0/
"Unicode-3.0",
"Unlicense", # https://unlicense.org/
"Apache-2.0",
"Apache-2.0 WITH LLVM-exception",
"BSD-2-Clause",
"BSD-3-Clause",
"BSL-1.0",
"ISC",
"MIT",
"Zlib",
"MPL-2.0",
"Unicode-3.0",
"Unlicense",
]

[[licenses.clarify]]
name = "ring"
expression = "MIT AND ISC AND OpenSSL"
license-files = [
{ path = "LICENSE", hash = 0xbd0eed23 },
]
name = "ring"

[advisories]
ignore = [
"RUSTSEC-2024-0370", # unmaintained, no upgrade available
"RUSTSEC-2024-0384", # unmaintained, no upgrade available
"RUSTSEC-2024-0436", # unmaintained paste
"RUSTSEC-2023-0089", # unmaintained, no upgrade available yet
]
[[licenses.clarify.license-files]]
hash = 3171872035
path = "LICENSE"

[sources]
allow-git = [
"https://github.com/n0-computer/iroh.git",
]
allow-git = []
2 changes: 1 addition & 1 deletion examples/custom-protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async fn main() -> Result<()> {

// Add our protocol, identified by our ALPN, to the node, and spawn the node.
let builder = builder.accept(ALPN, proto.clone());
let node = builder.spawn().await?;
let node = builder.spawn();

match args.command {
Command::Listen { text } => {
Expand Down
2 changes: 1 addition & 1 deletion examples/discovery-local-network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async fn main() -> anyhow::Result<()> {
let builder = Router::builder(endpoint);
let blobs = Blobs::memory().build(builder.endpoint());
let builder = builder.accept(iroh_blobs::ALPN, blobs.clone());
let node = builder.spawn().await?;
let node = builder.spawn();
let blobs_client = blobs.client();

match &cli.command {
Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world-fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async fn main() -> Result<()> {
let builder = Router::builder(endpoint);
let blobs = Blobs::memory().build(builder.endpoint());
let builder = builder.accept(iroh_blobs::ALPN, blobs.clone());
let node = builder.spawn().await?;
let node = builder.spawn();
let blobs_client = blobs.client();

println!("fetching hash: {}", ticket.hash());
Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world-provide.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async fn main() -> anyhow::Result<()> {
let blobs = Blobs::memory().build(builder.endpoint());
let builder = builder.accept(iroh_blobs::ALPN, blobs.clone());
let blobs_client = blobs.client();
let node = builder.spawn().await?;
let node = builder.spawn();

// add some data and remember the hash
let res = blobs_client.add_bytes("Hello, world!").await?;
Expand Down
3 changes: 1 addition & 2 deletions examples/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ async fn main() -> Result<()> {
// to the blobs protocol.
let router = Router::builder(endpoint)
.accept(iroh_blobs::ALPN, blobs.clone())
.spawn()
.await?;
.spawn();

// We use a blobs client to interact with the blobs protocol we're running locally:
let blobs_client = blobs.client();
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/client/blobs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ mod tests {
router = router.accept(crate::ALPN, blobs.clone());

// Build the router
let router = router.spawn().await?;
let router = router.spawn();

// Setup RPC
let (internal_rpc, controller) = quic_rpc::transport::flume::channel(32);
Expand Down
4 changes: 1 addition & 3 deletions tests/gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@ async fn node<S: Store>(store: S, gc_period: Duration) -> (Node<S>, async_channe
let blobs = Blobs::builder(store.clone()).build(&endpoint);
let router = Router::builder(endpoint)
.accept(iroh_blobs::ALPN, blobs.clone())
.spawn()
.await
.unwrap();
.spawn();
blobs
.start_gc(GcConfig {
period: gc_period,
Expand Down
3 changes: 1 addition & 2 deletions tests/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ impl Node {
let blobs = Blobs::builder(store).build(&endpoint);
let router = iroh::protocol::Router::builder(endpoint)
.accept(iroh_blobs::ALPN, blobs.clone())
.spawn()
.await?;
.spawn();
let (config, key) = quic_rpc::transport::quinn::configure_server()?;
let endpoint = quinn::Endpoint::server(config, "127.0.0.1:0".parse().unwrap())?;
let local_addr = endpoint.local_addr()?;
Expand Down
Loading