Skip to content

Commit

Permalink
Merge branch 'master' of github.com:libp2p/rust-libp2p into quic/muxer
Browse files Browse the repository at this point in the history
  • Loading branch information
elenaf9 committed Sep 9, 2022
2 parents 0a82be4 + c650dc1 commit 69caf98
Show file tree
Hide file tree
Showing 100 changed files with 1,424 additions and 768 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[alias]
# Temporary solution to have clippy config in a single place until https://github.com/rust-lang/rust-clippy/blob/master/doc/roadmap-2021.md#lintstoml-configuration is shipped.
custom-clippy = "clippy --all-features -- -A clippy::type_complexity -A clippy::pedantic -D warnings"
custom-clippy = "clippy --all-features --all-targets -- -A clippy::type_complexity -A clippy::pedantic -D warnings"
8 changes: 8 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file contains revisions that are to be ignored by git when running `git blame`.
#
# This does NOT work automatically, you first need to tell Git about this file.
# To do so, run `git config --global blame.ignoreRevsFile .git-blame-ignore-revs`.
# You may want to run this without `--global` if you have a different naming convention for this file in other repositories.
#
# Format with rustfmt
f701b24ec0f99be49444a6e7de950c66b01b2f3f
9 changes: 1 addition & 8 deletions .github/workflows/cargo-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@ name: cargo audit
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
pull_request:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'

jobs:
audit:
runs-on: ubuntu-latest
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/cargo-deny-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: cargo deny
on:
push:
paths:
- '**/Cargo.toml'
pull_request:
paths:
- '**/Cargo.toml'
jobs:
cargo-deny:
runs-on: ubuntu-latest
strategy:
matrix:
checks:
- advisories
- bans licenses sources

steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check ${{ matrix.checks }}
27 changes: 27 additions & 0 deletions .github/workflows/interop-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
pull_request:
push:
branches:
- master
name: Interoperability Testing

jobs:
# NOTE: during a pull request run, github creates a merge commit referenced in `github.sha`
# that merge commit is not a regular commit. You won't find it with a regular `git checkout SHA` and
# tools like `go get repo@SHA` won't find it.
#
# As a workaround, we generate a path to the actual pull request's commit, it looks like:
# `github.com/external-org/go-libp2p@latest-commit-on-their-branch`
run-ping-interop-cross-version:
uses: "libp2p/test-plans/.github/workflows/run-composition.yml@master"
with:
composition_file: "ping/_compositions/rust-cross-versions.toml"
custom_git_target: github.com/${{ github.event.pull_request.head.repo.full_name || github.event.repository.full_name }}
custom_git_reference: ${{ github.event.pull_request.head.sha || github.sha }}
run-ping-interop-cross-implementation:
uses: "libp2p/test-plans/.github/workflows/run-composition.yml@master"
with:
composition_file: "ping/_compositions/go-rust-interop-latest.toml"
custom_git_target: github.com/${{ github.event.pull_request.head.repo.full_name || github.event.repository.full_name }}
custom_git_reference: ${{ github.event.pull_request.head.sha || github.sha }}
custom_interop_target: rust
28 changes: 27 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,33 @@

# `libp2p` facade crate

# 0.47.0 [unreleased]
# 0.48.0

