diff --git a/.github/mergify.yml b/.github/mergify.yml index 38f025c7814..0d519b38a94 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -1,57 +1,17 @@ -defaults: - actions: - queue: - method: squash - commit_message_template: | - {{ title }} - - {{ body | get_section("## Description", "") }} - - Pull-Request: #{{ number }}. - - {{ body | get_section("## Attributions", "") }} - pull_request_rules: - name: Ask to resolve conflict conditions: - conflict - -author=dependabot[bot] - or: - - -draft # Don't report conflicts on regular draft. - - and: # Do report conflicts on draft that are scheduled for the next major release. - - draft - - milestone~=v[0-9]\.[0-9]{2} + - -draft # Don't report conflicts on regular draft. + - and: # Do report conflicts on draft that are scheduled for the next major release. + - draft + - milestone~=v[0-9]\.[0-9]{2} actions: comment: - message: This pull request has merge conflicts. Could you please resolve them @{{author}}? 🙏 - - - name: Add to merge queue - conditions: - # All branch protection rules are implicit: https://docs.mergify.com/conditions/#about-branch-protection - - label=send-it - - base=master - actions: - queue: - name: default - - # Adds the Pr to the batch queue, so that we can run the interop tests. See the `external_prs` queue for more info. - - name: Add to batch merge queue - conditions: - # All branch protection rules are implicit: https://docs.mergify.com/conditions/#about-branch-protection - - label=send-it-batch - - base=master - actions: - queue: - name: external_prs - - - name: Add approved dependabot PRs to merge queue - conditions: - # All branch protection rules are implicit: https://docs.mergify.com/conditions/#about-branch-protection - - author=dependabot[bot] - - base=master - actions: - queue: - name: default + message: This pull request has merge conflicts. Could you please resolve them + @{{author}}? 🙏 - name: Remove reviews on updates after PR is queued for merging conditions: @@ -59,9 +19,12 @@ pull_request_rules: - label=send-it - author!=@libp2p/rust-libp2p-maintainers - author!=dependabot[bot] + # Do not remove approvals if last commit was a merge of master into the branch, required for the PR to be merged. + - commits[-1].author!=@libp2p/rust-libp2p-maintainers actions: dismiss_reviews: - message: Approvals have been dismissed because the PR was updated after the `send-it` label was applied. + message: Approvals have been dismissed because the PR was updated after the + `send-it` label was applied. changes_requested: false - name: Approve trivial maintainer PRs @@ -83,11 +46,33 @@ pull_request_rules: review: type: APPROVE + - name: Add approved dependabot PRs to merge queue + conditions: + # All branch protection rules are implicit: https://docs.mergify.com/conditions/#about-branch-protection + - author=dependabot[bot] + - base=master + actions: + queue: + + - name: Add send-it labeled PRs to merge queue + conditions: + # All branch protection rules are implicit: https://docs.mergify.com/conditions/#about-branch-protection + - base=master + - label=send-it + actions: + queue: + queue_rules: - name: default - conditions: [] - # External PR's don't have access to secrets and variables, therefore they don't run the interop tests. - # using a batch queue allows to circumvent that as mergify creates it from an internal branch. - - name: external_prs - conditions: [] - batch_size: 1 + queue_conditions: + - base=master + merge_conditions: [] + merge_method: squash + commit_message_template: | + {{ title }} + + {{ body | get_section("## Description", "") }} + + Pull-Request: #{{ number }}. + + {{ body | get_section("## Attributions", "") }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2519f7e45f8..b05a1be0182 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,7 +70,7 @@ jobs: - name: Enforce version in `workspace.dependencies` matches the latest version if: env.CRATE != 'libp2p' run: | - SPECIFIED_VERSION=$(tq "workspace.dependencies.$CRATE.version" --file ./Cargo.toml) + SPECIFIED_VERSION=$(tq "workspace.dependencies.$CRATE.version" -r --file ./Cargo.toml) echo "Package version: $CRATE_VERSION"; echo "Specified version: $SPECIFIED_VERSION"; diff --git a/Cargo.lock b/Cargo.lock index 954d6acd497..808e1ab70a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2659,7 +2659,7 @@ dependencies = [ [[package]] name = "libp2p-allow-block-list" -version = "0.4.1" +version = "0.5.0" dependencies = [ "async-std", "libp2p-core", @@ -2671,7 +2671,7 @@ dependencies = [ [[package]] name = "libp2p-autonat" -version = "0.13.1" +version = "0.14.0" dependencies = [ "async-trait", "asynchronous-codec", @@ -2685,7 +2685,6 @@ dependencies = [ "libp2p-request-response", "libp2p-swarm", "libp2p-swarm-test", - "libp2p-test-utils", "quick-protobuf", "quick-protobuf-codec", "rand 0.8.5", @@ -2693,12 +2692,13 @@ dependencies = [ "thiserror 2.0.10", "tokio", "tracing", + "tracing-subscriber", "web-time 1.1.0", ] [[package]] name = "libp2p-connection-limits" -version = "0.4.1" +version = "0.5.0" dependencies = [ "async-std", "libp2p-core", @@ -2714,7 +2714,7 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.42.1" +version = "0.43.0" dependencies = [ "async-std", "either", @@ -2741,7 +2741,7 @@ dependencies = [ [[package]] name = "libp2p-dcutr" -version = "0.12.1" +version = "0.13.0" dependencies = [ "asynchronous-codec", "either", @@ -2756,7 +2756,6 @@ dependencies = [ "libp2p-swarm", "libp2p-swarm-test", "libp2p-tcp", - "libp2p-test-utils", "libp2p-yamux", "lru", "quick-protobuf", @@ -2764,12 +2763,13 @@ dependencies = [ "thiserror 2.0.10", "tokio", "tracing", + "tracing-subscriber", "web-time 1.1.0", ] [[package]] name = "libp2p-dns" -version = "0.42.1" +version = "0.43.0" dependencies = [ "async-std", "async-std-resolver", @@ -2778,16 +2778,16 @@ dependencies = [ "hickory-resolver", "libp2p-core", "libp2p-identity", - "libp2p-test-utils", "parking_lot", "smallvec", "tokio", "tracing", + "tracing-subscriber", ] [[package]] name = "libp2p-floodsub" -version = "0.45.0" +version = "0.46.0" dependencies = [ "asynchronous-codec", "bytes", @@ -2825,7 +2825,6 @@ dependencies = [ "libp2p-identity", "libp2p-swarm", "libp2p-swarm-test", - "libp2p-test-utils", "prometheus-client", "quick-protobuf", "quick-protobuf-codec", @@ -2836,6 +2835,7 @@ dependencies = [ "sha2 0.10.8", "tokio", "tracing", + "tracing-subscriber", "web-time 1.1.0", ] @@ -2853,12 +2853,12 @@ dependencies = [ "libp2p-identity", "libp2p-swarm", "libp2p-swarm-test", - "libp2p-test-utils", "quick-protobuf", "quick-protobuf-codec", "smallvec", "thiserror 2.0.10", "tracing", + "tracing-subscriber", ] [[package]] @@ -2906,7 +2906,6 @@ dependencies = [ "libp2p-noise", "libp2p-swarm", "libp2p-swarm-test", - "libp2p-test-utils", "libp2p-yamux", "quick-protobuf", "quick-protobuf-codec", @@ -2917,13 +2916,14 @@ dependencies = [ "smallvec", "thiserror 2.0.10", "tracing", + "tracing-subscriber", "uint", "web-time 1.1.0", ] [[package]] name = "libp2p-mdns" -version = "0.46.1" +version = "0.47.0" dependencies = [ "async-io", "async-std", @@ -2934,17 +2934,17 @@ dependencies = [ "libp2p-identity", "libp2p-swarm", "libp2p-swarm-test", - "libp2p-test-utils", "rand 0.8.5", "smallvec", "socket2", "tokio", "tracing", + "tracing-subscriber", ] [[package]] name = "libp2p-memory-connection-limits" -version = "0.3.1" +version = "0.4.0" dependencies = [ "libp2p-core", "libp2p-identify", @@ -2959,7 +2959,7 @@ dependencies = [ [[package]] name = "libp2p-metrics" -version = "0.15.0" +version = "0.16.0" dependencies = [ "futures", "libp2p-core", @@ -2978,7 +2978,7 @@ dependencies = [ [[package]] name = "libp2p-mplex" -version = "0.42.0" +version = "0.43.0" dependencies = [ "async-std", "asynchronous-codec", @@ -2990,13 +2990,13 @@ dependencies = [ "libp2p-muxer-test-harness", "libp2p-plaintext", "libp2p-tcp", - "libp2p-test-utils", "nohash-hasher", "parking_lot", "quickcheck-ext", "rand 0.8.5", "smallvec", "tracing", + "tracing-subscriber", "unsigned-varint", ] @@ -3013,7 +3013,7 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.45.1" +version = "0.46.0" dependencies = [ "asynchronous-codec", "bytes", @@ -3021,7 +3021,6 @@ dependencies = [ "futures_ringbuf", "libp2p-core", "libp2p-identity", - "libp2p-test-utils", "multiaddr", "multihash", "once_cell", @@ -3032,6 +3031,7 @@ dependencies = [ "static_assertions", "thiserror 2.0.10", "tracing", + "tracing-subscriber", "x25519-dalek", "zeroize", ] @@ -3051,7 +3051,6 @@ dependencies = [ "libp2p-swarm", "libp2p-swarm-test", "libp2p-tcp", - "libp2p-test-utils", "libp2p-tls", "libp2p-yamux", "serde", @@ -3065,7 +3064,7 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.45.1" +version = "0.46.0" dependencies = [ "futures", "futures-timer", @@ -3082,7 +3081,7 @@ dependencies = [ [[package]] name = "libp2p-plaintext" -version = "0.42.0" +version = "0.43.0" dependencies = [ "asynchronous-codec", "bytes", @@ -3090,16 +3089,16 @@ dependencies = [ "futures_ringbuf", "libp2p-core", "libp2p-identity", - "libp2p-test-utils", "quick-protobuf", "quick-protobuf-codec", "quickcheck-ext", "tracing", + "tracing-subscriber", ] [[package]] name = "libp2p-pnet" -version = "0.25.0" +version = "0.26.0" dependencies = [ "futures", "libp2p-core", @@ -3120,7 +3119,7 @@ dependencies = [ [[package]] name = "libp2p-quic" -version = "0.11.2" +version = "0.12.0" dependencies = [ "async-std", "futures", @@ -3131,7 +3130,6 @@ dependencies = [ "libp2p-muxer-test-harness", "libp2p-noise", "libp2p-tcp", - "libp2p-test-utils", "libp2p-tls", "libp2p-yamux", "quickcheck", @@ -3143,11 +3141,12 @@ dependencies = [ "thiserror 2.0.10", "tokio", "tracing", + "tracing-subscriber", ] [[package]] name = "libp2p-relay" -version = "0.18.1" +version = "0.19.0" dependencies = [ "asynchronous-codec", "bytes", @@ -3161,7 +3160,6 @@ dependencies = [ "libp2p-plaintext", "libp2p-swarm", "libp2p-swarm-test", - "libp2p-test-utils", "libp2p-yamux", "quick-protobuf", "quick-protobuf-codec", @@ -3170,12 +3168,13 @@ dependencies = [ "static_assertions", "thiserror 2.0.10", "tracing", + "tracing-subscriber", "web-time 1.1.0", ] [[package]] name = "libp2p-rendezvous" -version = "0.15.1" +version = "0.16.0" dependencies = [ "async-trait", "asynchronous-codec", @@ -3187,13 +3186,13 @@ dependencies = [ "libp2p-request-response", "libp2p-swarm", "libp2p-swarm-test", - "libp2p-test-utils", "quick-protobuf", "quick-protobuf-codec", "rand 0.8.5", "thiserror 2.0.10", "tokio", "tracing", + "tracing-subscriber", "web-time 1.1.0", ] @@ -3212,12 +3211,12 @@ dependencies = [ "libp2p-identity", "libp2p-swarm", "libp2p-swarm-test", - "libp2p-test-utils", "rand 0.8.5", "serde", "serde_json", "smallvec", "tracing", + "tracing-subscriber", ] [[package]] @@ -3240,22 +3239,22 @@ dependencies = [ [[package]] name = "libp2p-stream" -version = "0.2.0-alpha.1" +version = "0.3.0-alpha" dependencies = [ "futures", "libp2p-core", "libp2p-identity", "libp2p-swarm", "libp2p-swarm-test", - "libp2p-test-utils", "rand 0.8.5", "tokio", "tracing", + "tracing-subscriber", ] [[package]] name = "libp2p-swarm" -version = "0.45.2" +version = "0.46.0" dependencies = [ "async-std", "criterion", @@ -3272,7 +3271,6 @@ dependencies = [ "libp2p-plaintext", "libp2p-swarm-derive", "libp2p-swarm-test", - "libp2p-test-utils", "libp2p-yamux", "lru", "multistream-select", @@ -3282,6 +3280,7 @@ dependencies = [ "smallvec", "tokio", "tracing", + "tracing-subscriber", "trybuild", "wasm-bindgen-futures", "web-time 1.1.0", @@ -3314,7 +3313,7 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.42.0" +version = "0.43.0" dependencies = [ "async-io", "async-std", @@ -3323,22 +3322,15 @@ dependencies = [ "if-watch", "libc", "libp2p-core", - "libp2p-test-utils", "socket2", "tokio", "tracing", -] - -[[package]] -name = "libp2p-test-utils" -version = "0.1.0" -dependencies = [ "tracing-subscriber", ] [[package]] name = "libp2p-tls" -version = "0.5.0" +version = "0.6.0" dependencies = [ "futures", "futures-rustls", @@ -3359,7 +3351,7 @@ dependencies = [ [[package]] name = "libp2p-uds" -version = "0.41.0" +version = "0.42.0" dependencies = [ "async-std", "futures", @@ -3371,7 +3363,7 @@ dependencies = [ [[package]] name = "libp2p-upnp" -version = "0.3.1" +version = "0.4.0" dependencies = [ "futures", "futures-timer", @@ -3394,7 +3386,6 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-noise", - "libp2p-test-utils", "libp2p-webrtc-utils", "multihash", "quickcheck", @@ -3405,13 +3396,14 @@ dependencies = [ "tokio", "tokio-util", "tracing", + "tracing-subscriber", "webrtc", "webrtc-ice", ] [[package]] name = "libp2p-webrtc-utils" -version = "0.3.0" +version = "0.4.0" dependencies = [ "asynchronous-codec", "bytes", @@ -3432,7 +3424,7 @@ dependencies = [ [[package]] name = "libp2p-webrtc-websys" -version = "0.4.0-alpha.2" +version = "0.4.0" dependencies = [ "bytes", "futures", @@ -3452,7 +3444,7 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.44.1" +version = "0.45.0" dependencies = [ "async-std", "either", @@ -3475,7 +3467,7 @@ dependencies = [ [[package]] name = "libp2p-websocket-websys" -version = "0.4.1" +version = "0.5.0" dependencies = [ "bytes", "futures", @@ -3493,7 +3485,7 @@ dependencies = [ [[package]] name = "libp2p-webtransport-websys" -version = "0.4.1" +version = "0.5.0" dependencies = [ "futures", "js-sys", @@ -3514,7 +3506,7 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.46.0" +version = "0.47.0" dependencies = [ "async-std", "either", @@ -3834,12 +3826,12 @@ dependencies = [ "bytes", "futures", "futures_ringbuf", - "libp2p-test-utils", "pin-project", "quickcheck-ext", "rw-stream-sink", "smallvec", "tracing", + "tracing-subscriber", "unsigned-varint", ] diff --git a/Cargo.toml b/Cargo.toml index c39e1757e7a..455fbead65c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,6 @@ members = [ "misc/quickcheck-ext", "misc/rw-stream-sink", "misc/server", - "misc/test-utils", "misc/webrtc-utils", "muxers/mplex", "muxers/test-harness", @@ -74,47 +73,46 @@ rust-version = "1.83.0" [workspace.dependencies] libp2p = { version = "0.55.0", path = "libp2p" } -libp2p-allow-block-list = { version = "0.4.1", path = "misc/allow-block-list" } -libp2p-autonat = { version = "0.13.1", path = "protocols/autonat" } -libp2p-connection-limits = { version = "0.4.1", path = "misc/connection-limits" } -libp2p-core = { version = "0.42.1", path = "core" } -libp2p-dcutr = { version = "0.12.1", path = "protocols/dcutr" } -libp2p-dns = { version = "0.42.1", path = "transports/dns" } -libp2p-floodsub = { version = "0.45.0", path = "protocols/floodsub" } +libp2p-allow-block-list = { version = "0.5.0", path = "misc/allow-block-list" } +libp2p-autonat = { version = "0.14.0", path = "protocols/autonat" } +libp2p-connection-limits = { version = "0.5.0", path = "misc/connection-limits" } +libp2p-core = { version = "0.43.0", path = "core" } +libp2p-dcutr = { version = "0.13.0", path = "protocols/dcutr" } +libp2p-dns = { version = "0.43.0", path = "transports/dns" } +libp2p-floodsub = { version = "0.46.0", path = "protocols/floodsub" } libp2p-gossipsub = { version = "0.48.0", path = "protocols/gossipsub" } libp2p-identify = { version = "0.46.0", path = "protocols/identify" } libp2p-identity = { version = "0.2.10" } libp2p-kad = { version = "0.47.0", path = "protocols/kad" } -libp2p-mdns = { version = "0.46.1", path = "protocols/mdns" } -libp2p-memory-connection-limits = { version = "0.3.1", path = "misc/memory-connection-limits" } -libp2p-metrics = { version = "0.15.0", path = "misc/metrics" } -libp2p-mplex = { version = "0.42.0", path = "muxers/mplex" } -libp2p-noise = { version = "0.45.1", path = "transports/noise" } +libp2p-mdns = { version = "0.47.0", path = "protocols/mdns" } +libp2p-memory-connection-limits = { version = "0.4.0", path = "misc/memory-connection-limits" } +libp2p-metrics = { version = "0.16.0", path = "misc/metrics" } +libp2p-mplex = { version = "0.43.0", path = "muxers/mplex" } +libp2p-noise = { version = "0.46.0", path = "transports/noise" } libp2p-perf = { version = "0.4.0", path = "protocols/perf" } -libp2p-ping = { version = "0.45.1", path = "protocols/ping" } -libp2p-plaintext = { version = "0.42.0", path = "transports/plaintext" } -libp2p-pnet = { version = "0.25.0", path = "transports/pnet" } -libp2p-quic = { version = "0.11.2", path = "transports/quic" } -libp2p-relay = { version = "0.18.1", path = "protocols/relay" } -libp2p-rendezvous = { version = "0.15.1", path = "protocols/rendezvous" } +libp2p-ping = { version = "0.46.0", path = "protocols/ping" } +libp2p-plaintext = { version = "0.43.0", path = "transports/plaintext" } +libp2p-pnet = { version = "0.26.0", path = "transports/pnet" } +libp2p-quic = { version = "0.12.0", path = "transports/quic" } +libp2p-relay = { version = "0.19.0", path = "protocols/relay" } +libp2p-rendezvous = { version = "0.16.0", path = "protocols/rendezvous" } libp2p-request-response = { version = "0.28.0", path = "protocols/request-response" } libp2p-server = { version = "0.12.6", path = "misc/server" } -libp2p-stream = { version = "0.2.0-alpha.1", path = "protocols/stream" } -libp2p-swarm = { version = "0.45.2", path = "swarm" } +libp2p-stream = { version = "0.3.0-alpha", path = "protocols/stream" } +libp2p-swarm = { version = "0.46.0", path = "swarm" } libp2p-swarm-derive = { version = "=0.35.0", path = "swarm-derive" } # `libp2p-swarm-derive` may not be compatible with different `libp2p-swarm` non-breaking releases. E.g. `libp2p-swarm` might introduce a new enum variant `FromSwarm` (which is `#[non-exhaustive]`) in a non-breaking release. Older versions of `libp2p-swarm-derive` would not forward this enum variant within the `NetworkBehaviour` hierarchy. Thus the version pinning is required. libp2p-swarm-test = { version = "0.5.0", path = "swarm-test" } -libp2p-tcp = { version = "0.42.0", path = "transports/tcp" } -libp2p-tls = { version = "0.5.0", path = "transports/tls" } -libp2p-uds = { version = "0.41.0", path = "transports/uds" } -libp2p-upnp = { version = "0.3.1", path = "protocols/upnp" } +libp2p-tcp = { version = "0.43.0", path = "transports/tcp" } +libp2p-tls = { version = "0.6.0", path = "transports/tls" } +libp2p-uds = { version = "0.42.0", path = "transports/uds" } +libp2p-upnp = { version = "0.4.0", path = "protocols/upnp" } libp2p-webrtc = { version = "0.9.0-alpha", path = "transports/webrtc" } -libp2p-webrtc-utils = { version = "0.3.0", path = "misc/webrtc-utils" } -libp2p-webrtc-websys = { version = "0.4.0-alpha.2", path = "transports/webrtc-websys" } -libp2p-websocket = { version = "0.44.1", path = "transports/websocket" } -libp2p-websocket-websys = { version = "0.4.1", path = "transports/websocket-websys" } -libp2p-webtransport-websys = { version = "0.4.1", path = "transports/webtransport-websys" } -libp2p-yamux = { version = "0.46.0", path = "muxers/yamux" } -libp2p-test-utils = { version = "0.1.0", path = "misc/test-utils" } +libp2p-webrtc-utils = { version = "0.4.0", path = "misc/webrtc-utils" } +libp2p-webrtc-websys = { version = "0.4.0", path = "transports/webrtc-websys" } +libp2p-websocket = { version = "0.45.0", path = "transports/websocket" } +libp2p-websocket-websys = { version = "0.5.0", path = "transports/websocket-websys" } +libp2p-webtransport-websys = { version = "0.5.0", path = "transports/webtransport-websys" } +libp2p-yamux = { version = "0.47.0", path = "muxers/yamux" } # External dependencies async-std-resolver = { version = "0.25.0-alpha.4", default-features = false } @@ -124,6 +122,7 @@ futures = "0.3.30" futures-bounded = { version = "0.2.4" } futures-rustls = { version = "0.26.0", default-features = false } getrandom = "0.2" +if-watch = "3.2.1" hickory-proto = { version = "0.25.0-alpha.4", default-features = false } hickory-resolver = { version = "0.25.0-alpha.4", default-features = false } multiaddr = "0.18.1" diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index 68b1f99cc2a..003120954e7 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.42.1 +## 0.43.0 - Added `libp2p::core::util::unreachable` that is a drop-in replacement of `void::unreachable`. See [PR 5676](https://github.com/libp2p/rust-libp2p/pull/5676). diff --git a/core/Cargo.toml b/core/Cargo.toml index 162800b96c2..df07375ef8b 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-core" edition = "2021" rust-version = { workspace = true } description = "Core traits and structs of libp2p" -version = "0.42.1" +version = "0.43.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/examples/stream/Cargo.toml b/examples/stream/Cargo.toml index ba31d4d9e13..03d7ea425e5 100644 --- a/examples/stream/Cargo.toml +++ b/examples/stream/Cargo.toml @@ -12,7 +12,7 @@ release = false anyhow = "1" futures = { workspace = true } libp2p = { path = "../../libp2p", features = [ "tokio", "quic"] } -libp2p-stream = { path = "../../protocols/stream", version = "0.2.0-alpha" } +libp2p-stream = { path = "../../protocols/stream", version = "0.3.0-alpha" } rand = "0.8" tokio = { workspace = true, features = ["full"] } tracing = { workspace = true } diff --git a/interop-tests/Dockerfile.chromium b/interop-tests/Dockerfile.chromium index 4ccb142b4a3..73a9ab82ee7 100644 --- a/interop-tests/Dockerfile.chromium +++ b/interop-tests/Dockerfile.chromium @@ -14,7 +14,7 @@ FROM chef AS builder COPY --from=planner /app/recipe.json recipe.json # Build dependencies - this is the caching Docker layer! RUN cargo chef cook --release --package interop-tests --target wasm32-unknown-unknown --recipe-path recipe.json -RUN RUSTFLAGS='-C target-feature=+crt-static' cargo chef cook --release --package interop-tests --target x86_64-unknown-linux-gnu --bin wasm_ping --recipe-path recipe.json +RUN cargo chef cook --release --package interop-tests --bin wasm_ping --recipe-path recipe.json # Build application COPY . . RUN wasm-pack build --target web interop-tests diff --git a/interop-tests/Dockerfile.native b/interop-tests/Dockerfile.native index f0b078d9492..fab50dc50ad 100644 --- a/interop-tests/Dockerfile.native +++ b/interop-tests/Dockerfile.native @@ -9,7 +9,7 @@ RUN cargo chef prepare --recipe-path recipe.json FROM chef AS builder COPY --from=planner /app/recipe.json recipe.json # Build dependencies - this is the caching Docker layer! -RUN RUSTFLAGS='-C target-feature=+crt-static' cargo chef cook --release --package interop-tests --target $(rustc -vV | grep host | awk '{print $2}') --bin native_ping --recipe-path recipe.json +RUN cargo chef cook --release --package interop-tests --bin native_ping --recipe-path recipe.json # Build application COPY . . RUN RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --package interop-tests --target $(rustc -vV | grep host | awk '{print $2}') --bin native_ping diff --git a/libp2p/CHANGELOG.md b/libp2p/CHANGELOG.md index 9e7194e2a69..91f1b5628f8 100644 --- a/libp2p/CHANGELOG.md +++ b/libp2p/CHANGELOG.md @@ -15,6 +15,15 @@ - Expose swarm builder phase errors. See [PR 5726](https://github.com/libp2p/rust-libp2p/pull/5726). +- Deprecate `ConnectionHandler::{InboundOpenInfo, OutboundOpenInfo}` associated type. + Previously, users could tag pending sub streams with custom data and retrieve the data + after the substream has been negotiated. + But substreams themselves are completely interchangeable, users should instead track + additional data inside `ConnectionHandler` after negotiation. + See [PR 5242](https://github.com/libp2p/rust-libp2p/pull/5242). + + + ## 0.54.1 - Update individual crates. diff --git a/misc/allow-block-list/CHANGELOG.md b/misc/allow-block-list/CHANGELOG.md index e7f68f6f8fe..be7619269d0 100644 --- a/misc/allow-block-list/CHANGELOG.md +++ b/misc/allow-block-list/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.4.1 +## 0.5.0 - Add getters & setters for the allowed/blocked peers. Return a `bool` for every "insert/remove" function, informing if a change was performed. @@ -6,6 +6,8 @@ - Deprecate `void` crate. See [PR 5676](https://github.com/libp2p/rust-libp2p/pull/5676). + + ## 0.4.0 diff --git a/misc/allow-block-list/Cargo.toml b/misc/allow-block-list/Cargo.toml index c169be87056..859380a68a5 100644 --- a/misc/allow-block-list/Cargo.toml +++ b/misc/allow-block-list/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-allow-block-list" edition = "2021" rust-version = { workspace = true } description = "Allow/block list connection management for libp2p." -version = "0.4.1" +version = "0.5.0" license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" keywords = ["peer-to-peer", "libp2p", "networking"] diff --git a/misc/connection-limits/CHANGELOG.md b/misc/connection-limits/CHANGELOG.md index f2722b3745a..a84ff4deb32 100644 --- a/misc/connection-limits/CHANGELOG.md +++ b/misc/connection-limits/CHANGELOG.md @@ -1,8 +1,10 @@ -## 0.4.1 +## 0.5.0 - Deprecate `void` crate. See [PR 5676](https://github.com/libp2p/rust-libp2p/pull/5676). + + ## 0.4.0 diff --git a/misc/connection-limits/Cargo.toml b/misc/connection-limits/Cargo.toml index a0ecfd9da39..21e53ff385c 100644 --- a/misc/connection-limits/Cargo.toml +++ b/misc/connection-limits/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-connection-limits" edition = "2021" rust-version = { workspace = true } description = "Connection limits for libp2p." -version = "0.4.1" +version = "0.5.0" license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" keywords = ["peer-to-peer", "libp2p", "networking"] diff --git a/misc/memory-connection-limits/CHANGELOG.md b/misc/memory-connection-limits/CHANGELOG.md index bf198e27c65..ed16fa37eb3 100644 --- a/misc/memory-connection-limits/CHANGELOG.md +++ b/misc/memory-connection-limits/CHANGELOG.md @@ -1,8 +1,10 @@ -## 0.3.1 +## 0.4.0 - Deprecate `void` crate. See [PR 5676](https://github.com/libp2p/rust-libp2p/pull/5676). + + ## 0.3.0 diff --git a/misc/memory-connection-limits/Cargo.toml b/misc/memory-connection-limits/Cargo.toml index 2d04b6cf2ac..3a4dd469ddf 100644 --- a/misc/memory-connection-limits/Cargo.toml +++ b/misc/memory-connection-limits/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-memory-connection-limits" edition = "2021" rust-version = { workspace = true } description = "Memory usage based connection limits for libp2p." -version = "0.3.1" +version = "0.4.0" license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" keywords = ["peer-to-peer", "libp2p", "networking"] diff --git a/misc/metrics/CHANGELOG.md b/misc/metrics/CHANGELOG.md index bd109c42811..fa57d50fa7a 100644 --- a/misc/metrics/CHANGELOG.md +++ b/misc/metrics/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.16.0 + + + ## 0.15.0 - Use `web-time` instead of `instant`. See [PR 5347](https://github.com/libp2p/rust-libp2p/pull/5347). diff --git a/misc/metrics/Cargo.toml b/misc/metrics/Cargo.toml index 0b7a3c93b2f..97cc581c671 100644 --- a/misc/metrics/Cargo.toml +++ b/misc/metrics/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-metrics" edition = "2021" rust-version = { workspace = true } description = "Metrics for libp2p" -version = "0.15.0" +version = "0.16.0" authors = ["Max Inden "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/misc/multistream-select/Cargo.toml b/misc/multistream-select/Cargo.toml index 66ab434b613..d11ad4e2709 100644 --- a/misc/multistream-select/Cargo.toml +++ b/misc/multistream-select/Cargo.toml @@ -23,7 +23,7 @@ async-std = { version = "1.6.2", features = ["attributes"] } futures_ringbuf = "0.4.0" quickcheck = { workspace = true } rw-stream-sink = { workspace = true } -libp2p-test-utils = { workspace = true } +tracing-subscriber = { workspace = true, features = ["env-filter"] } # Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling diff --git a/misc/multistream-select/src/dialer_select.rs b/misc/multistream-select/src/dialer_select.rs index bd537e7fc7b..1d13e94910d 100644 --- a/misc/multistream-select/src/dialer_select.rs +++ b/misc/multistream-select/src/dialer_select.rs @@ -214,9 +214,9 @@ mod tests { future::timeout, net::{TcpListener, TcpStream}, }; - use libp2p_test_utils::EnvFilter; use quickcheck::{Arbitrary, Gen, GenRange}; use tracing::metadata::LevelFilter; + use tracing_subscriber::EnvFilter; use super::*; use crate::listener_select_proto; @@ -275,11 +275,13 @@ mod tests { ListenerProtos(listen_protos): ListenerProtos, DialPayload(dial_payload): DialPayload, ) { - libp2p_test_utils::with_env_filter( - EnvFilter::builder() - .with_default_directive(LevelFilter::DEBUG.into()) - .from_env_lossy(), - ); + let _ = tracing_subscriber::fmt() + .with_env_filter( + EnvFilter::builder() + .with_default_directive(LevelFilter::DEBUG.into()) + .from_env_lossy(), + ) + .try_init(); async_std::task::block_on(async move { let listener = TcpListener::bind("0.0.0.0:0").await.unwrap(); diff --git a/misc/test-utils/CHANGELOG.md b/misc/test-utils/CHANGELOG.md deleted file mode 100644 index 0b8ed3ab931..00000000000 --- a/misc/test-utils/CHANGELOG.md +++ /dev/null @@ -1,4 +0,0 @@ -## 0.1.0 - -- Introduce 'test-utils` crate. - See [PR 5725](https://github.com/libp2p/rust-libp2p/pull/5725). \ No newline at end of file diff --git a/misc/test-utils/Cargo.toml b/misc/test-utils/Cargo.toml deleted file mode 100644 index 438bcabcf2a..00000000000 --- a/misc/test-utils/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "libp2p-test-utils" -version = "0.1.0" -edition = "2021" -authors = ["Krishang Shah "] -license = "MIT" -repository = "https://github.com/libp2p/rust-libp2p" -publish = false - -[package.metadata.release] -release = false - -[dependencies] -tracing-subscriber = { workspace = true, features = ["env-filter"] } - -[lints] -workspace = true diff --git a/misc/test-utils/src/lib.rs b/misc/test-utils/src/lib.rs deleted file mode 100644 index 1155c79b614..00000000000 --- a/misc/test-utils/src/lib.rs +++ /dev/null @@ -1,15 +0,0 @@ -pub use tracing_subscriber::EnvFilter; - -/// Initializes logging with the default environment filter (`RUST_LOG`). -pub fn with_default_env_filter() { - with_env_filter(EnvFilter::from_default_env()); -} - -/// Initializes logging with a custom environment filter. -/// Logs are written to standard error (`stderr`). -pub fn with_env_filter(filter: impl Into) { - let _ = tracing_subscriber::fmt() - .with_env_filter(filter) - .with_writer(std::io::stderr) - .try_init(); -} diff --git a/misc/webrtc-utils/CHANGELOG.md b/misc/webrtc-utils/CHANGELOG.md index 3bb31610fa1..992f8354bba 100644 --- a/misc/webrtc-utils/CHANGELOG.md +++ b/misc/webrtc-utils/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.0 + + + ## 0.3.0 diff --git a/misc/webrtc-utils/Cargo.toml b/misc/webrtc-utils/Cargo.toml index 2c50a2f8ab7..bfcad64d08f 100644 --- a/misc/webrtc-utils/Cargo.toml +++ b/misc/webrtc-utils/Cargo.toml @@ -7,7 +7,7 @@ license = "MIT" name = "libp2p-webrtc-utils" repository = "https://github.com/libp2p/rust-libp2p" rust-version = { workspace = true } -version = "0.3.0" +version = "0.4.0" publish = true [dependencies] diff --git a/muxers/mplex/CHANGELOG.md b/muxers/mplex/CHANGELOG.md index f0c2c0353da..651a4d6182e 100644 --- a/muxers/mplex/CHANGELOG.md +++ b/muxers/mplex/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.43.0 + + + ## 0.42.0 diff --git a/muxers/mplex/Cargo.toml b/muxers/mplex/Cargo.toml index 78650218f4b..2bd6a49bbc8 100644 --- a/muxers/mplex/Cargo.toml +++ b/muxers/mplex/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-mplex" edition = "2021" rust-version = { workspace = true } description = "Mplex multiplexing protocol for libp2p" -version = "0.42.0" +version = "0.43.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" @@ -32,7 +32,7 @@ libp2p-muxer-test-harness = { path = "../test-harness" } libp2p-plaintext = { workspace = true } libp2p-tcp = { workspace = true, features = ["async-io"] } quickcheck = { workspace = true } -libp2p-test-utils = { workspace = true } +tracing-subscriber = { workspace = true, features = ["env-filter"] } [[bench]] name = "split_send_size" diff --git a/muxers/mplex/benches/split_send_size.rs b/muxers/mplex/benches/split_send_size.rs index 7a0e9780ca7..b0dd4babff7 100644 --- a/muxers/mplex/benches/split_send_size.rs +++ b/muxers/mplex/benches/split_send_size.rs @@ -38,6 +38,7 @@ use libp2p_identity as identity; use libp2p_identity::PeerId; use libp2p_mplex as mplex; use libp2p_plaintext as plaintext; +use tracing_subscriber::EnvFilter; type BenchTransport = transport::Boxed<(PeerId, muxing::StreamMuxerBox)>; @@ -54,7 +55,9 @@ const BENCH_SIZES: [usize; 8] = [ ]; fn prepare(c: &mut Criterion) { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let payload: Vec = vec![1; 1024 * 1024]; diff --git a/muxers/mplex/src/io.rs b/muxers/mplex/src/io.rs index eeea4ce734f..ac93fd3865e 100644 --- a/muxers/mplex/src/io.rs +++ b/muxers/mplex/src/io.rs @@ -1231,7 +1231,10 @@ mod tests { #[test] fn max_buffer_behaviour() { - libp2p_test_utils::with_default_env_filter(); + use tracing_subscriber::EnvFilter; + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); fn prop(cfg: MplexConfig, overflow: NonZeroU8) { let mut r_buf = BytesMut::new(); @@ -1366,7 +1369,10 @@ mod tests { #[test] fn close_on_error() { - libp2p_test_utils::with_default_env_filter(); + use tracing_subscriber::EnvFilter; + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); fn prop(cfg: MplexConfig, num_streams: NonZeroU8) { let num_streams = cmp::min(cfg.max_substreams, num_streams.get() as usize); diff --git a/muxers/yamux/CHANGELOG.md b/muxers/yamux/CHANGELOG.md index 855b3a33773..ace4c864f63 100644 --- a/muxers/yamux/CHANGELOG.md +++ b/muxers/yamux/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.47.0 + + + ## 0.46.0 diff --git a/muxers/yamux/Cargo.toml b/muxers/yamux/Cargo.toml index cd3f8347bd0..98beb55982c 100644 --- a/muxers/yamux/Cargo.toml +++ b/muxers/yamux/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-yamux" edition = "2021" rust-version = { workspace = true } description = "Yamux multiplexing protocol for libp2p" -version = "0.46.0" +version = "0.47.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/autonat/CHANGELOG.md b/protocols/autonat/CHANGELOG.md index 75a40b8c5ad..e80dc4df437 100644 --- a/protocols/autonat/CHANGELOG.md +++ b/protocols/autonat/CHANGELOG.md @@ -1,10 +1,12 @@ -## 0.13.1 +## 0.14.0 - Verify that an incoming AutoNAT dial comes from a connected peer. See [PR 5597](https://github.com/libp2p/rust-libp2p/pull/5597). - Deprecate `void` crate. See [PR 5676](https://github.com/libp2p/rust-libp2p/pull/5676). - Update to `libp2p-request-response` `v0.28.0`. + + ## 0.13.0 - Due to the refactor of `Transport` it's no longer required to create a seperate transport for diff --git a/protocols/autonat/Cargo.toml b/protocols/autonat/Cargo.toml index 8ad4492fbff..f614db56eb1 100644 --- a/protocols/autonat/Cargo.toml +++ b/protocols/autonat/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-autonat" edition = "2021" rust-version = { workspace = true } description = "NAT and firewall detection for libp2p" -version = "0.13.1" +version = "0.14.0" authors = [ "David Craven ", "Elena Frank ", @@ -37,7 +37,7 @@ thiserror = { workspace = true, optional = true } [dev-dependencies] tokio = { workspace = true, features = ["macros", "rt", "sync"] } libp2p-swarm-test = { path = "../../swarm-test" } -libp2p-test-utils = { workspace = true } +tracing-subscriber = { version = "0.3", features = ["env-filter"] } libp2p-identify = { workspace = true } libp2p-swarm = { workspace = true, features = ["macros"] } diff --git a/protocols/autonat/tests/autonatv2.rs b/protocols/autonat/tests/autonatv2.rs index 1e278f5554f..49866a9adb5 100644 --- a/protocols/autonat/tests/autonatv2.rs +++ b/protocols/autonat/tests/autonatv2.rs @@ -11,10 +11,13 @@ use libp2p_swarm::{ use libp2p_swarm_test::SwarmExt; use rand_core::OsRng; use tokio::sync::oneshot; +use tracing_subscriber::EnvFilter; #[tokio::test] async fn confirm_successful() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let (mut alice, mut bob) = start_and_connect().await; let cor_server_peer = *alice.local_peer_id(); @@ -125,7 +128,9 @@ async fn confirm_successful() { #[tokio::test] async fn dial_back_to_unsupported_protocol() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let (mut alice, mut bob) = bootstrap().await; let alice_peer_id = *alice.local_peer_id(); @@ -221,7 +226,9 @@ async fn dial_back_to_unsupported_protocol() { #[tokio::test] async fn dial_back_to_non_libp2p() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let (mut alice, mut bob) = bootstrap().await; let alice_peer_id = *alice.local_peer_id(); @@ -307,7 +314,9 @@ async fn dial_back_to_non_libp2p() { #[tokio::test] async fn dial_back_to_not_supporting() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let (mut alice, mut bob) = bootstrap().await; let alice_peer_id = *alice.local_peer_id(); diff --git a/protocols/dcutr/CHANGELOG.md b/protocols/dcutr/CHANGELOG.md index 80cac37321e..7fb02fabcbd 100644 --- a/protocols/dcutr/CHANGELOG.md +++ b/protocols/dcutr/CHANGELOG.md @@ -1,8 +1,10 @@ -## 0.12.1 +## 0.13.0 - Deprecate `void` crate. See [PR 5676](https://github.com/libp2p/rust-libp2p/pull/5676). + + ## 0.12.0 diff --git a/protocols/dcutr/Cargo.toml b/protocols/dcutr/Cargo.toml index 7bc05671aa2..be02e890e7a 100644 --- a/protocols/dcutr/Cargo.toml +++ b/protocols/dcutr/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-dcutr" edition = "2021" rust-version = { workspace = true } description = "Direct connection upgrade through relay" -version = "0.12.1" +version = "0.13.0" authors = ["Max Inden "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" @@ -34,7 +34,7 @@ libp2p-swarm = { workspace = true, features = ["macros"] } libp2p-swarm-test = { path = "../../swarm-test" } libp2p-tcp = { workspace = true, features = ["async-io"] } libp2p-yamux = { workspace = true } -libp2p-test-utils = { workspace = true } +tracing-subscriber = { workspace = true, features = ["env-filter"] } tokio = { workspace = true, features = ["rt", "macros"] } # Passing arguments to the docsrs builder in order to properly document cfg's. diff --git a/protocols/dcutr/tests/lib.rs b/protocols/dcutr/tests/lib.rs index ce7119cebcf..a35c9a50cfe 100644 --- a/protocols/dcutr/tests/lib.rs +++ b/protocols/dcutr/tests/lib.rs @@ -32,10 +32,13 @@ use libp2p_plaintext as plaintext; use libp2p_relay as relay; use libp2p_swarm::{Config, NetworkBehaviour, Swarm, SwarmEvent}; use libp2p_swarm_test::SwarmExt as _; +use tracing_subscriber::EnvFilter; #[tokio::test] async fn connect() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut relay = build_relay(); let mut dst = build_client(); diff --git a/protocols/floodsub/CHANGELOG.md b/protocols/floodsub/CHANGELOG.md index 4192e0ea58d..65e1ee8251a 100644 --- a/protocols/floodsub/CHANGELOG.md +++ b/protocols/floodsub/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.46.0 + + + ## 0.45.0 diff --git a/protocols/floodsub/Cargo.toml b/protocols/floodsub/Cargo.toml index dcfde6383cc..15652bd46c0 100644 --- a/protocols/floodsub/Cargo.toml +++ b/protocols/floodsub/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-floodsub" edition = "2021" rust-version = { workspace = true } description = "Floodsub protocol for libp2p" -version = "0.45.0" +version = "0.46.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/gossipsub/CHANGELOG.md b/protocols/gossipsub/CHANGELOG.md index 94b9b922973..10a225a92fd 100644 --- a/protocols/gossipsub/CHANGELOG.md +++ b/protocols/gossipsub/CHANGELOG.md @@ -38,6 +38,8 @@ - Fixe an issue where an `InsufficientPeers` error could occur under certain conditions, despite having peers subscribed to a topic. See [PR 5793](https://github.com/libp2p/rust-libp2p/pull/5793). + + ## 0.47.0 diff --git a/protocols/gossipsub/Cargo.toml b/protocols/gossipsub/Cargo.toml index 328d4367204..0262348429e 100644 --- a/protocols/gossipsub/Cargo.toml +++ b/protocols/gossipsub/Cargo.toml @@ -45,7 +45,7 @@ prometheus-client = { workspace = true } libp2p-core = { workspace = true } libp2p-swarm-test = { path = "../../swarm-test" } quickcheck = { workspace = true } -libp2p-test-utils = { workspace = true } +tracing-subscriber = { workspace = true, features = ["env-filter"] } tokio = { workspace = true, features = ["rt", "rt-multi-thread", "time", "macros"] } # Passing arguments to the docsrs builder in order to properly document cfg's. diff --git a/protocols/gossipsub/src/behaviour.rs b/protocols/gossipsub/src/behaviour.rs index 356f1d6cd77..b803337462d 100644 --- a/protocols/gossipsub/src/behaviour.rs +++ b/protocols/gossipsub/src/behaviour.rs @@ -1684,7 +1684,8 @@ where ); self.handle_invalid_message( propagation_source, - raw_message, + &raw_message.topic, + Some(msg_id), RejectReason::BlackListedSource, ); return false; @@ -1713,7 +1714,12 @@ where source=%propagation_source, "Dropping message claiming to be from self but forwarded from source" ); - self.handle_invalid_message(propagation_source, raw_message, RejectReason::SelfOrigin); + self.handle_invalid_message( + propagation_source, + &raw_message.topic, + Some(msg_id), + RejectReason::SelfOrigin, + ); return false; } @@ -1741,7 +1747,8 @@ where // Reject the message and return self.handle_invalid_message( propagation_source, - &raw_message, + &raw_message.topic, + None, RejectReason::ValidationError(ValidationError::TransformFailed), ); return; @@ -1827,42 +1834,29 @@ where fn handle_invalid_message( &mut self, propagation_source: &PeerId, - raw_message: &RawMessage, + topic_hash: &TopicHash, + message_id: Option<&MessageId>, reject_reason: RejectReason, ) { if let Some(metrics) = self.metrics.as_mut() { - metrics.register_invalid_message(&raw_message.topic); + metrics.register_invalid_message(topic_hash); } - - let message = self.data_transform.inbound_transform(raw_message.clone()); - - match (&mut self.peer_score, message) { - (Some((peer_score, ..)), Ok(message)) => { - let message_id = self.config.message_id(&message); - - peer_score.reject_message( - propagation_source, - &message_id, - &message.topic, - reject_reason, - ); - - self.gossip_promises - .reject_message(&message_id, &reject_reason); - } - (Some((peer_score, ..)), Err(_)) => { + if let Some(msg_id) = message_id { + // Valid transformation without peer scoring + self.gossip_promises.reject_message(msg_id, &reject_reason); + } + if let Some((peer_score, ..)) = &mut self.peer_score { + // The compiler will optimize this pattern-matching + if let Some(msg_id) = message_id { + // The message itself is valid, but is from a banned peer or + // claiming to be self-origin but is actually forwarded from other peers. + peer_score.reject_message(propagation_source, msg_id, topic_hash, reject_reason); + } else { // The message is invalid, we reject it ignoring any gossip promises. If a peer is // advertising this message via an IHAVE and it's invalid it will be double // penalized, one for sending us an invalid and again for breaking a promise. - peer_score.reject_invalid_message(propagation_source, &raw_message.topic); - } - (None, Ok(message)) => { - // Valid transformation without peer scoring - let message_id = self.config.message_id(&message); - self.gossip_promises - .reject_message(&message_id, &reject_reason); + peer_score.reject_invalid_message(propagation_source, topic_hash); } - (None, Err(_)) => {} } } @@ -3231,7 +3225,8 @@ where for (raw_message, validation_error) in invalid_messages { self.handle_invalid_message( &propagation_source, - &raw_message, + &raw_message.topic, + None, RejectReason::ValidationError(validation_error), ) } diff --git a/protocols/gossipsub/src/behaviour/tests.rs b/protocols/gossipsub/src/behaviour/tests.rs index bed74ecdce7..c79ed7f4cf9 100644 --- a/protocols/gossipsub/src/behaviour/tests.rs +++ b/protocols/gossipsub/src/behaviour/tests.rs @@ -4766,7 +4766,10 @@ fn test_limit_number_of_message_ids_inside_ihave() { #[test] fn test_iwant_penalties() { - libp2p_test_utils::with_default_env_filter(); + // use tracing_subscriber::EnvFilter; + // let _ = tracing_subscriber::fmt() + // .with_env_filter(EnvFilter::from_default_env()) + // .try_init(); let config = ConfigBuilder::default() .iwant_followup_time(Duration::from_secs(4)) .build() diff --git a/protocols/gossipsub/tests/smoke.rs b/protocols/gossipsub/tests/smoke.rs index d5fec2c1985..85038665b4d 100644 --- a/protocols/gossipsub/tests/smoke.rs +++ b/protocols/gossipsub/tests/smoke.rs @@ -31,6 +31,7 @@ use libp2p_swarm_test::SwarmExt as _; use quickcheck::{QuickCheck, TestResult}; use rand::{seq::SliceRandom, SeedableRng}; use tokio::{runtime::Runtime, time}; +use tracing_subscriber::EnvFilter; struct Graph { nodes: SelectAll>, @@ -131,7 +132,9 @@ async fn build_node() -> Swarm { #[test] fn multi_hop_propagation() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); fn prop(num_nodes: u8, seed: u64) -> TestResult { if !(2..=50).contains(&num_nodes) { diff --git a/protocols/identify/CHANGELOG.md b/protocols/identify/CHANGELOG.md index 66c839dfa98..708490db3fe 100644 --- a/protocols/identify/CHANGELOG.md +++ b/protocols/identify/CHANGELOG.md @@ -7,6 +7,8 @@ - Discard `Info`s received from remote peers that contain a public key that doesn't match their peer ID. See [PR 5707](https://github.com/libp2p/rust-libp2p/pull/5707). + + ## 0.45.0 - Address translation is moved here from `libp2p-core`. diff --git a/protocols/identify/Cargo.toml b/protocols/identify/Cargo.toml index 9c4f8ea3707..2fb2eaed1ba 100644 --- a/protocols/identify/Cargo.toml +++ b/protocols/identify/Cargo.toml @@ -29,7 +29,7 @@ either = "1.12.0" async-std = { version = "1.6.2", features = ["attributes"] } libp2p-swarm-test = { path = "../../swarm-test" } libp2p-swarm = { workspace = true, features = ["macros"] } -libp2p-test-utils = { workspace = true } +tracing-subscriber = { workspace = true, features = ["env-filter"] } # Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling diff --git a/protocols/identify/tests/smoke.rs b/protocols/identify/tests/smoke.rs index a152bd75b19..0d2818df0a4 100644 --- a/protocols/identify/tests/smoke.rs +++ b/protocols/identify/tests/smoke.rs @@ -9,10 +9,13 @@ use libp2p_identify as identify; use libp2p_identity::Keypair; use libp2p_swarm::{Swarm, SwarmEvent}; use libp2p_swarm_test::SwarmExt; +use tracing_subscriber::EnvFilter; #[async_std::test] async fn periodic_identify() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut swarm1 = Swarm::new_ephemeral(|identity| { identify::Behaviour::new( @@ -81,7 +84,9 @@ async fn periodic_identify() { } #[async_std::test] async fn only_emits_address_candidate_once_per_connection() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut swarm1 = Swarm::new_ephemeral(|identity| { identify::Behaviour::new( @@ -151,7 +156,9 @@ async fn only_emits_address_candidate_once_per_connection() { #[async_std::test] async fn emits_unique_listen_addresses() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut swarm1 = Swarm::new_ephemeral(|identity| { identify::Behaviour::new( @@ -221,7 +228,9 @@ async fn emits_unique_listen_addresses() { #[async_std::test] async fn hides_listen_addresses() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut swarm1 = Swarm::new_ephemeral(|identity| { identify::Behaviour::new( @@ -290,7 +299,9 @@ async fn hides_listen_addresses() { #[async_std::test] async fn identify_push() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut swarm1 = Swarm::new_ephemeral(|identity| { identify::Behaviour::new(identify::Config::new("a".to_string(), identity.public())) @@ -340,7 +351,9 @@ async fn identify_push() { #[async_std::test] async fn discover_peer_after_disconnect() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut swarm1 = Swarm::new_ephemeral(|identity| { identify::Behaviour::new(identify::Config::new("a".to_string(), identity.public())) @@ -391,7 +404,9 @@ async fn discover_peer_after_disconnect() { #[async_std::test] async fn configured_interval_starts_after_first_identify() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let identify_interval = Duration::from_secs(5); @@ -429,7 +444,9 @@ async fn configured_interval_starts_after_first_identify() { #[async_std::test] async fn reject_mismatched_public_key() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut honest_swarm = Swarm::new_ephemeral(|identity| { identify::Behaviour::new( diff --git a/protocols/kad/CHANGELOG.md b/protocols/kad/CHANGELOG.md index 0c6e460afcd..57e7d6dabef 100644 --- a/protocols/kad/CHANGELOG.md +++ b/protocols/kad/CHANGELOG.md @@ -15,6 +15,8 @@ - Remove deprecated default constructor for `ProtocolConfig`. See [PR 5774](https://github.com/libp2p/rust-libp2p/pull/5774). + + ## 0.46.2 - Emit `ToSwarm::NewExternalAddrOfPeer`. diff --git a/protocols/kad/Cargo.toml b/protocols/kad/Cargo.toml index 757c0aed189..0e4fb608d15 100644 --- a/protocols/kad/Cargo.toml +++ b/protocols/kad/Cargo.toml @@ -41,7 +41,7 @@ libp2p-swarm = { path = "../../swarm", features = ["macros"] } libp2p-swarm-test = { path = "../../swarm-test" } libp2p-yamux = { workspace = true } quickcheck = { workspace = true } -libp2p-test-utils = { workspace = true } +tracing-subscriber = { workspace = true, features = ["env-filter"] } [features] serde = ["dep:serde", "bytes/serde"] diff --git a/protocols/kad/src/behaviour/test.rs b/protocols/kad/src/behaviour/test.rs index ab8c980c30c..467865dd225 100644 --- a/protocols/kad/src/behaviour/test.rs +++ b/protocols/kad/src/behaviour/test.rs @@ -323,7 +323,9 @@ fn query_iter() { #[test] fn unresponsive_not_returned_direct() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(tracing_subscriber::EnvFilter::from_default_env()) + .try_init(); // Build one node. It contains fake addresses to non-existing nodes. We ask it to find a // random peer. We make sure that no fake address is returned. diff --git a/protocols/kad/src/handler.rs b/protocols/kad/src/handler.rs index b848cf94410..a3bb19447cb 100644 --- a/protocols/kad/src/handler.rs +++ b/protocols/kad/src/handler.rs @@ -1057,6 +1057,7 @@ fn process_kad_response(event: KadResponseMsg, query_id: QueryId) -> HandlerEven #[cfg(test)] mod tests { use quickcheck::{Arbitrary, Gen}; + use tracing_subscriber::EnvFilter; use super::*; @@ -1071,7 +1072,9 @@ mod tests { #[test] fn compute_next_protocol_status_test() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); fn prop(now_supported: bool, current: Option) { let new = compute_new_protocol_status(now_supported, current); diff --git a/protocols/kad/tests/client_mode.rs b/protocols/kad/tests/client_mode.rs index 09e24c6f6ea..3275c525890 100644 --- a/protocols/kad/tests/client_mode.rs +++ b/protocols/kad/tests/client_mode.rs @@ -3,12 +3,15 @@ use libp2p_identity as identity; use libp2p_kad::{store::MemoryStore, Behaviour, Config, Event, Mode}; use libp2p_swarm::{Swarm, SwarmEvent}; use libp2p_swarm_test::SwarmExt; +use tracing_subscriber::EnvFilter; use Event::*; use MyBehaviourEvent::*; #[async_std::test] async fn server_gets_added_to_routing_table_by_client() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut client = Swarm::new_ephemeral(MyBehaviour::new); let mut server = Swarm::new_ephemeral(MyBehaviour::new); @@ -38,7 +41,9 @@ async fn server_gets_added_to_routing_table_by_client() { #[async_std::test] async fn two_servers_add_each_other_to_routing_table() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut server1 = Swarm::new_ephemeral(MyBehaviour::new); let mut server2 = Swarm::new_ephemeral(MyBehaviour::new); @@ -77,7 +82,9 @@ async fn two_servers_add_each_other_to_routing_table() { #[async_std::test] async fn adding_an_external_addresses_activates_server_mode_on_existing_connections() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut client = Swarm::new_ephemeral(MyBehaviour::new); let mut server = Swarm::new_ephemeral(MyBehaviour::new); @@ -113,7 +120,9 @@ async fn adding_an_external_addresses_activates_server_mode_on_existing_connecti #[async_std::test] async fn set_client_to_server_mode() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut client = Swarm::new_ephemeral(MyBehaviour::new); client.behaviour_mut().kad.set_mode(Some(Mode::Client)); diff --git a/protocols/mdns/CHANGELOG.md b/protocols/mdns/CHANGELOG.md index 45a479bf4af..32b9359809d 100644 --- a/protocols/mdns/CHANGELOG.md +++ b/protocols/mdns/CHANGELOG.md @@ -1,10 +1,12 @@ -## 0.46.1 +## 0.47.0 - Emit `ToSwarm::NewExternalAddrOfPeer` on discovery. See [PR 5753](https://github.com/libp2p/rust-libp2p/pull/5753) - Upgrade `hickory-proto`. See [PR 5727](https://github.com/libp2p/rust-libp2p/pull/5727) + + ## 0.46.0 diff --git a/protocols/mdns/Cargo.toml b/protocols/mdns/Cargo.toml index ba86a82d5bb..e6b3131c412 100644 --- a/protocols/mdns/Cargo.toml +++ b/protocols/mdns/Cargo.toml @@ -2,7 +2,7 @@ name = "libp2p-mdns" edition = "2021" rust-version = { workspace = true } -version = "0.46.1" +version = "0.47.0" description = "Implementation of the libp2p mDNS discovery method" authors = ["Parity Technologies "] license = "MIT" @@ -14,7 +14,7 @@ categories = ["network-programming", "asynchronous"] async-std = { version = "1.12.0", optional = true } async-io = { version = "2.3.3", optional = true } futures = { workspace = true } -if-watch = "3.2.0" +if-watch = { workspace = true } libp2p-core = { workspace = true } libp2p-swarm = { workspace = true } libp2p-identity = { workspace = true } @@ -34,7 +34,7 @@ async-std = { version = "1.9.0", features = ["attributes"] } libp2p-swarm = { workspace = true, features = ["tokio", "async-std"] } tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread", "time"] } libp2p-swarm-test = { path = "../../swarm-test" } -libp2p-test-utils = { workspace = true } +tracing-subscriber = { workspace = true, features = ["env-filter"] } [[test]] name = "use-async-std" diff --git a/protocols/mdns/tests/use-async-std.rs b/protocols/mdns/tests/use-async-std.rs index 9ee2b7659ea..df08b39af07 100644 --- a/protocols/mdns/tests/use-async-std.rs +++ b/protocols/mdns/tests/use-async-std.rs @@ -24,17 +24,22 @@ use futures::future::Either; use libp2p_mdns::{async_io::Behaviour, Config, Event}; use libp2p_swarm::{Swarm, SwarmEvent}; use libp2p_swarm_test::SwarmExt as _; +use tracing_subscriber::EnvFilter; #[async_std::test] async fn test_discovery_async_std_ipv4() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); run_discovery_test(Config::default()).await } #[async_std::test] async fn test_discovery_async_std_ipv6() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let config = Config { enable_ipv6: true, @@ -45,7 +50,9 @@ async fn test_discovery_async_std_ipv6() { #[async_std::test] async fn test_expired_async_std() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let config = Config { ttl: Duration::from_secs(1), @@ -78,7 +85,9 @@ async fn test_expired_async_std() { #[async_std::test] async fn test_no_expiration_on_close_async_std() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let config = Config { ttl: Duration::from_secs(120), query_interval: Duration::from_secs(10), diff --git a/protocols/mdns/tests/use-tokio.rs b/protocols/mdns/tests/use-tokio.rs index a48f84217a3..0ec90a52b90 100644 --- a/protocols/mdns/tests/use-tokio.rs +++ b/protocols/mdns/tests/use-tokio.rs @@ -23,17 +23,22 @@ use futures::future::Either; use libp2p_mdns::{tokio::Behaviour, Config, Event}; use libp2p_swarm::{Swarm, SwarmEvent}; use libp2p_swarm_test::SwarmExt as _; +use tracing_subscriber::EnvFilter; #[tokio::test] async fn test_discovery_tokio_ipv4() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); run_discovery_test(Config::default()).await } #[tokio::test] async fn test_discovery_tokio_ipv6() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let config = Config { enable_ipv6: true, @@ -44,7 +49,9 @@ async fn test_discovery_tokio_ipv6() { #[tokio::test] async fn test_expired_tokio() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let config = Config { ttl: Duration::from_secs(1), diff --git a/protocols/perf/CHANGELOG.md b/protocols/perf/CHANGELOG.md index c5eda88d97d..52318bbeb28 100644 --- a/protocols/perf/CHANGELOG.md +++ b/protocols/perf/CHANGELOG.md @@ -7,6 +7,8 @@ - Deprecate `void` crate. See [PR 5676](https://github.com/libp2p/rust-libp2p/pull/5676). + + ## 0.3.1 - Use `web-time` instead of `instant`. See [PR 5347](https://github.com/libp2p/rust-libp2p/pull/5347). diff --git a/protocols/perf/Cargo.toml b/protocols/perf/Cargo.toml index 0b994447525..645abc9bcfb 100644 --- a/protocols/perf/Cargo.toml +++ b/protocols/perf/Cargo.toml @@ -29,7 +29,6 @@ serde_json = "1.0" thiserror = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true, features = ["env-filter"] } -libp2p-test-utils = { workspace = true } tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread"] } [dev-dependencies] diff --git a/protocols/perf/tests/lib.rs b/protocols/perf/tests/lib.rs index c265b0e2e61..017d475befd 100644 --- a/protocols/perf/tests/lib.rs +++ b/protocols/perf/tests/lib.rs @@ -24,10 +24,13 @@ use libp2p_perf::{ }; use libp2p_swarm::{Swarm, SwarmEvent}; use libp2p_swarm_test::SwarmExt; +use tracing_subscriber::EnvFilter; #[tokio::test] async fn perf() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut server = Swarm::new_ephemeral(|_| server::Behaviour::new()); let server_peer_id = *server.local_peer_id(); diff --git a/protocols/ping/CHANGELOG.md b/protocols/ping/CHANGELOG.md index d6e71b2c2d0..eb283fab625 100644 --- a/protocols/ping/CHANGELOG.md +++ b/protocols/ping/CHANGELOG.md @@ -1,8 +1,10 @@ -## 0.45.1 +## 0.46.0 - Deprecate `void` crate. See [PR 5676](https://github.com/libp2p/rust-libp2p/pull/5676). + + ## 0.45.0 diff --git a/protocols/ping/Cargo.toml b/protocols/ping/Cargo.toml index 83f3b6460c9..7f4d0e30983 100644 --- a/protocols/ping/Cargo.toml +++ b/protocols/ping/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-ping" edition = "2021" rust-version = { workspace = true } description = "Ping protocol for libp2p" -version = "0.45.1" +version = "0.46.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/relay/CHANGELOG.md b/protocols/relay/CHANGELOG.md index 8119c24a491..e60dcfb7596 100644 --- a/protocols/relay/CHANGELOG.md +++ b/protocols/relay/CHANGELOG.md @@ -1,8 +1,10 @@ -## 0.18.1 +## 0.19.0 - Deprecate `void` crate. See [PR 5676](https://github.com/libp2p/rust-libp2p/pull/5676). + + ## 0.18.0 diff --git a/protocols/relay/Cargo.toml b/protocols/relay/Cargo.toml index e7e447e7d16..23715fc86de 100644 --- a/protocols/relay/Cargo.toml +++ b/protocols/relay/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-relay" edition = "2021" rust-version = { workspace = true } description = "Communications relaying for libp2p" -version = "0.18.1" +version = "0.19.0" authors = ["Parity Technologies ", "Max Inden "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" @@ -36,7 +36,8 @@ libp2p-swarm = { workspace = true, features = ["macros", "async-std"] } libp2p-swarm-test = { workspace = true } libp2p-yamux = { workspace = true } quickcheck = { workspace = true } -libp2p-test-utils = { workspace = true } +tracing-subscriber = { workspace = true, features = ["env-filter"] } + # Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling diff --git a/protocols/relay/tests/lib.rs b/protocols/relay/tests/lib.rs index da6f549c091..3181e60db74 100644 --- a/protocols/relay/tests/lib.rs +++ b/protocols/relay/tests/lib.rs @@ -40,10 +40,13 @@ use libp2p_plaintext as plaintext; use libp2p_relay as relay; use libp2p_swarm::{dial_opts::DialOpts, Config, DialError, NetworkBehaviour, Swarm, SwarmEvent}; use libp2p_swarm_test::SwarmExt; +use tracing_subscriber::EnvFilter; #[test] fn reservation() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut pool = LocalPool::new(); let relay_addr = Multiaddr::empty().with(Protocol::Memory(rand::random::())); @@ -84,7 +87,9 @@ fn reservation() { #[test] fn new_reservation_to_same_relay_replaces_old() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut pool = LocalPool::new(); let relay_addr = Multiaddr::empty().with(Protocol::Memory(rand::random::())); @@ -181,7 +186,9 @@ fn new_reservation_to_same_relay_replaces_old() { #[test] fn connect() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut pool = LocalPool::new(); let relay_addr = Multiaddr::empty().with(Protocol::Memory(rand::random::())); @@ -265,7 +272,9 @@ async fn connection_established_to( #[test] fn handle_dial_failure() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut pool = LocalPool::new(); let relay_addr = Multiaddr::empty().with(Protocol::Memory(rand::random::())); @@ -284,7 +293,9 @@ fn handle_dial_failure() { #[test] fn propagate_reservation_error_to_listener() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut pool = LocalPool::new(); let relay_addr = Multiaddr::empty().with(Protocol::Memory(rand::random::())); @@ -331,7 +342,9 @@ fn propagate_reservation_error_to_listener() { #[test] fn propagate_connect_error_to_unknown_peer_to_dialer() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut pool = LocalPool::new(); let relay_addr = Multiaddr::empty().with(Protocol::Memory(rand::random::())); @@ -385,7 +398,9 @@ fn propagate_connect_error_to_unknown_peer_to_dialer() { #[test] fn reuse_connection() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let mut pool = LocalPool::new(); let relay_addr = Multiaddr::empty().with(Protocol::Memory(rand::random::())); diff --git a/protocols/rendezvous/CHANGELOG.md b/protocols/rendezvous/CHANGELOG.md index ca01538a76d..3bd2e469903 100644 --- a/protocols/rendezvous/CHANGELOG.md +++ b/protocols/rendezvous/CHANGELOG.md @@ -1,7 +1,9 @@ -## 0.15.1 +## 0.16.0 - Update to `libp2p-request-response` `v0.28.0`. + + ## 0.15.0 diff --git a/protocols/rendezvous/Cargo.toml b/protocols/rendezvous/Cargo.toml index 104dc6ad1d4..3864c817b9f 100644 --- a/protocols/rendezvous/Cargo.toml +++ b/protocols/rendezvous/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-rendezvous" edition = "2021" rust-version = { workspace = true } description = "Rendezvous protocol for libp2p" -version = "0.15.1" +version = "0.16.0" authors = ["The COMIT guys "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" @@ -32,7 +32,7 @@ libp2p-swarm = { workspace = true, features = ["macros", "tokio"] } libp2p-swarm-test = { path = "../../swarm-test" } rand = "0.8" tokio = { workspace = true, features = [ "rt-multi-thread", "time", "macros", "sync", "process", "fs", "net" ] } -libp2p-test-utils = { workspace = true } +tracing-subscriber = { workspace = true, features = ["env-filter"] } # Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling diff --git a/protocols/rendezvous/tests/rendezvous.rs b/protocols/rendezvous/tests/rendezvous.rs index 98aa9dab62d..2305c2ef412 100644 --- a/protocols/rendezvous/tests/rendezvous.rs +++ b/protocols/rendezvous/tests/rendezvous.rs @@ -27,10 +27,13 @@ use libp2p_rendezvous as rendezvous; use libp2p_rendezvous::client::RegisterError; use libp2p_swarm::{DialError, Swarm, SwarmEvent}; use libp2p_swarm_test::SwarmExt; +use tracing_subscriber::EnvFilter; #[tokio::test] async fn given_successful_registration_then_successful_discovery() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let namespace = rendezvous::Namespace::from_static("some-namespace"); let ([mut alice, mut bob], mut robert) = new_server_with_connected_clients(rendezvous::server::Config::default()).await; @@ -83,7 +86,9 @@ async fn given_successful_registration_then_successful_discovery() { #[tokio::test] async fn should_return_error_when_no_external_addresses() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let namespace = rendezvous::Namespace::from_static("some-namespace"); let server = new_server(rendezvous::server::Config::default()).await; let mut client = Swarm::new_ephemeral(rendezvous::client::Behaviour::new); @@ -98,7 +103,9 @@ async fn should_return_error_when_no_external_addresses() { #[tokio::test] async fn given_successful_registration_then_refresh_ttl() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let namespace = rendezvous::Namespace::from_static("some-namespace"); let ([mut alice, mut bob], mut robert) = new_server_with_connected_clients(rendezvous::server::Config::default()).await; @@ -164,7 +171,9 @@ async fn given_successful_registration_then_refresh_ttl() { #[tokio::test] async fn given_successful_registration_then_refresh_external_addrs() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let namespace = rendezvous::Namespace::from_static("some-namespace"); let ([mut alice], mut robert) = new_server_with_connected_clients(rendezvous::server::Config::default()).await; @@ -215,7 +224,9 @@ async fn given_successful_registration_then_refresh_external_addrs() { #[tokio::test] async fn given_invalid_ttl_then_unsuccessful_registration() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let namespace = rendezvous::Namespace::from_static("some-namespace"); let ([mut alice], mut robert) = new_server_with_connected_clients(rendezvous::server::Config::default()).await; @@ -242,7 +253,9 @@ async fn given_invalid_ttl_then_unsuccessful_registration() { #[tokio::test] async fn discover_allows_for_dial_by_peer_id() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let namespace = rendezvous::Namespace::from_static("some-namespace"); let ([mut alice, mut bob], robert) = new_server_with_connected_clients(rendezvous::server::Config::default()).await; @@ -297,7 +310,9 @@ async fn discover_allows_for_dial_by_peer_id() { #[tokio::test] async fn eve_cannot_register() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let namespace = rendezvous::Namespace::from_static("some-namespace"); let mut robert = new_server(rendezvous::server::Config::default()).await; let mut eve = new_impersonating_client().await; @@ -323,7 +338,9 @@ async fn eve_cannot_register() { // test if charlie can operate as client and server simultaneously #[tokio::test] async fn can_combine_client_and_server() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let namespace = rendezvous::Namespace::from_static("some-namespace"); let ([mut alice], mut robert) = new_server_with_connected_clients(rendezvous::server::Config::default()).await; @@ -359,7 +376,9 @@ async fn can_combine_client_and_server() { #[tokio::test] async fn registration_on_clients_expire() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let namespace = rendezvous::Namespace::from_static("some-namespace"); let ([mut alice, mut bob], robert) = new_server_with_connected_clients(rendezvous::server::Config::default().with_min_ttl(1)) diff --git a/protocols/request-response/CHANGELOG.md b/protocols/request-response/CHANGELOG.md index 34fc27b7432..c2ef19dbda2 100644 --- a/protocols/request-response/CHANGELOG.md +++ b/protocols/request-response/CHANGELOG.md @@ -1,15 +1,15 @@ ## 0.28.0 +- Deprecate `void` crate. + See [PR 5676](https://github.com/libp2p/rust-libp2p/pull/5676). + - Add connection id to the events emitted by a request-response `Behaviour`. See [PR 5719](https://github.com/libp2p/rust-libp2p/pull/5719). - Allow configurable request and response sizes for `json` and `cbor` codec. See [PR 5792](https://github.com/libp2p/rust-libp2p/pull/5792). -## 0.27.1 - -- Deprecate `void` crate. - See [PR 5676](https://github.com/libp2p/rust-libp2p/pull/5676). + ## 0.27.0 diff --git a/protocols/request-response/Cargo.toml b/protocols/request-response/Cargo.toml index cb78f536ae4..5cd711dd051 100644 --- a/protocols/request-response/Cargo.toml +++ b/protocols/request-response/Cargo.toml @@ -35,7 +35,7 @@ rand = "0.8" libp2p-swarm-test = { path = "../../swarm-test" } futures_ringbuf = "0.4.0" serde = { version = "1.0", features = ["derive"] } -libp2p-test-utils = { workspace = true } +tracing-subscriber = { workspace = true, features = ["env-filter"] } # Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling diff --git a/protocols/request-response/tests/error_reporting.rs b/protocols/request-response/tests/error_reporting.rs index 281701f5cc3..2108b6006c5 100644 --- a/protocols/request-response/tests/error_reporting.rs +++ b/protocols/request-response/tests/error_reporting.rs @@ -12,10 +12,13 @@ use libp2p_swarm_test::SwarmExt; use request_response::{ Codec, InboundFailure, InboundRequestId, OutboundFailure, OutboundRequestId, ResponseChannel, }; +use tracing_subscriber::EnvFilter; #[async_std::test] async fn report_outbound_failure_on_read_response() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let (peer1_id, mut swarm1) = new_swarm(); let (peer2_id, mut swarm2) = new_swarm(); @@ -69,7 +72,10 @@ async fn report_outbound_failure_on_read_response() { #[async_std::test] async fn report_outbound_failure_on_write_request() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); + let (peer1_id, mut swarm1) = new_swarm(); let (_peer2_id, mut swarm2) = new_swarm(); @@ -109,7 +115,9 @@ async fn report_outbound_failure_on_write_request() { #[async_std::test] async fn report_outbound_timeout_on_read_response() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); // `swarm1` needs to have a bigger timeout to avoid racing let (peer1_id, mut swarm1) = new_swarm_with_timeout(Duration::from_millis(200)); @@ -154,7 +162,9 @@ async fn report_outbound_timeout_on_read_response() { #[async_std::test] async fn report_outbound_failure_on_max_streams() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); // `swarm2` will be able to handle only 1 stream per time. let swarm2_config = request_response::Config::default() @@ -204,7 +214,9 @@ async fn report_outbound_failure_on_max_streams() { #[async_std::test] async fn report_inbound_failure_on_read_request() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let (peer1_id, mut swarm1) = new_swarm(); let (_peer2_id, mut swarm2) = new_swarm(); @@ -239,7 +251,9 @@ async fn report_inbound_failure_on_read_request() { #[async_std::test] async fn report_inbound_failure_on_write_response() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let (peer1_id, mut swarm1) = new_swarm(); let (peer2_id, mut swarm2) = new_swarm(); @@ -303,7 +317,9 @@ async fn report_inbound_failure_on_write_response() { #[async_std::test] async fn report_inbound_timeout_on_write_response() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); // `swarm2` needs to have a bigger timeout to avoid racing let (peer1_id, mut swarm1) = new_swarm_with_timeout(Duration::from_millis(100)); diff --git a/protocols/request-response/tests/peer_address.rs b/protocols/request-response/tests/peer_address.rs index 714091fc682..603e2d09dc0 100644 --- a/protocols/request-response/tests/peer_address.rs +++ b/protocols/request-response/tests/peer_address.rs @@ -6,11 +6,14 @@ use libp2p_request_response::ProtocolSupport; use libp2p_swarm::{StreamProtocol, Swarm, SwarmEvent}; use libp2p_swarm_test::SwarmExt; use serde::{Deserialize, Serialize}; +use tracing_subscriber::EnvFilter; #[async_std::test] #[cfg(feature = "cbor")] async fn dial_succeeds_after_adding_peers_address() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let protocols = iter::once((StreamProtocol::new("/ping/1"), ProtocolSupport::Full)); let config = request_response::Config::default(); diff --git a/protocols/request-response/tests/ping.rs b/protocols/request-response/tests/ping.rs index 12458a0e5e7..94adedac2d7 100644 --- a/protocols/request-response/tests/ping.rs +++ b/protocols/request-response/tests/ping.rs @@ -30,11 +30,14 @@ use libp2p_swarm::{StreamProtocol, Swarm, SwarmEvent}; use libp2p_swarm_test::SwarmExt; use rand::Rng; use serde::{Deserialize, Serialize}; +use tracing_subscriber::EnvFilter; #[async_std::test] #[cfg(feature = "cbor")] async fn is_response_outbound() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let ping = Ping("ping".to_string().into_bytes()); let offline_peer = PeerId::random(); diff --git a/protocols/stream/CHANGELOG.md b/protocols/stream/CHANGELOG.md index 6034104debd..2ad563b76ab 100644 --- a/protocols/stream/CHANGELOG.md +++ b/protocols/stream/CHANGELOG.md @@ -1,8 +1,10 @@ -## 0.2.0-alpha.1 +## 0.3.0-alpha - Deprecate `void` crate. See [PR 5676](https://github.com/libp2p/rust-libp2p/pull/5676). + + ## 0.2.0-alpha diff --git a/protocols/stream/Cargo.toml b/protocols/stream/Cargo.toml index adb7a797794..5750b082d28 100644 --- a/protocols/stream/Cargo.toml +++ b/protocols/stream/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libp2p-stream" -version = "0.2.0-alpha.1" +version = "0.3.0-alpha" edition = "2021" rust-version.workspace = true description = "Generic stream protocols for libp2p" @@ -20,7 +20,7 @@ rand = "0.8" [dev-dependencies] libp2p-swarm-test = { workspace = true } tokio = { workspace = true, features = ["full"] } -libp2p-test-utils = { workspace = true } +tracing-subscriber = { workspace = true, features = ["env-filter"] } [lints] workspace = true diff --git a/protocols/stream/tests/lib.rs b/protocols/stream/tests/lib.rs index 425b49adfaf..cd6caaced5e 100644 --- a/protocols/stream/tests/lib.rs +++ b/protocols/stream/tests/lib.rs @@ -5,20 +5,23 @@ use libp2p_identity::PeerId; use libp2p_stream as stream; use libp2p_swarm::{StreamProtocol, Swarm}; use libp2p_swarm_test::SwarmExt as _; -use libp2p_test_utils::EnvFilter; use stream::OpenStreamError; use tracing::level_filters::LevelFilter; +use tracing_subscriber::EnvFilter; const PROTOCOL: StreamProtocol = StreamProtocol::new("/test"); #[tokio::test] async fn dropping_incoming_streams_deregisters() { - libp2p_test_utils::with_env_filter( - EnvFilter::builder() - .with_default_directive(LevelFilter::DEBUG.into()) - .from_env() - .unwrap(), - ); + let _ = tracing_subscriber::fmt() + .with_env_filter( + EnvFilter::builder() + .with_default_directive(LevelFilter::DEBUG.into()) + .from_env() + .unwrap(), + ) + .with_test_writer() + .try_init(); let mut swarm1 = Swarm::new_ephemeral(|_| stream::Behaviour::new()); let mut swarm2 = Swarm::new_ephemeral(|_| stream::Behaviour::new()); diff --git a/protocols/upnp/CHANGELOG.md b/protocols/upnp/CHANGELOG.md index d9c24f8efcc..89a0752d724 100644 --- a/protocols/upnp/CHANGELOG.md +++ b/protocols/upnp/CHANGELOG.md @@ -1,7 +1,10 @@ -## 0.3.1 +## 0.4.0 + - update igd-next to 0.15.1. See [PR XXXX](https://github.com/libp2p/rust-libp2p/pull/XXXX). + + ## 0.3.0 diff --git a/protocols/upnp/Cargo.toml b/protocols/upnp/Cargo.toml index a069331b1ed..4d97bd56bfa 100644 --- a/protocols/upnp/Cargo.toml +++ b/protocols/upnp/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-upnp" edition = "2021" rust-version = "1.60.0" description = "UPnP support for libp2p transports" -version = "0.3.1" +version = "0.4.0" license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" keywords = ["peer-to-peer", "libp2p", "networking"] diff --git a/swarm/CHANGELOG.md b/swarm/CHANGELOG.md index f1ad994bd1b..624450ab8dd 100644 --- a/swarm/CHANGELOG.md +++ b/swarm/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.45.2 +## 0.46.0 - Don't report `NewExternalAddrCandidate` for confirmed external addresses. See [PR 5582](https://github.com/libp2p/rust-libp2p/pull/5582). @@ -12,6 +12,15 @@ - Update default for idle-connection-timeout to 10s. See [PR 4967](https://github.com/libp2p/rust-libp2p/pull/4967). +- Deprecate `ConnectionHandler::{InboundOpenInfo, OutboundOpenInfo}` associated type. + Previously, users could tag pending sub streams with custom data and retrieve the data + after the substream has been negotiated. + But substreams themselves are completely interchangeable, users should instead track + additional data inside `ConnectionHandler` after negotiation. + See [PR 5242](https://github.com/libp2p/rust-libp2p/pull/5242). + + + ## 0.45.1 - Update `libp2p-swarm-derive` to version `0.35.0`, see [PR 5545] diff --git a/swarm/Cargo.toml b/swarm/Cargo.toml index b7e0fd73b5e..b3d2520f97c 100644 --- a/swarm/Cargo.toml +++ b/swarm/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-swarm" edition = "2021" rust-version = { workspace = true } description = "The libp2p swarm" -version = "0.45.2" +version = "0.46.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" @@ -55,7 +55,7 @@ criterion = { version = "0.5", features = ["async_tokio"] } once_cell = "1.19.0" trybuild = "1.0.95" tokio = { workspace = true, features = ["time", "rt", "macros", "rt-multi-thread"] } -libp2p-test-utils = { workspace = true } +tracing-subscriber = { workspace = true, features = ["env-filter"] } [[test]] name = "swarm_derive" diff --git a/swarm/src/connection.rs b/swarm/src/connection.rs index 8e913aa80e5..bf688f41f0d 100644 --- a/swarm/src/connection.rs +++ b/swarm/src/connection.rs @@ -801,13 +801,16 @@ mod tests { StreamMuxer, }; use quickcheck::*; + use tracing_subscriber::EnvFilter; use super::*; use crate::dummy; #[test] fn max_negotiating_inbound_streams() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); fn prop(max_negotiating_inbound_streams: u8) { let max_negotiating_inbound_streams: usize = max_negotiating_inbound_streams.into(); @@ -975,7 +978,9 @@ mod tests { #[test] fn checked_add_fraction_can_add_u64_max() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(tracing_subscriber::EnvFilter::from_default_env()) + .try_init(); let start = Instant::now(); let duration = checked_add_fraction(start, Duration::from_secs(u64::MAX)); @@ -985,7 +990,9 @@ mod tests { #[test] fn compute_new_shutdown_does_not_panic() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); #[derive(Debug)] struct ArbitraryShutdown(Shutdown); diff --git a/swarm/src/lib.rs b/swarm/src/lib.rs index f9c4c71c76f..91513c83559 100644 --- a/swarm/src/lib.rs +++ b/swarm/src/lib.rs @@ -2303,7 +2303,9 @@ mod tests { #[tokio::test] async fn aborting_pending_connection_surfaces_error() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(tracing_subscriber::EnvFilter::from_default_env()) + .try_init(); let mut dialer = new_test_swarm(Config::with_tokio_executor()); let mut listener = new_test_swarm(Config::with_tokio_executor()); diff --git a/transports/dns/CHANGELOG.md b/transports/dns/CHANGELOG.md index b46b0413403..6fdaa06be2f 100644 --- a/transports/dns/CHANGELOG.md +++ b/transports/dns/CHANGELOG.md @@ -1,8 +1,10 @@ -## 0.42.1 +## 0.43.0 - Upgrade `async-std-resolver` and `hickory-resolver`. See [PR 5727](https://github.com/libp2p/rust-libp2p/pull/5727) + + ## 0.42.0 - Implement refactored `Transport`. diff --git a/transports/dns/Cargo.toml b/transports/dns/Cargo.toml index a07e795397b..ee497d5917f 100644 --- a/transports/dns/Cargo.toml +++ b/transports/dns/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-dns" edition = "2021" rust-version = { workspace = true } description = "DNS transport implementation for libp2p" -version = "0.42.1" +version = "0.43.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" @@ -25,7 +25,7 @@ tracing = { workspace = true } libp2p-identity = { workspace = true, features = ["rand"] } tokio = { workspace = true, features = ["rt", "time"] } async-std-crate = { package = "async-std", version = "1.6" } -libp2p-test-utils = { workspace = true } +tracing-subscriber = { workspace = true, features = ["env-filter"] } [features] async-std = ["async-std-resolver"] diff --git a/transports/dns/src/lib.rs b/transports/dns/src/lib.rs index 581942b8b7e..7e3cf5d3c37 100644 --- a/transports/dns/src/lib.rs +++ b/transports/dns/src/lib.rs @@ -629,7 +629,9 @@ mod tests { #[test] fn basic_resolve() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(tracing_subscriber::EnvFilter::from_default_env()) + .try_init(); #[derive(Clone)] struct CustomTransport; diff --git a/transports/noise/CHANGELOG.md b/transports/noise/CHANGELOG.md index cda7132cb28..0ed27e31bee 100644 --- a/transports/noise/CHANGELOG.md +++ b/transports/noise/CHANGELOG.md @@ -1,8 +1,10 @@ -## 0.45.1 +## 0.46.0 - Fix `cargo clippy` warnings in `rustc 1.84.0-beta.1`. See [PR 5700](https://github.com/libp2p/rust-libp2p/pull/5700). + + ## 0.45.0 diff --git a/transports/noise/Cargo.toml b/transports/noise/Cargo.toml index a1b712dbdaf..58fddd0cc7f 100644 --- a/transports/noise/Cargo.toml +++ b/transports/noise/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-noise" edition = "2021" rust-version = { workspace = true } description = "Cryptographic handshake protocol using the noise framework." -version = "0.45.1" +version = "0.46.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" @@ -34,7 +34,7 @@ snow = { version = "0.9.5", features = ["default-resolver"], default-features = [dev-dependencies] futures_ringbuf = "0.4.0" quickcheck = { workspace = true } -libp2p-test-utils = { workspace = true } +tracing-subscriber = { workspace = true, features = ["env-filter"] } libp2p-identity = { workspace = true, features = ["rand"] } # Passing arguments to the docsrs builder in order to properly document cfg's. diff --git a/transports/noise/tests/smoke.rs b/transports/noise/tests/smoke.rs index cd9702b1c2f..abc5a038f93 100644 --- a/transports/noise/tests/smoke.rs +++ b/transports/noise/tests/smoke.rs @@ -29,6 +29,7 @@ use libp2p_core::{ use libp2p_identity as identity; use libp2p_noise as noise; use quickcheck::*; +use tracing_subscriber::EnvFilter; #[allow(dead_code)] fn core_upgrade_compat() { @@ -43,7 +44,9 @@ fn core_upgrade_compat() { #[test] fn xx() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); fn prop(mut messages: Vec) -> bool { messages.truncate(5); let server_id = identity::Keypair::generate_ed25519(); diff --git a/transports/plaintext/CHANGELOG.md b/transports/plaintext/CHANGELOG.md index 91860c76590..74b11942afe 100644 --- a/transports/plaintext/CHANGELOG.md +++ b/transports/plaintext/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.43.0 + + + ## 0.42.0 diff --git a/transports/plaintext/Cargo.toml b/transports/plaintext/Cargo.toml index 95f8f5af065..d84b2b6eede 100644 --- a/transports/plaintext/Cargo.toml +++ b/transports/plaintext/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-plaintext" edition = "2021" rust-version = { workspace = true } description = "Plaintext encryption dummy protocol for libp2p" -version = "0.42.0" +version = "0.43.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" @@ -24,7 +24,7 @@ quick-protobuf-codec = { workspace = true } libp2p-identity = { workspace = true, features = ["ed25519", "rand"] } quickcheck = { workspace = true } futures_ringbuf = "0.4.0" -libp2p-test-utils = { workspace = true } +tracing-subscriber = { workspace = true, features = ["env-filter"] } # Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling diff --git a/transports/plaintext/tests/smoke.rs b/transports/plaintext/tests/smoke.rs index ee8cec46c0b..f77f23d3ad3 100644 --- a/transports/plaintext/tests/smoke.rs +++ b/transports/plaintext/tests/smoke.rs @@ -23,10 +23,13 @@ use libp2p_core::upgrade::InboundConnectionUpgrade; use libp2p_identity as identity; use libp2p_plaintext as plaintext; use quickcheck::QuickCheck; +use tracing_subscriber::EnvFilter; #[test] fn variable_msg_length() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); fn prop(msg: Vec) { let msg_to_send = msg.clone(); diff --git a/transports/pnet/CHANGELOG.md b/transports/pnet/CHANGELOG.md index 86d519e8640..901169837e6 100644 --- a/transports/pnet/CHANGELOG.md +++ b/transports/pnet/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.26.0 + + + ## 0.25.0 diff --git a/transports/pnet/Cargo.toml b/transports/pnet/Cargo.toml index db5c72fb7cc..91592f6de74 100644 --- a/transports/pnet/Cargo.toml +++ b/transports/pnet/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-pnet" edition = "2021" rust-version = { workspace = true } description = "Private swarm support for libp2p" -version = "0.25.0" +version = "0.26.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/transports/quic/CHANGELOG.md b/transports/quic/CHANGELOG.md index 238cbebe6cf..6e45e002de2 100644 --- a/transports/quic/CHANGELOG.md +++ b/transports/quic/CHANGELOG.md @@ -1,7 +1,6 @@ -## 0.11.2 +## 0.12.0 -- Deprecate `void` crate. - See [PR 5676](https://github.com/libp2p/rust-libp2p/pull/5676). + ## 0.11.1 diff --git a/transports/quic/Cargo.toml b/transports/quic/Cargo.toml index 1c35b293049..8c416858c91 100644 --- a/transports/quic/Cargo.toml +++ b/transports/quic/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libp2p-quic" -version = "0.11.2" +version = "0.12.0" authors = ["Parity Technologies "] edition = "2021" rust-version = { workspace = true } @@ -12,7 +12,7 @@ license = "MIT" async-std = { version = "1.12.0", optional = true } futures = { workspace = true } futures-timer = "3.0.3" -if-watch = "3.2.0" +if-watch = { workspace = true } libp2p-core = { workspace = true } libp2p-tls = { workspace = true } libp2p-identity = { workspace = true } @@ -43,7 +43,7 @@ libp2p-tcp = { workspace = true, features = ["async-io"] } libp2p-yamux = { workspace = true } quickcheck = "1" tokio = { workspace = true, features = ["macros", "rt-multi-thread", "time"] } -libp2p-test-utils = { workspace = true } +tracing-subscriber = { workspace = true, features = ["env-filter"] } [[test]] name = "stream_compliance" diff --git a/transports/quic/tests/smoke.rs b/transports/quic/tests/smoke.rs index f0a8bd97d70..5fbef84649e 100644 --- a/transports/quic/tests/smoke.rs +++ b/transports/quic/tests/smoke.rs @@ -33,6 +33,7 @@ use libp2p_tcp as tcp; use libp2p_yamux as yamux; use quic::Provider; use rand::RngCore; +use tracing_subscriber::EnvFilter; #[cfg(feature = "tokio")] #[tokio::test] @@ -49,7 +50,9 @@ async fn async_std_smoke() { #[cfg(feature = "tokio")] #[tokio::test] async fn endpoint_reuse() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let (_, mut a_transport) = create_default_transport::(); let (_, mut b_transport) = create_default_transport::(); @@ -74,7 +77,9 @@ async fn endpoint_reuse() { #[cfg(feature = "async-std")] #[async_std::test] async fn ipv4_dial_ipv6() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let (a_peer_id, mut a_transport) = create_default_transport::(); let (b_peer_id, mut b_transport) = create_default_transport::(); @@ -94,7 +99,9 @@ async fn ipv4_dial_ipv6() { async fn wrapped_with_delay() { use libp2p_core::transport::DialOpts; - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); struct DialDelay(Arc>>); @@ -264,7 +271,9 @@ async fn tcp_and_quic() { #[cfg(feature = "async-std")] #[test] fn concurrent_connections_and_streams_async_std() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); quickcheck::QuickCheck::new() .min_tests_passed(1) @@ -275,7 +284,9 @@ fn concurrent_connections_and_streams_async_std() { #[cfg(feature = "tokio")] #[test] fn concurrent_connections_and_streams_tokio() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let rt = tokio::runtime::Runtime::new().unwrap(); let _guard = rt.enter(); @@ -292,7 +303,9 @@ async fn draft_29_support() { use futures::{future::poll_fn, select}; use libp2p_core::transport::TransportError; - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let (_, mut a_transport) = create_transport::(|cfg| cfg.support_draft_29 = true); @@ -367,7 +380,9 @@ async fn draft_29_support() { #[cfg(feature = "async-std")] #[async_std::test] async fn backpressure() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let max_stream_data = quic::Config::new(&generate_tls_keypair()).max_stream_data; let (mut stream_a, mut stream_b) = build_streams::().await; @@ -391,7 +406,9 @@ async fn backpressure() { #[cfg(feature = "async-std")] #[async_std::test] async fn read_after_peer_dropped_stream() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let (mut stream_a, mut stream_b) = build_streams::().await; let data = vec![0; 10]; @@ -411,7 +428,9 @@ async fn read_after_peer_dropped_stream() { #[async_std::test] #[should_panic] async fn write_after_peer_dropped_stream() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let (stream_a, mut stream_b) = build_streams::().await; drop(stream_a); futures_timer::Delay::new(Duration::from_millis(100)).await; @@ -465,7 +484,9 @@ async fn test_local_listener_reuse() { } async fn smoke() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let (a_peer_id, mut a_transport) = create_default_transport::

