Skip to content

Commit

Permalink
Merge branch 'master' into relay-server-example
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumemichel authored Oct 4, 2024
2 parents c92477d + b83dd95 commit 8fdf1e4
Show file tree
Hide file tree
Showing 45 changed files with 260 additions and 156 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/interop-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ concurrency:
jobs:
run-transport-interop:
name: Run transport interoperability tests
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ${{ fromJSON(github.repository == 'libp2p/rust-libp2p' && '["self-hosted", "linux", "x64", "4xlarge"]' || '"ubuntu-latest"') }}
strategy:
matrix:
Expand Down Expand Up @@ -39,6 +40,7 @@ jobs:
worker-count: 16
run-holepunching-interop:
name: Run hole-punch interoperability tests
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ${{ fromJSON(github.repository == 'libp2p/rust-libp2p' && '["self-hosted", "linux", "x64", "4xlarge"]' || '"ubuntu-latest"') }}
steps:
- uses: actions/checkout@v4
Expand Down
75 changes: 28 additions & 47 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ libp2p-rendezvous = { version = "0.15.0", path = "protocols/rendezvous" }
libp2p-request-response = { version = "0.27.0", path = "protocols/request-response" }
libp2p-server = { version = "0.12.7", path = "misc/server" }
libp2p-stream = { version = "0.2.0-alpha", path = "protocols/stream" }
libp2p-swarm = { version = "0.45.1", path = "swarm" }
libp2p-swarm = { version = "0.45.2", 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.4.0", path = "swarm-test" }
libp2p-tcp = { version = "0.42.0", path = "transports/tcp" }
Expand Down
2 changes: 1 addition & 1 deletion examples/autonatv2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.75-alpine as builder
FROM rust:1.81-alpine as builder

RUN apk add musl-dev

Expand Down
2 changes: 1 addition & 1 deletion hole-punching-tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1.5-labs
FROM rust:1.75.0 as builder
FROM rust:1.81.0 as builder

# Run with access to the target cache to speed up builds
WORKDIR /workspace
Expand Down
2 changes: 1 addition & 1 deletion interop-tests/Dockerfile.chromium
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1.5-labs
FROM rust:1.75.0 as chef
FROM rust:1.81 as chef
RUN rustup target add wasm32-unknown-unknown
RUN wget -q -O- https://github.com/rustwasm/wasm-pack/releases/download/v0.12.1/wasm-pack-v0.12.1-x86_64-unknown-linux-musl.tar.gz | tar -zx -C /usr/local/bin --strip-components 1 --wildcards "wasm-pack-*/wasm-pack"
RUN wget -q -O- https://github.com/WebAssembly/binaryen/releases/download/version_115/binaryen-version_115-x86_64-linux.tar.gz | tar -zx -C /usr/local/bin --strip-components 2 --wildcards "binaryen-version_*/bin/wasm-opt"
Expand Down
2 changes: 1 addition & 1 deletion interop-tests/Dockerfile.native
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1.5-labs
FROM lukemathwalker/cargo-chef:0.1.62-rust-1.75.0 as chef
FROM lukemathwalker/cargo-chef:0.1.67-rust-bullseye as chef
WORKDIR /app

FROM chef AS planner
Expand Down
2 changes: 2 additions & 0 deletions misc/allow-block-list/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ where
_: ConnectionId,
event: THandlerOutEvent<Self>,
) {
// TODO: remove when Rust 1.82 is MSRV
#[allow(unreachable_patterns)]
void::unreachable(event)
}

Expand Down
4 changes: 4 additions & 0 deletions misc/connection-limits/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ impl NetworkBehaviour for Behaviour {
_: ConnectionId,
event: THandlerOutEvent<Self>,
) {
// TODO: remove when Rust 1.82 is MSRV
#[allow(unreachable_patterns)]
void::unreachable(event)
}

