Upgrade hyper to 0.14.11 (#9557)

* Upgrade hyper to 0.14.10

* fmt

* Enable required features
This commit is contained in:
Bastian Köcher
2021-08-13 20:31:40 +02:00
committed by GitHub
parent 7e9b8d278e
commit 1aadab917e
8 changed files with 70 additions and 198 deletions
+50 -178
View File
@@ -299,15 +299,16 @@ dependencies = [
[[package]]
name = "async-process"
version = "1.0.2"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef37b86e2fa961bae5a4d212708ea0154f904ce31d1a4a7f47e1bbc33a0c040b"
checksum = "b21b63ab5a0db0369deb913540af2892750e42d949faacc7a61495ac418a1692"
dependencies = [
"async-io",
"blocking",
"cfg-if 1.0.0",
"event-listener",
"futures-lite",
"libc",
"once_cell",
"signal-hook",
"winapi 0.3.9",
@@ -984,32 +985,16 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
[[package]]
name = "core-foundation"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171"
dependencies = [
"core-foundation-sys 0.7.0",
"libc",
]
[[package]]
name = "core-foundation"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62"
dependencies = [
"core-foundation-sys 0.8.2",
"core-foundation-sys",
"libc",
]
[[package]]
name = "core-foundation-sys"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac"
[[package]]
name = "core-foundation-sys"
version = "0.8.2"
@@ -1320,9 +1305,9 @@ dependencies = [
[[package]]
name = "ct-logs"
version = "0.7.0"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c8e13110a84b6315df212c045be706af261fd364791cad863285439ebba672e"
checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8"
dependencies = [
"sct",
]
@@ -2180,7 +2165,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a1387e07917c711fb4ee4f48ea0adb04a3c9739e53ef85bf43ae1edc2937a8b"
dependencies = [
"futures-io",
"rustls 0.19.1",
"rustls",
"webpki",
]
@@ -2344,26 +2329,6 @@ dependencies = [
"web-sys",
]
[[package]]
name = "h2"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535"
dependencies = [
"bytes 0.5.6",
"fnv",
"futures-core",
"futures-sink",
"futures-util",
"http",
"indexmap",
"slab",
"tokio 0.2.25",
"tokio-util 0.3.1",
"tracing",
"tracing-futures",
]
[[package]]
name = "half"
version = "1.7.1"
@@ -2517,16 +2482,6 @@ dependencies = [
"itoa",
]
[[package]]
name = "http-body"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b"
dependencies = [
"bytes 0.5.6",
"http",
]
[[package]]
name = "http-body"
version = "0.4.2"
@@ -2544,12 +2499,6 @@ version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3a87b616e37e93c22fb19bcd386f02f3af5ea98a25670ad0fce773de23c5e68"
[[package]]
name = "httpdate"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47"
[[package]]
name = "httpdate"
version = "1.0.1"
@@ -2590,30 +2539,6 @@ dependencies = [
"url 1.7.2",
]
[[package]]
name = "hyper"
version = "0.13.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a6f157065790a3ed2f88679250419b5cdd96e714a0d65f7797fd337186e96bb"
dependencies = [
"bytes 0.5.6",
"futures-channel",
"futures-core",
"futures-util",
"h2",
"http",
"http-body 0.3.1",
"httparse",
"httpdate 0.3.2",
"itoa",
"pin-project 1.0.5",
"socket2 0.3.19",
"tokio 0.2.25",
"tower-service",
"tracing",
"want",
]
[[package]]
name = "hyper"
version = "0.14.11"
@@ -2625,13 +2550,13 @@ dependencies = [
"futures-core",
"futures-util",
"http",
"http-body 0.4.2",
"http-body",
"httparse",
"httpdate 1.0.1",
"httpdate",
"itoa",
"pin-project-lite 0.2.6",
"socket2 0.4.0",
"tokio 1.9.0",
"tokio 1.10.0",
"tower-service",
"tracing",
"want",
@@ -2639,19 +2564,18 @@ dependencies = [
[[package]]
name = "hyper-rustls"
version = "0.21.0"
version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6"
checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64"
dependencies = [
"bytes 0.5.6",
"ct-logs",
"futures-util",
"hyper 0.13.10",
"hyper 0.14.11",
"log 0.4.14",
"rustls 0.18.1",
"rustls-native-certs 0.4.0",
"tokio 0.2.25",
"tokio-rustls 0.14.1",
"rustls",
"rustls-native-certs",
"tokio 1.10.0",
"tokio-rustls 0.22.0",
"webpki",
]
@@ -2664,7 +2588,7 @@ dependencies = [
"bytes 1.0.1",
"hyper 0.14.11",
"native-tls",
"tokio 1.9.0",
"tokio 1.10.0",
"tokio-native-tls",
]
@@ -2888,7 +2812,7 @@ dependencies = [
"log 0.4.14",
"serde",
"serde_json",
"tokio 1.9.0",
"tokio 1.10.0",
"url 1.7.2",
"websocket",
]
@@ -2988,7 +2912,7 @@ dependencies = [
"jsonrpc-core",
"lazy_static",
"log 0.4.14",
"tokio 1.9.0",
"tokio 1.10.0",
"tokio-stream",
"tokio-util 0.6.7",
"unicase 2.6.0",
@@ -3053,8 +2977,8 @@ dependencies = [
"jsonrpsee-types",
"log 0.4.14",
"pin-project 1.0.5",
"rustls 0.19.1",
"rustls-native-certs 0.5.0",
"rustls",
"rustls-native-certs",
"serde",
"serde_json",
"soketto 0.6.0",
@@ -4145,8 +4069,8 @@ dependencies = [
"openssl-probe",
"openssl-sys",
"schannel",
"security-framework 2.3.0",
"security-framework-sys 2.3.0",
"security-framework",
"security-framework-sys",
"tempfile",
]
@@ -5844,7 +5768,7 @@ dependencies = [
"libc",
"log 0.4.14",
"rand 0.7.3",
"tokio 1.9.0",
"tokio 1.10.0",
"winapi 0.3.9",
]
@@ -7038,19 +6962,6 @@ dependencies = [
"semver 0.9.0",
]
[[package]]
name = "rustls"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81"
dependencies = [
"base64 0.12.3",
"log 0.4.14",
"ring",
"sct",
"webpki",
]
[[package]]
name = "rustls"
version = "0.19.1"
@@ -7064,18 +6975,6 @@ dependencies = [
"webpki",
]
[[package]]
name = "rustls-native-certs"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "629d439a7672da82dd955498445e496ee2096fe2117b9f796558a43fdb9e59b8"
dependencies = [
"openssl-probe",
"rustls 0.18.1",
"schannel",
"security-framework 1.0.0",
]
[[package]]
name = "rustls-native-certs"
version = "0.5.0"
@@ -7083,9 +6982,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092"
dependencies = [
"openssl-probe",
"rustls 0.19.1",
"rustls",
"schannel",
"security-framework 2.3.0",
"security-framework",
]
[[package]]
@@ -7922,12 +7821,12 @@ dependencies = [
name = "sc-offchain"
version = "4.0.0-dev"
dependencies = [
"bytes 0.5.6",
"bytes 1.0.1",
"fnv",
"futures 0.3.16",
"futures-timer 3.0.2",
"hex",
"hyper 0.13.10",
"hyper 0.14.11",
"hyper-rustls",
"lazy_static",
"log 0.4.14",
@@ -7950,7 +7849,7 @@ dependencies = [
"sp-utils",
"substrate-test-runtime-client",
"threadpool",
"tokio 0.2.25",
"tokio 1.10.0",
]
[[package]]
@@ -8366,19 +8265,6 @@ dependencies = [
"zeroize",
]
[[package]]
name = "security-framework"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad502866817f0575705bd7be36e2b2535cc33262d493aa733a2ec862baa2bc2b"
dependencies = [
"bitflags",
"core-foundation 0.7.0",
"core-foundation-sys 0.7.0",
"libc",
"security-framework-sys 1.0.0",
]
[[package]]
name = "security-framework"
version = "2.3.0"
@@ -8386,20 +8272,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b239a3d5db51252f6f48f42172c65317f37202f4a21021bf5f9d40a408f4592c"
dependencies = [
"bitflags",
"core-foundation 0.9.1",
"core-foundation-sys 0.8.2",
"libc",
"security-framework-sys 2.3.0",
]
[[package]]
name = "security-framework-sys"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51ceb04988b17b6d1dcd555390fa822ca5637b4a14e1f5099f13d351bed4d6c7"
dependencies = [
"core-foundation-sys 0.7.0",
"core-foundation",
"core-foundation-sys",
"libc",
"security-framework-sys",
]
[[package]]
@@ -8408,7 +8284,7 @@ version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e4effb91b4b8b6fb7732e670b6cee160278ff8e6bf485c7805d9e319d76e284"
dependencies = [
"core-foundation-sys 0.8.2",
"core-foundation-sys",
"libc",
]
@@ -8587,9 +8463,9 @@ checksum = "42a568c8f2cd051a4d283bd6eb0343ac214c1b0f1ac19f93e1175b2dee38c73d"
[[package]]
name = "signal-hook"
version = "0.3.6"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a7f3f92a1da3d6b1d32245d0cbcbbab0cfc45996d8df619c42bccfa6d2bbb5f"
checksum = "ef33d6d0cd06e0840fba9985aab098c147e67e05cee14d412d3345ed14ff30ac"
dependencies = [
"libc",
"signal-hook-registry",
@@ -9719,10 +9595,10 @@ dependencies = [
"async-std",
"derive_more",
"futures-util",
"hyper 0.13.10",
"hyper 0.14.11",
"log 0.4.14",
"prometheus",
"tokio 0.2.25",
"tokio 1.10.0",
]
[[package]]
@@ -10162,11 +10038,9 @@ checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092"
dependencies = [
"bytes 0.5.6",
"fnv",
"futures-core",
"iovec",
"lazy_static",
"libc",
"memchr",
"mio 0.6.23",
"mio-uds",
"num_cpus",
@@ -10179,9 +10053,9 @@ dependencies = [
[[package]]
name = "tokio"
version = "1.9.0"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b7b349f11a7047e6d1276853e612d152f5e8a352c61917887cc2169e2366b4c"
checksum = "01cf844b23c6131f624accf65ce0e4e9956a8bb329400ea5bcc26ae3a5c20b0b"
dependencies = [
"autocfg 1.0.1",
"bytes 1.0.1",
@@ -10279,7 +10153,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b"
dependencies = [
"native-tls",
"tokio 1.9.0",
"tokio 1.10.0",
]
[[package]]
@@ -10303,25 +10177,24 @@ dependencies = [
[[package]]
name = "tokio-rustls"
version = "0.14.1"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a"
checksum = "03d15e5669243a45f630a5167d101b942174ca94b615445b2057eace1c818736"
dependencies = [
"futures-core",
"rustls 0.18.1",
"rustls",
"tokio 0.2.25",
"webpki",
]
[[package]]
name = "tokio-rustls"
version = "0.15.0"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03d15e5669243a45f630a5167d101b942174ca94b615445b2057eace1c818736"
checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6"
dependencies = [
"futures-core",
"rustls 0.19.1",
"tokio 0.2.25",
"rustls",
"tokio 1.10.0",
"webpki",
]
@@ -10333,7 +10206,7 @@ checksum = "7b2f3f698253f03119ac0102beaa64f67a67e08074d03a22d18784104543727f"
dependencies = [
"futures-core",
"pin-project-lite 0.2.6",
"tokio 1.9.0",
"tokio 1.10.0",
]
[[package]]
@@ -10459,7 +10332,7 @@ dependencies = [
"futures-sink",
"log 0.4.14",
"pin-project-lite 0.2.6",
"tokio 1.9.0",
"tokio 1.10.0",
]
[[package]]
@@ -10484,7 +10357,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f"
dependencies = [
"cfg-if 1.0.0",
"log 0.4.14",
"pin-project-lite 0.2.6",
"tracing-attributes",
"tracing-core",
-1
View File
@@ -238,7 +238,6 @@ ed25519-dalek = { opt-level = 3 }
flate2 = { opt-level = 3 }
futures-channel = { opt-level = 3 }
hashbrown = { opt-level = 3 }
h2 = { opt-level = 3 }
hash-db = { opt-level = 3 }
hmac = { opt-level = 3 }
httparse = { opt-level = 3 }
+4 -4
View File
@@ -13,7 +13,7 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
bytes = "0.5"
bytes = "1.0"
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
hex = "0.4"
fnv = "1.0.6"
@@ -33,8 +33,8 @@ sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
threadpool = "1.7"
[target.'cfg(not(target_os = "unknown"))'.dependencies]
hyper = "0.13.9"
hyper-rustls = "0.21.0"
hyper = "0.14.11"
hyper-rustls = "0.22.1"
[dev-dependencies]
sc-client-db = { version = "0.10.0-dev", default-features = true, path = "../db" }
@@ -44,7 +44,7 @@ sc-transaction-pool-api = { version = "4.0.0-dev", path = "../transaction-pool/a
sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
sp-consensus = { version = "0.10.0-dev", path = "../../primitives/consensus/common" }
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
tokio = "0.2"
tokio = "1.10"
lazy_static = "1.4.0"
[features]
+3 -3
View File
@@ -28,7 +28,7 @@
//! actively calling any function.
use crate::api::timestamp;
use bytes::buf::ext::{BufExt, Reader};
use bytes::buf::{Buf, Reader};
use fnv::FnvHashMap;
use futures::{channel::mpsc, future, prelude::*};
use hyper::{client, Body, Client as HyperClient};
@@ -51,7 +51,7 @@ pub struct SharedClient(Arc<HyperClient<HttpsConnector<client::HttpConnector>, B
impl SharedClient {
pub fn new() -> Self {
Self(Arc::new(HyperClient::builder().build(HttpsConnector::new())))
Self(Arc::new(HyperClient::builder().build(HttpsConnector::with_native_roots())))
}
}
@@ -719,7 +719,7 @@ mod tests {
let (addr_tx, addr_rx) = std::sync::mpsc::channel();
std::thread::spawn(move || {
let mut rt = tokio::runtime::Runtime::new().unwrap();
let rt = tokio::runtime::Runtime::new().unwrap();
let worker = rt.spawn(worker);
let server = rt.spawn(async move {
let server = hyper::Server::bind(&"127.0.0.1:0".parse().unwrap()).serve(
+1 -1
View File
@@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
futures = "0.3.16"
substrate-test-utils-derive = { version = "0.10.0-dev", path = "./derive" }
tokio = { version = "0.2.13", features = ["macros"] }
tokio = { version = "0.2.13", features = ["macros", "rt-core", "time"] }
[dev-dependencies]
sc-service = { version = "0.10.0-dev", path = "../client/service" }
+2 -2
View File
@@ -20,5 +20,5 @@ derive_more = "0.99"
[target.'cfg(not(target_os = "unknown"))'.dependencies]
async-std = { version = "1.6.5", features = ["unstable"] }
hyper = { version = "0.13.9", default-features = false, features = ["stream"] }
tokio = "0.2"
tokio = "1.10"
hyper = { version = "0.14.11", default-features = false, features = ["http1", "server", "tcp"] }
+5 -6
View File
@@ -16,7 +16,7 @@
// limitations under the License.
#[cfg(not(target_os = "unknown"))]
use futures_util::{future::Future, FutureExt};
use futures_util::future::Future;
use prometheus::core::Collector;
pub use prometheus::{
self,
@@ -67,8 +67,9 @@ mod known_os {
use super::*;
use hyper::{
http::StatusCode,
server::Server,
service::{make_service_fn, service_fn},
Body, Request, Response, Server,
Body, Request, Response,
};
#[derive(Debug, derive_more::Display, derive_more::From)]
@@ -153,10 +154,8 @@ mod known_os {
}
});
let server = Server::builder(Incoming(listener.incoming()))
.executor(Executor)
.serve(service)
.boxed();
let server =
Server::builder(Incoming(listener.incoming())).executor(Executor).serve(service);
let result = server.await.map_err(Into::into);
+5 -3
View File
@@ -44,9 +44,11 @@ impl tokio::io::AsyncRead for TcpStream {
fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context,
buf: &mut [u8],
) -> Poll<Result<usize, std::io::Error>> {
Pin::new(&mut Pin::into_inner(self).0).poll_read(cx, buf)
buf: &mut tokio::io::ReadBuf<'_>,
) -> Poll<Result<(), std::io::Error>> {
Pin::new(&mut Pin::into_inner(self).0)
.poll_read(cx, buf.initialized_mut())
.map_ok(drop)
}
}