Commit Graph

2529 Commits

Author SHA1 Message Date
d5475fccde fix(test): only listen on 127.0.0.1 for ephemeral swarm
This resolves an issue where our tests were depending on the number of network interfaces available on the local machine.

Related #4110.

Pull-Request: #4122.


  
Co-Authored-By: Thomas Eizinger <thomas@eizinger.io>
2023-06-27 01:21:47 +00:00
e32775d6fb chore(webrtc): prepare v0.6.0-alpha
Pull-Request: #4123.


  
Co-Authored-By: Max Inden <mail@max-inden.de>
2023-06-26 23:58:49 +00:00
78510ede84 feat(identity): expose KeyType for PublicKey and Keypair
Resolves https://github.com/libp2p/rust-libp2p/issues/3649.

Pull-Request: #4107.


  
Co-Authored-By: Nick Pavlov <gurinderu@gmail.com>
  

  
Co-Authored-By: Thomas Eizinger <thomas@eizinger.io>
2023-06-26 17:53:23 +00:00
524bfc2130 deps: bump syn from 2.0.18 to 2.0.22
Pull-Request: #4114.
2023-06-26 12:17:06 +00:00
8eb9ba9302 deps: bump webpki-roots from 0.23.0 to 0.23.1
Pull-Request: #4115.
2023-06-26 11:51:50 +00:00
8b91c89775 deps: bump libc from 0.2.146 to 0.2.147
Pull-Request: #4113.
2023-06-26 11:29:05 +00:00
300d2b2256 deps: bump axum from 0.6.7 to 0.6.18
Pull-Request: #4112.
2023-06-26 11:05:25 +00:00
6241b92fe4 deps: bump clap from 4.3.3 to 4.3.8
Pull-Request: #4118.
2023-06-26 10:43:20 +00:00
26801481fa deps: bump serde_json from 1.0.97 to 1.0.99
Pull-Request: #4119.
2023-06-26 10:19:34 +00:00
73dbde1519 refactor(perf): expose single latency measurement
Instead of exposing the time to establish a connection, the time to upload the bytes and the time to download the bytes, expose a single time including all three.

The rational here is, that differentiation of the three is flawed. E.g. when does one stop the upload timer and start the download timer? When the last byte is sent? When the last byte is flushed? When the first byte is received?

See https://github.com/libp2p/test-plans/pull/184#pullrequestreview-1482600521 for past discussion.

Pull-Request: #4105.


  
Co-Authored-By: Max Inden <mail@max-inden.de>
2023-06-26 03:56:17 +00:00
c1551d71b6 chore: prepare libp2p v0.52.1
Pull-Request: #4106.


  
Co-Authored-By: Max Inden <mail@max-inden.de>
2023-06-26 00:33:59 +00:00
85a846a7dd feat(webtransport): add WebTransport for WASM environments
This PR implements `Transport` for WebTransport for browsers by using web-sys.

Related: #3846.
Resolves: #3825.

Pull-Request: #4015.


  
Co-Authored-By: Yiannis Marangos <yiannis@eiger.co>
  

  
Co-Authored-By: Maciej Zwoliński <mac.zwolinski@gmail.com>
  

  
Co-Authored-By: Yiannis Marangos <psyberbits@gmail.com>
2023-06-23 05:50:49 +00:00
b23a4a7b72 chore: add script for generating list of external contributors
Related: https://github.com/libp2p/blog/pull/84.

Pull-Request: #4095.


  
Co-Authored-By: Thomas Eizinger <thomas@eizinger.io>
2023-06-22 10:34:39 +00:00
b3f48caf7e fix(roadmap): correct table formatting
Pull-Request: #4100.


  
Co-Authored-By: Max Inden <mail@max-inden.de>
2023-06-22 06:53:05 +00:00
59d17c206d deps: bump wasm-bindgen-futures from 0.4.36 to 0.4.37
Pull-Request: #4082.
2023-06-21 13:12:22 +00:00
f8b3998661 deps(webrtc): update webrtc to 0.8.0
Pull-Request: #4099.


  
Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>
2023-06-21 09:11:32 +00:00
e28f0326c7 deps: bump clap from 4.3.2 to 4.3.3
Pull-Request: #4061.
2023-06-20 15:23:15 +00:00
8f9827043c deps: bump js-sys from 0.3.63 to 0.3.64
Pull-Request: #4083.
2023-06-20 15:00:00 +00:00
be54727326 deps: bump rustls from 0.21.1 to 0.21.2
Pull-Request: #4084.
2023-06-20 14:38:22 +00:00
0d5c1eae16 deps: bump serde_json from 1.0.96 to 1.0.97
Pull-Request: #4085.
2023-06-20 14:16:12 +00:00
84ccf26695 deps: bump wasm-bindgen from 0.2.86 to 0.2.87
Pull-Request: #4086.
2023-06-20 13:54:05 +00:00
face06b05c deps: bump arrayvec from 0.7.2 to 0.7.4
Pull-Request: #4087.
2023-06-20 13:32:36 +00:00
04b7668c55 deps: bump sha2 from 0.10.6 to 0.10.7
Pull-Request: #4088.
2023-06-20 13:10:43 +00:00
37d5174c7b deps: bump actions/upload-pages-artifact from 1.0.8 to 1.0.9
Pull-Request: #4080.
2023-06-20 12:48:48 +00:00
78c150d0df chore: don't use workspace inheritance for dev-dependencies
Using workspace inheritance breaks `cargo release` because it cannot resolve that the dev-dependencies should only use a `path` and not a version.

