19 Commits

Author SHA1 Message Date
Thomas Eizinger
43575e9918
refactor: use cargo chef for rust-libp2p-server docker build
Using `cargo chef` allows us to significantly speed up the build of docker images in CI as we can make use of `cache-{to,from}` to push the created cache layers to an S3 bucket.

Pull-Request: #4605.
2023-10-16 23:27:41 +00:00
dependabot[bot]
7947a9fded
deps: bump serde from 1.0.188 to 1.0.189
Pull-Request: #4637.
2023-10-13 04:47:56 +00:00
Thomas Eizinger
0626e2e329
docs: fix misc. errors around changelogs and manifests
Detected by #4620.

Pull-Request: #4630.
2023-10-13 04:29:38 +00:00
Max Inden
3a0f0c292a
fix(server): remove support_draft_29
Support for QUIC draft 29 was removed with https://github.com/libp2p/rust-libp2p/pull/4467.

https://github.com/libp2p/rust-libp2p/pull/4120 reintroduced it as a faulty merge.

This commit removes it again.

Pull-Request: #4622.
2023-10-10 13:05:54 +00:00
Max Inden
d605255fec
feat(libp2p): add SwarmBuilder
Introduce the new `libp2p::SwarmBuilder`. Users should use the new `libp2p::SwarmBuilder` instead of the now deprecated `libp2p::swarm::SwarmBuilder`. See `libp2p::SwarmBuilder` docs on how to use the new builder.

Fixes #3657.
Fixes #3563.
Fixes #3179.

Pull-Request: #4120.
2023-10-10 06:55:14 +00:00
Binston Sukhael Cardoza
0e9d339bd2
ci: use workspace inheritance to enforce lints in all crates
Starting with nightly-2023-09-10, the `[lints]` section in `Cargo.toml` files is stable. Together with workspace inheritance, this can be used to declare all lints we want to enforce in a single place.

Resolves: #4484.

Pull-Request: #4575.
2023-10-09 02:20:46 +00:00
Panagiotis Ganelis
c8b5f49ec2
refactor(kad): rename to follow naming convention across repository
Renamed the following

`kad::Kademlia` -> `kad::Behaviour`
`kad::KademliaEvent` -> `kad::Event`
`kad::KademliaBucketInserts` -> `kad::BucketInserts`
`kad::KademliaStoreInserts` -> `kad::StoreInserts`
`kad::KademliaConfig` -> `kad::Config`
`kad::KademliaCaching` -> `kad::Caching`
`kad::KademliaEvent` -> `kad::Event`
`kad::KademliaConnectionType` -> `kad::ConnectionType`
`KademliaHandler` -> `Handler`
`KademliaHandlerEvent` -> `HandlerEvent`
`KademliaProtocolConfig` -> `ProtocolConfig`
`KademliaHandlerIn` -> `HandlerIn`
`KademliaRequestId` -> `RequestId`
`KademliaHandlerQueryErr` -> `HandlerQueryErr`

Resolves: #4485

Pull-Request: #4547.
2023-09-27 20:25:22 +00:00
whtsht
95890b550b
refactor(dns): unify symbol naming
Renamed the following
- `dns::GenDnsConfig`  ->  `dns::Config`
- `dns::DnsConfig` -> `dns::async_std::Config`
- `dns::TokioDnsConfig` -> `dns::tokio::Config`

If async-std feature is enable, use `dns::async_std::Config`. When using tokio, import `dns::tokio::Config` . There is no need to use `dns::Config` directly.

Resolves #4486.
Related: #2217.

Pull-Request: #4505.
2023-09-24 05:31:42 +00:00
Max Inden
600b6af314
chore: prepare non-breaking releases
Crates to be released:

- core
- misc/futures-bounded
- misc/server
- misc/webrtc-utils
- protocols/kad
- protocols/ping
- protocols/upnp
- swarm
- transports/webrtc-websys
- transports/webrtc

Pull-Request: #4537.
2023-09-22 11:02:02 +00:00
chirag-bgh
4ea42c99eb
refactor(server): remove spawning of 2nd tokio runtime
Closes #4448.

Pull-Request: #4454.
2023-09-13 02:45:50 +00:00
sufferpurrityxd
b0c3da7f87
feat(swarm): log local peer id on swarm creation
Closes https://github.com/libp2p/rust-libp2p/issues/4394.

Pull-Request: #4439.
2023-09-12 10:09:27 +00:00
Max Inden
0e64d71196
fix(server): filter out /quic in favor of /quic-v1
Configuration files generated by Kubo <= v0.22 list both `/quic` and `/quic-v1` listen addresses with the same UDP port. Given that we enable draft-29, the two addresses are treated the same by rust-libp2p's QUIC implementation. Though calling `listen_on` with both results in an "Address already in use" error by the OS on the second call. To prevent this from happening filter out `/quic` addresses in favor of `/quic-v1`.

Pull-Request: #4467.
2023-09-12 03:03:38 +00:00
Mario Camou
ce8f38cc16
feat(misc/server): add libp2p-lookup to rust-libp2p-server
As mentioned in #4444, we need to include https://github.com/mxinden/libp2p-lookup/ in the image so that we can enable a healthcheck when it starts up.

Pull-Request: #4466.
2023-09-11 16:51:54 +00:00
Max Inden
96213b37c6
fix(misc/server): adhere to --metrics-path and listen on 0.0.0.0:8888
This commit reverts the previous metrics behavior. Namely:

- adhering to --metrics-path flag
- listening on 0.0.0.0:8888 instead of 127.0.0.1:8080

Note that 8888 is the default IPFS debug (aka. metrics) port.

See https://github.com/mxinden/rust-libp2p-server/blob/master/src/metric_server.rs for previous behavior.

Pull-Request: #4392.
2023-08-30 14:39:07 +00:00
dependabot[bot]
e36e8ce445
deps: bump serde from 1.0.185 to 1.0.188
Pull-Request: #4398.
2023-08-28 08:41:54 +00:00
Max Inden
9946890b53
fix(misc/server): import libp2p as workspace dependency
One needs to specify a version of `libp2p` dependeny in `misc/server/Cargo.toml` or import as a workspace dependency, in order to publish to crates.io.

This commit does the latter for the sake of consistency with the other libp2p-* dependencies.

Pull-Request: #4391.
2023-08-25 08:44:15 +00:00
Max Inden
f265f39e70
fix(misc/server): add repository URL to Cargo.toml
Pull-Request: #4390.
2023-08-24 16:10:34 +00:00
Max Inden
e8759c85c2
chore: prepare libp2p v0.52.3
- Addresses TLS CVE:
- https://github.com/libp2p/rust-libp2p/pull/4381
- https://github.com/libp2p/rust-libp2p/pull/4378
- Stable QUIC https://github.com/libp2p/rust-libp2p/pull/4325
- New rust-libp2p-server release https://github.com/libp2p/rust-libp2p/pull/4311

Pull-Request: #4387.
2023-08-24 12:47:59 +00:00
Max Inden
e974efb755
feat: add rust-libp2p-server to monorepo
Moves https://github.com/mxinden/rust-libp2p-server to the rust-libp2p monorepository.

> # Rust libp2p Server
>
> A rust-libp2p based server implementation running:
>
> - the [Kademlia protocol](https://github.com/libp2p/specs/tree/master/kad-dht)
>
> - the [Circuit Relay v2 protocol](https://github.com/libp2p/specs/blob/master/relay/circuit-v2.md)
>
> - the [AutoNAT protocol](https://github.com/libp2p/specs/blob/master/autonat/README.md)

Pull-Request: #4311.
2023-08-21 18:49:42 +00:00