Skip to content

Commit 3c598b5

Browse files
authored
chore: release prep (#71)
This PR updates the following dependencies to their latest versions: - `iroh` - `irpc` - `iroh-base` - `iroh-gossip` - `iroh-blobs`
1 parent 8537460 commit 3c598b5

File tree

18 files changed

+302
-250
lines changed

18 files changed

+302
-250
lines changed

Cargo.lock

Lines changed: 171 additions & 122 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ anyhow = "1"
1616
async-channel = "2.3.1"
1717
blake3 = "1.8"
1818
bytes = { version = "1.7", features = ["serde"] }
19-
derive_more = { version = "1.0.0", features = [
19+
derive_more = { version = "2.0.1", features = [
2020
"debug",
2121
"deref",
2222
"display",
@@ -26,17 +26,17 @@ derive_more = { version = "1.0.0", features = [
2626
"into",
2727
"as_ref",
2828
] }
29-
ed25519-dalek = { version = "2.0.0", features = ["serde", "rand_core"] }
29+
ed25519-dalek = { version = "3.0.0-pre.1", features = ["serde", "rand_core"] }
3030
futures-buffered = "0.2.4"
3131
futures-lite = "2.3.0"
3232
futures-util = { version = "0.3.25" }
3333
hex = "0.4"
34-
iroh = { version = "0.92" }
35-
iroh-base = { version = "0.92", features = ["ticket"] }
36-
iroh-blobs = { version = "0.94" }
37-
iroh-gossip = { version = "0.92", features = ["net"] }
38-
iroh-metrics = { version = "0.35", default-features = false }
39-
irpc = { version = "0.8.0" }
34+
iroh = { version = "0.93" }
35+
iroh-base = { version = "0.93", features = ["ticket"] }
36+
iroh-blobs = { version = "0.95" }
37+
iroh-gossip = { version = "0.93", features = ["net"] }
38+
iroh-metrics = { version = "0.36", default-features = false }
39+
irpc = { version = "0.9.0" }
4040
n0-future = "0.1.3"
4141
num_enum = "0.7"
4242
postcard = { version = "1", default-features = false, features = [
@@ -45,8 +45,7 @@ postcard = { version = "1", default-features = false, features = [
4545
"experimental-derive",
4646
] }
4747
quinn = { package = "iroh-quinn", version = "0.14.0" }
48-
rand = "0.8.5"
49-
rand_core = "0.6.4"
48+
rand = "0.9.2"
5049
redb = { version = "2.0.0" }
5150
redb_v1 = { package = "redb", version = "1.5.1" }
5251
self_cell = "1.0.3"
@@ -62,11 +61,11 @@ tracing = "0.1"
6261

6362
[dev-dependencies]
6463
data-encoding = "2.6.0"
65-
iroh = { version = "0.92", features = ["test-utils"] }
64+
iroh = { version = "0.93", features = ["test-utils"] }
6665
nested_enum_utils = "0.1.0"
6766
parking_lot = "0.12.3"
6867
proptest = "1.2.0"
69-
rand_chacha = "0.3.1"
68+
rand_chacha = "0.9"
7069
tempfile = "3.4"
7170
test-strategy = "0.4"
7271
testdir = "0.7"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ async fn main() -> anyhow::Result<()> {
7171

7272
// setup router
7373
let _router = builder
74-
.accept(BLOBS_ALPN, BlobsProtocol::new(&blobs, endpoint.clone(), None))
74+
.accept(BLOBS_ALPN, BlobsProtocol::new(&blobs, None))
7575
.accept(GOSSIP_ALPN, gossip)
7676
.accept(DOCS_ALPN, docs)
7777
.spawn();

deny.toml

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,41 @@
1+
[advisories]
2+
ignore = [
3+
"RUSTSEC-2024-0370",
4+
"RUSTSEC-2024-0384",
5+
"RUSTSEC-2024-0436",
6+
"RUSTSEC-2023-0089",
7+
]
8+
19
[bans]
2-
multiple-versions = "allow"
310
deny = [
4-
"aws-lc",
5-
"aws-lc-rs",
6-
"aws-lc-sys",
7-
"native-tls",
8-
"openssl",
11+
"aws-lc",
12+
"aws-lc-rs",
13+
"aws-lc-sys",
14+
"native-tls",
15+
"openssl",
916
]
17+
multiple-versions = "allow"
1018

1119
[licenses]
1220
allow = [
13-
"Apache-2.0",
14-
"Apache-2.0 WITH LLVM-exception",
15-
"BSD-2-Clause",
16-
"BSD-3-Clause",
17-
"BSL-1.0", # BOSL license
18-
"CDLA-Permissive-2.0",
19-
"ISC",
20-
"MIT",
21-
"Zlib",
22-
"MPL-2.0", # https://fossa.com/blog/open-source-software-licenses-101-mozilla-public-license-2-0/
23-
"Unicode-3.0",
24-
"Unlicense" # https://unlicense.org/
21+
"Apache-2.0",
22+
"Apache-2.0 WITH LLVM-exception",
23+
"BSD-2-Clause",
24+
"BSD-3-Clause",
25+
"BSL-1.0",
26+
"CDLA-Permissive-2.0",
27+
"ISC",
28+
"MIT",
29+
"Zlib",
30+
"MPL-2.0",
31+
"Unicode-3.0",
32+
"Unlicense",
2533
]
2634

2735
[[licenses.clarify]]
28-
name = "ring"
2936
expression = "MIT AND ISC AND OpenSSL"
30-
license-files = [
31-
{ path = "LICENSE", hash = 0xbd0eed23 },
32-
]
33-
34-
[advisories]
35-
ignore = [
36-
"RUSTSEC-2024-0370", # unmaintained, no upgrade available
37-
"RUSTSEC-2024-0384", # unmaintained, no upgrade available
38-
"RUSTSEC-2024-0436", # paste
39-
"RUSTSEC-2023-0089", # unmainatined: postcard -> heapless -> atomic-polyfill
40-
]
37+
name = "ring"
4138

42-
[sources]
43-
allow-git = []
39+
[[licenses.clarify.license-files]]
40+
hash = 3171872035
41+
path = "LICENSE"

examples/setup.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ async fn main() -> anyhow::Result<()> {
2727

2828
// setup router
2929
let _router = builder
30-
.accept(
31-
BLOBS_ALPN,
32-
BlobsProtocol::new(&blobs, endpoint.clone(), None),
33-
)
30+
.accept(BLOBS_ALPN, BlobsProtocol::new(&blobs, None))
3431
.accept(GOSSIP_ALPN, gossip)
3532
.accept(DOCS_ALPN, docs)
3633
.spawn();

src/actor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ mod tests {
10611061
async fn open_close() -> anyhow::Result<()> {
10621062
let store = store::Store::memory();
10631063
let sync = SyncHandle::spawn(store, None, "foo".into());
1064-
let namespace = NamespaceSecret::new(&mut rand::rngs::OsRng {});
1064+
let namespace = NamespaceSecret::new(&mut rand::rng());
10651065
let id = namespace.id();
10661066
sync.import_namespace(namespace.into()).await?;
10671067
sync.open(id, Default::default()).await?;

src/api.rs

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -81,35 +81,37 @@ impl DocsApi {
8181
.context("cannot listen on remote API")?;
8282
let handler: Handler<DocsProtocol> = Arc::new(move |msg, _rx, tx| {
8383
let local = local.clone();
84-
Box::pin(match msg {
85-
DocsProtocol::Open(msg) => local.send((msg, tx)),
86-
DocsProtocol::Close(msg) => local.send((msg, tx)),
87-
DocsProtocol::Status(msg) => local.send((msg, tx)),
88-
DocsProtocol::List(msg) => local.send((msg, tx)),
89-
DocsProtocol::Create(msg) => local.send((msg, tx)),
90-
DocsProtocol::Drop(msg) => local.send((msg, tx)),
91-
DocsProtocol::Import(msg) => local.send((msg, tx)),
92-
DocsProtocol::Set(msg) => local.send((msg, tx)),
93-
DocsProtocol::SetHash(msg) => local.send((msg, tx)),
94-
DocsProtocol::Get(msg) => local.send((msg, tx)),
95-
DocsProtocol::GetExact(msg) => local.send((msg, tx)),
96-
// DocsProtocol::ImportFile(msg) => local.send((msg, tx)),
97-
// DocsProtocol::ExportFile(msg) => local.send((msg, tx)),
98-
DocsProtocol::Del(msg) => local.send((msg, tx)),
99-
DocsProtocol::StartSync(msg) => local.send((msg, tx)),
100-
DocsProtocol::Leave(msg) => local.send((msg, tx)),
101-
DocsProtocol::Share(msg) => local.send((msg, tx)),
102-
DocsProtocol::Subscribe(msg) => local.send((msg, tx)),
103-
DocsProtocol::GetDownloadPolicy(msg) => local.send((msg, tx)),
104-
DocsProtocol::SetDownloadPolicy(msg) => local.send((msg, tx)),
105-
DocsProtocol::GetSyncPeers(msg) => local.send((msg, tx)),
106-
DocsProtocol::AuthorList(msg) => local.send((msg, tx)),
107-
DocsProtocol::AuthorCreate(msg) => local.send((msg, tx)),
108-
DocsProtocol::AuthorGetDefault(msg) => local.send((msg, tx)),
109-
DocsProtocol::AuthorSetDefault(msg) => local.send((msg, tx)),
110-
DocsProtocol::AuthorImport(msg) => local.send((msg, tx)),
111-
DocsProtocol::AuthorExport(msg) => local.send((msg, tx)),
112-
DocsProtocol::AuthorDelete(msg) => local.send((msg, tx)),
84+
Box::pin(async move {
85+
match msg {
86+
DocsProtocol::Open(msg) => local.send((msg, tx)).await,
87+
DocsProtocol::Close(msg) => local.send((msg, tx)).await,
88+
DocsProtocol::Status(msg) => local.send((msg, tx)).await,
89+
DocsProtocol::List(msg) => local.send((msg, tx)).await,
90+
DocsProtocol::Create(msg) => local.send((msg, tx)).await,
91+
DocsProtocol::Drop(msg) => local.send((msg, tx)).await,
92+
DocsProtocol::Import(msg) => local.send((msg, tx)).await,
93+
DocsProtocol::Set(msg) => local.send((msg, tx)).await,
94+
DocsProtocol::SetHash(msg) => local.send((msg, tx)).await,
95+
DocsProtocol::Get(msg) => local.send((msg, tx)).await,
96+
DocsProtocol::GetExact(msg) => local.send((msg, tx)).await,
97+
// DocsProtocol::ImportFile(msg) => local.send((msg, tx)).await,
98+
// DocsProtocol::ExportFile(msg) => local.send((msg, tx)).await,
99+
DocsProtocol::Del(msg) => local.send((msg, tx)).await,
100+
DocsProtocol::StartSync(msg) => local.send((msg, tx)).await,
101+
DocsProtocol::Leave(msg) => local.send((msg, tx)).await,
102+
DocsProtocol::Share(msg) => local.send((msg, tx)).await,
103+
DocsProtocol::Subscribe(msg) => local.send((msg, tx)).await,
104+
DocsProtocol::GetDownloadPolicy(msg) => local.send((msg, tx)).await,
105+
DocsProtocol::SetDownloadPolicy(msg) => local.send((msg, tx)).await,
106+
DocsProtocol::GetSyncPeers(msg) => local.send((msg, tx)).await,
107+
DocsProtocol::AuthorList(msg) => local.send((msg, tx)).await,
108+
DocsProtocol::AuthorCreate(msg) => local.send((msg, tx)).await,
109+
DocsProtocol::AuthorGetDefault(msg) => local.send((msg, tx)).await,
110+
DocsProtocol::AuthorSetDefault(msg) => local.send((msg, tx)).await,
111+
DocsProtocol::AuthorImport(msg) => local.send((msg, tx)).await,
112+
DocsProtocol::AuthorExport(msg) => local.send((msg, tx)).await,
113+
DocsProtocol::AuthorDelete(msg) => local.send((msg, tx)).await,
114+
}
113115
})
114116
});
115117
let join_handle = task::spawn(irpc::rpc::listen(endpoint, handler));
@@ -634,7 +636,7 @@ impl Stream for ImportFileProgress {
634636
.take()
635637
.expect("AddProgressItem::Done may be emitted only once");
636638
let size = size.expect("Size must be emitted before done");
637-
let hash = *tag.hash();
639+
let hash = tag.hash();
638640
*this = Self(ImportInner::Entry(Box::pin(async move {
639641
doc.set_hash(author, key.clone(), hash, size).await?;
640642
Ok(ImportFileOutcome { hash, size, key })

src/api/actor.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use std::sync::Arc;
22

33
use anyhow::anyhow;
44
use futures_lite::StreamExt;
5-
use iroh::Watcher;
65
use irpc::{channel::mpsc, LocalSender, WithChannels};
76
use n0_future::task::{self};
87
use tokio::sync::mpsc as tokio_mpsc;
@@ -241,7 +240,7 @@ impl RpcActor {
241240
_req: AuthorCreateRequest,
242241
) -> RpcResult<AuthorCreateResponse> {
243242
// TODO: pass rng
244-
let author = Author::new(&mut rand::rngs::OsRng {});
243+
let author = Author::new(&mut rand::rng());
245244
self.sync
246245
.import_author(author.clone())
247246
.await
@@ -322,7 +321,7 @@ impl RpcActor {
322321
}
323322

324323
pub(super) async fn doc_create(&self, _req: CreateRequest) -> RpcResult<CreateResponse> {
325-
let namespace = NamespaceSecret::new(&mut rand::rngs::OsRng {});
324+
let namespace = NamespaceSecret::new(&mut rand::rng());
326325
let id = namespace.id();
327326
self.sync
328327
.import_namespace(namespace.into())
@@ -390,7 +389,7 @@ impl RpcActor {
390389
mode,
391390
addr_options,
392391
} = req;
393-
let me = self.endpoint.node_addr().initialized().await;
392+
let me = self.endpoint.node_addr();
394393
let me = addr_options.apply(&me);
395394

396395
let capability = match mode {
@@ -498,7 +497,7 @@ impl RpcActor {
498497
.await
499498
.map_err(|e| RpcError::new(&e))?;
500499
self.sync
501-
.insert_local(doc_id, author_id, key.clone(), *tag.hash(), len as u64)
500+
.insert_local(doc_id, author_id, key.clone(), tag.hash(), len as u64)
502501
.await
503502
.map_err(|e| RpcError::new(&*e))?;
504503
let entry = self

src/engine.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl Engine {
7575
protect_cb: Option<ProtectCallbackHandler>,
7676
) -> anyhow::Result<Self> {
7777
let (live_actor_tx, to_live_actor_recv) = mpsc::channel(ACTOR_CHANNEL_CAP);
78-
let me = endpoint.node_id().fmt_short();
78+
let me = endpoint.node_id().fmt_short().to_string();
7979

8080
let content_status_cb: ContentStatusCallback = {
8181
let blobs = bao_store.blobs().clone();
@@ -368,7 +368,7 @@ impl DefaultAuthorStorage {
368368
pub async fn load(&self, docs_store: &SyncHandle) -> anyhow::Result<AuthorId> {
369369
match self {
370370
Self::Mem => {
371-
let author = Author::new(&mut rand::thread_rng());
371+
let author = Author::new(&mut rand::rng());
372372
let author_id = author.id();
373373
docs_store.import_author(author).await?;
374374
Ok(author_id)
@@ -392,7 +392,7 @@ impl DefaultAuthorStorage {
392392
}
393393
Ok(author_id)
394394
} else {
395-
let author = Author::new(&mut rand::thread_rng());
395+
let author = Author::new(&mut rand::rng());
396396
let author_id = author.id();
397397
docs_store.import_author(author).await?;
398398
// Make sure to write the default author to the store

src/engine/live.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -971,10 +971,10 @@ impl Subscribers {
971971

972972
fn fmt_accept_peer(res: &Result<SyncFinished, AcceptError>) -> String {
973973
match res {
974-
Ok(res) => res.peer.fmt_short(),
974+
Ok(res) => res.peer.fmt_short().to_string(),
975975
Err(err) => err
976976
.peer()
977-
.map(|x| x.fmt_short())
977+
.map(|x| x.fmt_short().to_string())
978978
.unwrap_or_else(|| "unknown".to_string()),
979979
}
980980
}

0 commit comments

Comments
 (0)