Reduce provisioner work (#6328)

* Store values needed to create inherent data when needed instead of creating them early on

* Point deps to substrate branch

* Arc the client

* Cargo update

* Fix main cargo files

* Undo cargo file changes

* Add overseer dep to inherents

* Update deps

* Simplify code

* Update benchmark

* Update node/client/src/benchmarking.rs

Co-authored-by: Bastian Köcher <info@kchr.de>

* Update node/core/parachains-inherent/src/lib.rs

Co-authored-by: Bastian Köcher <info@kchr.de>

* Update node/core/parachains-inherent/src/lib.rs

Co-authored-by: Bastian Köcher <info@kchr.de>

* Revert "Update node/core/parachains-inherent/src/lib.rs"

This reverts commit 8b9555dc2451acfabab173d259e00da2728b7aa2.

* Revert "Update node/core/parachains-inherent/src/lib.rs"

This reverts commit 816c92d0e001e71f677d0acbcf22bdc3f511bc56.

* cargo update -p sp-io

* fmt

Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
alexgparity
2022-12-02 23:46:49 +01:00
committed by GitHub
parent 7341dbb20d
commit a7eee7dd86
6 changed files with 221 additions and 204 deletions
+2 -3
View File
@@ -359,7 +359,7 @@ pub fn benchmark_inherent_data(
// Assume that all runtimes have the `timestamp` pallet.
let d = std::time::Duration::from_millis(0);
let timestamp = sp_timestamp::InherentDataProvider::new(d.into());
timestamp.provide_inherent_data(&mut inherent_data)?;
futures::executor::block_on(timestamp.provide_inherent_data(&mut inherent_data))?;
let para_data = polkadot_primitives::v2::InherentData {
bitfields: Vec::new(),
@@ -368,8 +368,7 @@ pub fn benchmark_inherent_data(
parent_header: header,
};
polkadot_node_core_parachains_inherent::ParachainsInherentDataProvider::from_data(para_data)
.provide_inherent_data(&mut inherent_data)?;
inherent_data.put_data(polkadot_primitives::v2::PARACHAINS_INHERENT_IDENTIFIER, &para_data)?;
Ok(inherent_data)
}