Skip to content

Commit

Permalink
substrate-offchain: upgrade hyper to v1
Browse files Browse the repository at this point in the history
  • Loading branch information
ShoyuVanilla committed Oct 25, 2024
1 parent 5d7181c commit 014c0ff
Show file tree
Hide file tree
Showing 12 changed files with 227 additions and 163 deletions.
100 changes: 58 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -804,13 +804,11 @@ honggfuzz = { version = "0.5.55" }
http = { version = "1.1" }
http-body = { version = "1", default-features = false }
http-body-util = { version = "0.1.2", default-features = false }
hyper = { version = "1.3.1", default-features = false }
hyper-rustls = { version = "0.24.2" }
hyper-util = { version = "0.1.5", default-features = false }
# TODO: remove hyper v0.14 https://github.com/paritytech/polkadot-sdk/issues/4896
hyper = { version = "1.5.0", default-features = false }
hyper-rustls = { version = "0.27.3", default-features = false, features = ["http1", "http2", "logging", "ring", "rustls-native-certs", "tls12"] }
hyper-util = { version = "0.1.9", default-features = false }
first-pallet = { package = "polkadot-sdk-docs-first-pallet", path = "docs/sdk/packages/guides/first-pallet", default-features = false }
first-runtime = { package = "polkadot-sdk-docs-first-runtime", path = "docs/sdk/packages/guides/first-runtime", default-features = false }
hyperv14 = { package = "hyper", version = "0.14.29", default-features = false }
impl-serde = { version = "0.5.0", default-features = false }
impl-trait-for-tuples = { version = "0.2.2" }
indexmap = { version = "2.0.0" }
Expand Down Expand Up @@ -1127,6 +1125,7 @@ rstest = { version = "0.18.2" }
rustc-hash = { version = "1.1.0" }
rustc-hex = { version = "2.1.0", default-features = false }
rustix = { version = "0.36.7", default-features = false }
rustls = { version = "0.23.14", default-features = false, features = ["logging", "ring", "std", "tls12"] }
rustversion = { version = "1.0.17" }
rusty-fork = { version = "0.3.0", default-features = false }
safe-mix = { version = "1.0", default-features = false }
Expand Down
6 changes: 3 additions & 3 deletions polkadot/node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ pub fn new_full<
is_validator: role.is_authority(),
enable_http_requests: false,
custom_extensions: move |_| vec![],
})
})?
.run(client.clone(), task_manager.spawn_handle())
.boxed(),
);
Expand Down Expand Up @@ -1436,7 +1436,7 @@ pub fn new_chain_ops(
} else if config.chain_spec.is_kusama() {
chain_ops!(config, None)
} else if config.chain_spec.is_westend() {
return chain_ops!(config, None)
return chain_ops!(config, None);
} else {
chain_ops!(config, None)
}
Expand Down Expand Up @@ -1488,7 +1488,7 @@ pub fn revert_backend(
let revertible = blocks.min(best_number - finalized);

if revertible == 0 {
return Ok(())
return Ok(());
}

let number = best_number - revertible;
Expand Down
19 changes: 19 additions & 0 deletions prdoc/pr_5919.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json

title: "substrate-offchain: upgrade hyper to v1"

doc:
- audience: Node Dev
description: |
Bump depencency `hyper` of `substrait-offchain` for http from `0.14` to `1`.
This changed APIs a bit;
- `sc_offchain::Offchainworker::new()` now returns `std::io::Result<Self>` (Previously was `Self`)

crates:
- name: sc-offchain
bump: major
- name: polkadot-service
bump: patch
- name: staging-node-cli
bump: patch
Loading

0 comments on commit 014c0ff

Please sign in to comment.