Skip to content

Commit 291e1e7

Browse files
authored
Merge branch 'master' into lexnv/identify-checks
2 parents 27a6f3d + 48d540d commit 291e1e7

File tree

23 files changed

+6817
-411
lines changed

23 files changed

+6817
-411
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 42 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,41 @@ license = "MIT"
55
version = "0.9.3"
66
edition = "2021"
77

8+
# cargo-machete does not detect serde_millis usage, so we ignore the warning
9+
[package.metadata.cargo-machete]
10+
ignored = ["serde_millis"]
11+
812
[build-dependencies]
913
prost-build = "0.13"
1014

1115
[dependencies]
12-
async-trait = "0.1.81"
16+
async-trait = "0.1.88"
1317
bs58 = "0.5.1"
14-
bytes = "1.6.1"
15-
cid = "0.10.1"
18+
bytes = "1.10.1"
19+
cid = "0.11.1"
1620
ed25519-dalek = { version = "2.1.1", features = ["rand_core"] }
1721
futures = "0.3.27"
1822
futures-timer = "3.0.3"
19-
hex-literal = "0.4.1"
20-
indexmap = { version = "2.7.1", features = ["std"] }
23+
indexmap = { version = "2.9.0", features = ["std"] }
2124
libc = "0.2.158"
2225
mockall = "0.13.1"
2326
multiaddr = "0.17.0"
24-
multihash = { version = "0.17.0", default-features = false, features = ["std", "multihash-impl", "identity", "sha2"] }
25-
network-interface = "1.1.1"
27+
multihash = { version = "0.17.0", default-features = false, features = ["std", "multihash-impl", "identity", "sha2", "blake2b"] }
28+
network-interface = "2.0.1"
2629
parking_lot = "0.12.3"
27-
pin-project = "1.1.0"
28-
prost = "0.12.6"
30+
pin-project = "1.1.10"
31+
prost = "0.13.5"
2932
rand = { version = "0.8.0", features = ["getrandom"] }
30-
rcgen = "0.10.0"
3133
serde = "1.0.158"
3234
sha2 = "0.10.8"
3335
simple-dns = "0.9.3"
34-
smallvec = "1.13.2"
36+
smallvec = "1.15.0"
3537
snow = { version = "0.9.3", features = ["ring-resolver"], default-features = false }
36-
socket2 = { version = "0.5.8", features = ["all"] }
37-
str0m = { version = "0.6.2", optional = true }
38-
thiserror = "2.0.11"
38+
socket2 = { version = "0.5.9", features = ["all"] }
39+
thiserror = "2.0.12"
3940
tokio-stream = "0.1.12"
40-
tokio-tungstenite = { version = "0.26.1", features = ["rustls-tls-native-roots", "url"], optional = true }
41-
tokio-util = { version = "0.7.11", features = ["compat", "io", "codec"] }
42-
tokio = { version = "1.43.1", features = ["rt", "net", "io-util", "time", "macros", "sync", "parking_lot"] }
41+
tokio-util = { version = "0.7.15", features = ["compat", "io", "codec"] }
42+
tokio = { version = "1.44.2", features = ["rt", "net", "io-util", "time", "macros", "sync", "parking_lot"] }
4343
tracing = { version = "0.1.40", features = ["log"] }
4444
hickory-resolver = "0.24.2"
4545
uint = "0.10.0"
@@ -51,11 +51,25 @@ yasna = "0.5.0"
5151
zeroize = "1.8.1"
5252
yamux = "0.13.4"
5353

54+
# Websocket related dependencies.
55+
tokio-tungstenite = { version = "0.26.2", features = ["rustls-tls-native-roots", "url"], optional = true }
56+
# End of websocket related dependencies.
57+
5458
# Quic related dependencies. Quic is an experimental feature flag. The dependencies must be updated.
5559
quinn = { version = "0.9.3", default-features = false, features = ["tls-rustls", "runtime-tokio"], optional = true }
5660
rustls = { version = "0.20.7", default-features = false, features = ["dangerous_configuration"], optional = true }
5761
ring = { version = "0.16.20", optional = true }
5862
webpki = { version = "0.22.4", optional = true }
63+
rcgen = { version = "0.10.0", optional = true }
64+
# End of Quic related dependencies.
65+
66+
# WebRTC related dependencies. WebRTC is an experimental feature flag. The dependencies must be updated.
67+
str0m = { version = "0.6.2", optional = true }
68+
# End of WebRTC related dependencies.
69+
70+
# Fuzzing related dependencies.
71+
serde_millis = {version = "0.1", optional = true}
72+
# End of fuzzing related dependencies.
5973

6074
[dev-dependencies]
6175
libp2p = { version = "0.51.4", features = [
@@ -73,15 +87,23 @@ libp2p = { version = "0.51.4", features = [
7387
"quic",
7488
]}
7589
quickcheck = "1.0.3"
76-
serde_json = "1.0.122"
90+
serde_json = "1.0.140"
7791
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
7892
futures_ringbuf = "0.4.0"
93+
hex-literal = "0.4.1"
7994

8095
[features]
81-
quic = ["dep:webpki", "dep:quinn", "dep:rustls", "dep:ring"]
82-
webrtc = ["dep:str0m"]
96+
# Stable feature flags.
8397
websocket = ["dep:tokio-tungstenite"]
8498

99+
# Fuzzing feature flags.
100+
fuzz = ["serde/derive", "serde/rc", "bytes/serde", "dep:serde_millis", "cid/serde", "multihash/serde"]
101+
102+
# Unstable / experimental feature flags. These features are not guaranteed to be stable and may change in the future.
103+
# They are not yet suitable for production use-cases and should be used with caution.
104+
quic = ["dep:webpki", "dep:quinn", "dep:rustls", "dep:ring", "dep:rcgen"]
105+
webrtc = ["dep:str0m"]
106+
85107
[profile.release]
86108
debug = true
87109

build.rs

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
fn main() {
2-
prost_build::compile_protos(
3-
&[
4-
"src/schema/keys.proto",
5-
"src/schema/noise.proto",
6-
"src/schema/webrtc.proto",
7-
"src/protocol/libp2p/schema/identify.proto",
8-
"src/protocol/libp2p/schema/kademlia.proto",
9-
"src/protocol/libp2p/schema/bitswap.proto",
10-
],
11-
&["src"],
12-
)
13-
.unwrap();
2+
let mut config = prost_build::Config::new();
3+
// Configure Prost to add #[derive(Serialize, Deserialize)] to all generated structs
4+
config.type_attribute(
5+
".",
6+
"#[cfg_attr(feature = \"fuzz\", derive(serde::Serialize, serde::Deserialize))]",
7+
);
8+
config
9+
.compile_protos(
10+
&[
11+
"src/schema/keys.proto",
12+
"src/schema/noise.proto",
13+
"src/schema/webrtc.proto",
14+
"src/protocol/libp2p/schema/identify.proto",
15+
"src/protocol/libp2p/schema/kademlia.proto",
16+
"src/protocol/libp2p/schema/bitswap.proto",
17+
],
18+
&["src"],
19+
)
20+
.unwrap();
1421
}

0 commit comments

Comments
 (0)