286 lines
8.1 KiB
Markdown
Raw Normal View History

# 0.44.0 [unreleased]
- Update to `prometheus-client` `v0.19.0`. See [PR 3207].
- Update to `libp2p-core` `v0.39.0`.
- Update to `libp2p-swarm` `v0.42.0`.
- Initialize `ProtocolConfig` via `GossipsubConfig`. See [PR 3381].
- Rename types as per [discussion 2174].
`Gossipsub` has been renamed to `Behaviour`.
The `Gossipsub` prefix has been removed from various types like `GossipsubConfig` or `GossipsubMessage`.
It is preferred to import the gossipsub protocol as a module (`use libp2p::gossipsub;`), and refer to its types via `gossipsub::`.
For example: `gossipsub::Behaviour` or `gossipsub::RawMessage`. See [PR 3303].
[PR 3207]: https://github.com/libp2p/rust-libp2p/pull/3207/
[PR 3303]: https://github.com/libp2p/rust-libp2p/pull/3303/
[PR 3381]: https://github.com/libp2p/rust-libp2p/pull/3381/
[discussion 2174]: https://github.com/libp2p/rust-libp2p/discussions/2174
# 0.43.0
- Update to `libp2p-core` `v0.38.0`.
- Update to `libp2p-swarm` `v0.41.0`.
- Update to `prost-codec` `v0.3.0`.
- Refactoring GossipsubCodec to use common protobuf Codec. See [PR 3070].
.github/workflows: Refactor CI jobs (#3090) We refactor our continuous integration workflow with the following goals in mind: - Run as few jobs as possible - Have the jobs finish as fast as possible - Have the jobs redo as little work as possible There are only so many jobs that GitHub Actions will run in parallel. Thus, it makes sense to not create massive matrices but instead group things together meaningfully. The new `test` job will: - Run once for each crate - Ensure that the crate compiles on its specified MSRV - Ensure that the tests pass - Ensure that there are no semver violations This is an improvement to before because we are running all of these in parallel which speeds up execution and highlights more errors at once. Previously, tests run later in the pipeline would not get run at all until you make sure the "first" one passes. We also previously did not verify the MSRV of each crate, making the setting in the `Cargo.toml` rather pointless. The new `cross` job supersedes the existing `wasm` job. This is an improvement because we now also compile the crate for windows and MacOS. Something that wasn't checked before. We assume that checking MSRV and the tests under Linux is good enough. Hence, this job only checks for compile-errors. The new `feature_matrix` ensures we compile correctly with certain feature combinations. `libp2p` exposes a fair few feature-flags. Some of the combinations are worth checking independently. For the moment, this concerns only the executor related transports together with the executor flags but this list can easily be extended. The new `clippy` job runs for `stable` and `beta` rust. Clippy gets continuously extended with new lints. Up until now, we would only learn about those as soon as a new version of Rust is released and CI would run the new lints. This leads to unrelated failures in CI. Running clippy on with `beta` Rust gives us a heads-up of 6 weeks before these lints land on stable. Fixes #2951.
2022-11-18 22:04:16 +11:00
- Replace `Gossipsub`'s `NetworkBehaviour` implementation `inject_*` methods with the new `on_*` methods.
See [PR 3011].
.github/workflows: Refactor CI jobs (#3090) We refactor our continuous integration workflow with the following goals in mind: - Run as few jobs as possible - Have the jobs finish as fast as possible - Have the jobs redo as little work as possible There are only so many jobs that GitHub Actions will run in parallel. Thus, it makes sense to not create massive matrices but instead group things together meaningfully. The new `test` job will: - Run once for each crate - Ensure that the crate compiles on its specified MSRV - Ensure that the tests pass - Ensure that there are no semver violations This is an improvement to before because we are running all of these in parallel which speeds up execution and highlights more errors at once. Previously, tests run later in the pipeline would not get run at all until you make sure the "first" one passes. We also previously did not verify the MSRV of each crate, making the setting in the `Cargo.toml` rather pointless. The new `cross` job supersedes the existing `wasm` job. This is an improvement because we now also compile the crate for windows and MacOS. Something that wasn't checked before. We assume that checking MSRV and the tests under Linux is good enough. Hence, this job only checks for compile-errors. The new `feature_matrix` ensures we compile correctly with certain feature combinations. `libp2p` exposes a fair few feature-flags. Some of the combinations are worth checking independently. For the moment, this concerns only the executor related transports together with the executor flags but this list can easily be extended. The new `clippy` job runs for `stable` and `beta` rust. Clippy gets continuously extended with new lints. Up until now, we would only learn about those as soon as a new version of Rust is released and CI would run the new lints. This leads to unrelated failures in CI. Running clippy on with `beta` Rust gives us a heads-up of 6 weeks before these lints land on stable. Fixes #2951.
2022-11-18 22:04:16 +11:00
- Replace `GossipsubHandler`'s `ConnectionHandler` implementation `inject_*` methods with the new `on_*` methods.
See [PR 3085].
.github/workflows: Refactor CI jobs (#3090) We refactor our continuous integration workflow with the following goals in mind: - Run as few jobs as possible - Have the jobs finish as fast as possible - Have the jobs redo as little work as possible There are only so many jobs that GitHub Actions will run in parallel. Thus, it makes sense to not create massive matrices but instead group things together meaningfully. The new `test` job will: - Run once for each crate - Ensure that the crate compiles on its specified MSRV - Ensure that the tests pass - Ensure that there are no semver violations This is an improvement to before because we are running all of these in parallel which speeds up execution and highlights more errors at once. Previously, tests run later in the pipeline would not get run at all until you make sure the "first" one passes. We also previously did not verify the MSRV of each crate, making the setting in the `Cargo.toml` rather pointless. The new `cross` job supersedes the existing `wasm` job. This is an improvement because we now also compile the crate for windows and MacOS. Something that wasn't checked before. We assume that checking MSRV and the tests under Linux is good enough. Hence, this job only checks for compile-errors. The new `feature_matrix` ensures we compile correctly with certain feature combinations. `libp2p` exposes a fair few feature-flags. Some of the combinations are worth checking independently. For the moment, this concerns only the executor related transports together with the executor flags but this list can easily be extended. The new `clippy` job runs for `stable` and `beta` rust. Clippy gets continuously extended with new lints. Up until now, we would only learn about those as soon as a new version of Rust is released and CI would run the new lints. This leads to unrelated failures in CI. Running clippy on with `beta` Rust gives us a heads-up of 6 weeks before these lints land on stable. Fixes #2951.
2022-11-18 22:04:16 +11:00
- Update `rust-version` to reflect the actual MSRV: 1.62.0. See [PR 3090].
[PR 3085]: https://github.com/libp2p/rust-libp2p/pull/3085
[PR 3070]: https://github.com/libp2p/rust-libp2p/pull/3070
[PR 3011]: https://github.com/libp2p/rust-libp2p/pull/3011
.github/workflows: Refactor CI jobs (#3090) We refactor our continuous integration workflow with the following goals in mind: - Run as few jobs as possible - Have the jobs finish as fast as possible - Have the jobs redo as little work as possible There are only so many jobs that GitHub Actions will run in parallel. Thus, it makes sense to not create massive matrices but instead group things together meaningfully. The new `test` job will: - Run once for each crate - Ensure that the crate compiles on its specified MSRV - Ensure that the tests pass - Ensure that there are no semver violations This is an improvement to before because we are running all of these in parallel which speeds up execution and highlights more errors at once. Previously, tests run later in the pipeline would not get run at all until you make sure the "first" one passes. We also previously did not verify the MSRV of each crate, making the setting in the `Cargo.toml` rather pointless. The new `cross` job supersedes the existing `wasm` job. This is an improvement because we now also compile the crate for windows and MacOS. Something that wasn't checked before. We assume that checking MSRV and the tests under Linux is good enough. Hence, this job only checks for compile-errors. The new `feature_matrix` ensures we compile correctly with certain feature combinations. `libp2p` exposes a fair few feature-flags. Some of the combinations are worth checking independently. For the moment, this concerns only the executor related transports together with the executor flags but this list can easily be extended. The new `clippy` job runs for `stable` and `beta` rust. Clippy gets continuously extended with new lints. Up until now, we would only learn about those as soon as a new version of Rust is released and CI would run the new lints. This leads to unrelated failures in CI. Running clippy on with `beta` Rust gives us a heads-up of 6 weeks before these lints land on stable. Fixes #2951.
2022-11-18 22:04:16 +11:00
[PR 3090]: https://github.com/libp2p/rust-libp2p/pull/3090
2022-10-14 15:30:16 +01:00
# 0.42.0
- Bump rand to 0.8 and quickcheck to 1. See [PR 2857].
- Update to `libp2p-core` `v0.37.0`.
- Update to `libp2p-swarm` `v0.40.0`.
[PR 2857]: https://github.com/libp2p/rust-libp2p/pull/2857
2022-09-07 09:44:51 +02:00
# 0.41.0
- Update to `libp2p-swarm` `v0.39.0`.
- Update to `libp2p-core` `v0.36.0`.
- Allow publishing with any `impl Into<TopicHash>` as a topic. See [PR 2862].
[PR 2862]: https://github.com/libp2p/rust-libp2p/pull/2862
2022-08-22 05:14:04 +02:00
# 0.40.0
- Update prost requirement from 0.10 to 0.11 which no longer installs the protoc Protobuf compiler.
Thus you will need protoc installed locally. See [PR 2788].
- Update to `libp2p-swarm` `v0.38.0`.
- Update to `libp2p-core` `v0.35.0`.
- Update to `prometheus-client` `v0.18.0`. See [PR 2822].
[PR 2822]: https://github.com/libp2p/rust-libp2p/pull/2761/
[PR 2788]: https://github.com/libp2p/rust-libp2p/pull/2788
2022-07-05 13:09:58 +02:00
# 0.39.0
- Update to `libp2p-core` `v0.34.0`.
- Update to `libp2p-swarm` `v0.37.0`.
- Allow for custom protocol ID via `GossipsubConfigBuilder::protocol_id()`. See [PR 2718].
[PR 2718]: https://github.com/libp2p/rust-libp2p/pull/2718/
# 0.38.1
- Fix duplicate connection id. See [PR 2702].
[PR 2702]: https://github.com/libp2p/rust-libp2p/pull/2702
2022-05-31 13:12:53 +02:00
# 0.38.0
- Update to `libp2p-core` `v0.33.0`.
- Update to `libp2p-swarm` `v0.36.0`.
- changed `TimeCache::contains_key` and `DuplicateCache::contains` to immutable methods. See [PR 2620].
- Update to `prometheus-client` `v0.16.0`. See [PR 2631].
[PR 2620]: https://github.com/libp2p/rust-libp2p/pull/2620
[PR 2631]: https://github.com/libp2p/rust-libp2p/pull/2631
2022-04-04 18:27:41 +02:00
# 0.37.0
- Update to `libp2p-swarm` `v0.35.0`.
- Fix gossipsub metric (see [PR 2558]).
- Allow the user to set the buckets for the score histogram, and to adjust them from the score thresholds. See [PR 2595].
[PR 2558]: https://github.com/libp2p/rust-libp2p/pull/2558
[PR 2595]: https://github.com/libp2p/rust-libp2p/pull/2595
2022-02-22 14:05:19 +01:00
# 0.36.0 [2022-02-22]
- Update to `libp2p-core` `v0.32.0`.
- Update to `libp2p-swarm` `v0.34.0`.
- Move from `open-metrics-client` to `prometheus-client` (see [PR 2442]).
- Emit gossip of all non empty topics (see [PR 2481]).
- Merge NetworkBehaviour's inject_\* paired methods (see [PR 2445]).
- Revert to wasm-timer (see [PR 2506]).
- Do not overwrite msg's peers if put again into mcache (see [PR 2493]).
[PR 2442]: https://github.com/libp2p/rust-libp2p/pull/2442
[PR 2481]: https://github.com/libp2p/rust-libp2p/pull/2481
[PR 2445]: https://github.com/libp2p/rust-libp2p/pull/2445
[PR 2506]: https://github.com/libp2p/rust-libp2p/pull/2506
[PR 2493]: https://github.com/libp2p/rust-libp2p/pull/2493
2022-01-27 11:29:09 +01:00
# 0.35.0 [2022-01-27]
- Update dependencies.
- Migrate to Rust edition 2021 (see [PR 2339]).
- Add metrics for network and configuration performance analysis (see [PR 2346]).
protocols/gossipsub: Improve bandwidth (#2327) This PR adds some bandwidth improvements to gossipsub. After a bit of inspection on live networks a number of improvements have been made that can help reduce unnecessary bandwidth on gossipsub networks. This PR introduces the following: - A 1:1 tracking of all in-flight IWANT requests. This not only ensures that all IWANT requests are answered and peers penalized accordingly, but gossipsub will no no longer create multiple IWANT requests for multiple peers. Previously, gossipsub sampled the in-flight IWANT requests in order to penalize peers for not responding with a high probability that we would detect non-responsive nodes. Futher, it was possible to re-request IWANT messages that are already being requested causing added duplication in messages and wasted unnecessary IWANT control messages. This PR shifts this logic to only request message ids that we are not currently requesting from peers. - Triangle routing naturally gives rise to unnecessary duplicates. Consider a mesh of 4 peers that are interconnected. Peer 1 sends a new message to 2,3,4. 2 propagates to 3,4 and 3 propagates to 2,4 and 4 propagates to 2,3. In this case 3 has received the message 3 times. If we keep track of peers that send us messages, when publishing or forwarding we no longer send to peers that have sent us a duplicate, we can eliminate one of the sends in the scenario above. This only occurs when message validation is async however. This PR adds this logic to remove some elements of triangle-routing duplicates. Co-authored-by: Divma <26765164+divagant-martian@users.noreply.github.com> Co-authored-by: Max Inden <mail@max-inden.de> Co-authored-by: Diva M <divma@protonmail.com>
2021-12-21 22:09:15 +11:00
- Improve bandwidth performance by tracking IWANTs and reducing duplicate sends
(see [PR 2327]).
- Implement `Serialize` and `Deserialize` for `MessageId` and `FastMessageId` (see [PR 2408])
- Fix `GossipsubConfigBuilder::build()` requiring `&self` to live for `'static` (see [PR 2409])
- Implement Unsubscribe backoff as per [libp2p specs PR 383] (see [PR 2403]).
[PR 2346]: https://github.com/libp2p/rust-libp2p/pull/2346
[PR 2339]: https://github.com/libp2p/rust-libp2p/pull/2339
protocols/gossipsub: Improve bandwidth (#2327) This PR adds some bandwidth improvements to gossipsub. After a bit of inspection on live networks a number of improvements have been made that can help reduce unnecessary bandwidth on gossipsub networks. This PR introduces the following: - A 1:1 tracking of all in-flight IWANT requests. This not only ensures that all IWANT requests are answered and peers penalized accordingly, but gossipsub will no no longer create multiple IWANT requests for multiple peers. Previously, gossipsub sampled the in-flight IWANT requests in order to penalize peers for not responding with a high probability that we would detect non-responsive nodes. Futher, it was possible to re-request IWANT messages that are already being requested causing added duplication in messages and wasted unnecessary IWANT control messages. This PR shifts this logic to only request message ids that we are not currently requesting from peers. - Triangle routing naturally gives rise to unnecessary duplicates. Consider a mesh of 4 peers that are interconnected. Peer 1 sends a new message to 2,3,4. 2 propagates to 3,4 and 3 propagates to 2,4 and 4 propagates to 2,3. In this case 3 has received the message 3 times. If we keep track of peers that send us messages, when publishing or forwarding we no longer send to peers that have sent us a duplicate, we can eliminate one of the sends in the scenario above. This only occurs when message validation is async however. This PR adds this logic to remove some elements of triangle-routing duplicates. Co-authored-by: Divma <26765164+divagant-martian@users.noreply.github.com> Co-authored-by: Max Inden <mail@max-inden.de> Co-authored-by: Diva M <divma@protonmail.com>
2021-12-21 22:09:15 +11:00
[PR 2327]: https://github.com/libp2p/rust-libp2p/pull/2327
[PR 2408]: https://github.com/libp2p/rust-libp2p/pull/2408
[PR 2409]: https://github.com/libp2p/rust-libp2p/pull/2409
[PR 2403]: https://github.com/libp2p/rust-libp2p/pull/2403
[libp2p specs PR 383]: https://github.com/libp2p/specs/pull/383
2021-11-16 16:39:42 +01:00
# 0.34.0 [2021-11-16]
- Add topic and mesh metrics (see [PR 2316]).
- Fix bug in internal peer's topics tracking (see [PR 2325]).
- Use `instant` and `futures-timer` instead of `wasm-timer` (see [PR 2245]).
- Update dependencies.
[PR 2245]: https://github.com/libp2p/rust-libp2p/pull/2245
[PR 2325]: https://github.com/libp2p/rust-libp2p/pull/2325
[PR 2316]: https://github.com/libp2p/rust-libp2p/pull/2316
# 0.33.0 [2021-11-01]
- Add an event to register peers that do not support the gossipsub protocol
[PR 2241](https://github.com/libp2p/rust-libp2p/pull/2241)
- Make default features of `libp2p-core` optional.
[PR 2181](https://github.com/libp2p/rust-libp2p/pull/2181)
- Improve internal peer tracking.
[PR 2175](https://github.com/libp2p/rust-libp2p/pull/2175)
- Update dependencies.
- Allow `message_id_fn`s to accept closures that capture variables.
[PR 2103](https://github.com/libp2p/rust-libp2p/pull/2103)
- Implement std::error::Error for error types.
[PR 2254](https://github.com/libp2p/rust-libp2p/pull/2254)
2021-07-12 21:24:58 +02:00
# 0.32.0 [2021-07-12]
- Update dependencies.
- Reduce log levels across the crate to lessen noisiness of libp2p-gossipsub (see [PR 2101]).
[PR 2101]: https://github.com/libp2p/rust-libp2p/pull/2101
2021-05-17 12:43:24 +02:00
# 0.31.0 [2021-05-17]
- Keep connections to peers in a mesh alive. Allow closing idle connections to peers not in a mesh
[PR-2043].
[PR-2043]: https://github.com/libp2p/rust-libp2p/pull/2043https://github.com/libp2p/rust-libp2p/pull/2043
# 0.30.1 [2021-04-27]
- Remove `regex-filter` feature flag thus always enabling `regex::RegexSubscriptionFilter` [PR
2056](https://github.com/libp2p/rust-libp2p/pull/2056).
2021-04-13 20:15:15 +02:00
# 0.30.0 [2021-04-13]
- Update `libp2p-swarm`.
- Update dependencies.
2021-03-17 15:28:13 +01:00
# 0.29.0 [2021-03-17]
- Update `libp2p-swarm`.
- Update dependencies.
2021-02-15 20:06:50 +01:00
# 0.28.0 [2021-02-15]
- Prevent non-published messages being added to caches.
[PR 1930](https://github.com/libp2p/rust-libp2p/pull/1930)
- Update dependencies.
# 0.27.0 [2021-01-12]
- Update dependencies.
- Implement Gossipsub v1.1 specification.
[PR 1720](https://github.com/libp2p/rust-libp2p/pull/1720)
# 0.26.0 [2020-12-17]
- Update `libp2p-swarm` and `libp2p-core`.
# 0.25.0 [2020-11-25]
- Update `libp2p-swarm` and `libp2p-core`.
# 0.24.0 [2020-11-09]
- Update dependencies.
2020-10-16 20:36:47 +02:00
# 0.23.0 [2020-10-16]
- Update dependencies.
2020-09-09 12:20:25 +02:00
# 0.22.0 [2020-09-09]
- Update `libp2p-swarm` and `libp2p-core`.
# 0.21.0 [2020-08-18]
2020-07-29 09:28:04 +02:00
- Add public API to list topics and peers. [PR 1677](https://github.com/libp2p/rust-libp2p/pull/1677).
- Add message signing and extended privacy/validation configurations. [PR 1583](https://github.com/libp2p/rust-libp2p/pull/1583).
2020-07-29 09:28:04 +02:00
- `Debug` instance for `Gossipsub`. [PR 1673](https://github.com/libp2p/rust-libp2p/pull/1673).
[core/swarm] Emit events for active connection close and fix `disconnect()`. (#1619) * Emit events for active connection close and fix `disconnect()`. The `Network` does currently not emit events for actively closed connections, e.g. via `EstablishedConnection::close` or `ConnectedPeer::disconnect()`. As a result, when actively closing connections, there will be `ConnectionEstablished` events emitted without eventually a matching `ConnectionClosed` event. This seems undesirable and has the consequence that the `Swarm::ban_peer_id` feature in `libp2p-swarm` does not result in appropriate calls to `NetworkBehaviour::inject_connection_closed` and `NetworkBehaviour::inject_disconnected`. Furthermore, the `disconnect()` functionality in `libp2p-core` is currently broken as it leaves the `Pool` in an inconsistent state. This commit does the following: 1. When connection background tasks are dropped (i.e. removed from the `Manager`), they always terminate immediately, without attempting an orderly close of the connection. 2. An orderly close is sent to the background task of a connection as a regular command. The background task emits a `Closed` event before terminating. 3. `Pool::disconnect()` removes all connection tasks for the affected peer from the `Manager`, i.e. without an orderly close, thereby also fixing the discovered state inconsistency due to not removing the corresponding entries in the `Pool` itself after removing them from the `Manager`. 4. A new test is added to `libp2p-swarm` that exercises the ban/unban functionality and places assertions on the number and order of calls to the `NetworkBehaviour`. In that context some new testing utilities have been added to `libp2p-swarm`. This addresses https://github.com/libp2p/rust-libp2p/issues/1584. * Update swarm/src/lib.rs Co-authored-by: Toralf Wittner <tw@dtex.org> * Incorporate some review feedback. * Adapt to changes in master. * More verbose panic messages. * Simplify There is no need for a `StartClose` future. * Fix doc links. * Further small cleanup. * Update CHANGELOGs and versions. Co-authored-by: Toralf Wittner <tw@dtex.org>
2020-08-04 11:30:09 +02:00
- Bump `libp2p-core` and `libp2p-swarm` dependency.
# 0.20.0 [2020-07-01]
- Updated dependencies.
# 0.19.3 [2020-06-23]
- Maintenance release fixing linter warnings.
2020-06-22 11:41:28 +02:00
# 0.19.2 [2020-06-22]
- Updated dependencies.