Skip to content

Commit

Permalink
Merge branch 'master' into fix/relay-not-expiring-external-address
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusc93 authored Sep 25, 2024
2 parents ec59927 + f3e0e55 commit 21c75e9
Show file tree
Hide file tree
Showing 40 changed files with 152 additions and 53 deletions.
1 change: 0 additions & 1 deletion .github/workflows/interop-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Interoperability Testing
on:
pull_request:
push:
branches:
- "master"
Expand Down
73 changes: 27 additions & 46 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 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
2 changes: 2 additions & 0 deletions protocols/dcutr/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ impl NetworkBehaviour for Behaviour {
.or_default() += 1;
self.queued_events.push_back(ToSwarm::Dial { opts });
}
// TODO: remove when Rust 1.82 is MSRV
#[allow(unreachable_patterns)]
Either::Right(never) => void::unreachable(never),
};
}
Expand Down
8 changes: 8 additions & 0 deletions protocols/dcutr/src/handler/relayed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ impl Handler {
self.attempts += 1;
}
// A connection listener denies all incoming substreams, thus none can ever be fully negotiated.
// TODO: remove when Rust 1.82 is MSRV
#[allow(unreachable_patterns)]
future::Either::Right(output) => void::unreachable(output),
}
}
Expand Down Expand Up @@ -153,6 +155,8 @@ impl Handler {
<Self as ConnectionHandler>::InboundProtocol,
>,
) {
// TODO: remove when Rust 1.82 is MSRV
#[allow(unreachable_patterns)]
void::unreachable(error.into_inner());
}

Expand All @@ -164,6 +168,8 @@ impl Handler {
>,
) {
let error = match error {
// TODO: remove when Rust 1.82 is MSRV
#[allow(unreachable_patterns)]
StreamUpgradeError::Apply(v) => void::unreachable(v),
StreamUpgradeError::NegotiationFailed => outbound::Error::Unsupported,
StreamUpgradeError::Io(e) => outbound::Error::Io(e),
Expand Down Expand Up @@ -298,6 +304,8 @@ impl ConnectionHandler for Handler {
ConnectionEvent::FullyNegotiatedOutbound(fully_negotiated_outbound) => {
self.on_fully_negotiated_outbound(fully_negotiated_outbound)
}
// TODO: remove when Rust 1.82 is MSRV
#[allow(unreachable_patterns)]
ConnectionEvent::ListenUpgradeError(listen_upgrade_error) => {
self.on_listen_upgrade_error(listen_upgrade_error)
}
Expand Down
4 changes: 4 additions & 0 deletions protocols/gossipsub/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,8 @@ impl ConnectionHandler for Handler {
..
}) => match protocol {
Either::Left(protocol) => handler.on_fully_negotiated_inbound(protocol),
// TODO: remove when Rust 1.82 is MSRV
#[allow(unreachable_patterns)]
Either::Right(v) => void::unreachable(v),
},
ConnectionEvent::FullyNegotiatedOutbound(fully_negotiated_outbound) => {
Expand All @@ -504,6 +506,8 @@ impl ConnectionHandler for Handler {
}) => {
tracing::debug!("Dial upgrade error: Protocol negotiation timeout");
}
// TODO: remove when Rust 1.82 is MSRV
#[allow(unreachable_patterns)]
ConnectionEvent::DialUpgradeError(DialUpgradeError {
error: StreamUpgradeError::Apply(e),
..
Expand Down
1 change: 1 addition & 0 deletions protocols/gossipsub/src/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use crate::{Message, RawMessage, TopicHash};

/// A general trait of transforming a [`RawMessage`] into a [`Message`]. The
///
/// [`RawMessage`] is obtained from the wire and the [`Message`] is used to
/// calculate the [`crate::MessageId`] of the message and is what is sent to the application.
///
Expand Down
2 changes: 2 additions & 0 deletions protocols/kad/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,8 @@ impl Handler {
// is a `Void`.
let protocol = match protocol {
future::Either::Left(p) => p,
// TODO: remove when Rust 1.82 is MSRV
#[allow(unreachable_patterns)]
future::Either::Right(p) => void::unreachable(p),
};

Expand Down
2 changes: 1 addition & 1 deletion protocols/perf/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
Loading

0 comments on commit 21c75e9

Please sign in to comment.