2044 Commits

Author SHA1 Message Date
Hannes
4a4019da50
transport/dns: Update async-std-resolver and trust-dns-resolver (#2988)
* build(deps): Update async-std-resolver requirement from 0.21 to 0.22

Updates the requirements on [async-std-resolver](https://github.com/bluejekyll/trust-dns) to permit the latest version.
- [Release notes](https://github.com/bluejekyll/trust-dns/releases)
- [Changelog](https://github.com/bluejekyll/trust-dns/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bluejekyll/trust-dns/compare/v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: async-std-resolver
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bumped versions of async-std-resolver and trust-dns-resolver

* Updated changelog

* Update transports/pnet/CHANGELOG.md

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2022-10-05 20:49:00 +01:00
Hannes
33b5c05529
*: Updated comments in examples (#2985) 2022-10-05 18:49:03 +01:00
Thomas Eizinger
bdf9209824
swarm: Split off "keep alive" functionality from DummyConnectionHandler (#2859)
Previously, the `DummyConnectionHandler` offered a "keep alive" functionality,
i.e. it allowed users to set the value of what is returned from
`ConnectionHandler::keep_alive`. This handler is primarily used in tests or
`NetworkBehaviour`s that don't open any connections (like mDNS). In all of these
cases, it is statically known whether we want to keep connections alive. As
such, this functionality is better represented by a static
`KeepAliveConnectionHandler` that always returns `KeepAlive::Yes` and a
`DummyConnectionHandler` that always returns `KeepAlive::No`.

To follow the naming conventions described in
https://github.com/libp2p/rust-libp2p/issues/2217, we introduce a top-level
`keep_alive` and `dummy` behaviour in `libp2p-swarm` that contains both the
`NetworkBehaviour` and `ConnectionHandler` implementation for either case.
2022-10-05 17:50:11 +01:00
Hannes
da0403dc45
protocols/mdns: Removed obsolete lazy static use from mdns (#2977)
Co-authored-by: Max Inden <mail@max-inden.de>
2022-10-05 10:26:30 +11:00
Elena Frank
4577c5a81d
transports/tcp: Only translate tcp addresses (#2970)
Return `None` in in `<GenTcpTransport as Transport>::address_translation` if the
address is not a tcp address. Relevant if in case of something like
`OrTransport<TcpTransport, QuicTransport>`, where tcp would currently perform
the address translation for quic addresses.
2022-10-04 18:42:05 +01:00
Thomas Eizinger
f13f9edeb4
protocols/identify: Fix bad changelog entries and manifest version (#2974)
Fix bad changelog entries and manifest version for libp2p-identify
2022-10-04 18:06:45 +01:00
Thomas Eizinger
f359c2ce5c
.github/worksflows/ci: Fix bad use of bash (#2963) 2022-10-04 12:29:03 +01:00
Thomas Eizinger
215a8e12f3
{core,muxers/mplex}: Fix bad version bump (#2960) 2022-10-04 12:04:42 +01:00
Thomas Eizinger
a905a36cbc
protocols/mdns: Optimise InterfaceState::poll for low latency (#2939) 2022-10-04 18:45:39 +11:00
Thomas Eizinger
1b793242e6
.cargo: Run clippy on ALL the source files (#2949) 2022-10-04 18:24:38 +11:00
David D
e6da99e4f8
.github/workflows: Deny cargo doc warnings in CI (#2936)
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2022-10-04 12:01:45 +11:00
João Oliveira
a7a96e5502
protocols/identify: Revise symbol naming (#2927) 2022-10-04 11:17:31 +11:00
Thomas Eizinger
1da75b2b25
protocols/ping: Properly deprecate types with Ping prefix (#2937)
Co-authored-by: Elena Frank <elena.frank@protonmail.com>
Co-authored-by:  João Oliveira <hello@jxs.pt>
2022-10-01 00:19:34 +10:00
Ryan Plauche
cce296e55e
protocols/{autonat,dcutr}: Fixing filename collision in examples (#2959)
Co-authored-by: Ryan Plauche <ryan@littlebearlabs.io>
2022-09-30 13:58:35 +10:00
Thomas Eizinger
f6bb846c36
*: Remove default features from all crates (#2918)
Remove default features. You need to enable required features
explicitly now. As a quick workaround, you may want to use the
new `full` feature which activates all features.
2022-09-29 16:32:22 +01:00
Friedel Ziegelmayer
c71115d055
misc/multistream-select/: Remove parallel dialing optimization (#2934)
This is to avoid the usage of the now optional `ls` command, and
stay compatible with go-multistream.

Closes #2925
2022-09-29 14:36:11 +01:00
Max Inden
749ff00a79
transports/noise: Have NoiseAuthenticated::xx use X25519Spec (#2954)
We support two versions of the Noise XX handshake with X25519, but only one of
them is compliant with the specification and thus compliant with other
implementations. We should always default to the spec compliant handshake.

Fixes bug introduced in https://github.com/libp2p/rust-libp2p/pull/2887/
2022-09-29 13:16:22 +01:00
folex
04b07c4d14
swarm-derive: Specify NetworkBehaviour by full path (#2932)
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Max Inden <mail@max-inden.de>
2022-09-27 19:27:32 +10:00
Thomas Eizinger
b28ab2c6bc
build(deps): Update lru to 0.8.0 (#2908)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2022-09-27 11:39:10 +10:00
João Oliveira
d747537911
README: Update notable users (#2922)
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2022-09-24 22:49:45 +10:00
Max Inden
0063722bda
examples/README: Reference hole punching tutorial (#2935) 2022-09-24 22:14:46 +10:00
Darius Clark
121a11c7f1
swarm: Provide peer_id to inject_dial_failure on connection limit error (#2928) 2022-09-23 12:57:52 +02:00
futpib
bcff814b92
core/identity: Implement Hash and Ord for PublicKey (#2915)
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2022-09-22 19:35:42 +02:00
dependabot[bot]
0a12418b18
build(deps): Bump actions/stale from 3 to 6 (#2929)
Bumps [actions/stale](https://github.com/actions/stale) from 3 to 6.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v3...v6)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-22 18:14:35 +02:00
Roman
e530118fb0
build(deps): Bump rand to 0.8 and quickcheck to 1 (#2857)
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Max Inden <mail@max-inden.de>
2022-09-22 18:48:32 +10:00
Thomas Eizinger
a4d1e58836
swarm/connection: Enforce limit on inbound substreams via StreamMuxer (#2861)
* Provide separate functions for injecting in- and outbound streams

* Inline `HandlerWrapper` into `Connection`

* Only poll for new inbound streams if we are below the limit

* yamux: Buffer inbound streams in `StreamMuxer::poll`
2022-09-21 15:02:21 +02:00
Thomas Eizinger
f4362cb8aa
CHANGELOG: Add missing entry for noise update (#2912) 2022-09-21 14:14:53 +02:00
Thomas Eizinger
ed1b89902a
protocols/noise: Add NoiseConfig::with_prologue (#2903) 2022-09-21 13:46:35 +02:00
libp2p-mgmt-read-write[bot]
39d63513d4
chore: Update .github/workflows/stale.yml [skip ci] 2022-09-19 13:41:33 +00:00
Thomas Eizinger
45faefa36c
*: Unfiy how we depend on crates across the workspace (#2886) 2022-09-19 17:32:02 +10:00
Thomas Eizinger
2025de3ef0
swarm-derive/: Allow for templated behaviours (#2907)
This patch fixes an issue where we couldn't use type parameters on a behaviour
with a custom out event that had different type parameters.
2022-09-16 16:57:41 +02:00
Hannes
c81b06a9b2
*: Fix various clippy warnings (#2900) 2022-09-16 16:30:11 +02:00
Thomas Eizinger
2c739e9bdb
protocols/noise: Introduce NoiseAuthenticated::xx constructor with X25519 DH key exchange (#2887)
Co-authored-by: Max Inden <mail@max-inden.de>
2022-09-16 11:41:35 +10:00
Dmitry Markin
5906140d38
protocols/kad: Remove deprecated set_protocol_name() (#2866) 2022-09-15 15:30:32 +02:00
Roman
72bade1799
build(deps): Update env_logger to 0.9 and criterion to 0.4 (#2896) 2022-09-14 13:01:41 +10:00
Thomas Eizinger
66c275520d
swarm/: Fix rare test failure of multiple_addresses_err (#2882)
In case we accidentally generate the same port twice, we will try to
issue two dial attempts to the same address but also expect two dial
errors which is exactly what this test is trying to catch.
Unfortunately, the assertion is badly written and does not catch
duplicate inputs.
2022-09-11 08:55:26 +02:00
Elena Frank
457fb51ee0
transports/tcp: Simplify IfWatcher integration (#2813)
With if-watch `2.0.0` `IfWatcher::new` is not async anymore, hence the
`IfWatch` wrapping logic is obsolete.

Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2022-09-10 12:40:09 +02:00
Alexander Shishenko
c650dc19db
*: Replace _serde with dep:serde in Cargo.toml (#2868) 2022-09-08 18:30:43 +10:00
Max Inden
83c67954e9
*: Prepare v0.48.0 (#2869) 2022-09-07 09:44:51 +02:00
Thomas Eizinger
d2eddf4ff1
muxers/yamux: Remove OpenSubstreamToken (#2873) 2022-09-07 09:25:33 +02:00
Thomas Eizinger
2eca38cca0
core/upgrade/: Add ReadyUpgrade (#2855) 2022-09-07 09:08:23 +02:00
Alexander Shishenko
8644c65a22
core/: Introduce rsa feature flag to avoid ring dependency (#2860)
- Introduce `rsa` feature flag to `libp2p-core`.
- Expose `rsa` feature in `libp2p`.
- Add `rsa` feature to `libp2p` `default`.
2022-09-07 08:16:22 +02:00
Laurent Senta
a40180c3d8
.github/: Introduce interop tests (#2835)
Adds two workflows on push & PR:

* `run-ping-interop-cross-version`: runs a Testground interoperability test
  between multiple versions of rust-libp2p, including master, and the current
  branch (during a pull request)
* `run-ping-interop-cross-implementation`: runs a Testground interoperability
  test between go-libp2p and rust-libp2p, and the current branch (during a pull
  request)

We rely on the https://github.com/libp2p/test-plans/ repository to retrieve and
run the tests.

Co-authored-by: Piotr Galar <piotr.galar@gmail.com>
2022-09-07 06:10:01 +02:00
Alexander Shishenko
b8c3b282ee
protocols/gossipsub: Allow publishing to anything that implements Into<TopicHash> (#2862) 2022-09-05 06:31:13 +02:00
Thomas Eizinger
f04df2901b
.git-blame-ignore-revs/: Initialize and add rustfmt commit (#2864)
Ignoring certain revisions helps in finding the "correct" commit
that touched a file last.

For more information, see:

https://www.git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt
2022-09-04 14:29:39 +02:00
Dmitry Markin
cee199afca
protocols/kad: Support multiple protocol names (#2846)
Add support for multiple Kademlia protocol names to allow
protocol name upgrades.
2022-09-03 02:46:50 +02:00
Yolier Galan Tasse
89f898c69f
protocols/mdns: Allow users to choose between async-io and tokio runtime (#2748)
Allow users to choose between async-io and tokio runtime
in the mdns protocol implementation. `async-io` is a default
feature, with an additional `tokio` feature.

Fix high CPU usage with Tokio library.
2022-09-02 05:53:38 +02:00
Divma
36a2773861
*: Update changelogs for prost dep update (#2851) 2022-08-30 10:03:54 +02:00
pinkforest(she/her)
f16561c960
.github/workflows: Split advisory issues from PR workflows using cargo-deny (#2803) 2022-08-30 09:48:26 +02:00
pinkforest(she/her)
e01f77bc49
transports/noise: Migrate away from deprecated sodiumoxide for tests (#2817) 2022-08-30 09:20:41 +02:00