Commit Graph

2601 Commits

Author SHA1 Message Date
cf3cff147c fix(kad): prevent simultaneous dials to peer
By default, dialing is prevented when already connected. `kad` already checks this manually before doing dials. By changing the condition from `Disconnected` to `NotDialing`, we prevent simultaneous dials to a peer.

Pull-Request: #4224.
2023-07-24 17:06:48 +00:00
3f0fef2823 deps: bump asynchronous-codec from 0.6.1 to 0.6.2
Pull-Request: #4244.
2023-07-24 16:51:08 +00:00
cfa879396c deps: bump tempfile from 3.6.0 to 3.7.0
Pull-Request: #4247.
2023-07-24 16:35:29 +00:00
b52c3ac317 deps: bump serde from 1.0.171 to 1.0.175
Pull-Request: #4246.
2023-07-24 16:19:48 +00:00
12c98dca35 deps: bump either from 1.8.1 to 1.9.0
Pull-Request: #4243.
2023-07-24 16:02:14 +00:00
521eea2d01 deps: bump thiserror from 1.0.43 to 1.0.44
Pull-Request: #4242.
2023-07-24 15:46:36 +00:00
458fb7b15b deps: bump tower-http from 0.4.1 to 0.4.3
Pull-Request: #4240.
2023-07-24 15:31:08 +00:00
9546dd44d5 deps: bump async-trait from 0.1.71 to 0.1.72
Pull-Request: #4239.
2023-07-24 15:14:58 +00:00
f97ff9f514 deps: bump num-traits from 0.2.15 to 0.2.16
Pull-Request: #4238.
2023-07-24 12:17:02 +00:00
9bfa964147 deps: bump rmp-serde from 1.1.1 to 1.1.2
Pull-Request: #4237.
2023-07-24 11:50:11 +00:00
136acf05b0 deps: bump quote from 1.0.31 to 1.0.32
Pull-Request: #4236.
2023-07-24 09:46:58 +00:00
293128dd13 deps: bump syn from 2.0.26 to 2.0.27
Pull-Request: #4235.
2023-07-24 08:32:27 +00:00
52cf26f530 refactor(request-reponse): replace serde_cbor with cbor4ii
As per `RUSTSEC-2021-0127`, serde_cbor is unmaintained.

Fixes #4182.
Related: https://github.com/rustsec/advisory-db/pull/1114.

Pull-Request: #4187.
2023-07-20 13:18:36 +00:00
b18c77e21c chore(libp2p): expose json feature from request-response
`cbor` feature was exposed in `libp2p` but not `json`.

Pull-Request: #4188.
2023-07-20 08:44:32 +00:00
f0b1b122e6 feat(relay): add functions to Limit to access its data
Currently, `Limit` is supplied to many of relay client events, however there is no way to access the fields. This PR adds functions to allow access to the data from those fields.

Pull-Request: #4162.
2023-07-20 08:06:33 +00:00
660fadba35 chore(gossipsub): include in libp2p meta crate when compiling for wasm
Since https://github.com/libp2p/rust-libp2p/pull/3973, gossipsub now fully supports wasm targets. It functions properly when added as a dependency on its own. However, when trying to use it under libp2p by activating a feature, it's not possible and the compiler will raise an error like `unresolved import libp2p::gossipsub`. This pull request enables the use of gossipsub for wasm targets when it's activated as a feature of the libp2p dependency.

Pull-Request: #4217.
2023-07-20 07:48:21 +00:00
1acf4a5e17 deps: bump actions/upload-pages-artifact from 1.0.9 to 2.0.0
Pull-Request: #4183.
2023-07-19 13:56:45 +00:00
6ac15bdb98 deps: bump lru from 0.10.1 to 0.11.0
Pull-Request: #4198.
2023-07-19 13:41:32 +00:00
a10733f8a4 chore: update Rust version for clippy check to 1.71
We also need to prepend the `clippy::allow` with an `unknown_lints` lint because clippy 1.71 does not (yet) know about this new lint.

