Skip to content

Commit

Permalink
Merge branch 'master' into nloadholtes/noise-use-proto2
Browse files Browse the repository at this point in the history
  • Loading branch information
nloadholtes authored Oct 15, 2022
2 parents 75466a5 + 981d586 commit 97974db
Show file tree
Hide file tree
Showing 52 changed files with 565 additions and 493 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/cargo-deny-pr.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
name: cargo deny

on:
push:
paths:
- '**/Cargo.toml'
pull_request:
paths:
- '**/Cargo.toml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
cargo-deny:
runs-on: ubuntu-latest
Expand Down
91 changes: 49 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test-desktop:
name: Build and test
Expand All @@ -18,12 +22,6 @@ jobs:
"--benches --all-features",
]
steps:

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

- name: Install Protoc
uses: arduino/setup-protoc@v1

Expand Down Expand Up @@ -53,12 +51,6 @@ jobs:
run:
shell: bash
steps:

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

- name: Install Protoc
uses: arduino/setup-protoc@v1

Expand Down Expand Up @@ -91,12 +83,6 @@ jobs:
name: Check rustdoc intra-doc links
runs-on: ubuntu-latest
steps:

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

- name: Install Protoc
uses: arduino/setup-protoc@v1

Expand All @@ -116,12 +102,6 @@ jobs:
check-clippy:
runs-on: ubuntu-latest
steps:

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

- name: Install Protoc
uses: arduino/setup-protoc@v1

Expand All @@ -145,12 +125,6 @@ jobs:
name: Integration tests
runs-on: ubuntu-latest
steps:

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

- name: Install Protoc
uses: arduino/setup-protoc@v1

Expand All @@ -170,12 +144,6 @@ jobs:
rustfmt:
runs-on: ubuntu-latest
steps:

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

- uses: actions/checkout@v3

- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
Expand All @@ -191,12 +159,6 @@ jobs:
manifest_lint:
runs-on: ubuntu-latest
steps:

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

- uses: actions/checkout@v3

- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
Expand All @@ -210,7 +172,52 @@ jobs:
ALL_FEATURES=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "libp2p") | .features | keys | map(select(. != "full")) | sort | join(" ")')
FULL_FEATURE=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "libp2p") | .features["full"] | sort | join(" ")')
test "$ALL_FEATURES = $FULL_FEATURE"
echo "$ALL_FEATURES";
echo "$FULL_FEATURE";
test "$ALL_FEATURES" = "$FULL_FEATURE"
gather_crates_for_semver_checks:
runs-on: ubuntu-latest
outputs:
members: ${{ steps.cargo-metadata.outputs.members }}
steps:
- uses: actions/checkout@v3

- id: cargo-metadata
run: |
WORKSPACE_MEMBERS=$(cargo metadata --format-version=1 --no-deps | jq -c '.packages | .[] | select(.publish == null) | .name' | jq -s '.' | jq -c '.')
echo "::set-output name=members::${WORKSPACE_MEMBERS}"
semver-check:
runs-on: ubuntu-latest
needs: gather_crates_for_semver_checks
strategy:
fail-fast: false
matrix:
crate: ${{ fromJSON(needs.gather_crates_for_semver_checks.outputs.members) }}
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@bb6001c4ea612bf59c3abfc4756fbceee4f870c7 # 0.10.0
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v3

- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
with:
profile: minimal
toolchain: stable
override: true

- name: Install Protoc
uses: arduino/setup-protoc@v1

- uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8 # v2.0.0

- run: cargo install cargo-semver-checks

- name: Semver Check
run: cargo semver-checks check-release -p ${{ matrix.crate }}
9 changes: 7 additions & 2 deletions .github/workflows/interop-test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: Interoperability Testing

on:
pull_request:
push:
branches:
- master
name: Interoperability Testing

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# NOTE: during a pull request run, github creates a merge commit referenced in `github.sha`
Expand All @@ -24,4 +29,4 @@ jobs:
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
custom_interop_target: rust
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,21 @@

# `libp2p` facade crate

# 0.49.0 - [unreleased]
# 0.49.0

- Remove default features. You need to enable required features explicitly now. As a quick workaround, you may want to use the
new `full` feature which activates all features. See [PR 2918].

