Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpc: replace hyper::Client with reqwest::Client #1362

Merged
merged 10 commits into from
Sep 29, 2023

Conversation

mzabaluev
Copy link
Contributor

@mzabaluev mzabaluev commented Sep 28, 2023

Closes #1342

In hyper, the high-level Client implementation is going to be removed in the next major release. The current client lacks built-in support for HTTP proxies, and we want to ditch hyper-proxy as it is unmaintained and its webpki dependency has a known security issue.

  • Referenced an issue explaining the need for the change
  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Added entry in .changelog/

In hyper, the high-level Client implementation is going to be removed
in the next major release. The current client lacks built-in support for
HTTP proxies, and we want to ditch hyper-proxy as it is unmaintained
and its webpki dependency has known security issues.
Oops, this was temporary and not meant to be commited.
The CLI can be used to test the proxy support.
rpc/src/error.rs Show resolved Hide resolved
rpc/src/error.rs Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Sep 28, 2023

Codecov Report

Merging #1362 (c5f186d) into main (89da5f6) will decrease coverage by 0.6%.
The diff coverage is 62.2%.

❗ Current head c5f186d differs from pull request most recent head 7f9b850. Consider uploading reports for the commit 7f9b850 to get more accurate results

@@           Coverage Diff           @@
##            main   #1362     +/-   ##
=======================================
- Coverage   60.7%   60.2%   -0.6%     
=======================================
  Files        274     274             
  Lines      26864   27199    +335     
=======================================
+ Hits       16322   16386     +64     
- Misses     10542   10813    +271     
Files Coverage Δ
rpc/src/client/transport/auth.rs 100.0% <100.0%> (ø)
rpc/src/error.rs 95.2% <100.0%> (-0.1%) ⬇️
rpc/src/rpc_url.rs 66.6% <76.0%> (ø)
rpc/src/client/transport/websocket.rs 63.9% <15.3%> (-0.4%) ⬇️
rpc/src/client/transport/http.rs 34.5% <60.3%> (+14.4%) ⬆️

... and 5 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@romac
Copy link
Member

romac commented Sep 28, 2023

Love all that deleted code 🥇

Remove ugly turbofish syntax. The changes only affect internal methods,
so these stylistics do not matter a lot.
This solves the problem with using type alias as a constructor.
@mzabaluev mzabaluev marked this pull request as ready for review September 28, 2023 18:53
@romac romac merged commit 93877da into main Sep 29, 2023
23 checks passed
@romac romac deleted the mikhail/rpc-client-backed-by-reqwest branch September 29, 2023 11:03
SuperFluffy pushed a commit to astriaorg/tendermint-rs that referenced this pull request Oct 12, 2023
…1362)

* rpc: replace hyper::Client with reqwest::Client

In hyper, the high-level Client implementation is going to be removed
in the next major release. The current client lacks built-in support for
HTTP proxies, and we want to ditch hyper-proxy as it is unmaintained
and its webpki dependency has known security issues.

* Remove the proxy_client example

Oops, this was temporary and not meant to be commited.
The CLI can be used to test the proxy support.

* Bump async-tungstenite version to 0.23

* rpc: fix proxy configuration in http::Builder

* rpc: use argument type to select the dialog

Remove ugly turbofish syntax. The changes only affect internal methods,
so these stylistics do not matter a lot.

* rpc: restore LatestDialog as re-export

This solves the problem with using type alias as a constructor.

* Changelog entries for informalsystems#1362

* rpc: prune dependencies for http-client feature

* rpc: demote http to dev-dependencies

* Small rewording in changelog for informalsystems#1342 (informalsystems#1362)

Co-authored-by: Romain Ruetschi <[email protected]>

---------

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

Successfully merging this pull request may close these issues.

RUSTSEC-2023-0052: webpki: CPU denial of service in certificate path building
3 participants