Pull-Request: #4219.
2023-07-19 13:25:58 +00:00
132688961f deps: bump clap from 4.3.11 to 4.3.12
Pull-Request: #4206.
2023-07-19 13:10:14 +00:00
e4d6d193a4 deps: bump sec1 from 0.7.2 to 0.7.3
Pull-Request: #4207.
2023-07-19 12:53:22 +00:00
8c0c9cc90b deps: bump anyhow from 1.0.71 to 1.0.72
Pull-Request: #4205.
2023-07-19 12:37:34 +00:00
130955748e deps: bump quote from 1.0.29 to 1.0.31
Pull-Request: #4204.
2023-07-19 12:21:53 +00:00
0f0506e08a deps: bump axum from 0.6.18 to 0.6.19
Pull-Request: #4203.
2023-07-19 12:06:09 +00:00
bc866417e6 deps: bump syn from 2.0.25 to 2.0.26
Pull-Request: #4202.
2023-07-19 11:49:33 +00:00
a49ad7785c deps: bump proc-macro2 from 1.0.63 to 1.0.66
Pull-Request: #4200.
2023-07-19 11:34:09 +00:00
42be5b5d16 deps: bump serde from 1.0.168 to 1.0.171
Pull-Request: #4199.
2023-07-19 11:18:10 +00:00
c70f3245dc deps: bump prometheus-client from 0.21.1 to 0.21.2
Pull-Request: #4173.
2023-07-19 11:01:53 +00:00
237f37abae ci: automatically merge PRs of semver-compatible updates
We receive a lot of PRs from dependabot for version updates to our lockfile and Cargo.toml. Whilst it is nice that those are explicit, they require quite some work from maintainers. Often, these PRs only get queued to be merged when a maintainer is next active on a repository which is also likely at a time they want to merge other PRs.

We don't want to automatically merge all updates that are coming in because they might be breaking changes for us if they are exposed in our public API. We solve this by only merging updates that are in a semver-compatible range:

- For major >= 1 updates, only approve them if they have the same major version.
- For major == 0 updates, only approve them if they have the same minor version.

We also add a rule to automatically queue PRs from dependabot with an approval. This avoids us having to approve AND apply the `send-it` label.

Resolves #4186.
Pull-Request: #4210.
2023-07-19 12:45:23 +02:00
d3b4714730 chore: apply suggestions from clippy beta (1.72)
Pull-Request: #4211.
2023-07-18 08:45:26 +00:00
efdba39f83 deps: bump thiserror from 1.0.40 to 1.0.43
Pull-Request: #4174.
2023-07-17 08:45:14 +00:00
30024f38d4 fix: clippy useless_conversion and useless_vec
Pull-Request: #4190.
2023-07-16 03:31:37 +00:00
a3efb40892 fix(examples/kv-store): set kademlia mode to Server
Pull-Request: #4195.
2023-07-16 02:08:34 +00:00
4c889fd6d5 fix(interop): install wasm-opt in Dockerfile.chromium
I'm not able to build this container on my machine arm64 linux because the builder is missing the `wasm-opt` binary. I'm not sure why CI manages to do so. I'm guessing the x86 image is slightly different and may include `wasm-opt`.

This makes a change to that dockerfile to explicitly install `wasm-opt`.

Here's the previous error:


