From d282251af19fc7d5d4200a9441999bd1a81b2ae8 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 14 Nov 2025 07:37:57 +0000 Subject: chore: bump rust-nostr v0.44 fix breaking changes --- Cargo.lock | 58 +++++++++++++++++++++++++++++++--------- Cargo.toml | 12 ++++----- src/bin/git_remote_nostr/push.rs | 2 +- test_utils/Cargo.toml | 8 +++--- test_utils/src/lib.rs | 2 +- test_utils/src/relay.rs | 7 +++-- 6 files changed, 62 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a3d5b10..20c3fd7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -640,6 +640,18 @@ dependencies = [ "spin", ] +[[package]] +name = "flume" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" +dependencies = [ + "futures-core", + "futures-sink", + "nanorand", + "spin", +] + [[package]] name = "fnv" version = "1.0.7" @@ -904,6 +916,12 @@ dependencies = [ "heed-traits", ] +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + [[package]] name = "hex-conservative" version = "0.1.2" @@ -1492,9 +1510,9 @@ dependencies = [ [[package]] name = "nostr" -version = "0.43.1" +version = "0.44.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62a97d745f1bd8d5e05a978632bbb87b0614567d5142906fe7c86fb2440faac6" +checksum = "d3595fecf0e0aaacb69a0dc0101a4453f3c76eda333d6bbc49f68f64390b3d85" dependencies = [ "aes", "base64", @@ -1505,6 +1523,7 @@ dependencies = [ "chacha20", "chacha20poly1305", "getrandom 0.2.16", + "hex", "instant", "scrypt", "secp256k1", @@ -1516,9 +1535,9 @@ dependencies = [ [[package]] name = "nostr-connect" -version = "0.43.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3bcd44ea344d1cab3447615681cd3bb90134cafe4d157d3e714c23c31268cd8" +checksum = "38d7366ee1dfa57b479cf56256e18301cb3088f7068ceba01d446db0332b4cb2" dependencies = [ "async-utility", "nostr", @@ -1529,9 +1548,9 @@ dependencies = [ [[package]] name = "nostr-database" -version = "0.43.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c75a8c2175d2785ba73cfddef21d1e30da5fbbdf158569b6808ba44973a15b" +checksum = "7462c9d8ae5ef6a28d66a192d399ad2530f1f2130b13186296dbb11bdef5b3d1" dependencies = [ "flatbuffers", "lru", @@ -1539,13 +1558,23 @@ dependencies = [ "tokio", ] +[[package]] +name = "nostr-gossip" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade30de16869618919c6b5efc8258f47b654a98b51541eb77f85e8ec5e3c83a6" +dependencies = [ + "nostr", +] + [[package]] name = "nostr-lmdb" -version = "0.43.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03e20688047b2114906ba84cce26c955e6cd079c10fc7328bc2618dc8031fb17" +checksum = "1201bcf1f900c352f9f2cea5249960dc6b23049b65699a516e1327243becf6a2" dependencies = [ "async-utility", + "flume 0.11.1", "heed", "nostr", "nostr-database", @@ -1555,13 +1584,14 @@ dependencies = [ [[package]] name = "nostr-relay-pool" -version = "0.43.1" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2f43b70d13dfc50508a13cd902e11f4625312b2ce0e4b7c4c2283fd04001bd" +checksum = "4b1073ccfbaea5549fb914a9d52c68dab2aecda61535e5143dd73e95445a804b" dependencies = [ "async-utility", "async-wsocket", "atomic-destructor", + "hex", "lru", "negentropy", "nostr", @@ -1572,15 +1602,17 @@ dependencies = [ [[package]] name = "nostr-sdk" -version = "0.43.0" +version = "0.44.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "599f8963d6a1522a13b1a2b0ea6e168acfc367706606f1d33fa595e91fa22db0" +checksum = "471732576710e779b64f04c55e3f8b5292f865fea228436daf19694f0bf70393" dependencies = [ "async-utility", "nostr", "nostr-database", + "nostr-gossip", "nostr-relay-pool", "tokio", + "tracing", ] [[package]] @@ -2467,7 +2499,7 @@ name = "simple-websockets" version = "0.1.6" source = "git+https://github.com/DanConwayDev/simple-websockets?branch=auto-release-port#f53d7662ddf10d926e46c34e7d4044c0ebc21bb0" dependencies = [ - "flume", + "flume 0.10.14", "futures-util", "tokio", "tokio-tungstenite 0.20.1", diff --git a/Cargo.toml b/Cargo.toml index 6c60d94..9dc9ccb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,12 +23,12 @@ directories = "6.0.0" futures = "0.3.31" git2 = "0.20.2" indicatif = "0.18.0" -nostr = { version = "0.43.0", features = ["nip49"] } -nostr-connect = "0.43.0" -nostr-database = "0.43.0" -nostr-lmdb = "0.43.0" -nostr-relay-pool = "0.43.0" -nostr-sdk = "0.43.0" +nostr = { version = "0.44.1", features = ["nip49"] } +nostr-connect = "0.44.0" +nostr-database = "0.44.0" +nostr-lmdb = "0.44.0" +nostr-relay-pool = "0.44.0" +nostr-sdk = "0.44.1" passwords = "3.1.16" qrcode = { version = "0.14.1", default-features = false } reqwest = { version = "0.12.22", features = ["json"] } diff --git a/src/bin/git_remote_nostr/push.rs b/src/bin/git_remote_nostr/push.rs index 9cf2c52..31c920a 100644 --- a/src/bin/git_remote_nostr/push.rs +++ b/src/bin/git_remote_nostr/push.rs @@ -1296,7 +1296,7 @@ async fn get_proposal_and_revision_root_from_patch_or_pr_or_pr_update( ); } } - return Ok((*id, None)); + return Ok((id, None)); } bail!( "pull request update {} root event is not a pull request event", diff --git a/test_utils/Cargo.toml b/test_utils/Cargo.toml index 016cc19..e7f5e05 100644 --- a/test_utils/Cargo.toml +++ b/test_utils/Cargo.toml @@ -10,10 +10,10 @@ dialoguer = "0.12.0" directories = "6.0.0" futures = "0.3.31" git2 = "0.20.2" -nostr = "0.43.0" -nostr-database = "0.43.0" -nostr-lmdb = "0.43.0" -nostr-sdk = "0.43.0" +nostr = "0.44.1" +nostr-database = "0.44.0" +nostr-lmdb = "0.44.0" +nostr-sdk = "0.44.1" once_cell = "1.21.3" rand = "0.9" rexpect = { git = "https://github.com/rust-cli/rexpect.git", rev = "9eb61dd" } diff --git a/test_utils/src/lib.rs b/test_utils/src/lib.rs index 22bdf90..bdfc550 100644 --- a/test_utils/src/lib.rs +++ b/test_utils/src/lib.rs @@ -135,7 +135,7 @@ pub fn make_event_old_or_change_user( .build(keys.public_key()); unsigned.created_at = - nostr::types::Timestamp::from(nostr::types::Timestamp::now().as_u64() - how_old_in_secs); + nostr::types::Timestamp::from(nostr::types::Timestamp::now().as_secs() - how_old_in_secs); unsigned.id = Some(nostr::EventId::new( &keys.public_key(), &unsigned.created_at, diff --git a/test_utils/src/relay.rs b/test_utils/src/relay.rs index 313e824..9582bfd 100644 --- a/test_utils/src/relay.rs +++ b/test_utils/src/relay.rs @@ -219,10 +219,13 @@ fn get_nreq( let cm_result = ClientMessage::from_json(s); if let Ok(ClientMessage::Req { subscription_id, - filter, + filters, }) = cm_result { - return Ok((subscription_id.into_owned(), filter.into_owned())); + return Ok(( + subscription_id.into_owned(), + filters.into_iter().next().unwrap().into_owned(), + )); } } bail!("not nostr event") -- cgit v1.2.3