build(deps): upgrade dependencies and Rust toolchain

Upgrade rust-nostr to 0.45.0-alpha.1 from a patched version to enable
publishing ngit-grasp to crates.io, a Rust toolchain bump via Nix flake
upgrade, and other Rust dependencies.

- rust-nostr stack -> 0.45.0-alpha.1 (off git deps, onto crates.io)
- dashmap 5->6, prometheus 0.13->0.14, rand 0.8->0.10, reqwest ->0.13
  (root dev-dep and grasp-audit), plus semver-compatible lockfile updates
- nix flake update for both flakes (nixpkgs, rust-overlay); Rust 1.96.0
- adapt code to rand 0.10 (RngExt/random) and prometheus 0.14
  (homogeneous with_label_values) breaking changes
- cargo fmt + fix clippy::useless_conversion surfaced by toolchain 1.96
- CHANGELOG: single high-level Unreleased entry
This commit is contained in:
DanConwayDev
2026-06-16 14:28:18 +00:00
parent 0c98ba2ce7
commit 03b582cf69
12 changed files with 646 additions and 768 deletions
+4
View File
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Changed
- Upgraded dependencies: rust-nostr to `0.45.0-alpha.1` from a patched version to enable publishing ngit-grasp to crates.io, a Rust toolchain bump via Nix flake upgrade, and other Rust dependencies.
## [1.1.0] - 2026-05-22
### Added
Generated
+615 -742
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -31,15 +31,15 @@ base64 = "0.22"
flate2 = "1.0"
# Metrics
prometheus = "0.13"
dashmap = "5"
prometheus = "0.14"
dashmap = "6"
lazy_static = "1.4"
# Data structures
indexmap = "2"
# Random (for startup jitter)
rand = "0.8"
rand = "0.10"
# Serialization
serde = { version = "1.0", features = ["derive"] }
@@ -69,7 +69,7 @@ tempfile = "3"
# Testing
grasp-audit = { path = "grasp-audit" }
tempfile = "3"
reqwest = "0.12"
reqwest = "0.13"
[lib]
name = "ngit_grasp"
Generated
+6 -6
View File
@@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1762111121,
"narHash": "sha256-4vhDuZ7OZaZmKKrnDpxLZZpGIJvAeMtK6FKLJYUtAdw=",
"lastModified": 1781074563,
"narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b3d51a0365f6695e7dd5cdf3e180604530ed33b4",
"rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca",
"type": "github"
},
"original": {
@@ -62,11 +62,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1762223900,
"narHash": "sha256-caxpESVH71mdrdihYvQZ9rTZPZqW0GyEG9un7MgpyRM=",
"lastModified": 1781580018,
"narHash": "sha256-BlTedbM77FmesD2ZqR73vhFy+y77UrhefV7IYw1pDsk=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "cfe1598d69a42a5edb204770e71b8df77efef2c3",
"rev": "8bceba21a1ebea535c27c4dc723a0d5a4db9e386",
"type": "github"
},
"original": {
+1 -1
View File
@@ -31,7 +31,7 @@ clap = { version = "4", features = ["derive"] }
uuid = { version = "1", features = ["v4"] }
# HTTP Client
reqwest = { version = "0.11", features = ["json"] }
reqwest = { version = "0.13", features = ["json"] }
regex = "1"
# Logging
+6 -6
View File
@@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1762111121,
"narHash": "sha256-4vhDuZ7OZaZmKKrnDpxLZZpGIJvAeMtK6FKLJYUtAdw=",
"lastModified": 1781074563,
"narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b3d51a0365f6695e7dd5cdf3e180604530ed33b4",
"rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca",
"type": "github"
},
"original": {
@@ -62,11 +62,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1762223900,
"narHash": "sha256-caxpESVH71mdrdihYvQZ9rTZPZqW0GyEG9un7MgpyRM=",
"lastModified": 1781580018,
"narHash": "sha256-BlTedbM77FmesD2ZqR73vhFy+y77UrhefV7IYw1pDsk=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "cfe1598d69a42a5edb204770e71b8df77efef2c3",
"rev": "8bceba21a1ebea535c27c4dc723a0d5a4db9e386",
"type": "github"
},
"original": {
+1 -1
View File
@@ -409,7 +409,7 @@ impl AuditClient {
for filter in filters {
let events = self.client.fetch_events(filter).timeout(timeout).await?;
all_events.extend(events.into_iter());
all_events.extend(events);
}
Ok(all_events)
+2 -1
View File
@@ -204,9 +204,10 @@ impl Metrics {
/// Record a rejected Nostr event
pub fn record_event_rejected(&self, kind: u64, reason: &str) {
let kind = kind.to_string();
self.inner
.events_rejected_total
.with_label_values(&[&kind.to_string(), reason])
.with_label_values(&[kind.as_str(), reason])
.inc();
}
+1 -3
View File
@@ -412,9 +412,7 @@ impl Nip34WritePolicy {
event_id = %event_id_str,
"PR event previously expired from purgatory (synced), rejecting to prevent re-sync loop"
);
return reject_invalid(
"previously expired from purgatory without git data",
);
return reject_invalid("previously expired from purgatory without git data");
}
// No git data exists - add to purgatory
+3 -1
View File
@@ -126,7 +126,9 @@ impl StatePolicy {
"Rejecting state event: author not in maintainer set of any announcement"
);
}
return Ok(reject_restricted("author not authorized for this repository"));
return Ok(reject_restricted(
"author not authorized for this repository",
));
}
tracing::debug!(
+1 -1
View File
@@ -527,7 +527,7 @@ impl SyncMetrics {
// Update detailed info (occurrence count)
self.naughty_relay_info
.with_label_values(&[&url, entry.category.as_str(), &entry.reason])
.with_label_values(&[url.as_str(), entry.category.as_str(), entry.reason.as_str()])
.set(entry.occurrence_count as i64);
}
+2 -2
View File
@@ -353,11 +353,11 @@ async fn run_daily_timer(
sync_manager: Arc<Mutex<SyncManager>>,
mut shutdown_rx: broadcast::Receiver<()>,
) {
use ::rand::Rng;
use ::rand::RngExt;
loop {
// Random interval between 23-25 hours
let hours = 23.0 + ::rand::thread_rng().gen::<f64>() * 2.0;
let hours = 23.0 + ::rand::rng().random::<f64>() * 2.0;
let seconds = (hours * 3600.0) as u64;
tracing::info!(