Expand Down Expand Up @@ -586,6 +588,8 @@ mod tests {
_connection_id: ConnectionId,
event: THandlerOutEvent<Self>,
) {
// TODO: remove when Rust 1.82 is MSRV
#[allow(unreachable_patterns)]
void::unreachable(event)
}

Expand Down
2 changes: 2 additions & 0 deletions misc/memory-connection-limits/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ impl NetworkBehaviour for Behaviour {
_: ConnectionId,
event: THandlerOutEvent<Self>,
) {
// TODO: remove when Rust 1.82 is MSRV
#[allow(unreachable_patterns)]
void::unreachable(event)
}

Expand Down
2 changes: 2 additions & 0 deletions misc/memory-connection-limits/tests/util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ impl<const MEM_PENDING: usize, const MEM_ESTABLISHED: usize> NetworkBehaviour
_: ConnectionId,
event: THandlerOutEvent<Self>,
) {
// TODO: remove when Rust 1.82 is MSRV
#[allow(unreachable_patterns)]
void::unreachable(event)
}

Expand Down
1 change: 1 addition & 0 deletions misc/quick-protobuf-codec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ mod generated;
pub use generated::test as proto;

/// [`Codec`] implements [`Encoder`] and [`Decoder`], uses [`unsigned_varint`]
///
/// to prefix messages with their length and uses [`quick_protobuf`] and a provided
/// `struct` implementing [`MessageRead`] and [`MessageWrite`] to do the encoding.
pub struct Codec<In, Out = In> {
Expand Down
2 changes: 1 addition & 1 deletion misc/server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1.5-labs
FROM rust:1.75.0 as chef
FROM rust:1.81.0 as chef
RUN wget -q -O- https://github.com/LukeMathWalker/cargo-chef/releases/download/v0.1.62/cargo-chef-x86_64-unknown-linux-gnu.tar.gz | tar -zx -C /usr/local/bin
RUN cargo install --locked --root /usr/local libp2p-lookup --version 0.6.4
WORKDIR /app
Expand Down
2 changes: 2 additions & 0 deletions protocols/autonat/src/v2/client/handler/dial_back.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ impl ConnectionHandler for Handler {
tracing::warn!("Dial back request dropped, too many requests in flight");
}
}
// TODO: remove when Rust 1.82 is MSRVprotocols/autonat/src/v2/client/handler/dial_back.rs
#[allow(unreachable_patterns)]
ConnectionEvent::ListenUpgradeError(ListenUpgradeError { error, .. }) => {
void::unreachable(error);
}
Expand Down
2 changes: 2 additions & 0 deletions protocols/autonat/src/v2/client/handler/dial_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ async fn start_stream_handle(
.map_err(|e| match e {
StreamUpgradeError::NegotiationFailed => Error::UnsupportedProtocol,
StreamUpgradeError::Timeout => Error::Io(io::ErrorKind::TimedOut.into()),
// TODO: remove when Rust 1.82 is MSRV
#[allow(unreachable_patterns)]
StreamUpgradeError::Apply(v) => void::unreachable(v),
StreamUpgradeError::Io(e) => Error::Io(e),
})?;
Expand Down
2 changes: 2 additions & 0 deletions protocols/autonat/src/v2/server/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ where
Either::Left(Either::Left(Err(e))) => {
tracing::debug!("dial back error: {e:?}");
}
// TODO: remove when Rust 1.82 is MSRV
#[allow(unreachable_patterns)]
Either::Left(Either::Right(v)) => void::unreachable(v),
Either::Right(Either::Left(cmd)) => {
let addr = cmd.addr.clone();
Expand Down
2 changes: 2 additions & 0 deletions protocols/autonat/src/v2/server/handler/dial_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ where
);
}
}
// TODO: remove when Rust 1.82 is MSRV
#[allow(unreachable_patterns)]
ConnectionEvent::ListenUpgradeError(ListenUpgradeError { error, .. }) => {
tracing::debug!("inbound request failed: {:?}", error);
}
Expand Down
Loading

0 comments on commit 8fdf1e4

Please sign in to comment.