We don't always want to write a changelog entry or bump the version of a crate when we make changes to it. This especially applies to refactorings and other chores. We can automatically detect such PRs based on our conventional commit title.
At the moment, this is not per crate but could be extended in the future. For now, this should be good enough to unblock PRs that are currently stuck on this workflow.
Pull-Request: #4658.
Today, I discovered this clippy lint as part of some other work and found it useful. It doesn't turn up anything in our repository at the moment but it is good to guard against this in future code.
Pull-Request: #4652.
It turns out, we never actually used `ProtocolStatus::NotSupported`. Or at least, we never constructed it within the `Handler`. This didn't get flagged by rustc because
a) we allowed the `dead_code` lint across `libp2p-kad`
b) the `HandlerEvent` enum is public and thus could be constructed by users
Related: #4632.
Related: #4633.
Pull-Request: #4639.
This test is sometimes flaky. Instead of fixing it, I am proposing to delete it because it doesn't test anything meaningful. Dialing a non-existent transport should fail? Yes probably. Should we test that dropping a value destroys the relevant tasks? I don't think so. That is covered by Rust's ownership rules.
Pull-Request: #4640.
The` fmt::Debug` implementation of a type should in most cases reveal its internal structure. `StreamProtocol` is likely to be debug-printed a lot and in many cases, the only contract is the `fmt::Debug` impl. The internals of `StreamProtocol` only exist for performance reasons to avoid allocations for statically-known protocol strings. Revealing this implementation detail isn't particularly beneficial to end users. At the same time, the current implementation is very noise.
Previously, the `protocols` field of an `identify::Info` would e.g. read as:
```
protocols: [StreamProtocol { inner: Right("/ipfs/id/1.0.0") }, StreamProtocol { inner: Right("/ipfs/id/push/1.0.0") }, StreamProtocol { inner: Right("/ipfs/kad/1.0.0") }]
```
With this patch, it reads as:
```
protocols: ["/ipfs/id/1.0.0", "/ipfs/kad/1.0.0", "/ipfs/id/push/1.0.0"]
```
Pull-Request: #4631.
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.
In the original issue I mention that a lot of external dependencies would be needed to insert records into the IPFS DHT. While this is still true for IPNS-type records, I found that PK-type records can be created with no need for external code. Thus, I decided to try and enhance the already existing example and add the option to insert a PK record there.
Resolves#2263.
Pull-Request: #4567.
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.
For pull-requests coming from forks, we don't have access to the secrets. This is currently failing CI for all PRs from forks as docker cannot write the cache after running the tests.
Pull-Request: #4604.
Currently, the Docker images for the HEAD branch of the pull-request get re-built completely every time we push a new commit to a branch. That is because the RUN caches use the local disk of the host system but those are ephemeral in GitHub actions.
To fix this, we rewrite the dockerfiles to use `cargo chef`, a tool developed to create a cached layer of built dependencies that doesn't get invalidated as the application source changes.
Normally, these layers are also cached on the local filesystem. To have them available across pull-requests and branches, we instruct buildkit to use the same S3 cache as we use in the interop tests already for docker layers. As a result, this should greatly speed up our CI.
Resolves: #3925.
Pull-Request: #4593.
Removes the usage of the `to_swarm` `libp2p-swarm-derive` attribute in favor of the automatically generated event through the `NetworkBehaviour` derive macro.
Pull-Request: #4580.
`libp2p-identity` gets a special treatment in our workspace because it is the only crate that is a dependency of crates _outside_ the workspace, in particular `multiaddr`. We however also depend on `multiaddr` again in the workspace. As a result, we need to use `[patch.crates-io]` to replace the `libp2p-identity` version across the entire dependency tree. This however doesn't work well with `cargo semver-checks` as it doesn't copy over `[patch]` sections into its workspace where it does the docs building.
To fix the semver checks error, we need to release a new version of `libp2p-identity`.
Pull-Request: #4583.