Pull-Request: #4097.


  
Co-Authored-By: Thomas Eizinger <thomas@eizinger.io>
2023-06-20 12:24:28 +00:00
31da9b25c9 chore(roadmap): move QUIC hole punching to done
Pull-Request: #4096.


  
Co-Authored-By: Max Inden <mail@max-inden.de>
2023-06-20 10:45:58 +00:00
ce9821154a fix(cargo.toml): specify muxer harness by path only
`libp2p-muxer-harness` is never published to crates.io. Specifying it with a version makes `cargo release` check crates.io for the the non-existing crate.

Pull-Request: #4093.


  
Co-Authored-By: Max Inden <mail@max-inden.de>
2023-06-20 10:20:27 +00:00
4195840f92 chore(roadmap): move kad client mode to done
Pull-Request: #4094.


  
Co-Authored-By: Max Inden <mail@max-inden.de>
2023-06-20 09:15:09 +00:00
fd803e2697 chore(quic,webrtc): prepare v0.8.0-alpha & v0.5.0-alpha
Pull-Request: #4089.


  
Co-Authored-By: Max Inden <mail@max-inden.de>
2023-06-20 07:27:10 +00:00
42566869b2 chore: use path dependencies for all cyclic dev-dependencies
We have two "interface" crates in our workspace: `libp2p-core` and `libp2p-swarm`. Most crates depend on both of these. To compile the tests for this crate, we often need a concrete implementation to some of these interfaces. When specifying a workspace-inherited dependency, we don't get to choose to omit the `version` field next to the path. If a dependency is `path`-only however, it will be tripped by `cargo` during the release process which is why all of this worked before our move to workspace inheritance.

With this patch, we change the minimum amount of dependencies necessary back to `path` dependencies to allowing releasing of our crates.

Related: #4053.

Pull-Request: #4091.


  
Co-Authored-By: Thomas Eizinger <thomas@eizinger.io>
2023-06-20 06:42:53 +00:00
755de30757 fix(multistream-select): remove cyclic dependency to libp2p-core
All of the removed `dev-dependencies` are only for testing the upgrade procedure in `libp2p-core`. Ironically, this test does not use a single API of `multistream-select`. Thus, this test is simply misplaced in this crate. If we wanted to retain it, it should probably go into `libp2p` itself as that one already depends on all required crates.

Related: #4053.

Pull-Request: #4090.


  
Co-Authored-By: Thomas Eizinger <thomas@eizinger.io>
2023-06-20 05:41:15 +00:00
8776fa8766 chore: prepare libp2p v0.52.0 release
Pull-Request: #4053.


  
Co-Authored-By: Max Inden <mail@max-inden.de>
  

  
Co-Authored-By: Thomas Eizinger <thomas@eizinger.io>
2023-06-19 11:49:39 +00:00
c4ab04c57c feat(rendezvous): directly return error from register
Resolves #4070.