(); let (b_peer_id, mut b_transport) = create_default_transport::

(); diff --git a/transports/tcp/CHANGELOG.md b/transports/tcp/CHANGELOG.md index 107d0d13ece..3c4b0bc946d 100644 --- a/transports/tcp/CHANGELOG.md +++ b/transports/tcp/CHANGELOG.md @@ -1,3 +1,10 @@ +## 0.43.0 + +- Fix the disabling of Nagle's algorithm, which requires setting `TCP_NODELAY` to _true_. + See [PR 5764](https://github.com/libp2p/rust-libp2p/pull/5764) + + + ## 0.42.0 - Implement refactored `Transport`. diff --git a/transports/tcp/Cargo.toml b/transports/tcp/Cargo.toml index 61c31e49639..cc1b0d2fce5 100644 --- a/transports/tcp/Cargo.toml +++ b/transports/tcp/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-tcp" edition = "2021" rust-version = { workspace = true } description = "TCP/IP transport protocol for libp2p" -version = "0.42.0" +version = "0.43.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" @@ -14,7 +14,7 @@ categories = ["network-programming", "asynchronous"] async-io = { version = "2.3.3", optional = true } futures = { workspace = true } futures-timer = "3.0" -if-watch = "3.2.0" +if-watch = { workspace = true } libc = "0.2.155" libp2p-core = { workspace = true } socket2 = { version = "0.5.7", features = ["all"] } @@ -28,7 +28,7 @@ async-io = ["dep:async-io", "if-watch/smol"] [dev-dependencies] async-std = { version = "1.6.5", features = ["attributes"] } tokio = { workspace = true, features = ["full"] } -libp2p-test-utils = { workspace = true } +tracing-subscriber = { workspace = true, features = ["env-filter"] } # Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling diff --git a/transports/tcp/src/lib.rs b/transports/tcp/src/lib.rs index 5d3e46bcb09..7eb25c81e92 100644 --- a/transports/tcp/src/lib.rs +++ b/transports/tcp/src/lib.rs @@ -59,8 +59,8 @@ use socket2::{Domain, Socket, Type}; pub struct Config { /// TTL to set for opened sockets, or `None` to keep default. ttl: Option, - /// `TCP_NODELAY` to set for opened sockets, or `None` to keep default. - nodelay: Option, + /// `TCP_NODELAY` to set for opened sockets. + nodelay: bool, /// Size of the listen backlog for listen sockets. backlog: u32, } @@ -130,7 +130,7 @@ impl PortReuse { impl Config { /// Creates a new configuration for a TCP/IP transport: /// - /// * Nagle's algorithm, i.e. `TCP_NODELAY`, is _enabled_. See [`Config::nodelay`]. + /// * Nagle's algorithm is _disabled_, i.e. `TCP_NODELAY` _enabled_. See [`Config::nodelay`]. /// * Reuse of listening ports is _disabled_. See [`Config::port_reuse`]. /// * No custom `IP_TTL` is set. The default of the OS TCP stack applies. See [`Config::ttl`]. /// * The size of the listen backlog for new listening sockets is `1024`. See @@ -138,7 +138,7 @@ impl Config { pub fn new() -> Self { Self { ttl: None, - nodelay: Some(false), // Disable Nagle's algorithm by default + nodelay: true, // Disable Nagle's algorithm by default. backlog: 1024, } } @@ -151,7 +151,7 @@ impl Config { /// Configures the `TCP_NODELAY` option for new sockets. pub fn nodelay(mut self, value: bool) -> Self { - self.nodelay = Some(value); + self.nodelay = value; self } @@ -198,9 +198,7 @@ impl Config { if let Some(ttl) = self.ttl { socket.set_ttl(ttl)?; } - if let Some(nodelay) = self.nodelay { - socket.set_nodelay(nodelay)?; - } + socket.set_nodelay(self.nodelay)?; socket.set_reuse_address(true)?; #[cfg(all(unix, not(any(target_os = "solaris", target_os = "illumos"))))] if port_use == PortUse::Reuse { @@ -762,7 +760,9 @@ mod tests { #[test] fn communicating_between_dialer_and_listener() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(tracing_subscriber::EnvFilter::from_default_env()) + .try_init(); async fn listener(addr: Multiaddr, mut ready_tx: mpsc::Sender) { let mut tcp = Transport::::default().boxed(); @@ -841,7 +841,9 @@ mod tests { #[test] fn wildcard_expansion() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(tracing_subscriber::EnvFilter::from_default_env()) + .try_init(); async fn listener(addr: Multiaddr, mut ready_tx: mpsc::Sender) { let mut tcp = Transport::::default().boxed(); @@ -919,7 +921,9 @@ mod tests { #[test] fn port_reuse_dialing() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(tracing_subscriber::EnvFilter::from_default_env()) + .try_init(); async fn listener( addr: Multiaddr, @@ -1036,7 +1040,9 @@ mod tests { #[test] fn port_reuse_listening() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(tracing_subscriber::EnvFilter::from_default_env()) + .try_init(); async fn listen_twice(addr: Multiaddr) { let mut tcp = Transport::::new(Config::new()); @@ -1090,7 +1096,9 @@ mod tests { #[test] fn listen_port_0() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(tracing_subscriber::EnvFilter::from_default_env()) + .try_init(); async fn listen(addr: Multiaddr) -> Multiaddr { let mut tcp = Transport::::default().boxed(); @@ -1125,7 +1133,9 @@ mod tests { #[test] fn listen_invalid_addr() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(tracing_subscriber::EnvFilter::from_default_env()) + .try_init(); fn test(addr: Multiaddr) { #[cfg(feature = "async-io")] @@ -1146,7 +1156,9 @@ mod tests { #[test] fn test_remove_listener() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(tracing_subscriber::EnvFilter::from_default_env()) + .try_init(); async fn cycle_listeners() -> bool { let mut tcp = Transport::::default().boxed(); diff --git a/transports/tls/CHANGELOG.md b/transports/tls/CHANGELOG.md index e27b8b4cf1f..698cd3a770b 100644 --- a/transports/tls/CHANGELOG.md +++ b/transports/tls/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.6.0 + + + ## 0.5.0 diff --git a/transports/tls/Cargo.toml b/transports/tls/Cargo.toml index 7702a4361b1..cdde26ad6a9 100644 --- a/transports/tls/Cargo.toml +++ b/transports/tls/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libp2p-tls" -version = "0.5.0" +version = "0.6.0" edition = "2021" rust-version = { workspace = true } description = "TLS configuration based on libp2p TLS specs." diff --git a/transports/uds/CHANGELOG.md b/transports/uds/CHANGELOG.md index aa068fe3877..44328e019a6 100644 --- a/transports/uds/CHANGELOG.md +++ b/transports/uds/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.42.0 + + + ## 0.41.0 - Implement refactored `Transport`. diff --git a/transports/uds/Cargo.toml b/transports/uds/Cargo.toml index f70ac388fa8..a3e29f380cd 100644 --- a/transports/uds/Cargo.toml +++ b/transports/uds/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-uds" edition = "2021" rust-version = { workspace = true } description = "Unix domain sockets transport for libp2p" -version = "0.41.0" +version = "0.42.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/transports/webrtc-websys/CHANGELOG.md b/transports/webrtc-websys/CHANGELOG.md index 5b8f2efb3b0..5a550a5e8b1 100644 --- a/transports/webrtc-websys/CHANGELOG.md +++ b/transports/webrtc-websys/CHANGELOG.md @@ -1,7 +1,11 @@ -## 0.4.0-alpha.2 +## 0.4.0 +- Cut stable release. + See [PR 5807](https://github.com/libp2p/rust-libp2p/pull/5807) - Bump version of web-sys and update `__Nonexhaustive` to `__Invalid`. - See [PR 5569](https://github.com/libp2p/rust-libp2p/pull/5569) + See [PR 5569](https://github.com/libp2p/rust-libp2p/pull/5569) + + ## 0.4.0-alpha diff --git a/transports/webrtc-websys/Cargo.toml b/transports/webrtc-websys/Cargo.toml index 6d42d74f610..47cf252393f 100644 --- a/transports/webrtc-websys/Cargo.toml +++ b/transports/webrtc-websys/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT" name = "libp2p-webrtc-websys" repository = "https://github.com/libp2p/rust-libp2p" rust-version = { workspace = true } -version = "0.4.0-alpha.2" +version = "0.4.0" publish = true [dependencies] diff --git a/transports/webrtc/CHANGELOG.md b/transports/webrtc/CHANGELOG.md index 4bc8c1d5abc..083f4f2893a 100644 --- a/transports/webrtc/CHANGELOG.md +++ b/transports/webrtc/CHANGELOG.md @@ -1,8 +1,12 @@ -## 0.9-alpha +## 0.10-alpha - Bump `webrtc` dependency to `0.12.0`. See [PR 5448](https://github.com/libp2p/rust-libp2p/pull/5448). +## 0.9.0-alpha + + + ## 0.8.0-alpha - Implement refactored `Transport`. diff --git a/transports/webrtc/Cargo.toml b/transports/webrtc/Cargo.toml index 88914c6e38b..e5e5076be37 100644 --- a/transports/webrtc/Cargo.toml +++ b/transports/webrtc/Cargo.toml @@ -15,7 +15,7 @@ async-trait = "0.1" futures = { workspace = true } futures-timer = "3" hex = "0.4" -if-watch = "3.2" +if-watch = { workspace = true } libp2p-core = { workspace = true } libp2p-noise = { workspace = true } libp2p-identity = { workspace = true } @@ -39,7 +39,8 @@ pem = ["webrtc?/pem"] libp2p-identity = { workspace = true, features = ["rand"] } tokio = { workspace = true, features = ["full"] } quickcheck = "1.0.3" -libp2p-test-utils = { workspace = true } +tracing-subscriber = { workspace = true, features = ["env-filter"] } + [[test]] name = "smoke" diff --git a/transports/webrtc/tests/smoke.rs b/transports/webrtc/tests/smoke.rs index e27e3cee672..5f67c09d962 100644 --- a/transports/webrtc/tests/smoke.rs +++ b/transports/webrtc/tests/smoke.rs @@ -42,10 +42,13 @@ use libp2p_core::{ use libp2p_identity::PeerId; use libp2p_webrtc as webrtc; use rand::{thread_rng, RngCore}; +use tracing_subscriber::EnvFilter; #[tokio::test] async fn smoke() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let (a_peer_id, mut a_transport) = create_transport(); let (b_peer_id, mut b_transport) = create_transport(); @@ -62,7 +65,9 @@ async fn smoke() { // Note: This test should likely be ported to the muxer compliance test suite. #[test] fn concurrent_connections_and_streams_tokio() { - libp2p_test_utils::with_default_env_filter(); + let _ = tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env()) + .try_init(); let rt = tokio::runtime::Runtime::new().unwrap(); let _guard = rt.enter(); diff --git a/transports/websocket-websys/CHANGELOG.md b/transports/websocket-websys/CHANGELOG.md index affe9ff2551..d1144135e64 100644 --- a/transports/websocket-websys/CHANGELOG.md +++ b/transports/websocket-websys/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.4.1 +## 0.5.0 - fix: Return `None` when extracting a `/dnsaddr` address See [PR 5613](https://github.com/libp2p/rust-libp2p/pull/5613) @@ -6,6 +6,8 @@ - Fix `cargo clippy` warnings in `rustc 1.84.0-beta.1`. See [PR 5700](https://github.com/libp2p/rust-libp2p/pull/5700). + + ## 0.4.0 - Implement refactored `Transport`. diff --git a/transports/websocket-websys/Cargo.toml b/transports/websocket-websys/Cargo.toml index f33703c1884..cbc2330d2b7 100644 --- a/transports/websocket-websys/Cargo.toml +++ b/transports/websocket-websys/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-websocket-websys" edition = "2021" rust-version = "1.60.0" description = "WebSocket for libp2p under WASM environment" -version = "0.4.1" +version = "0.5.0" authors = ["Vince Vasta "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/transports/websocket/CHANGELOG.md b/transports/websocket/CHANGELOG.md index 1a8e9569c06..6b12e3a786a 100644 --- a/transports/websocket/CHANGELOG.md +++ b/transports/websocket/CHANGELOG.md @@ -1,8 +1,10 @@ -## 0.44.1 +## 0.45.0 - fix: Return `Error::InvalidMultiaddr` when dialed to a `/dnsaddr` address See [PR 5613](https://github.com/libp2p/rust-libp2p/pull/5613) + + ## 0.44.0 - Implement refactored `Transport`. diff --git a/transports/websocket/Cargo.toml b/transports/websocket/Cargo.toml index 5c9734e420a..69a4f3bb83a 100644 --- a/transports/websocket/Cargo.toml +++ b/transports/websocket/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-websocket" edition = "2021" rust-version = { workspace = true } description = "WebSocket transport for libp2p" -version = "0.44.1" +version = "0.45.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/transports/webtransport-websys/CHANGELOG.md b/transports/webtransport-websys/CHANGELOG.md index 45a94495e4e..a09c10bee6f 100644 --- a/transports/webtransport-websys/CHANGELOG.md +++ b/transports/webtransport-websys/CHANGELOG.md @@ -1,8 +1,10 @@ -## 0.4.1 +## 0.5.0 - Fix `cargo clippy` warnings in `rustc 1.84.0-beta.1`. See [PR 5700](https://github.com/libp2p/rust-libp2p/pull/5700). + + ## 0.4.0 - Implement refactored `Transport`. diff --git a/transports/webtransport-websys/Cargo.toml b/transports/webtransport-websys/Cargo.toml index ef2865535bf..e455cd9b08e 100644 --- a/transports/webtransport-websys/Cargo.toml +++ b/transports/webtransport-websys/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-webtransport-websys" edition = "2021" rust-version = { workspace = true } description = "WebTransport for libp2p under WASM environment" -version = "0.4.1" +version = "0.5.0" authors = [ "Yiannis Marangos ", "oblique ",