- Introduce `tokio` and `async-std` features and deprecate the following ones:
- `tcp-tokio` in favor of `tcp` + `tokio`
- `mdns-tokio` in favor of `mdns` + `tokio`
- `dns-tokio` in favor of `dns` + `tokio`
- `tcp-async-io` in favor of `tcp` + `async-std`
- `mdns-async-io` in favor of `mdns` + `async-std`
- `dns-async-std` in favor of `dns` + `async-std`

See [PR 2962].

- Update individual crates.
- Update to [`libp2p-autonat` `v0.8.0`](protocols/autonat/CHANGELOG.md#0080).
- Update to [`libp2p-core` `v0.37.0`](core/CHANGELOG.md#0370).
Expand Down Expand Up @@ -75,7 +85,8 @@
- Update to [`libp2p-websocket` `v0.39.0`](transports/websocket/CHANGELOG.md#0390).
- Update to [`libp2p-yamux` `v0.41.0`](muxers/mplex/CHANGELOG.md#0410).

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

# 0.48.0

Expand Down
14 changes: 12 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,19 @@ categories = ["network-programming", "asynchronous"]

[features]
full = [
"async-std",
"autonat",
"dcutr",
"deflate",
"dns",
"dns-async-std",
"dns-tokio",
"ecdsa",
"floodsub",
"gossipsub",
"identify",
"kad",
"mdns",
"mdns-async-io",
"mdns-tokio",
"metrics",
Expand All @@ -36,8 +39,10 @@ full = [
"rsa",
"secp256k1",
"serde",
"tcp",
"tcp-async-io",
"tcp-tokio",
"tokio",
"uds",
"wasm-bindgen",
"wasm-ext",
Expand All @@ -48,13 +53,15 @@ full = [
autonat = ["dep:libp2p-autonat"]
dcutr = ["dep:libp2p-dcutr", "libp2p-metrics?/dcutr"]
deflate = ["dep:libp2p-deflate"]
dns = ["dep:libp2p-dns"]
dns-async-std = ["dep:libp2p-dns", "libp2p-dns?/async-std"]
dns-tokio = ["dep:libp2p-dns", "libp2p-dns?/tokio"]
floodsub = ["dep:libp2p-floodsub"]
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"]
Expand All @@ -65,6 +72,7 @@ pnet = ["dep:libp2p-pnet"]
relay = ["dep:libp2p-relay", "libp2p-metrics?/relay"]
request-response = ["dep:libp2p-request-response"]
rendezvous = ["dep:libp2p-rendezvous"]
tcp = ["dep:libp2p-tcp"]
tcp-async-io = ["dep:libp2p-tcp", "libp2p-tcp?/async-io"]
tcp-tokio = ["dep:libp2p-tcp", "libp2p-tcp?/tokio"]
uds = ["dep:libp2p-uds"]
Expand All @@ -77,6 +85,8 @@ secp256k1 = ["libp2p-core/secp256k1"]
rsa = ["libp2p-core/rsa"]
ecdsa = ["libp2p-core/ecdsa"]
serde = ["libp2p-core/serde", "libp2p-kad?/serde", "libp2p-gossipsub?/serde"]
tokio = ["libp2p-mdns?/tokio", "libp2p-tcp?/tokio", "libp2p-dns?/tokio"]
async-std = ["libp2p-mdns?/async-io", "libp2p-tcp?/async-io", "libp2p-dns?/async-std"]

[package.metadata.docs.rs]
all-features = true
Expand All @@ -91,7 +101,7 @@ lazy_static = "1.2"

libp2p-autonat = { version = "0.8.0", path = "protocols/autonat", optional = true }
libp2p-core = { version = "0.37.0", path = "core" }
libp2p-dcutr = { version = "0.7.0", path = "protocols/dcutr", optional = true }
libp2p-dcutr = { version = "0.7.0", path = "protocols/dcutr", optional = true }
libp2p-floodsub = { version = "0.40.1", path = "protocols/floodsub", optional = true }
libp2p-identify = { version = "0.40.0", path = "protocols/identify", optional = true }
libp2p-kad = { version = "0.41.0", path = "protocols/kad", optional = true }
Expand Down Expand Up @@ -128,7 +138,7 @@ libp2p-gossipsub = { version = "0.42.1", path = "protocols/gossipsub", optional
async-std = { version = "1.6.2", features = ["attributes"] }
async-trait = "0.1"
env_logger = "0.9.0"
clap = {version = "3.1.6", features = ["derive"]}
clap = { version = "4.0.13", features = ["derive"] }
tokio = { version = "1.15", features = ["io-util", "io-std", "macros", "rt", "rt-multi-thread"] }

[workspace]
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).

- [COMIT](https://github.com/comit-network/xmr-btc-swap) - Bitcoin–Monero Cross-chain Atomic Swap.
- [Forest](https://github.com/ChainSafe/forest) - An implementation of Filecoin written in Rust.
- [fuel-core](https://github.com/FuelLabs/fuel-core) - A Rust implementation of the Fuel protocol.
- [ipfs-embed](https://github.com/ipfs-rust/ipfs-embed) - A small embeddable ipfs implementation
used and maintained by [Actyx][https://www.actyx.com].
- [iroh](https://github.com/n0-computer/iroh) - Next-generation implementation of IPFS for Cloud & Mobile platforms.
Expand Down
7 changes: 5 additions & 2 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# 0.37.0 [unreleased]
# 0.37.0

- Implement `Hash` and `Ord` for `PublicKey`. See [PR 2915].

- Remove default features. If you previously depended on `secp256k1` or `ecdsa` you need to enable these explicitly
- Remove default features. If you previously depended on `secp256k1` or `ecdsa` you need to enable these explicitly
now. See [PR 2918].

- Deprecate `StreamMuxerExt::next_{inbound,outbound}`. See [PR 3002].

[PR 2915]: https://github.com/libp2p/rust-libp2p/pull/2915
[PR 2918]: https://github.com/libp2p/rust-libp2p/pull/2918
[PR 3002]: https://github.com/libp2p/rust-libp2p/pull/3002

# 0.36.0

Expand Down
8 changes: 8 additions & 0 deletions core/src/muxing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,19 @@ pub trait StreamMuxerExt: StreamMuxer + Sized {
}

/// Returns a future that resolves to the next inbound `Substream` opened by the remote.
#[deprecated(
since = "0.37.0",
note = "This future violates the `StreamMuxer` contract because it doesn't call `StreamMuxer::poll`."
)]
fn next_inbound(&mut self) -> NextInbound<'_, Self> {
NextInbound(self)
}

/// Returns a future that opens a new outbound `Substream` with the remote.
#[deprecated(
since = "0.37.0",
note = "This future violates the `StreamMuxer` contract because it doesn't call `StreamMuxer::poll`."
)]
fn next_outbound(&mut self) -> NextOutbound<'_, Self> {
NextOutbound(self)
}
Expand Down
3 changes: 2 additions & 1 deletion misc/keygen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
keywords = ["peer-to-peer", "libp2p", "networking"]
categories = ["network-programming", "asynchronous"]
publish = false

[dependencies]
clap = {version = "3.1.6", features = ["derive"]}
clap = { version = "4.0.13", features = ["derive"] }
zeroize = "1"
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.79"
Expand Down
2 changes: 1 addition & 1 deletion misc/keygen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ enum Command {
/// Read from config file
From {
/// Provide a IPFS config file
#[clap(parse(from_os_str))]
#[clap(value_parser)]
config: PathBuf,
},
/// Generate random
Expand Down
2 changes: 1 addition & 1 deletion misc/metrics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 0.10.0 [unreleased]
# 0.10.0

- Update to `libp2p-swarm` `v0.40.0`.

Expand Down
2 changes: 1 addition & 1 deletion misc/multistream-select/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 0.12.0 [unreleased]
# 0.12.0

- Remove parallel dialing optimization, to avoid requiring the use of the `ls` command. See [PR 2934].

Expand Down
2 changes: 1 addition & 1 deletion muxers/mplex/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 0.37.0 [unreleased]
# 0.37.0

- Bump rand to 0.8 and quickcheck to 1. See [PR 2857].

Expand Down
Loading

0 comments on commit 97974db

Please sign in to comment.