```
// ...
#0 36.90     Finished release [optimized] target(s) in 35.97s
#0 36.91   Installing /root/.cache/.wasm-pack/.wasm-bindgen-cargo-install-0.2.87/bin/wasm-bindgen
#0 36.91   Installing /root/.cache/.wasm-pack/.wasm-bindgen-cargo-install-0.2.87/bin/wasm-bindgen-test-runner
#0 36.91   Installing /root/.cache/.wasm-pack/.wasm-bindgen-cargo-install-0.2.87/bin/wasm2es6js
#0 36.91    Installed package `wasm-bindgen-cli v0.2.87` (executables `wasm-bindgen`, `wasm-bindgen-test-runner`, `wasm2es6js`)
#0 37.06 warning: be sure to add `/root/.cache/.wasm-pack/.wasm-bindgen-cargo-install-0.2.87/bin` to your PATH to be able to run the installed binaries
#0 37.22 Error: no prebuilt wasm-opt binaries are available for this platform: Unrecognized target!
#0 37.22 To disable `wasm-opt`, add `wasm-opt = false` to your package metadata in your `Cargo.toml`.
#0 37.22 Caused by: no prebuilt wasm-opt binaries are available for this platform: Unrecognized target!
#0 37.22 To disable `wasm-opt`, add `wasm-opt = false` to your package metadata in your `Cargo.toml`.
------
ERROR: failed to solve: executor failed running [/bin/sh -c wasm-pack build --target web interop-tests]: exit code: 1
```

Another solution would be to diable wasm-opt as mentioned in the error message as well.

Pull-Request: #4192.
2023-07-13 04:53:24 +00:00
df1caa0da9 chore: prepare libp2p-swarm v0.43.1 and libp2p-kad v0.44.2
Pull-Request: #4166.
2023-07-13 01:58:30 +00:00
fd3fc30c48 ci: run interop tests on bigger hardware
With the move to running our CI on self-hosted runners, this job tends to always be the slowest one. We move it to a bigger runner such that it finishes closer to all the other jobs.

Pull-Request: #3861.
2023-07-11 12:05:07 +00:00
2f288523b0 deps: bump clap from 4.3.10 to 4.3.11
Pull-Request: #4178.
2023-07-11 11:44:04 +00:00
4ddaa550c7 deps: bump webpki-roots from 0.23.1 to 0.24.0
Pull-Request: #4177.
2023-07-11 11:11:24 +00:00
3ce3282f78 deps: bump syn from 2.0.23 to 2.0.25
Pull-Request: #4176.
2023-07-11 10:38:30 +00:00
066f7d6c5d deps: bump async-trait from 0.1.69 to 0.1.71
Pull-Request: #4175.
2023-07-11 10:04:32 +00:00
1246d832a4 deps: bump serde_json from 1.0.99 to 1.0.100
Pull-Request: #4172.
2023-07-11 09:31:49 +00:00
a92a801cce deps: bump smallvec from 1.10.0 to 1.11.0
Pull-Request: #4171.
2023-07-11 08:58:09 +00:00
a6c427483c deps: bump regex from 1.8.4 to 1.9.1
Pull-Request: #4170.
2023-07-11 08:19:26 +00:00
185cb4a2e3 deps: bump tokio from 1.28.2 to 1.29.1
Pull-Request: #4148.
2023-07-10 09:31:15 +00:00
29c0fefaa2 chore: Update CHANGELOG.md
Add missing PR to CHANGELOG.md

Pull-Request: #4163.
2023-07-10 05:39:16 +00:00
2671375cc4 fix(core/choice): log on dial and fix listen log
- Fixes typo in `<OrTransport as Transport>::listen_on` using the word "dial" instead of "listen_on".
- Adds logging to `<OrTransport as Transport>::dial`.

Follow-up to https://github.com/libp2p/rust-libp2p/pull/4133

Pull-Request: #4164.
2023-07-10 01:47:31 +00:00
b4c7dfca63 fix(swarm): external address candidate only after address translation
Pull-Request: #4158.
2023-07-09 23:03:11 +00:00
b6b8844123 docs(swarm): document Swarm::external_addresses
Pull-Request: #4159.
2023-07-07 02:38:54 +00:00
7308221237 feat(core): add logs for OrTransport when trying addresses
Currently, when trying addresses in `listen_on` via `OrTransport`, there are no logs to facilitate debugging. This PR corrects that by providing adequate logs via `std::any::type_name` method.

Resolves #4072.

Pull-Request: #4133.
2023-07-05 00:52:16 +00:00
f0fd535c25 deps: bump Swatinem/rust-cache from 2.5.0 to 2.5.1
Pull-Request: #4155.
2023-07-04 09:13:35 +00:00