Commit Graph

2873 Commits

Author SHA1 Message Date
7af4af1e3e bump version 2023-12-18 17:06:11 +03:00
62f1bfd5c1 Merge branch 'master' into rand-feature 2023-10-18 11:39:07 +04:00
c442df892e docs(readme): add homestar as notable user
Add [Homestar](https://github.com/ipvm-wg/homestar) to the list of notable users. Homestar is an implementation of the InterPlanetary Virtual Machine (IPVM) specification.

Pull-Request: #4682.
2023-10-17 21:07:15 +00:00
f582507e5c refactor(examples): add rendezvous point fixed keypair
Related: #4380.

Pull-Request: #4681.
2023-10-17 20:57:20 +00:00
203e11c1c8 feat(swarm): deprecated keep_alive_timeout from OneShotHandlerConfig
Related: #3844.
Related: #4677

Pull-Request: #4680.
2023-10-17 20:41:04 +00:00
d9bbdb83df Update Cargo.lock 2023-10-17 14:52:08 +04:00
3e824d9639 Merge branch 'master' into rand-feature 2023-10-17 12:22:29 +04:00
411824ad50 feat(kad): deprecate Config::set_connection_idle_timeout
Related: #3844.
Related: #4659.

Pull-Request: #4675.
2023-10-17 07:46:19 +00:00
f12e01546f ci: allow opt-out of changelog lint for internal changes
We introduced a lint in #4620 that ensures the changelog is updated when we touch a certain crate. This however leads to many "false-positives" where a change to the source code is not actually worth mentioning in the changelog.

To opt out of this change, this patch adds a condition to the job that checks for a `internal:$crate` label and if that is applied, it doesn't run the lint.

Pull-Request: #4673.
2023-10-17 07:33:42 +00:00
21c7ee88ba deps: bump regex from 1.10.0 to 1.10.2
Pull-Request: #4668.
2023-10-17 03:41:05 +00:00
82902fc9f9 fix(kad): re-export NodeStatus
The `EntryView` struct exposes the node status however its type is not public making it impossible to use the status field. This change re-exports `NodeStatus`.

Related: #4108.

Pull-Request: #4645.
2023-10-16 23:54:36 +00:00
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
09f8cb4d27 ci: don't require changelog entries for docs and deps
Pull-Request: #4670.
2023-10-16 22:31:06 +00:00
ce91c1c22c chore: apply clippy lints to public API
By default, clippy doesn't suggest changes if it would break the public API. Whilst a sensible default, it makes us miss certain opportunities to follow conventions correctly. When a new lint is added, we can always temporarily allow it and make a change in the next breaking release but I think it is better to be aware of the lint than having it automatically silenced.

Pull-Request: #4653.
2023-10-16 21:57:36 +00:00
5d54f705f7 Merge branch 'master' into rand-feature 2023-10-16 21:57:44 +04:00
7c6f75eaf2 feat(swarm): deprecate KeepAlive::Until
In preparation for removing this variant, we are issuing a deprecation notice. The linked issue describes why and guides users in migrating away from it. This deprecation is backwards-compatible and allows us to remove the variant in the next breaking release. We haven't migrated all internal protocols yet but that isn't strictly necessary to issue the deprecation.

Related: #3844.

Pull-Request: #4656.
2023-10-16 16:32:09 +00:00
e54580525d deps: bump tracing from 0.1.37 to 0.1.39
Pull-Request: #4665.
2023-10-16 08:22:36 +00:00
c980b4e2ce deps(noise): update x25519-dalek to 2.0.0
Pull-Request: #4657.
2023-10-16 07:43:33 +00:00
e1c1f038fe chore(perf): remove unused module
Related: #3844.

Pull-Request: #4655.
2023-10-16 07:05:10 +00:00
c91ecbc8a2 ci: don't run changelog check on chores and refactor PRs
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.
2023-10-16 06:43:06 +00:00
29c44e8576 ci: run clippy on all targets
A small left-over mistake from moving towards `Cargo.toml` controlled lint configuration.

Pull-Request: #4654.
2023-10-16 06:26:08 +00:00
44ce6566f7 chore: activate clippy::unnecessary_wraps lint
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.
2023-10-16 02:31:29 +00:00
15ad4ea1d1 feat(gossipsub): deprecate Config::idle_timeout
Deprecate the `Config::idle_timeout` function in preparation for removing the `KeepAlive::Until` entirely.

Related: #3844.

Pull-Request: #4648.
2023-10-15 12:05:08 +00:00
4686ce8e66 feat(rendezous): refresh registration on change to external addresses
Resolves #4627.

Pull-Request: #4629.
2023-10-15 08:40:13 +00:00
d72c67d94e fix(kad): actually report unsupported protocol
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.
2023-10-14 22:43:40 +00:00
7a43faf380 Merge branch 'master' into rand-feature 2023-10-15 02:37:56 +04:00
0446068b4b ci: ensure Cargo.toml and CHANGELOG of published crates are updated
Resolves: #4367.

Pull-Request: #4620.
2023-10-14 09:45:03 +00:00
ee4f2f55b0 Merge branch 'master' into rand-feature 2023-10-14 11:24:57 +04:00
74c087dcef fix(libp2p): add shortcut with_tcp(...).with_bandwidth_logging()
Add the shortcut method `.with_bandwidth_logging` to `SwarmBuilder<_, QuicPhase<_>>`, thus allowing `with_tcp(...).with_bandwidth_logging()`.

Pull-Request: #4626.
2023-10-13 12:17:10 +00:00
56cb08a9b0 fix(quic): delete flaky dial_failure test
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.
2023-10-13 08:10:33 +00:00
50a7ffe119 refactor(kad): delete unused code
We have a fair bit of unused code in `libp2p-kad` that was ignored because we had `#[allow(dead_code)]` at the top of the crate.

Pull-Request: #4633.
2023-10-13 08:00:02 +00:00
d6351eead7 deps: bump if-watch from 3.0.1 to 3.1.0
Pull-Request: #4635.
2023-10-13 06:10:06 +00:00
6aa805d581 refactor: make debug-print of StreamProtocol more concise
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.
2023-10-13 05:23:11 +00:00
7947a9fded deps: bump serde from 1.0.188 to 1.0.189
Pull-Request: #4637.
2023-10-13 04:47:56 +00:00
0626e2e329 docs: fix misc. errors around changelogs and manifests
Detected by #4620.

Pull-Request: #4630.
2023-10-13 04:29:38 +00:00
7120529c6d fix(kad): rewrite tests to be less flaky
Not sure why but these tests have recently been quite flaky and are blocking several PRs.

Pull-Request: #4634.
2023-10-13 04:18:19 +00:00
497f393987 fix(quic): don't report error for gracefully closed connections
Closes quinn's `Endpoint` with `Ok(())`  when `Accept` returns `None`.

Resolves: #4588.
Related: https://github.com/quinn-rs/quinn/issues/1676.

Pull-Request: #4621.
2023-10-12 09:05:07 +00:00
5c498f656c ci: use new "transport-interop" action
Resolves: #4592.

Pull-Request: #4594.
2023-10-11 20:01:34 +00:00
7fbd4f1e56 Fix compilation in certain crates 2023-10-11 13:16:19 +04:00
9c3fd0ef2b Merge branch 'master' into rand-feature 2023-10-10 18:01:27 +04:00
fe1b8b7b8f Add rand feature to tests where required 2023-10-10 18:00:36 +04:00
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
50ec01cc31 Merge branch 'master' into rand-feature 2023-10-10 11:18:45 +04:00
c9077117f0 Remove a comment 2023-10-10 11:12:42 +04:00
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
3ae72557ab deps: bump tokio from 1.32.0 to 1.33.0
Pull-Request: #4615.
2023-10-10 05:17:02 +00:00
6cc40fe533 deps: bump byteorder from 1.4.3 to 1.5.0
Pull-Request: #4614.
2023-10-10 05:04:05 +00:00
d3f34454d4 fix: don't push rust-libp2p-server image for dependabot PRs
Pull-Request: #4619.
2023-10-10 04:47:51 +00:00
bcd5f06606 Add note about rand feature flag 2023-10-10 13:42:16 +11:00
d9bcbb72ec Merge branch 'master' into rand-feature 2023-10-10 13:40:57 +11:00