Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Update libp2p and tokio #431

Closed
wants to merge 3 commits into from
Closed

Conversation

ljedrz
Copy link
Member

@ljedrz ljedrz commented Nov 17, 2020

A mostly straightforward update to more recent versions of these dependencies.

Filing it as a draft due to the block_exchange::long_get_block mysteriously failing, at least locally.

@ljedrz ljedrz requested a review from koivunej November 17, 2020 13:54
@koivunej
Copy link
Collaborator

koivunej commented Nov 18, 2020

Looked into getting ipfs-http to run with the help of tokio_compat_02 in ljedrz#1. The way I understand the state it'll end up to is:

  1. tokio-0.3 running as configured in the http/src/main.rs
  2. tokio-0.2 running as single threaded from tokio_compat_02
  3. all warp work being executed on tokio-0.2
  4. therefore all ipfs work (except for background task, swarm spawns) will happen on single threaded tokio-0.2
  5. because single threaded tokio-0.2, some ipfs work will fail, like FsStore using spawn_blocking on tokio-0.3
  6. spawn_blocking on tokio-0.3 will fail because of there is no tokio-0.3 runtime available on the single tokio-0.2 thread

(emphasis on spawn_blocking on tokio-0.3 because this threw me off a bit, but makes sense: nowhere in the tokio-0.2 path is the tokio-0.3 reactor made available locally to thread, so it will not be found.)

I think we can land this only when seanmonstar/warp#741 is done along with the bytes 0.6 upgrades happening, which may or may not be linked on the warp PR.

@ljedrz
Copy link
Member Author

ljedrz commented Dec 11, 2020

Further tokio 0.3 work in warp: seanmonstar/warp#753.

@koivunej
Copy link
Collaborator

koivunej commented Jan 5, 2021

Status of the upgrade seems that we are still awaiting for the warp PR to go through. At the same time there are at least two major PRs ongoing in rust-libp2p 1907 and the larger 1887. Looks like this will be a big one since we need to adapt to the fixed size multihash as well, unless the two work side by side.

@koivunej
Copy link
Collaborator

Rebased, superceded in #446.

@koivunej koivunej closed this Jan 12, 2021
@ljedrz ljedrz deleted the update_libp2p_and_tokio branch January 12, 2021 16:48
bors bot added a commit that referenced this pull request Jan 26, 2021
446: Update libp2p, tokio, warp, prost, futures, etc r=koivunej a=koivunej

Rebased the #431 work on top of the latest master. This PR will leave:

- mdns commented out
- domain a git dependency pending a release or migration to trust-dns following upcoming changes in libp2p-dns

Co-authored-by: ljedrz <[email protected]>
Co-authored-by: Joonas Koivunen <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants