Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/cargo/stun-0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Sep 11, 2023
2 parents 9311a6d + 0df1a96 commit b5f24f5
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 41 deletions.
52 changes: 26 additions & 26 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ libp2p-quic = { version = "0.9.2", path = "transports/quic" }
libp2p-relay = { version = "0.16.1", path = "protocols/relay" }
libp2p-rendezvous = { version = "0.13.0", path = "protocols/rendezvous" }
libp2p-request-response = { version = "0.25.1", path = "protocols/request-response" }
libp2p-server = { version = "0.12.2", path = "misc/server" }
libp2p-server = { version = "0.12.3", path = "misc/server" }
libp2p-swarm = { version = "0.43.4", path = "swarm" }
libp2p-swarm-derive = { version = "0.33.0", path = "swarm-derive" }
libp2p-swarm-test = { version = "0.2.0", path = "swarm-test" }
Expand All @@ -108,7 +108,7 @@ quick-protobuf-codec = { version = "0.2.0", path = "misc/quick-protobuf-codec" }
quickcheck = { package = "quickcheck-ext", path = "misc/quickcheck-ext" }
rw-stream-sink = { version = "0.4.0", path = "misc/rw-stream-sink" }
multiaddr = "0.18.0"
multihash = "0.19.0"
multihash = "0.19.1"


[patch.crates-io]
Expand Down
4 changes: 2 additions & 2 deletions identity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bs58 = { version = "0.5.0", optional = true }
ed25519-dalek = { version = "2.0", optional = true, features = ["rand_core"] }
libsecp256k1 = { version = "0.7.0", optional = true }
log = "0.4"
multihash = { version = "0.19.0", optional = true }
multihash = { version = "0.19.1", optional = true }
p256 = { version = "0.13", default-features = false, features = ["ecdsa", "std", "pem"], optional = true }
quick-protobuf = "0.8.1"
rand = { version = "0.8", optional = true }
Expand All @@ -40,7 +40,7 @@ peerid = [ "dep:multihash", "dep:bs58", "dep:rand", "dep:thiserror", "dep:sha2"

[dev-dependencies]
quickcheck = { workspace = true }
base64 = "0.21.3"
base64 = "0.21.4"
serde_json = "1.0"
rmp-serde = "1.1"
criterion = "0.5"
Expand Down
4 changes: 2 additions & 2 deletions misc/keygen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ publish = false
clap = { version = "4.3.23", features = ["derive"] }
zeroize = "1"
serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.105"
serde_json = "1.0.106"
libp2p-core = { workspace = true }
base64 = "0.21.3"
base64 = "0.21.4"
libp2p-identity = { workspace = true }
4 changes: 4 additions & 0 deletions misc/server/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.12.3] - unreleased
### Changed
- Add libp2p-lookup to Dockerfile to enable healthchecks.

## [0.12.2]
### Fixed
- Adhere to `--metrics-path` flag and listen on `0.0.0.0:8888` (default IPFS metrics port).
Expand Down
2 changes: 1 addition & 1 deletion misc/server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libp2p-server"
version = "0.12.2"
version = "0.12.3"
authors = ["Max Inden <mail@max-inden.de>"]
edition = "2021"
repository = "https://github.com/libp2p/rust-libp2p"
Expand Down
8 changes: 6 additions & 2 deletions misc/server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
FROM rust:1.66-bullseye as builder
FROM rust:1.72-bullseye as builder
WORKDIR /usr/src/rust-libp2p-server

# Run with access to the target cache to speed up builds
WORKDIR /workspace

RUN --mount=type=cache,target=/usr/local/cargo/registry \
cargo install --locked --root /usr/local libp2p-lookup --version 0.6.4

ADD . .
RUN --mount=type=cache,target=./target \
--mount=type=cache,target=/usr/local/cargo/registry \
Expand All @@ -12,5 +16,5 @@ RUN --mount=type=cache,target=./target \
mv ./target/release/libp2p-server /usr/local/bin/libp2p-server

FROM gcr.io/distroless/cc
COPY --from=builder /usr/local/bin/libp2p-server /usr/local/bin/libp2p-server
COPY --from=builder /usr/local/bin/libp2p-server /usr/local/bin/libp2p-lookup /usr/local/bin/
CMD ["libp2p-server"]
6 changes: 6 additions & 0 deletions misc/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,9 @@ Local peer id: PeerId("12D3KooWSa1YEeQVSwvoqAMhwjKQ6kqZQckhWPb3RWEGV3sZGU6Z")
Listening on "/ip4/127.0.0.1/udp/4001/quic"
[...]
```

The Docker container includes [libp2-lookup](https://github.com/mxinden/libp2p-lookup/) to enable adding a proper healthcheck for container startup, e.g.

``` shell
docker run --health-cmd 'libp2p-lookup direct --address /ip4/127.0.0.1/tcp/4001/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa' /home/ipfs/.ipfs:/ipfs ghcr.io/libp2p/rust-libp2p-server --config /ipfs/config
```
6 changes: 3 additions & 3 deletions protocols/gossipsub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ wasm-bindgen = ["getrandom/js", "instant/wasm-bindgen"]

[dependencies]
asynchronous-codec = "0.6"
base64 = "0.21.3"
base64 = "0.21.4"
byteorder = "1.3.4"
bytes = "1.4"
bytes = "1.5"
either = "1.9"
fnv = "1.0.7"
futures = "0.3.28"
Expand All @@ -36,7 +36,7 @@ regex = "1.9.5"
serde = { version = "1", optional = true, features = ["derive"] }
sha2 = "0.10.7"
smallvec = "1.11.0"
unsigned-varint = { version = "0.7.0", features = ["asynchronous_codec"] }
unsigned-varint = { version = "0.7.2", features = ["asynchronous_codec"] }
void = "1.0.2"

# Metrics dependencies
Expand Down
2 changes: 1 addition & 1 deletion protocols/request-response/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ libp2p-swarm = { workspace = true }
libp2p-identity = { workspace = true }
rand = "0.8"
serde = { version = "1.0", optional = true}
serde_json = { version = "1.0.105", optional = true }
serde_json = { version = "1.0.106", optional = true }
smallvec = "1.11.0"
void = "1.0.2"
log = "0.4.20"
Expand Down
2 changes: 1 addition & 1 deletion swarm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ libp2p-yamux = { path = "../muxers/yamux" } # Using `path` here because this is
quickcheck = { workspace = true }
void = "1"
once_cell = "1.18.0"
trybuild = "1.0.83"
trybuild = "1.0.84"

[[test]]
name = "swarm_derive"
Expand Down
2 changes: 1 addition & 1 deletion transports/quic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = "MIT"

[dependencies]
async-std = { version = "1.12.0", optional = true }
bytes = "1.4.0"
bytes = "1.5.0"
futures = "0.3.28"
futures-timer = "3.0.2"
if-watch = "3.0.1"
Expand Down

0 comments on commit b5f24f5

Please sign in to comment.