Skip to content
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

chore: prune some deps #2932

Merged
merged 26 commits into from
Nov 27, 2024
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
524 changes: 297 additions & 227 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ allow = [
"ISC",
"MIT",
"OpenSSL",
"Unicode-DFS-2016",
"Zlib",
"MPL-2.0", # https://fossa.com/blog/open-source-software-licenses-101-mozilla-public-license-2-0/
"Unicode-3.0",
Expand Down
8 changes: 4 additions & 4 deletions iroh-base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ hex = "0.4.3"
postcard = { version = "1", default-features = false, features = ["alloc", "use-std", "experimental-derive"], optional = true }
redb = { version = "2.0.0", optional = true }
serde = { version = "1", features = ["derive"] }
thiserror = "1"
thiserror = "2"

# key module
aead = { version = "0.5.2", features = ["bytes"], optional = true }
Expand All @@ -36,15 +36,15 @@ ssh-key = { version = "0.6.0", features = ["ed25519", "std", "rand_core"], optio
ttl_cache = { version = "0.5.1", optional = true }
crypto_box = { version = "0.9.1", features = ["serde", "chacha20"], optional = true }
zeroize = { version = "1.5", optional = true }
url = { version = "2.5.0", features = ["serde"], optional = true }
url = { version = "2.5", features = ["serde"], optional = true }
# wasm
getrandom = { version = "0.2", default-features = false, optional = true }

[dev-dependencies]
iroh-test = "0.28.0"
proptest = "1.0.0"
serde_json = "1.0.107"
serde_test = "1.0.176"
serde_json = "1"
serde_test = "1"

[features]
default = ["hash", "base32", "relay"]
Expand Down
31 changes: 13 additions & 18 deletions iroh-dns-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ readme = "README.md"
[dependencies]
anyhow = "1.0.80"
async-trait = "0.1.77"
axum = { version = "0.7.4", features = ["macros"] }
axum = { version = "0.7", features = ["macros"] }
axum-server = { version = "0.7", features = ["tls-rustls-no-provider"] }
base64-url = "2.0.2"
base64-url = "3.0"
bytes = "1.7"
clap = { version = "4.5.1", features = ["derive"] }
derive_more = { version = "1.0.0", features = [
Expand All @@ -24,43 +24,38 @@ derive_more = { version = "1.0.0", features = [
"from",
] }
dirs-next = "2.0.0"
futures-lite = "2.3.0"
governor = "0.6.3"
futures-lite = "2.5"
governor = "0.6.3" #needs new release of tower_governor for 0.7.0
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have any great way of doing this automatically or regularly. Im open to suggestions here on how to keep track of these other than to just manually revisit every so often and do this whole dance.

hickory-proto = "=0.25.0-alpha.2"
hickory-server = { version = "=0.25.0-alpha.2", features = ["dns-over-rustls"] }
http = "1.0.0"
iroh-metrics = { version = "0.28.0" }
lru = "0.12.3"
mainline = "2.0.1"
parking_lot = "0.12.1"
pkarr = { version = "2.2.0", features = [
"async",
"relay",
"dht",
], default-features = false }
pkarr = { version = "2.2.0", features = [ "async", "relay", "dht"], default-features = false }
rcgen = "0.13"
redb = "2.0.0"
regex = "1.10.3"
rustls = { version = "0.23", default-features = false, features = ["ring"] }
rustls-pemfile = { version = "2.1" }
serde = { version = "1.0.197", features = ["derive"] }
serde = { version = "1", features = ["derive"] }
struct_iterable = "0.1.1"
strum = { version = "0.26.1", features = ["derive"] }
strum = { version = "0.26", features = ["derive"] }
tokio = { version = "1.36.0", features = ["full"] }
tokio-rustls = { version = "0.26", default-features = false, features = [
"logging",
"ring",
] }
tokio-rustls-acme = { version = "0.4", features = ["axum"] }
tokio-rustls-acme = { version = "0.6", features = ["axum"] }
tokio-stream = "0.1.14"
tokio-util = "0.7.10"
tokio-util = "0.7"
toml = "0.8.10"
tower-http = { version = "0.5.2", features = ["cors", "trace"] }
tower_governor = "0.3.2"
tracing = "0.1.40"
tower-http = { version = "0.6.1", features = ["cors", "trace"] }
tower_governor = "0.4"
tracing = "0.1"
tracing-subscriber = "0.3.18"
ttl_cache = "0.5.1"
url = "2.5.0"
url = "2.5"
z32 = "1.1.1"

[dev-dependencies]
Expand Down
12 changes: 4 additions & 8 deletions iroh-dns-server/src/http/rate_limiting.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::time::Duration;
use std::{sync::Arc, time::Duration};

use governor::{clock::QuantaInstant, middleware::NoOpMiddleware};
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -38,7 +38,7 @@ impl Default for &RateLimitConfig {
/// This spawns a background thread to clean up the rate limiting cache.
pub fn create(
rate_limit_config: &RateLimitConfig,
) -> Option<GovernorLayer<'static, PeerIpKeyExtractor, NoOpMiddleware<QuantaInstant>>> {
) -> Option<GovernorLayer<PeerIpKeyExtractor, NoOpMiddleware<QuantaInstant>>> {
let use_smart_extractor = match rate_limit_config {
RateLimitConfig::Disabled => {
tracing::info!("Rate limiting disabled");
Expand Down Expand Up @@ -66,11 +66,7 @@ pub fn create(
.finish()
.expect("failed to build rate-limiting governor");

// The governor layer needs a reference that outlives the layer.
// The tower_governor crate recommends in its examples to use Box::leak here.
// In the unreleased v0.4 of tower_governor this was changed to use an Arc instead.
// https://github.com/benwis/tower-governor/pull/27
let governor_conf = Box::leak(Box::new(governor_conf));
let governor_conf = Arc::new(governor_conf);

// The governor needs a background task for garbage collection (to clear expired records)
let gc_interval = Duration::from_secs(60);
Expand All @@ -82,6 +78,6 @@ pub fn create(
});

Some(GovernorLayer {
config: &*governor_conf,
config: governor_conf,
})
}
4 changes: 2 additions & 2 deletions iroh-dns-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ mod tests {
iroh_test::logging::setup_multithreaded();

// run a mainline testnet
let testnet = mainline::dht::Testnet::new(5);
let testnet = pkarr::mainline::dht::Testnet::new(5);
let bootstrap = testnet.bootstrap.clone();

// spawn our server with mainline support
Expand All @@ -198,7 +198,7 @@ mod tests {

// publish the signed packet to our DHT
let pkarr = PkarrClient::builder()
.dht_settings(mainline::dht::DhtSettings {
.dht_settings(pkarr::mainline::dht::DhtSettings {
bootstrap: Some(testnet.bootstrap),
..Default::default()
})
Expand Down
3 changes: 1 addition & 2 deletions iroh-dns-server/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ use anyhow::Result;
use hickory_proto::rr::{Name, RecordSet, RecordType, RrKey};
use iroh_metrics::inc;
use lru::LruCache;
use mainline::dht::DhtSettings;
use parking_lot::Mutex;
use pkarr::{PkarrClient, SignedPacket};
use pkarr::{mainline::dht::DhtSettings, PkarrClient, SignedPacket};
use tracing::{debug, trace};
use ttl_cache::TtlCache;

Expand Down
4 changes: 2 additions & 2 deletions iroh-metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ workspace = true

[dependencies]
anyhow = { version = "1" }
erased_set = "0.7"
erased_set = "0.8"
http-body-util = "0.1.0"
hyper = { version = "1", features = ["server", "http1"] }
hyper-util = { version = "0.1.1", features = ["tokio"] }
once_cell = "1.17.0"
prometheus-client = { version = "0.22", optional = true }
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
serde = { version = "1.0", features = ["derive"] }
serde = { version = "1", features = ["derive"] }
struct_iterable = "0.1"
time = { version = "0.3.21", features = ["serde-well-known"] }
tokio = { version = "1", features = ["rt", "net", "fs"]}
Expand Down
52 changes: 28 additions & 24 deletions iroh-net/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ workspace = true
cc = "=1.1.31" # enforce cc version, because of https://github.com/rust-lang/cc-rs/issues/1278

anyhow = { version = "1" }
axum = { version = "0.7.4", optional = true }
axum = { version = "0.7", optional = true }
backoff = "0.4.0"
base64 = "0.22.1"
bytes = "1.7"
Expand All @@ -33,15 +33,15 @@ derive_more = { version = "1.0.0", features = [
"deref",
] }
futures-buffered = "0.2.8"
futures-concurrency = "7.6.0"
futures-lite = "2.3"
futures-sink = "0.3.25"
futures-util = "0.3.25"
governor = "0.6.0"
futures-concurrency = "7.6"
futures-lite = "2.5"
futures-sink = "0.3"
futures-util = "0.3"
governor = "0.7.0"
hex = "0.4.3"
hickory-proto = "=0.25.0-alpha.2"
hickory-resolver = "=0.25.0-alpha.2"
hostname = "0.3.1"
hostname = "0.4"
http = "1"
http-body-util = "0.1.0"
hyper = { version = "1", features = ["server", "client", "http1"] }
Expand All @@ -50,7 +50,7 @@ igd-next = { version = "0.15.1", features = ["aio_tokio"] }
iroh-base = { version = "0.28.0", features = ["key"] }
iroh-relay = { version = "0.28", path = "../iroh-relay" }
libc = "0.2.139"
netdev = "0.30.0"
netdev = "0.31.0"
netwatch = { version = "0.1.0", path = "../net-tools/netwatch" }
num_enum = "0.7"
once_cell = "1.18.0"
Expand Down Expand Up @@ -82,7 +82,7 @@ smallvec = "1.11.1"
socket2 = "0.5.3"
stun-rs = "0.1.5"
surge-ping = "0.8.0"
thiserror = "1"
thiserror = "2"
time = "0.3.20"
tokio = { version = "1", features = [
"io-util",
Expand All @@ -100,15 +100,14 @@ tokio-rustls = { version = "0.26", default-features = false, features = [
"ring",
] }
tokio-stream = { version = "0.1.15" }
tokio-tungstenite = "0.21"
tokio-tungstenite = "0.24"
tokio-tungstenite-wasm = "0.3"
tokio-util = { version = "0.7.12", features = ["io-util", "io", "codec", "rt"] }
tokio-util = { version = "0.7", features = ["io-util", "io", "codec", "rt"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = [
"env-filter",
], optional = true }
tungstenite = "0.21"
url = { version = "2.4", features = ["serde"] }
url = { version = "2.5", features = ["serde"] }
watchable = "1.1.2"
webpki = { package = "rustls-webpki", version = "0.102" }
webpki-roots = "0.26"
Expand All @@ -118,31 +117,37 @@ net-report = { package = "iroh-net-report", path = "../iroh-net-report", version

# metrics
iroh-metrics = { version = "0.28.0", default-features = false }
strum = { version = "0.26.2", features = ["derive"] }
strum = { version = "0.26", features = ["derive"] }

# local-swarm-discovery
swarm-discovery = { version = "0.2.1", optional = true }

# dht_discovery
genawaiter = { version = "0.99.1", features = ["futures03"], optional = true }
genawaiter = { version = "0.99", features = ["futures03"], optional = true }

[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
[target.'cfg(all(target_os = "linux", not(target_os = "android")))'.dependencies]
netlink-packet-core = "0.7.0"
netlink-packet-route = "0.17.0"
netlink-sys = "0.8.5"
rtnetlink = "0.13.0"
netlink-packet-route = "0.21"
netlink-sys = "0.8.6"
rtnetlink = "=0.14.1" # pinned because of https://github.com/rust-netlink/rtnetlink/issues/83

[target.'cfg(target_os = "android")'.dependencies]
netlink-packet-core = "0.7.0"
netlink-packet-route = "0.19" # 0.20/21 is blocked on rtnetlink bumping its dependency
netlink-sys = "0.8.6"
rtnetlink = "=0.13.1" # pinned because of https://github.com/rust-netlink/rtnetlink/issues/83

[target.'cfg(target_os = "windows")'.dependencies]
wmi = "0.13"
windows = { version = "0.51", features = [
wmi = "0.14"
windows = { version = "0.58", features = [
"Win32_NetworkManagement_IpHelper",
"Win32_Foundation",
"Win32_NetworkManagement_Ndis",
"Win32_Networking_WinSock",
] }

[dev-dependencies]
axum = { version = "0.7.4" }
axum = { version = "0.7" }
clap = { version = "4", features = ["derive"] }
criterion = "0.5.1"
crypto_box = { version = "0.9.1", features = ["serde", "chacha20"] }
Expand All @@ -161,9 +166,8 @@ tokio = { version = "1", features = [
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
iroh-test = "0.28.0"
iroh-net = { path = "." }
serde_json = "1.0.107"
serde_json = "1"
testresult = "0.4.0"
mainline = "2.0.1"
iroh-relay = { version = "0.28", path = "../iroh-relay", features = ["test-utils", "server"] }

[[bench]]
Expand Down
6 changes: 3 additions & 3 deletions iroh-net/bench/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "iroh-net-bench"
version = "0.27.0"
version = "0.28.0"
edition = "2021"
license = "MIT OR Apache-2.0"
publish = false
Expand All @@ -15,7 +15,7 @@ quinn = { package = "iroh-quinn", version = "0.12" }
rcgen = "0.13"
rustls = { version = "0.23", default-features = false, features = ["ring"] }
clap = { version = "4", features = ["derive"] }
tokio = { version = "1.0.1", features = ["rt", "sync"] }
tokio = { version = "1", features = ["rt", "sync"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3.0", default-features = false, features = [
"env-filter",
Expand All @@ -25,7 +25,7 @@ tracing-subscriber = { version = "0.3.0", default-features = false, features = [
"local-time",
] }
socket2 = "0.5"
futures-lite = "2.3.0"
futures-lite = "2.5"

[features]
default = []
Expand Down
4 changes: 2 additions & 2 deletions iroh-net/src/discovery/pkarr/dht.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ mod tests {
use std::collections::BTreeSet;

use iroh_base::node_addr::RelayUrl;
use mainline::dht::DhtSettings;
use pkarr::mainline::dht::DhtSettings;
use testresult::TestResult;

use super::*;
Expand All @@ -416,7 +416,7 @@ mod tests {
let _logging_guard = iroh_test::logging::setup();
let ep = crate::Endpoint::builder().bind().await?;
let secret = ep.secret_key().clone();
let testnet = mainline::dht::Testnet::new(2);
let testnet = pkarr::mainline::dht::Testnet::new(2);
let settings = pkarr::Settings {
dht: DhtSettings {
bootstrap: Some(testnet.bootstrap.clone()),
Expand Down
Loading
Loading