Skip to content

Commit 24db526

Browse files
authored
Merge branch 'master' into smart-dialing
2 parents 85bc539 + 93a63d9 commit 24db526

File tree

7 files changed

+82
-39
lines changed

7 files changed

+82
-39
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ libp2p-dns = { version = "0.44.0", path = "transports/dns" }
8484
libp2p-floodsub = { version = "0.47.0", path = "protocols/floodsub" }
8585
libp2p-gossipsub = { version = "0.50.0", path = "protocols/gossipsub" }
8686
libp2p-identify = { version = "0.47.0", path = "protocols/identify" }
87-
libp2p-identity = { version = "0.2.12" }
87+
libp2p-identity = { version = "0.2.13" }
8888
libp2p-kad = { version = "0.49.0", path = "protocols/kad" }
8989
libp2p-mdns = { version = "0.48.0", path = "protocols/mdns" }
9090
libp2p-memory-connection-limits = { version = "0.5.0", path = "misc/memory-connection-limits" }

deny.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ allow = [
3939
"Apache-2.0",
4040
"BSD-2-Clause",
4141
"BSD-3-Clause",
42+
"CDLA-Permissive-2.0",
4243
"ISC",
4344
"MIT",
4445
"MPL-2.0",

identity/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.2.13
2+
3+
- Turn the `quick-protobuf` dependency optional to only the features which require it.
4+
See [PR 6226](https://github.com/libp2p/rust-libp2p/pull/6226)
5+
16
## 0.2.12
27

38
- Avoid depending on the `rand_core` feature in `ed25519-dalek` crate.

identity/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "libp2p-identity"
3-
version = "0.2.12"
3+
version = "0.2.13"
44
edition = "2021" # MUST NOT inherit from workspace because we don't want to publish breaking changes to `libp2p-identity`.
55
description = "Data structures and algorithms for identifying peers in libp2p."
66
rust-version = "1.73.0" # MUST NOT inherit from workspace because we don't want to publish breaking changes to `libp2p-identity`.
@@ -20,7 +20,7 @@ k256 = { version = "0.13.4", optional = true, features = ["ecdsa", "arithmetic"]
2020
tracing = { workspace = true }
2121
multihash = { version = "0.19.1", optional = true }
2222
p256 = { version = "0.13", default-features = false, features = ["ecdsa", "std", "pem"], optional = true }
23-
quick-protobuf = "0.8.1"
23+
quick-protobuf = { version = "0.8.1", optional = true }
2424
rand = { version = "0.8", optional = true }
2525
sec1 = { version = "0.7", default-features = false, optional = true }
2626
serde = { version = "1", optional = true, features = ["derive"] }
@@ -32,10 +32,10 @@ zeroize = { version = "1.8", optional = true }
3232
ring = { workspace = true, features = ["alloc", "std"], optional = true }
3333

3434
[features]
35-
secp256k1 = ["dep:k256", "dep:asn1_der", "dep:sha2", "dep:hkdf", "dep:zeroize"]
36-
ecdsa = ["dep:p256", "dep:zeroize", "dep:sec1", "dep:sha2", "dep:hkdf"]
37-
rsa = ["dep:ring", "dep:asn1_der", "dep:rand", "dep:zeroize"]
38-
ed25519 = ["dep:ed25519-dalek", "dep:zeroize", "dep:sha2", "dep:hkdf"]
35+
secp256k1 = ["dep:k256", "dep:asn1_der", "dep:sha2", "dep:hkdf", "dep:zeroize", "dep:quick-protobuf"]
36+
ecdsa = ["dep:p256", "dep:zeroize", "dep:sec1", "dep:sha2", "dep:hkdf", "dep:quick-protobuf"]
37+
rsa = ["dep:ring", "dep:asn1_der", "dep:rand", "dep:zeroize", "dep:quick-protobuf"]
38+
ed25519 = ["dep:ed25519-dalek", "dep:zeroize", "dep:sha2", "dep:hkdf", "dep:quick-protobuf"]
3939
peerid = ["dep:multihash", "dep:bs58", "dep:thiserror", "dep:sha2", "dep:hkdf"]
4040
rand = ["dep:rand"]
4141

protocols/gossipsub/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
- Refactor gossipsub with in-place negative-score peer removal.
3333
See [PR 6209](https://github.com/libp2p/rust-libp2p/pull/6209).
3434

35+
- Avoid direct casting from u128 to u64.
36+
See [PR 6211](https://github.com/libp2p/rust-libp2p/pull/6211).
37+
3538
## 0.49.2
3639

3740
- Relax `Behaviour::with_metrics` requirements, do not require DataTransform and TopicSubscriptionFilter to also impl Default

protocols/gossipsub/src/behaviour.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ enum PublishConfig {
183183

184184
/// A strictly linearly increasing sequence number.
185185
///
186-
/// We start from the current time as unix timestamp in milliseconds.
186+
/// We start from the current time as unix timestamp in nanoseconds.
187187
#[derive(Debug)]
188188
struct SequenceNumber(u64);
189189

@@ -194,7 +194,10 @@ impl SequenceNumber {
194194
.expect("time to be linear")
195195
.as_nanos();
196196

197-
Self(unix_timestamp as u64)
197+
Self(
198+
u64::try_from(unix_timestamp)
199+
.expect("timestamp in nanos since UNIX_EPOCH should fit in u64"),
200+
)
198201
}
199202

200203
fn next(&mut self) -> u64 {

0 commit comments

Comments
 (0)