Skip to content

Commit 6cc1621

Browse files
Merge branch 'master' into 2680-explore
2 parents 66821dc + 0e46865 commit 6cc1621

File tree

28 files changed

+1248
-61
lines changed

28 files changed

+1248
-61
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,43 +11,44 @@ members = [
1111
"examples/ping-example",
1212
"examples/rendezvous",
1313
"identity",
14+
"interop-tests",
15+
"misc/allow-block-list",
16+
"misc/connection-limits",
17+
"misc/keygen",
1418
"misc/metrics",
1519
"misc/multistream-select",
16-
"misc/rw-stream-sink",
17-
"misc/keygen",
1820
"misc/quick-protobuf-codec",
1921
"misc/quickcheck-ext",
22+
"misc/rw-stream-sink",
2023
"muxers/mplex",
21-
"muxers/yamux",
2224
"muxers/test-harness",
23-
"protocols/dcutr",
25+
"muxers/yamux",
2426
"protocols/autonat",
27+
"protocols/dcutr",
2528
"protocols/floodsub",
2629
"protocols/gossipsub",
27-
"protocols/rendezvous",
2830
"protocols/identify",
2931
"protocols/kad",
3032
"protocols/mdns",
3133
"protocols/perf",
3234
"protocols/ping",
3335
"protocols/relay",
36+
"protocols/rendezvous",
3437
"protocols/request-response",
3538
"swarm",
3639
"swarm-derive",
37-
"interop-tests",
3840
"swarm-test",
3941
"transports/deflate",
4042
"transports/dns",
4143
"transports/noise",
42-
"transports/tls",
4344
"transports/plaintext",
4445
"transports/pnet",
4546
"transports/quic",
4647
"transports/tcp",
48+
"transports/tls",
4749
"transports/uds",
48-
"transports/websocket",
4950
"transports/wasm-ext",
5051
"transports/webrtc",
51-
"interop-tests"
52+
"transports/websocket",
5253
]
5354
resolver = "2"

interop-tests/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ anyhow = "1"
1010
either = "1.8.0"
1111
env_logger = "0.10.0"
1212
futures = "0.3.27"
13-
libp2p = { path = "../libp2p", features = ["websocket", "quic", "mplex", "yamux", "tcp", "tokio", "ping", "noise", "tls", "dns", "rsa", "macros", "webrtc"] }
13+
libp2p = { path = "../libp2p", features = ["websocket", "mplex", "yamux", "tcp", "tokio", "ping", "noise", "tls", "dns", "rsa", "macros"] }
14+
libp2p-quic = { path = "../transports/quic", features = ["tokio"] }
15+
libp2p-webrtc = { path = "../transports/webrtc", features = ["tokio"] }
1416
log = "0.4"
1517
rand = "0.8.5"
1618
redis = { version = "0.22.1", default-features = false, features = ["tokio-comp"] }

interop-tests/src/bin/ping.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ use libp2p::swarm::{keep_alive, NetworkBehaviour, SwarmEvent};
1313
use libp2p::tls::TlsStream;
1414
use libp2p::websocket::WsConfig;
1515
use libp2p::{
16-
identity, mplex, noise, ping, quic, swarm::SwarmBuilder, tcp, tls, webrtc, yamux,
17-
InboundUpgradeExt, Multiaddr, OutboundUpgradeExt, PeerId, Transport as _,
16+
identity, mplex, noise, ping, swarm::SwarmBuilder, tcp, tls, yamux, InboundUpgradeExt,
17+
Multiaddr, OutboundUpgradeExt, PeerId, Transport as _,
1818
};
19+
use libp2p_quic as quic;
20+
use libp2p_webrtc as webrtc;
1921
use redis::AsyncCommands;
2022

2123
#[tokio::main]

libp2p/CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# 0.52.2 - unreleased
2+
3+
- Introduce `libp2p::connection_limits` module.
4+
See [PR 3386].
5+
6+
- Deprecate the `quic` and `webrtc` feature.
7+
These two crates are only in alpha state.
8+
To properly communicate this to users, we want them to add the dependency directly which makes the `alpha` version visible.
9+
See [PR 3580].
10+
11+
- Introduce `libp2p::allow_block_list` module and deprecate `libp2p::Swarm::ban_peer_id`.
12+
See [PR 3590].
13+
14+
[PR 3386]: https://github.com/libp2p/rust-libp2p/pull/3386
15+
[PR 3580]: https://github.com/libp2p/rust-libp2p/pull/3580
16+
[PR 3590]: https://github.com/libp2p/rust-libp2p/pull/3590
17+
118
# 0.51.1
219

320
- Depend on `libp2p-tls` `v0.1.0`.

