2752 Commits

Author SHA1 Message Date
dependabot[bot]
b1beab71aa
deps: bump syn from 1.0.107 to 1.0.109
Pull-Request: #3524.
2023-02-28 06:53:24 +00:00
Thomas Eizinger
2ca93e12c5
refactor(interop-test): remove easy to replace strum dependency
We only use `strum` for the interop-tests but we add 3 dependencies to a full build of the repository for it, including a proc-macro which needs to be pipelined in front of other crates which makes them hard to parallelize. Remove it in favor of fairly trivial reimplementation of `FromStr`.

Pull-Request: #3513.
2023-02-28 05:04:59 +00:00
hanabi1224
52a32ffac1
fix(pnet): flush nonce in handshake
Previously, we did not flush the nonce within the handshake to the stream. This caused problems when `pnet` was composed with the websocket transport. Inserting a flush fixes these compatibility problems.

Resolves https://github.com/libp2p/rust-libp2p/issues/3475.

Pull-Request: #3476.
2023-02-28 04:34:54 +00:00
dependabot[bot]
b8d95ff974
deps: bump tempfile from 3.3.0 to 3.4.0
Pull-Request: #3520.
2023-02-28 03:25:42 +00:00
dependabot[bot]
3a049f0815
deps: bump prost from 0.11.6 to 0.11.8
Pull-Request: #3517.
2023-02-28 02:10:45 +00:00
dependabot[bot]
ac97e28d45
deps: bump env_logger from 0.9.3 to 0.10.0
Pull-Request: #3518.
2023-02-28 01:35:40 +00:00
Thomas Eizinger
d6ebac4e78
refactor(interop-tests): disable unused features
This removes a few dependencies from our dependency tree without any impact on functionality.

Pull-Request: #3512.
2023-02-28 00:37:04 +00:00
Max Inden
ad2954c631
docs(coding-guidelines): Add request response correlation
Allow correlating asynchronous responses to their requests.

Pull-Request: #3290.
2023-02-27 22:57:03 +00:00
Max Inden
1a9cf4f776
fix(uds): Bump version
https://github.com/libp2p/rust-libp2p/pull/3196/ forgot to bump `libp2p-uds`. `libp2p-uds` was updated to `libp2p-core` `v0.39.0` thus requiring the version bump.

This has happened before, see https://github.com/libp2p/rust-libp2p/pull/2720.

Pull-Request: #3502.
2023-02-24 13:21:06 +00:00
Max Inden
71015ee16f
docs: prepare v0.51.0
A large release with lots of changes I am looking forward to. Sorry for the long release cadence.

Anything folks would like to see included that is not yet in `master`? As usual I would like to only block on bug fixes.

Pull-Request: #3491.
2023-02-24 10:42:29 +00:00
Thomas Eizinger
622d0b00de
feat(ci): don't dismiss reviews on dependabot PRs
Pull-Request: #3486.
2023-02-24 21:00:24 +11:00
Thomas Eizinger
d80d92dc45
feat(ci): lint against usages of variables with underscore
Prefixing a variable with an underscore (`_`) in Rust indicates that it is not used. Through refactorings, it can sometimes happen that we do end up using such a variable. In this case, the underscore should be removed.

Clippy can help us with this.

Pull-Request: #3484.
2023-02-24 08:34:59 +00:00
dependabot[bot]
6383e1e8bd
deps: update base64 requirement from 0.20.0 to 0.21.0
Pull-Request: #3315.
2023-02-24 00:36:59 +00:00
Thomas Eizinger
19a554965f
feat(swarm)!: allow NetworkBehaviours to manage connections
Previously, a `ConnectionHandler` was immediately requested from the `NetworkBehaviour` as soon as a new dial was initiated or a new incoming connection accepted.

With this patch, we delay the creation of the handler until the connection is actually established and fully upgraded, i.e authenticated and multiplexed.

As a consequence, `NetworkBehaviour::new_handler` is now deprecated in favor of a new set of callbacks:

- `NetworkBehaviour::handle_pending_inbound_connection`
- `NetworkBehaviour::handle_pending_outbound_connection`
- `NetworkBehaviour::handle_established_inbound_connection`
- `NetworkBehaviour::handle_established_outbound_connection`

All callbacks are fallible, allowing the `NetworkBehaviour` to abort the connection either immediately or after it is fully established. All callbacks also receive a `ConnectionId` parameter which uniquely identifies the connection. For example, in case a `NetworkBehaviour` issues a dial via `NetworkBehaviourAction::Dial`, it can unambiguously detect this dial in these lifecycle callbacks via the `ConnectionId`.

