`Certificate#fingerprint()` returns `Fingerprint`, but since it's not
public, I was not able to test it in my project. I.e. before this change it was
not possible to do:
```
cert.fingerprint() == Fingerprint::raw([1u8 ...])
```
Pull-Request: #3648.
The check for fanout peer inclusion in `test_join` does not check anything since `new_peers` is always empty.
12b785e94e/protocols/gossipsub/src/behaviour/tests.rs (L611)
I assume the intention was to fill the `new_peers` with the fanout peers. In this MR I do just that.
Pull-Request: #3628.
Currently, banning peers is a first-class feature of `Swarm`. With the new connection management capabilities of `NetworkBehaviour`, we can now implement allow and block lists as a separate module.
We introduce a new crate `libp2p-allow-block-list` and deprecate `Swarm::ban_peer_id` in favor of that.
Related #2824.
Pull-Request: #3590.
In earlier iterations of the design for generic connection management, we removed the `ConnectionId::new` constructor because it would have allowed users to create `ConnectionId`s that are already taken, thus breaking invariants that `NetworkBehaviour`s rely on. Later, we incorporated the creation of `ConnectionId` in `DialOpts` which mitigates this risk altogether.
Thus, it is reasonably safe to introduce a public, non-deprecated constructor for `ConnectionId` that can be used for tests.
Related https://github.com/libp2p/rust-libp2p/pull/3327#issuecomment-1469870307.
Pull-Request: #3652.
We currently expose `libp2p-quic` and `libp2p-webrtc` as submodules from the `libp2p` crate despite those only being "alpha" status. This causes problems because we need to pin those dependencies due to `cargo` automatically upgrading alphas (which are allowed to incur breaking changes as per semver spec). Additionally, exposing these modules practically hides the "alpha" state of those modules, rendering it kind of obsolete.
The "alpha" state is still true for those modules, thus to properly communicate this to users, we deprecate the modules and require users to spell out the dependency and the alpha version in their manifest.
Pull-Request: #3580.
This patch deprecates the existing connection limits within `Swarm` and uses the new `NetworkBehaviour` APIs to implement it as a plugin instead.
Related #2824.
Pull-Request: #3386.
Allows folks like @bajtos to use the crate, see https://github.com/filecoin-station/zinnia/pull/85.
I opted for not exposing the crate through the `libp2p` meta crate as it is a testing tool only. @thomas
let me know if you prefer me to do so.
Pull-Request: #3629.
Implementation of the libp2p perf protocol according to https://github.com/libp2p/specs/pull/478/.
//CC @MarcoPolo as the author of the specification.
**Don't (yet) expect this to produce reliable performance metrics.**
Pull-Request: #3508.
`cargo release` provides multiple steps:
- changes
- version
- replace
- hook
- commit
- publish
- owner
- tag
- push
- config
- help
We only make use of `publish` and `tag`. We explicitly don't want `cargo release` to do `version` or `commit`.
Update the release docs accordingly, namely replace the generic `cargo release` with a two step process `cargo release publish` and `cargo release tag`.
Pull-Request: #3596.
This modifies the gossipsub implementation to use monotonically increasing sequence numbers for signed messages (as dictated by the specification). There is a discussion about this in #3453. This change will make rust-libp2p gossipsub align with the go-implementation when messages are signed.
Messages will however still use randomized sequence numbers when messages are unsigned for security reasons (as discussed in the issue linked).
This shouldn't change any user-level API, only the seqno behavior. It is fully backwards compatible.
Resolves#3453.
Pull-Request: #3551.
Mark constructors `Swarm::with_X_executor` as deprecated.
Move the deprecated functionality to `SwarmBuilder::with_X_executor`
Use `SwarmBuilder` throughout.
Resolves#3186.
Resolves#3107.
Pull-Request: #3588.
Derive trait `Clone` for `mdns::Event`. This makes cloning its contents without destroying type information possible.
Related #3593.
Pull-Request: #3606.
We only retain it for the test job which runs `cargo semver-checks` which may need to build the rustdoc for the baseline version which still requires `protoc` to be installed until we make the next round of releases.
Pull-Request: #3592.
Instead of running with `--locked` which would require us to pick a CI job that does this, we can add a dedicated job that only has as its responsibility to ensure that `Cargo.lock` is up-to-date.
Fixes#3547.
Pull-Request: #3587.
We will embrace the fact that cargo auto updates to new alpha versions. We can prevent auto updates on breaking alpha versions by bumping their minor version.
Reverts https://github.com/libp2p/rust-libp2p/pull/3538/
Pull-Request: #3582.
With the adoption of mergify, we now use the `## Description` section as the commit message. Update the PR template to guide users towards crafting a good commit message. Specifically, ask them to point to relevant issues and PRs at the end of the message instead of in a separate section.
Pull-Request: #3570.