Pull-Request: #4073.
2023-06-17 11:19:41 +00:00
b8ceeccdc6 refactor(rendezvous): rewrite using libp2p-request-response
Fixes [#3878](https://github.com/libp2p/rust-libp2p/issues/3878).

Pull-Request: #4051.


  
Co-Authored-By: Thomas Eizinger <thomas@eizinger.io>
2023-06-14 17:49:23 +00:00
14530af261 ci: attribute co-authorship of a PR based on its commits
It often happens that multiple people contribute to a single PR. To correctly attribute authorship, GitHub supports the `Co-authored-by` convention. This line however needs to be at the very end of the commit message.

Because we are also automatically adding the pull-request number to the commit message, we cannot add these lines ourselves. Doing this manually is error-prone anyway so with this patch, we are extending the commit message template to automatically populate this from the commits within the pull request.

Pull-Request: #4069.
2023-06-14 18:00:19 +02:00
2c6c058bb7 chore: Update .github/workflows/semantic-pull-request.yml [skip ci] 2023-06-14 09:04:10 +00:00
755e3417f7 feat(noise): add WebTransport certhashes extension
The extension for WebTransport certhashes was added and can be configured via `Config::with_webtransport_certhashes`.

In case of initiator, these certhashes will be used to validate the ones reported by responder. In case of responder, these certhashes will be reported to initiator.

Resolves #3988.

Pull-Request: #3991.
2023-06-13 12:03:35 +00:00
cf3e4c6860 feat(quic): implement hole punching
Implement `Transport::dial_as_listener` for QUIC as specified by the [DCUtR spec](https://github.com/libp2p/specs/blob/master/relay/DCUtR.md).

To facilitate hole punching in QUIC, one side needs to send random UDP packets to establish a mapping in the routing table of the NAT device. If successful, our listener will emit a new inbound connection. This connection needs to then be sent to the dialing task. We achieve this by storing a `HashMap` of hole punch attempts indexed by the remote's `SocketAddr`. A matching incoming connection is then sent via a oneshot channel to the dialing task which continues with upgrading the connection.

Related #2883.

Pull-Request: #3964.
2023-06-13 11:42:18 +00:00
2a6311f473 deps: bump serde from 1.0.163 to 1.0.164
Pull-Request: #4060.
2023-06-13 11:11:59 +00:00
db93fa1657 deps: bump proc-macro2 from 1.0.59 to 1.0.60
Pull-Request: #4059.
2023-06-13 10:50:17 +00:00
d263ee67a9 deps: bump log from 0.4.18 to 0.4.19
Pull-Request: #4058.
2023-06-13 10:29:36 +00:00
f93719cfd3 refactor(wasm-ext): replace parity-send-wrapper with send-wrapper
Co-authored-by: Yiannis Marangos <yiannis@eiger.co>

Related: #4065.

Pull-Request: #4066.
2023-06-12 16:14:42 +00:00
4a1703f046 feat(swarm): add ConnectionDenied::downcast_ref
Prior to this change it was only possible to downcast a `ConnectionDenied` error when you had ownership of it which isn't the case inside `NetworkBehaviour`s. This change allows downcasting by reference.

See https://github.com/libp2p/rust-libp2p/discussions/4018.

Pull-Request: #4020.
2023-06-12 15:26:09 +00:00
2910c985e8 fix(examples): call Swarm::add_external_address in dcutr and relay
> Observed addresses (aka. external address candidates) of the local node, reported by a remote node
> via `libp2p-identify`, are no longer automatically considered confirmed external addresses, in
> other words they are no longer trusted by default. Instead users need to confirm the reported
> observed address either manually, or by using `libp2p-autonat`. In trusted environments users can
> simply extract observed addresses from a `libp2p-identify::Event::Received { info:
> libp2p_identify::Info { observed_addr }}` and confirm them via `Swarm::add_external_address`.

Follow-up to https://github.com/libp2p/rust-libp2p/pull/3954.

Pull-Request: #4052.
2023-06-09 03:26:24 +00:00
c2230f9948 feat(swarm): allow NetworkBehaviours to create and remove listeners
This extends `ToSwarm` to add `ToSwarm::ListenOn` and `ToSwarm::RemoveListener`, which allows creating and removing listeners from a `NetworkBehaviour`.

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

Pull-Request: #3292.
2023-06-09 01:34:33 +00:00
4532302917 refactor(identity): fix import warnings in keypair.rs
- Adding conditional `cfg` in `keypair.rs` imports.
- Adding `#[allow(unused_variables)]` on the top of the `sign` function.

Pull-Request: #4047.
2023-06-08 09:27:33 +00:00
f66420c2b1 deps: run cargo update
This removes multiple duplicate dependencies from our lockfile. Unsure why dependabot hasn't done these yet.

Pull-Request: #4044.
2023-06-08 06:16:11 +00:00
e0f9de3683 chore(kad): extend changelog entry on client/server mode
Pull-Request: #4050.
2023-06-08 05:51:12 +00:00
ed14630672 feat: leverage type-safe /p2p in multiaddr
This updates `multiaddr` to version `0.19`.

Depends-On: #3656.
Depends-On: https://github.com/multiformats/rust-multiaddr/pull/83.
Resolves: #4039.

Pull-Request: #4037.
2023-06-08 01:38:18 +00:00
d2dab94b76 feat(request-response): use cbor codec in ping example
Remove the use of the core `upgrade::transfer` module in `ping` example (`request-response` protocol) in favor of `cbor` codec.

Related #4011.

Pull-Request: #4046.
2023-06-07 13:01:40 +00:00