- Update to [`libp2p-core` `v0.36.0`](core/CHANGELOG.md#0360).

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

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

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

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

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

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

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

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

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

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

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

# 0.47.0

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

Expand Down
63 changes: 33 additions & 30 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "libp2p"
edition = "2021"
rust-version = "1.60.0"
description = "Peer-to-peer networking library"
version = "0.47.0"
version = "0.48.0"
authors = ["Parity Technologies <admin@parity.io>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand All @@ -16,10 +16,10 @@ default = [
"deflate",
"dns-async-std",
"floodsub",
"gossipsub",
"identify",
"kad",
"mdns",
"gossipsub",
"mdns-async-io",
"mplex",
"noise",
"ping",
Expand All @@ -29,6 +29,7 @@ default = [
"relay",
"request-response",
"rendezvous",
"rsa",
"secp256k1",
"tcp-async-io",
"uds",
Expand All @@ -47,7 +48,8 @@ identify = ["dep:libp2p-identify", "libp2p-metrics?/identify"]
kad = ["dep:libp2p-kad", "libp2p-metrics?/kad"]
gossipsub = ["dep:libp2p-gossipsub", "libp2p-metrics?/gossipsub"]
metrics = ["dep:libp2p-metrics"]
mdns = ["dep:libp2p-mdns"]
mdns-async-io = ["dep:libp2p-mdns", "libp2p-mdns?/async-io"]
mdns-tokio = ["dep:libp2p-mdns", "libp2p-mdns?/tokio"]
mplex = ["dep:libp2p-mplex"]
noise = ["dep:libp2p-noise"]
ping = ["dep:libp2p-ping", "libp2p-metrics?/ping"]
Expand All @@ -66,6 +68,7 @@ wasm-ext-websocket = ["wasm-ext", "libp2p-wasm-ext?/websocket"]
websocket = ["dep:libp2p-websocket"]
yamux = ["dep:libp2p-yamux"]
secp256k1 = ["libp2p-core/secp256k1"]
rsa = ["libp2p-core/rsa"]
serde = ["libp2p-core/serde", "libp2p-kad?/serde", "libp2p-gossipsub?/serde"]

[package.metadata.docs.rs]
Expand All @@ -79,42 +82,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.6.0", path = "protocols/autonat", optional = true }
libp2p-core = { version = "0.35.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.35.0", path = "muxers/mplex", optional = true }
libp2p-noise = { version = "0.38.0", path = "transports/noise", optional = true }
libp2p-ping = { version = "0.38.0", path = "protocols/ping", optional = true }
libp2p-plaintext = { version = "0.35.0", path = "transports/plaintext", optional = true }
libp2p-autonat = { version = "0.7.0", path = "protocols/autonat", optional = true }
libp2p-core = { version = "0.36.0", path = "core", default-features = false }
libp2p-dcutr = { version = "0.6.0", path = "protocols/dcutr", optional = true }
libp2p-floodsub = { version = "0.39.0", path = "protocols/floodsub", optional = true }
libp2p-identify = { version = "0.39.0", path = "protocols/identify", optional = true }
libp2p-kad = { version = "0.40.0", path = "protocols/kad", optional = true }
libp2p-metrics = { version = "0.9.0", path = "misc/metrics", optional = true }
libp2p-mplex = { version = "0.36.0", path = "muxers/mplex", optional = true }
libp2p-noise = { version = "0.39.0", path = "transports/noise", optional = true }
libp2p-ping = { version = "0.39.0", path = "protocols/ping", optional = true }
libp2p-plaintext = { version = "0.36.0", path = "transports/plaintext", optional = true }
libp2p-pnet = { version = "0.22.0", path = "transports/pnet", 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.29.0", path = "swarm-derive" }
libp2p-uds = { version = "0.34.0", path = "transports/uds", optional = true }
libp2p-wasm-ext = { version = "0.35.0", path = "transports/wasm-ext", default-features = false, optional = true }
libp2p-yamux = { version = "0.39.0", path = "muxers/yamux", optional = true }
libp2p-relay = { version = "0.12.0", path = "protocols/relay", optional = true }
libp2p-rendezvous = { version = "0.9.0", path = "protocols/rendezvous", optional = true }
libp2p-request-response = { version = "0.21.0", path = "protocols/request-response", optional = true }
libp2p-swarm = { version = "0.39.0", path = "swarm" }
libp2p-swarm-derive = { version = "0.30.0", path = "swarm-derive" }
libp2p-uds = { version = "0.35.0", path = "transports/uds", optional = true }
libp2p-wasm-ext = { version = "0.36.0", path = "transports/wasm-ext", default-features = false, optional = true }
libp2p-yamux = { version = "0.40.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.35.0", path = "transports/deflate", optional = true }
libp2p-dns = { version = "0.35.0", path = "transports/dns", optional = true, default-features = false }
libp2p-mdns = { version = "0.39.0", path = "protocols/mdns", optional = true }
libp2p-deflate = { version = "0.36.0", path = "transports/deflate", optional = true }
libp2p-dns = { version = "0.36.0", path = "transports/dns", optional = true, default-features = false }
libp2p-mdns = { version = "0.40.0", path = "protocols/mdns", optional = true, default-features = false }
libp2p-quic = { version = "0.7.0", path = "transports/quic", optional = true }
libp2p-tcp = { version = "0.35.0", path = "transports/tcp", default-features = false, optional = true }
libp2p-websocket = { version = "0.37.0", path = "transports/websocket", optional = true }
libp2p-tcp = { version = "0.36.0", path = "transports/tcp", default-features = false, optional = true }
libp2p-websocket = { version = "0.38.0", path = "transports/websocket", optional = true }

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

[dev-dependencies]
async-std = { version = "1.6.2", features = ["attributes"] }
Expand Down Expand Up @@ -164,7 +167,7 @@ required-features = ["floodsub"]

[[example]]
name = "chat-tokio"
required-features = ["tcp-tokio", "mdns"]
required-features = ["tcp-tokio", "mdns-tokio"]

[[example]]
name = "file-sharing"
Expand Down
3 changes: 3 additions & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
disallowed-methods = [
{ path = "futures::channel::mpsc::unbounded", reason = "does not enforce backpressure" },
]
21 changes: 20 additions & 1 deletion core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# 0.35.0 [unreleased]
# 0.36.0

- Make RSA keypair support optional. To enable RSA support, `rsa` feature should be enabled.
See [PR 2860].

- Add `ReadyUpgrade`. See [PR 2855].

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

# 0.35.1

- Update to `p256` `v0.11.0`. See [PR 2636].

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

# 0.35.0

- Update prost requirement from 0.10 to 0.11 which no longer installs the protoc Protobuf compiler.
Thus you will need protoc installed locally. See [PR 2788].
- Drop `Unpin` requirement from `SubstreamBox`. See [PR 2762] and [PR 2776].
- Drop `Sync` requirement on `StreamMuxer` for constructing `StreamMuxerBox`. See [PR 2775].
- Use `Pin<&mut Self>` as the receiver type for all `StreamMuxer` poll functions. See [PR 2765].
Expand All @@ -13,6 +31,7 @@
[PR 2776]: https://github.com/libp2p/rust-libp2p/pull/2776
[PR 2765]: https://github.com/libp2p/rust-libp2p/pull/2765
[PR 2797]: https://github.com/libp2p/rust-libp2p/pull/2797
[PR 2788]: https://github.com/libp2p/rust-libp2p/pull/2788

# 0.34.0

Expand Down
11 changes: 6 additions & 5 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
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.35.0"
version = "0.36.0"
authors = ["Parity Technologies <admin@parity.io>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand All @@ -25,7 +25,7 @@ log = "0.4"
multiaddr = { version = "0.14.0" }
multihash = { version = "0.16", default-features = false, features = ["std", "multihash-impl", "identity", "sha2"] }
multistream-select = { version = "0.11", path = "../misc/multistream-select" }
p256 = { version = "0.10.0", default-features = false, features = ["ecdsa"], optional = true }
p256 = { version = "0.11.1", default-features = false, features = ["ecdsa"], optional = true }
parking_lot = "0.12.0"
pin-project = "1.0.0"
prost = "0.11"
Expand All @@ -37,10 +37,10 @@ thiserror = "1.0"
unsigned-varint = "0.7"
void = "1"
zeroize = "1"
_serde = { package = "serde", version = "1", optional = true, features = ["derive"] }
serde = { version = "1", optional = true, features = ["derive"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
ring = { version = "0.16.9", features = ["alloc", "std"], default-features = false }
ring = { version = "0.16.9", features = ["alloc", "std"], default-features = false, optional = true}

[dev-dependencies]
async-std = { version = "1.6.2", features = ["attributes"] }
Expand All @@ -62,7 +62,8 @@ prost-build = "0.11"
default = [ "secp256k1", "ecdsa" ]
secp256k1 = [ "libsecp256k1" ]
ecdsa = [ "p256" ]
serde = ["multihash/serde-codec", "_serde"]
rsa = [ "dep:ring" ]
serde = ["multihash/serde-codec", "dep:serde"]

[[bench]]
name = "peer_id"
Expand Down

0 comments on commit 69caf98

Please sign in to comment.