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
Max Inden
6855ab943b
swarm-derive/: Remove support for ignoring fields on struct ( #2842 )
...
With the removal of `NetworkBehaviourEventProcess` there is no more need for
ignoring fields.
2022-08-29 07:39:47 +02:00
Max Inden
247b5536d4
swarm-derive/: Remove support for custom poll method ( #2841 )
...
With the removal of `NetworkBehaviourEventProcess` there is no more need for a
custom poll method.
2022-08-28 10:51:49 +02:00
Max Inden
a3dec471c0
docs/coding-guidelines: Document limit on number of tasks ( #2839 )
...
Add guideline to limit number of tasks being spawned.
2022-08-26 09:02:14 +02:00
Max Inden
ca07ce4d64
swarm/behaviour: Remove deprecated NetworkBehaviourEventProcess ( #2840 )
...
Removes the `NetworkBehaviourEventProcess` and all its associated logic.
See deprecation pull request https://github.com/libp2p/rust-libp2p/pull/2784 .
Find rational in https://github.com/libp2p/rust-libp2p/pull/2751 .
2022-08-26 07:08:33 +02:00
dependabot[bot]
d92cab8581
build(deps): Update p256 requirement from 0.10.0 to 0.11.0 ( #2636 )
...
* build(deps): Update p256 requirement from 0.10.0 to 0.11.0
Updates the requirements on [p256](https://github.com/RustCrypto/elliptic-curves ) to permit the latest version.
- [Release notes](https://github.com/RustCrypto/elliptic-curves/releases )
- [Commits](https://github.com/RustCrypto/elliptic-curves/commits/p256/v0.10.1 )
---
updated-dependencies:
- dependency-name: p256
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
* core/: Bump version and add changelog entry
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-08-23 09:51:58 +02:00
Elena Frank
d610e4b0fb
protocols/dcutr: Disable libp2p-core
default features ( #2836 )
2022-08-23 09:12:00 +02:00
Max Inden
4253080a43
*: Prepare v0.47.0 ( #2830 )
2022-08-22 05:14:04 +02:00
Max Inden
217dd2ca22
clippy.toml: Create config and disallow unbounded channels ( #2823 )
...
When using channels (e.g. `futures::channel::mpsc` or `std::sync::mpsc`)
always use the bounded variant, never use the unbounded variant. When
using a bounded channel, a slow consumer eventually slows down a fast
producer once the channel bound is reached, ideally granting the slow
consumer more system resources e.g. CPU time, keeping queues small and
thus latencies low. When using an unbounded channel a fast producer
continues being a fast producer, growing the channel buffer
indefinitely, increasing latency until the illusion of unboundedness
breaks and the system runs out of memory.
One may use an unbounded channel if one enforces backpressure through an
out-of-band mechanism, e.g. the consumer granting the producer
send-tokens through a side-channel.
2022-08-20 07:31:45 +02:00
Thomas Eizinger
3d3666e1a6
*: Enforce no clippy warnings for examples ( #2826 )
2022-08-20 05:48:22 +02:00
Elena Frank
8931860b2f
core/identity: Allow clippy::large-enum-variant on Keypair
( #2827 )
2022-08-19 05:06:55 +02:00
Max Inden
475289c19c
docs/coding-guidelines: Add document ( #2780 )
...
Add document outlining a set of coding guidelines followed and to be
followed across the rust-libp2p code base.
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2022-08-17 09:03:20 +02:00
Max Inden
a2738fd555
swarm-derive/: Derive Debug for generated OutEvent ( #2821 )
...
When generating an `OutEvent` `enum` definition for a user, derive `Debug`
for that `enum`.
Why not derive `Clone`, `PartialEq` and `Eq` for the generated `enum`
definition?
While it is fine to require all sub-`OutEvent`s to implement
`Debug`, the same does not apply to traits like `Clone`. I
suggest users that need `Clone` to define their own `OutEvent`.
2022-08-17 08:40:32 +02:00
dependabot[bot]
d2c50530e9
build(deps): Update prometheus-client requirement from 0.17.0 to 0.18.0 ( #2822 )
...
* build(deps): Update prometheus-client requirement from 0.17.0 to 0.18.0
Updates the requirements on [prometheus-client](https://github.com/prometheus/client_rust ) to permit the latest version.
- [Release notes](https://github.com/prometheus/client_rust/releases )
- [Changelog](https://github.com/prometheus/client_rust/blob/master/CHANGELOG.md )
- [Commits](https://github.com/prometheus/client_rust/compare/v0.17.0...v0.18.0 )
---
updated-dependencies:
- dependency-name: prometheus-client
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-08-17 07:02:21 +02:00
Max Inden
67266c6a66
swarm-derive/: Add where clause of behaviour to generated out event ( #2819 )
...
When generating the `OutEvent` for a `NetworkBehaviour`, add the `where` clause of the
`NetworkBehaviour` `struct` to the generated `enum`.
2022-08-17 06:43:47 +02:00
Max Inden
8dc0188a1d
swarm/src/connection: Test max_negotiating_inbound_streams ( #2785 )
...
Test that `HandlerWrapper` upholds the provided
`max_negotiating_inbound_streams` limit.
2022-08-16 10:15:31 +02:00
dependabot[bot]
6a9fa3d930
build(deps): Update prost requirement from 0.10 to 0.11 ( #2788 )
...
* build(deps): Update prost-build requirement from 0.10 to 0.11
Updates the requirements on [prost-build](https://github.com/tokio-rs/prost ) to permit the latest version.
- [Release notes](https://github.com/tokio-rs/prost/releases )
- [Commits](https://github.com/tokio-rs/prost/compare/v0.10.0...v0.11.0 )
---
updated-dependencies:
- dependency-name: prost-build
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): Update prost requirement from 0.10 to 0.11
Updates the requirements on [prost](https://github.com/tokio-rs/prost ) to permit the latest version.
- [Release notes](https://github.com/tokio-rs/prost/releases )
- [Commits](https://github.com/tokio-rs/prost/compare/v0.10.0...v0.11.0 )
---
updated-dependencies:
- dependency-name: prost
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-08-16 08:49:09 +02:00
Max Inden
878c49fa14
swarm/src/behaviour: Deprecate NetworkBehaviourEventProcess ( #2784 )
...
In preparation for https://github.com/libp2p/rust-libp2p/pull/2751 .
2022-08-16 06:58:17 +02:00
qidu
0e5a25dea8
examples/file-sharing: Support binary files ( #2786 )
2022-08-16 05:12:28 +02:00
Thomas Eizinger
cef505685c
core/muxing: Generalise StreamMuxer::poll_address_change
to poll
( #2797 )
...
This is to allow general-purpose background work to be performed
by implementations.
2022-08-16 04:50:17 +02:00
Elena Frank
06aaea67f3
*: Fix clippy::derive-partial-eq-without-eq
( #2818 )
2022-08-14 04:03:04 +02:00
Max Inden
0a01c81c7b
misc/multistream-select: Replace msg.get(0) with msg.first() ( #2816 )
2022-08-13 12:46:45 +02:00
Kourosh
a4110a2b69
*: Remove inject_connected
/ inject_disconnected
from docs ( #2805 )
2022-08-10 10:20:31 +02:00
Kourosh
1012579d77
protocols/: Remove passing default variant to WithPeerId::condition
( #2802 )
2022-08-10 09:50:24 +02:00
Max Inden
3da8b423c2
README: Point to security@libp2p.io ( #2799 )
2022-08-08 10:57:11 +02:00
Max Inden
e2b83b7c8f
SECURITY.md: Document supported releases and security mail addr ( #2800 )
2022-08-08 08:14:46 +02:00
Max Inden
579b1be5d5
swarm-derive/: Generate OutEvent if not provided ( #2792 )
...
Generate `NetworkBehaviour::OutEvent` if not provided through
`#[behaviour(out_event = "MyOutEvent")]` and event processing is
disabled (default).
2022-08-08 07:18:32 +02:00
Thomas Eizinger
028decec69
core/muxing: Have functions on StreamMuxer
take Pin<&mut Self>
( #2765 )
...
Co-authored-by: Elena Frank <elena.frank@protonmail.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2022-08-03 23:12:11 +10:00
Luke Hinds
2b9e212682
examples/README.md: Fix tutorial link ( #2790 )
2022-08-02 08:46:50 +02:00
Elena Frank
eaf3f3a7fb
.cargo: Check all features in custom-clippy ( #2771 )
2022-07-28 03:35:35 +02:00
Elena Frank
09c690862e
protocols/dcutr: Fix clippy lints ( #2772 )
2022-07-28 03:04:36 +02:00
Thomas Eizinger
56c492cf41
core/muxing: Drop Sync
requirement for StreamMuxer
on StreamMuxerBox
( #2775 )
...
`StreamMuxerBox` is never shared across threads but owned by a single
connection. Restricting it to be `Sync` unnecessarily limits the design
space around the `StreamMuxer` trait and its implementations.
2022-07-27 08:23:07 +02:00
Elena Frank
ce963dfcaa
core: fix clippy::op-ref, clippy::needless-borrow ( #2770 )
2022-07-25 17:57:50 +02:00