Skip to content

Commit

Permalink
Merge branch 'master' into anton/webrtc-transport
Browse files Browse the repository at this point in the history
  • Loading branch information
melekes committed Jul 11, 2022
2 parents 64d60e9 + d0da3a0 commit e8207f9
Show file tree
Hide file tree
Showing 125 changed files with 2,938 additions and 2,937 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:

- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@a40b8845c0683271d9f53dfcb887a7e181d3918b # 0.9.1
uses: styfle/cancel-workflow-action@bb6001c4ea612bf59c3abfc4756fbceee4f870c7 # 0.10.0
with:
access_token: ${{ github.token }}

Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
steps:

- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@a40b8845c0683271d9f53dfcb887a7e181d3918b # 0.9.1
uses: styfle/cancel-workflow-action@bb6001c4ea612bf59c3abfc4756fbceee4f870c7 # 0.10.0
with:
access_token: ${{ github.token }}

Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
steps:

- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@a40b8845c0683271d9f53dfcb887a7e181d3918b # 0.9.1
uses: styfle/cancel-workflow-action@bb6001c4ea612bf59c3abfc4756fbceee4f870c7 # 0.10.0
with:
access_token: ${{ github.token }}

Expand All @@ -109,7 +109,7 @@ jobs:
steps:

- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@a40b8845c0683271d9f53dfcb887a7e181d3918b # 0.9.1
uses: styfle/cancel-workflow-action@bb6001c4ea612bf59c3abfc4756fbceee4f870c7 # 0.10.0
with:
access_token: ${{ github.token }}

Expand All @@ -135,7 +135,7 @@ jobs:
steps:

- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@a40b8845c0683271d9f53dfcb887a7e181d3918b # 0.9.1
uses: styfle/cancel-workflow-action@bb6001c4ea612bf59c3abfc4756fbceee4f870c7 # 0.10.0
with:
access_token: ${{ github.token }}

Expand All @@ -157,7 +157,7 @@ jobs:
steps:

- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@a40b8845c0683271d9f53dfcb887a7e181d3918b # 0.9.1
uses: styfle/cancel-workflow-action@bb6001c4ea612bf59c3abfc4756fbceee4f870c7 # 0.10.0
with:
access_token: ${{ github.token }}

Expand Down
48 changes: 47 additions & 1 deletion CHANGELOG.md
Expand Up @@ -43,11 +43,57 @@

# `libp2p` facade crate

# 0.46.0 [unreleased]
# 0.47.0 [unreleased]