libp2p/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "libp2p"
33
edition = "2021"
44
rust-version = "1.65.0"
55
description = "Peer-to-peer networking library"
6-
version = "0.51.1"
6+
version = "0.51.2"
77
authors = ["Parity Technologies <[email protected]>"]
88
license = "MIT"
99
repository = "https://github.com/libp2p/rust-libp2p"
@@ -96,7 +96,9 @@ futures-timer = "3.0.2" # Explicit dependency to be used in `wasm-bindgen` featu
9696
getrandom = "0.2.3" # Explicit dependency to be used in `wasm-bindgen` feature
9797
instant = "0.1.11" # Explicit dependency to be used in `wasm-bindgen` feature
9898

99+
libp2p-allow-block-list = { version = "0.1.0", path = "../misc/allow-block-list" }
99100
libp2p-autonat = { version = "0.10.0", path = "../protocols/autonat", optional = true }
101+
libp2p-connection-limits = { version = "0.1.0", path = "../misc/connection-limits" }
100102
libp2p-core = { version = "0.39.0", path = "../core" }
101103
libp2p-dcutr = { version = "0.9.0", path = "../protocols/dcutr", optional = true }
102104
libp2p-floodsub = { version = "0.42.0", path = "../protocols/floodsub", optional = true }

libp2p/src/lib.rs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,14 @@ pub use libp2p_core::multihash;
4040
#[doc(inline)]
4141
pub use multiaddr;
4242

43+
#[doc(inline)]
44+
pub use libp2p_allow_block_list as allow_block_list;
4345
#[cfg(feature = "autonat")]
4446
#[doc(inline)]
4547
pub use libp2p_autonat as autonat;
4648
#[doc(inline)]
49+
pub use libp2p_connection_limits as connection_limits;
50+
#[doc(inline)]
4751
pub use libp2p_core as core;
4852
#[cfg(feature = "dcutr")]
4953
#[doc(inline)]
@@ -95,8 +99,12 @@ pub use libp2p_plaintext as plaintext;
9599
pub use libp2p_pnet as pnet;
96100
#[cfg(feature = "quic")]
97101
#[cfg(not(target_arch = "wasm32"))]
98-
#[doc(inline)]
99-
pub use libp2p_quic as quic;
102+
#[deprecated(
103+
note = "`quic` is only in alpha status. Please depend on `libp2p-quic` directly and don't ues the `quic` feature of `libp2p`."
104+
)]
105+
pub mod quic {
106+
pub use libp2p_quic::*;
107+
}
100108
#[cfg(feature = "relay")]
101109
#[doc(inline)]
102110
pub use libp2p_relay as relay;
@@ -129,8 +137,12 @@ pub use libp2p_wasm_ext as wasm_ext;
129137
#[cfg(feature = "webrtc")]
130138
#[cfg_attr(docsrs, doc(cfg(feature = "webrtc")))]
131139
#[cfg(not(target_arch = "wasm32"))]
132-
#[doc(inline)]
133-
pub use libp2p_webrtc as webrtc;
140+
#[deprecated(
141+
note = "`webrtc` is only in alpha status. Please depend on `libp2p-webrtc` directly and don't ues the `webrtc` feature of `libp2p`."
142+
)]
143+
pub mod webrtc {
144+
pub use libp2p_webrtc::*;
145+
}
134146
#[cfg(feature = "websocket")]
135147
#[cfg(not(target_arch = "wasm32"))]
136148
#[doc(inline)]

misc/allow-block-list/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 0.1.0 - unreleased
2+
3+
- Initial release.

misc/allow-block-list/Cargo.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[package]
2+
name = "libp2p-allow-block-list"
3+
edition = "2021"
4+
rust-version = "1.62.0"
5+
description = "Allow/block list connection management for libp2p."
6+
version = "0.1.0"
7+
license = "MIT"
8+
repository = "https://github.com/libp2p/rust-libp2p"
9+
keywords = ["peer-to-peer", "libp2p", "networking"]
10+
categories = ["network-programming", "asynchronous"]
11+
12+
[dependencies]
13+
libp2p-core = { version = "0.39.0", path = "../../core" }
14+
libp2p-swarm = { version = "0.42.0", path = "../../swarm" }
15+
libp2p-identity = { version = "0.1.0", path = "../../identity", features = ["peerid"] }
16+
void = "1"
17+
18+
[dev-dependencies]
19+
async-std = { version = "1.12.0", features = ["attributes"] }
20+
libp2p-swarm-derive = { path = "../../swarm-derive" }
21+
libp2p-swarm-test = { path = "../../swarm-test" }

0 commit comments

Comments
 (0)