Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Upgrade libp2p to 0.49.0 #12256

Merged
merged 21 commits into from
Oct 17, 2022
Merged

Conversation

dmitry-markin
Copy link
Contributor

@dmitry-markin dmitry-markin commented Sep 13, 2022

Resolves #12267 and pulls in libp2p/rust-libp2p#2846 to support fallback Kademlia protocol names (see #7746).

The main change is that NetworkBehaviourEventProcess was deprecated, so the event processing previously taking place in Behaviour popped up to NetworkWorker.

Follow-Up Issue

Transports and protocols currently used rely on async-std primitives, what can cause issues under the tokio runtime. They should be upgraded to use tokio implementations: #12499.

@dmitry-markin dmitry-markin added B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Sep 13, 2022
@github-actions github-actions bot added the A3-in_progress Pull request is in progress. No review needed at this stage. label Sep 13, 2022
@dmitry-markin dmitry-markin changed the title [draft] Upgrade libp2p to 0.48.0 [draft] Upgrade libp2p to 0.49.0 Sep 15, 2022
Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 👍 what's blocking you from finishing this?

@gilescope
Copy link
Contributor

This upgrade also removes an unmaintained dependency from being pulled in (a few levels down) so I would love to see this landed.

@dmitry-markin
Copy link
Contributor Author

nice +1 what's blocking you from finishing this?

@melekes There is a blocking bug in libp2p-0.48 with NetworkBehaviour derive macro that was fixed in master and is going to be released with 0.49. So we are waiting for the next release of libp2p.

@gilescope
Copy link
Contributor

Once we've done this PR, we should do another PR to bump kvdb-rocksdb to 0.16 (like https://github.com/paritytech/substrate/pull/11144/files ) as the current version is also dependent on the unmaintained crate. That second PR should reduce the pulling in of multiple crate versions that this PR will create. (feel free to ping me to do it if you don't want to, just want to make sure it gets done.)

@jasl
Copy link
Contributor

jasl commented Sep 28, 2022

+1
Hope these dependencies bumping can be included in coming polkadot-v0.9.30

@dmitry-markin
Copy link
Contributor Author

dmitry-markin commented Oct 3, 2022

Pulled the changes from master in, but still blocked by libp2p-0.49.0 release...

@dmitry-markin dmitry-markin changed the title [draft] Upgrade libp2p to 0.49.0 Upgrade libp2p to 0.49.0 Oct 15, 2022
@dmitry-markin dmitry-markin marked this pull request as ready for review October 15, 2022 17:16
@github-actions github-actions bot added A0-please_review Pull request needs code review. and removed A3-in_progress Pull request is in progress. No review needed at this stage. labels Oct 15, 2022
client/network/src/discovery.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

client/network/src/behaviour.rs Outdated Show resolved Hide resolved
client/network/src/behaviour.rs Outdated Show resolved Hide resolved
client/network/src/behaviour.rs Outdated Show resolved Hide resolved
@dmitry-markin dmitry-markin added A8-mergeoncegreen and removed A0-please_review Pull request needs code review. labels Oct 17, 2022
@dmitry-markin
Copy link
Contributor Author

bot merge

@paritytech-processbot paritytech-processbot bot merged commit 444cf9d into master Oct 17, 2022
@paritytech-processbot paritytech-processbot bot deleted the dm-upgrade-libp2p-to-0.48.0 branch October 17, 2022 11:02
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
* cargo upgrade libp2p

* Get rid of `NetworkBehaviourEventProcess` in handling of `CustomMessageOutcome`

* Get rid of `NetworkBehaviourEventProcess` in handling of `request_responses::Event`

* Get rid of `NetworkBehaviourEventProcess` in handling of `peer_info::PeerInfoEvent`

* Get rid of `NetworkBehaviourEventProcess` in handling of `DiscoveryOut`

* Get rid of `poll()` method in `Bahaviour`

* minor: comments

* Upgrade libp2p to 0.49.0 (unreleased)

* Support multiple Kad protocol names

* Make borrow checker happy

* minor: wording

* Make substrate build with libp2p-0.49.0

* rustfmt

* Get rid of MdnsWrapper

* Resolve deprecation warnings

* Fix documentation

* Apply suggestions from code review: fix typos

Co-authored-by: Aaro Altonen <[email protected]>

* Apply suggestion: simplify kad protocol name matching

Co-authored-by: Aaro Altonen <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update libp2p from 0.46.1 to 0.48.0
6 participants