- Update to [`libp2p-dcutr` `v0.5.0`](protocols/dcutr/CHANGELOG.md#050).

- Update to [`libp2p-rendezvous` `v0.8.0`](protocols/rendezvous/CHANGELOG.md#080).

- Update to [`libp2p-ping` `v0.38.0`](protocols/ping/CHANGELOG.md#0380).

- Update to [`libp2p-identify` `v0.38.0`](protocols/identify/CHANGELOG.md#0380).

- Update to [`libp2p-floodsub` `v0.38.0`](protocols/floodsub/CHANGELOG.md#0380).

- Update to [`libp2p-relay` `v0.11.0`](protocols/relay/CHANGELOG.md#0110).

- Update to [`libp2p-metrics` `v0.8.0`](misc/metrics/CHANGELOG.md#080).

- Update to [`libp2p-kad` `v0.39.0`](protocols/kad/CHANGELOG.md#0390).

- Update to [`libp2p-autonat` `v0.6.0`](protocols/autonat/CHANGELOG.md#060).

- Update to [`libp2p-request-response` `v0.20.0`](protocols/request-response/CHANGELOG.md#0200).

- Update to [`libp2p-swarm` `v0.38.0`](swarm/CHANGELOG.md#0380).

# 0.46.1

- Update to `libp2p-derive` [`v0.28.0`](swarm-derive/CHANGELOG.md#0280).

# 0.46.0

- Semver bump Rust from `1.56.1` to `1.60.0` . See [PR 2646].
- Added weak dependencies for features. See [PR 2646].
- Update individual crates.
- Update to [`libp2p-autonat` `v0.5.0`](protocols/autonat/CHANGELOG.md#050).
- Update to [`libp2p-core` `v0.34.0`](core/CHANGELOG.md#0340).
- Update to [`libp2p-dcutr` `v0.4.0`](protocols/dcutr/CHANGELOG.md#040).
- Update to [`libp2p-floodsub` `v0.37.0`](protocols/floodsub/CHANGELOG.md#0370).
- Update to [`libp2p-identify` `v0.37.0`](protocols/identify/CHANGELOG.md#0370).
- Update to [`libp2p-kad` `v0.38.0`](protocols/kad/CHANGELOG.md#0380).
- Update to [`libp2p-metrics` `v0.7.0`](misc/metrics/CHANGELOG.md#070).
- Update to [`libp2p-mplex` `v0.34.0`](muxers/mplex/CHANGELOG.md).
- Update to [`libp2p-noise` `v0.37.0`](transports/noise/CHANGELOG.md#0370).
- Update to [`libp2p-ping` `v0.37.0`](protocols/ping/CHANGELOG.md#0370).
- Update to [`libp2p-plaintext` `v0.34.0`](transports/plaintext/CHANGELOG.md#0340).
- Update to [`libp2p-relay` `v0.10.0`](protocols/relay/CHANGELOG.md#0100).
- Update to [`libp2p-rendezvous` `v0.7.0`](protocols/rendezvous/CHANGELOG.md#070).
- Update to [`libp2p-request-response` `v0.19.0`](protocols/request-response/CHANGELOG.md#0190).
- Update to [`libp2p-swarm` `v0.37.0`](swarm/CHANGELOG.md#0370).
- Update to [`libp2p-wasm-ext` `v0.34.0`](transports/wasm-ext/CHANGELOG.md#0340).
- Update to [`libp2p-yamux` `v0.38.0`](muxers/yamux/CHANGELOG.md#0380).
- Update to `libp2p-uds` [`v0.33.0`](transports/uds/CHANGELOG.md).

[PR 2646]: https://github.com/libp2p/rust-libp2p/pull/2646

Expand Down
51 changes: 26 additions & 25 deletions Cargo.toml
Expand Up @@ -3,7 +3,7 @@ name = "libp2p"
edition = "2021"
rust-version = "1.60.0"
description = "Peer-to-peer networking library"
version = "0.46.0"
version = "0.47.0"
authors = ["Parity Technologies <admin@parity.io>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand Down Expand Up @@ -35,6 +35,7 @@ default = [
"websocket",
"yamux",
]

autonat = ["dep:libp2p-autonat"]
dcutr = ["dep:libp2p-dcutr", "libp2p-metrics?/dcutr"]
deflate = ["dep:libp2p-deflate"]
Expand Down Expand Up @@ -77,42 +78,42 @@ getrandom = "0.2.3" # Explicit dependency to be used in `wasm-bindgen` feature
instant = "0.1.11" # Explicit dependency to be used in `wasm-bindgen` feature
lazy_static = "1.2"

libp2p-autonat = { version = "0.4.0", path = "protocols/autonat", optional = true }
libp2p-core = { version = "0.33.0", path = "core", default-features = false }
libp2p-dcutr = { version = "0.3.1", path = "protocols/dcutr", optional = true }
libp2p-floodsub = { version = "0.36.0", path = "protocols/floodsub", optional = true }
libp2p-identify = { version = "0.36.1", path = "protocols/identify", optional = true }
libp2p-kad = { version = "0.37.1", path = "protocols/kad", optional = true }
libp2p-metrics = { version = "0.6.0", path = "misc/metrics", optional = true }
libp2p-autonat = { version = "0.6.0", path = "protocols/autonat", optional = true }
libp2p-core = { version = "0.34.0", path = "core", default-features = false }
libp2p-dcutr = { version = "0.5.0", path = "protocols/dcutr", optional = true }
libp2p-floodsub = { version = "0.38.0", path = "protocols/floodsub", optional = true }
libp2p-identify = { version = "0.38.0", path = "protocols/identify", optional = true }
libp2p-kad = { version = "0.39.0", path = "protocols/kad", optional = true }
libp2p-metrics = { version = "0.8.0", path = "misc/metrics", optional = true }
libp2p-mplex = { version = "0.34.0", path = "muxers/mplex", optional = true }
libp2p-noise = { version = "0.36.0", path = "transports/noise", optional = true }
libp2p-ping = { version = "0.36.0", path = "protocols/ping", optional = true }
libp2p-plaintext = { version = "0.33.0", path = "transports/plaintext", optional = true }
libp2p-noise = { version = "0.37.0", path = "transports/noise", optional = true }
libp2p-ping = { version = "0.38.0", path = "protocols/ping", optional = true }
libp2p-plaintext = { version = "0.34.0", path = "transports/plaintext", optional = true }
libp2p-pnet = { version = "0.22.0", path = "transports/pnet", optional = true }
libp2p-relay = { version = "0.9.1", path = "protocols/relay", optional = true }
libp2p-rendezvous = { version = "0.6.0", path = "protocols/rendezvous", optional = true }
libp2p-request-response = { version = "0.18.0", path = "protocols/request-response", optional = true }
libp2p-swarm = { version = "0.36.1", path = "swarm" }
libp2p-swarm-derive = { version = "0.27.0", path = "swarm-derive" }
libp2p-uds = { version = "0.32.0", path = "transports/uds", optional = true }
libp2p-wasm-ext = { version = "0.33.0", path = "transports/wasm-ext", default-features = false, optional = true }
libp2p-yamux = { version = "0.37.0", path = "muxers/yamux", optional = true }
libp2p-relay = { version = "0.11.0", path = "protocols/relay", optional = true }
libp2p-rendezvous = { version = "0.8.0", path = "protocols/rendezvous", optional = true }
libp2p-request-response = { version = "0.20.0", path = "protocols/request-response", optional = true }
libp2p-swarm = { version = "0.38.0", path = "swarm" }
libp2p-swarm-derive = { version = "0.28.0", path = "swarm-derive" }
libp2p-uds = { version = "0.33.0", path = "transports/uds", optional = true }
libp2p-wasm-ext = { version = "0.34.0", path = "transports/wasm-ext", default-features = false, optional = true }
libp2p-webrtc = { version = "0.1.0", path = "transports/webrtc", optional = true }
libp2p-yamux = { version = "0.38.0", path = "muxers/yamux", optional = true }
multiaddr = { version = "0.14.0" }
parking_lot = "0.12.0"
pin-project = "1.0.0"
rand = "0.7.3" # Explicit dependency to be used in `wasm-bindgen` feature
smallvec = "1.6.1"

[target.'cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))'.dependencies]
libp2p-deflate = { version = "0.33.0", path = "transports/deflate", optional = true }
libp2p-dns = { version = "0.33.0", path = "transports/dns", optional = true, default-features = false }
libp2p-mdns = { version = "0.37.0", path = "protocols/mdns", optional = true }
libp2p-tcp = { version = "0.33.0", path = "transports/tcp", default-features = false, optional = true }
libp2p-websocket = { version = "0.35.0", path = "transports/websocket", optional = true }
libp2p-deflate = { version = "0.34.0", path = "transports/deflate", optional = true }
libp2p-dns = { version = "0.34.0", path = "transports/dns", optional = true, default-features = false }
libp2p-mdns = { version = "0.39.0", path = "protocols/mdns", optional = true }
libp2p-tcp = { version = "0.34.0", path = "transports/tcp", default-features = false, optional = true }
libp2p-websocket = { version = "0.36.0", path = "transports/websocket", optional = true }

[target.'cfg(not(target_os = "unknown"))'.dependencies]
libp2p-gossipsub = { version = "0.38.0", path = "protocols/gossipsub", optional = true }
libp2p-gossipsub = { version = "0.40.0", path = "protocols/gossipsub", optional = true }

# TODO: use upstream once Protocol for WebRTC is there.
[patch.crates-io]
Expand Down
12 changes: 11 additions & 1 deletion core/CHANGELOG.md
@@ -1,8 +1,18 @@
# 0.33.1 - unreleased
# 0.34.0

- Introduce `StreamMuxerEvent::map_inbound_stream`. See [PR 2691].
- Remove `{read,write,flush,shutdown,destroy}_substream` functions from `StreamMuxer` trait
in favor of forcing `StreamMuxer::Substream` to implement `AsyncRead + AsyncWrite`. See [PR 2707].
- Replace `Into<std::io::Error>` bound on `StreamMuxer::Error` with `std::error::Error`. See [PR 2710].

- Remove the concept of individual `Transport::Listener` streams from `Transport`.
Instead the `Transport` is polled directly via `Transport::poll`. The
`Transport` is now responsible for driving its listeners. See [PR 2652].

[PR 2691]: https://github.com/libp2p/rust-libp2p/pull/2691
[PR 2707]: https://github.com/libp2p/rust-libp2p/pull/2707
[PR 2710]: https://github.com/libp2p/rust-libp2p/pull/2710
[PR 2652]: https://github.com/libp2p/rust-libp2p/pull/2652

# 0.33.0

Expand Down
2 changes: 1 addition & 1 deletion core/Cargo.toml
Expand Up @@ -3,7 +3,7 @@ name = "libp2p-core"
edition = "2021"
rust-version = "1.56.1"
description = "Core traits and structs of libp2p"
version = "0.33.1"
version = "0.34.0"
authors = ["Parity Technologies <admin@parity.io>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand Down
19 changes: 0 additions & 19 deletions core/src/connection.rs
Expand Up @@ -43,25 +43,6 @@ impl std::ops::Add<usize> for ConnectionId {
}
}

/// The ID of a single listener.
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ListenerId(u64);

impl ListenerId {
/// Creates a `ListenerId` from a non-negative integer.
pub fn new(id: u64) -> Self {
Self(id)
}
}

impl std::ops::Add<u64> for ListenerId {
type Output = Self;

fn add(self, other: u64) -> Self {
Self(self.0 + other)
}
}

/// The endpoint roles associated with a peer-to-peer communication channel.
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum Endpoint {
Expand Down

0 comments on commit e8207f9

Please sign in to comment.