Commit Graph

2846 Commits

Author SHA1 Message Date
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
19c5cf22ec feat(websocket): add WebSocket for WASM environments
Resolves https://github.com/libp2p/rust-libp2p/issues/3611.

Pull-Request: #4102.
2023-10-10 01:41:29 +00:00
5efcb8ff6d deps: bump regex from 1.9.6 to 1.10.0
Pull-Request: #4617.
2023-10-10 01:13:45 +00:00
e6be50154d deps: bump proc-macro-warning from 0.4.2 to 1.0.0
Pull-Request: #4608.
2023-10-10 00:56:57 +00:00
f2a9707dde Merge branch 'master' into rand-feature 2023-10-09 21:59:40 +04:00
14ccaed094 deps: bump libc from 0.2.148 to 0.2.149
Pull-Request: #4609.
2023-10-09 13:43:06 +00:00
2f22dd2be1 deps: bump proc-macro2 from 1.0.67 to 1.0.69
Pull-Request: #4613.
2023-10-09 13:23:47 +00:00
8114894f67 docs: add pk records insertion example
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.
2023-10-09 13:08:22 +00:00
1bfaf1c67d deps: bump lru from 0.11.1 to 0.12.0
Pull-Request: #4610.
2023-10-09 12:04:49 +00:00
94894e4c9f deps: bump num-traits from 0.2.16 to 0.2.17
Pull-Request: #4612.
2023-10-09 11:06:22 +00:00
630b7132dc deps: bump reqwest from 0.11.21 to 0.11.22
Pull-Request: #4611.
2023-10-09 10:53:25 +00:00
fedbb60d71 Merge branch 'master' into rand-feature 2023-10-09 13:17:40 +04:00
ba4d56f436 deps: bump syn from 2.0.37 to 2.0.38
Pull-Request: #4607.
2023-10-09 09:14:52 +00:00
2d158a1ba8 Add libp2p-idenity/rand feature to libp2p-swarm-test 2023-10-09 13:12:22 +04:00
0c69bc665a Bump libp2p version 2023-10-09 13:12:22 +04:00
1a460fa66f feat: change md issue templates into yml forms
Resolves: #4151.

Pull-Request: #4560.
2023-10-09 08:49:18 +00:00
3458950bea chore(upnp, webrtc): add missing docs.rs metadata
Includes necessary package metadata to improve documentation on docs.rs (shows which items are behind a cfg).
Read more on: #2983

Pull-Request: #4599.
2023-10-09 02:46:32 +00:00
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
35b8308817 fix(interop): only write to cache if we have credentials
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.
2023-10-09 01:50:19 +00:00
77149f08c4 fix(identity): correctly follow extract-expand for HKDF
As @mxinden pointed out in https://github.com/libp2p/rust-libp2p/pull/4554#discussion_r1344747938, we were not correctly following the HKDF steps of extract and expand.

Pull-Request: #4589.
2023-10-09 01:31:10 +00:00
ef9c544d4d deps: upgrade cargo semver-checks to v0.24
I've also changed our use of the action to pin by Git hash as per our policy for external actions.

See https://github.com/obi1kenobi/cargo-semver-checks/releases/tag/v0.24.0 for details on the release.

Pull-Request: #4603.
2023-10-09 01:14:44 +00:00
b6a1398060 fix: remove redundant intra-doc link
The recent Rust release introduced a new rustdoc lint which is currently failing CI.

Pull-Request: #4602.
2023-10-09 00:58:32 +00:00
d68fe13e98 Update identity/CHANGELOG.md
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2023-10-06 22:24:47 +07:00
fbd443888c Update version in the top-level Cargo.toml 2023-10-06 19:23:22 +04:00
4e9419c59c Format identity/Cargo.toml
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2023-10-06 20:56:19 +07:00
8d9881d965 ed25519 feature doens't depend on rand directly 2023-10-05 20:41:05 +04:00
719a6e0cf1 Merge branch 'master' into rand-feature 2023-10-05 19:02:35 +04:00
4fe58a1a3b libp2p-identity version bump 2023-10-05 18:27:30 +04:00