Finally, `NetworkBehaviour::handle_pending_outbound_connection` also replaces `NetworkBehaviour::addresses_of_peer` by allowing the behaviour to return more addresses to be used for the dial.

Resolves #2824.

Pull-Request: #3254.
2023-02-23 23:43:33 +00:00
Thomas Eizinger
794b2a23d0
feat(swarm): remove unused types from public API
Pull-Request: #3497.
2023-02-23 22:25:27 +00:00
Max Inden
79fce51f9b
docs(release): Document patch release process
Quick documentation update to describe patch release branching convention.

Pull-Request: #3490.
2023-02-23 01:03:25 +00:00
dependabot[bot]
30ff1317d6
deps: bump clap from 4.1.4 to 4.1.6
Pull-Request: #3480.
2023-02-22 23:15:32 +00:00
Mahmoud
577e8f9547
chore: update notable users in Readme
Add [Ursa](https://github.com/fleek-network/ursa) by fleek to the notable user's section in Readme.

Pull-Request: #3493.
2023-02-22 21:44:00 +00:00
dependabot[bot]
c7f367a675
deps: bump hyper from 0.14.23 to 0.14.24
Pull-Request: #3429.
2023-02-21 03:13:23 +00:00
dependabot[bot]
bfe3117ff2
deps: bump serde_json from 1.0.91 to 1.0.93
Pull-Request: #3440.
2023-02-21 02:19:37 +00:00
dependabot[bot]
78e48c7851
deps: bump heck from 0.4.0 to 0.4.1
Pull-Request: #3426.
2023-02-21 01:42:59 +00:00
StemCll
58af2e0887
refactor(gossipsub): make error module private
Resolves https://github.com/libp2p/rust-libp2p/issues/3392.

Pull-Request: #3457.
2023-02-20 19:35:21 +00:00
Elena Frank
79b7cef070
fix(identify): don't close stream in protocol::recv
Don't close the stream `protocol::recv`.

This is a short-term fix for #3298.

The issue behind this is a general one on the QUIC transport when closing streams, as described in #3343. This PR only circumvents the issue for identify. A proper solution for our QUIC transport still needs more thought.

Pull-Request: #3344.
2023-02-19 21:18:54 +00:00
Max Inden
0f4930f92b
docs(roadmap): Update done projects and reprioritize (#3467) 2023-02-19 18:40:32 +01:00
dependabot[bot]
57b6605e71
deps: bump amannn/action-semantic-pull-request from 5.0.2 to 5.1.0
Pull-Request: #3459.
2023-02-17 09:24:05 +00:00
dependabot[bot]
462ddeacb7
deps: bump wasm-bindgen-futures from 0.4.33 to 0.4.34
Pull-Request: #3427.
2023-02-17 04:53:54 +00:00
Thomas Eizinger
75cb9ec0ee
feat(ci): move PR number to commit message body
Pull-Request: #3470.
2023-02-17 16:48:15 +13:00
Thomas Eizinger
dda6fc5dd7
feat(ci): only send (and refresh) dependabot PRs weekly (#3477)
Despite `rebase-strategy: "disabled"`, dependabot will refresh (i.e. rebase) PRs on the specified schedule interval. With the addition of `Cargo.lock` to our repository, dependabot is opening a lot more PRs which consumes unnecessary CI resources.

We change the interval to "weekly" to reduce the noise and resource consumption.
2023-02-16 21:54:32 +00:00
Thomas Eizinger
af68cc4d8e
feat(dependabot): revert versioning-strategy set to widen (#3478)
This is an invalid configuration parameter and does not work. Let's revert it.

Reverts libp2p/rust-libp2p#3434.
2023-02-16 20:52:37 +00:00
dependabot[bot]
911ea0e54c
deps: bump tokio-util from 0.7.4 to 0.7.7 (#3461) 2023-02-16 11:28:40 +00:00
dependabot[bot]
0d72e810c6
deps: bump js-sys from 0.3.60 to 0.3.61 (#3428) 2023-02-16 08:58:06 +00:00
dependabot[bot]
2ae9dba53f
deps: bump async-trait from 0.1.63 to 0.1.64 (#3404) 2023-02-16 08:26:52 +00:00
dependabot[bot]
6d689ed420
deps: bump once_cell from 1.17.0 to 1.17.1 (#3466) 2023-02-16 07:13:37 +00:00
dependabot[bot]
51ca602893
deps: bump anyhow from 1.0.68 to 1.0.69 (#3433) 2023-02-16 06:01:54 +00:00
Max Inden
239a62c764
test(swarm): Wait for swarm1 to disconnect (#3465)
This commit does two things:

- Check that swarm1, given that it has no ban, establishes 21 connections and swarm2, given that it has a ban, establishes 20 connections.

- Wait for swarm1 to notice disconnect, given that swarm2 closed the connection to the banned swarm1.

Fixes flake introduced in caed1fe2c7.
2023-02-14 20:51:27 +00:00
Max Inden
7c73bc365a
ci(interop): Use run-interop-ping-test master latest hash (#3462)
With https://github.com/libp2p/test-plans/pull/121 merged, we should be able to use @master
directly. Still pointing to a concrete git hash.

This includes
6d1aed2ed5, thus
allowing interop tests to run from fork pull requests.
2023-02-14 18:33:37 +01:00
Thomas Eizinger
caed1fe2c7
refactor(swarm)!: remove handler from NetworkBehaviourAction::Dial (#3328)
We create the `ConnectionId` for the new connection as part of `DialOpts`. This allows `NetworkBehaviour`s to accurately track state regarding their own dial attempts.

This patch is the main enabler of https://github.com/libp2p/rust-libp2p/pull/3254. Removing the `handler` field will allow us to deprecate the `NetworkBehaviour::new_handler` function in favor of four new ones that give more control over the connection lifecycle.
2023-02-14 01:09:29 +00:00
Thomas Eizinger
9247cfa878
feat(ci): pin Rust version for clippy job (#3445)
Always referencing the latest version of Rust for clippy creates problems during backporting as already fixed problems in master come up again during a backport.
2023-02-11 06:04:25 +00:00
Thomas Eizinger
43b6e2f8e5
fix(dependabot): avoid lockfile updates (#3434)
This is an attempt to _avoid_ lockfile-only updates now that we are tracking the `Cargo.lock` in Git.
2023-02-10 13:00:48 +00:00
Max Inden
eddbb2bda0
docs(quic): Add changelog entry for #3420 (#3452) 2023-02-10 11:32:36 +01:00
Marco Munizaga
eeca244ca5
feat(interop-tests): build test binary inside container (#3441)
Building inside the container allows Windows and MacOS users to also build this binary. Thanks to a new feature from docker, `--mount=type=cache`, rebuilding layers is fast without any additional hacks.
2023-02-10 06:14:25 +00:00
Thomas Eizinger
351a166b39
feat: don't publish docker containers for interop-tests (#3437)
As per outcome of discussion here: https://github.com/libp2p/test-plans/pull/121#discussion_r1099109241
2023-02-08 19:27:39 +00:00
dependabot[bot]
0bffad98c0
deps: bump dtolnay/rust-toolchain (#3424) 2023-02-08 08:39:41 +00:00
tim gretler
3c120322a9
fix(quic): discard correct waker upon accepting inbound stream (#3420) 2023-02-07 08:08:26 +00:00
Thomas Eizinger
696c644fef
feat(ci): use interop-tests action instead of workflow (#3414) 2023-02-06 00:48:53 +00:00
João Oliveira
53e477d442
refactor(interop): update ping to conform to the new interop spec (#3423) 2023-02-02 11:41:59 +00:00
Elvis
babf7e3753
fix(ci): replace actions-rs/toolchain with dtolnay/toolchain (#3391)
This one seems it [got a blessing](https://github.com/rust-lang/regex/pull/883) from rust-lang.

Closes #3352.
2023-02-02 05:25:50 +00:00
Thomas Eizinger
b7fa2bccdf
refactor(inter-op): misc clean-up (#3409)
This patch contains misc cleanup that I did as part of reading through the code to understand how it works.
2023-02-01 22:20:25 +00:00
João Oliveira
b98b03eb7e
fix(swarm-derive): add bounds to OutEvent on generic fields (#3393)
This PR isolates the bugfix for the `NetworkBehaviour` derive implementation for structures with generic fields. When `out_event` was not provided, the generated enum was missing the `NetworkBehaviour` impl constraint for the generic variants whilst using the generics for `<Generic>::OutEvent`.

Meanwhile I also found that the generated `poll` function `loop`s the sub behaviours and either `return`'s when `Poll::Ready` or `break`'s when `Poll::Pending`. This is a relict from when we still had `NetworkBehaviourEventProcess` which had added a branch within this loop that did not `return` but consume the event and `continue`. This trait was removed a while ago meaning this `loop` is no longer needed.
2023-02-01 21:30:27 +00:00
dependabot[bot]
063aab5909
deps: bump bytes from 1.3.0 to 1.4.0 (#3422) 2023-02-01 11:34:26 +00:00