diff --git a/.gitlab/pipeline/zombienet/polkadot.yml b/.gitlab/pipeline/zombienet/polkadot.yml
index ac4bdac7ad15..e722239d890c 100644
--- a/.gitlab/pipeline/zombienet/polkadot.yml
+++ b/.gitlab/pipeline/zombienet/polkadot.yml
@@ -252,6 +252,17 @@ zombienet-polkadot-functional-0018-shared-core-idle-parachain:
--local-dir="${LOCAL_DIR}/functional"
--test="0018-shared-core-idle-parachain.zndsl"
+zombienet-polkadot-functional-0019-coretime-collation-fetching-fairness:
+ extends:
+ - .zombienet-polkadot-common
+ before_script:
+ - !reference [ .zombienet-polkadot-common, before_script ]
+ - cp --remove-destination ${LOCAL_DIR}/assign-core.js ${LOCAL_DIR}/functional
+ script:
+ - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh
+ --local-dir="${LOCAL_DIR}/functional"
+ --test="0019-coretime-collation-fetching-fairness.zndsl"
+
zombienet-polkadot-smoke-0001-parachains-smoke-test:
extends:
- .zombienet-polkadot-common
diff --git a/Cargo.lock b/Cargo.lock
index 01fb5aad69ed..80281efbb69f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4630,6 +4630,7 @@ dependencies = [
"sp-runtime 31.0.1",
"sp-state-machine 0.35.0",
"sp-timestamp 26.0.0",
+ "sp-trie 29.0.0",
"substrate-prometheus-endpoint",
"tokio",
"tracing",
@@ -4929,7 +4930,6 @@ dependencies = [
"pallet-message-queue 31.0.0",
"parity-scale-codec",
"polkadot-parachain-primitives 6.0.0",
- "polkadot-runtime-common 7.0.0",
"polkadot-runtime-parachains 7.0.0",
"rand",
"sc-client-api",
@@ -10741,9 +10741,9 @@ dependencies = [
[[package]]
name = "merkleized-metadata"
-version = "0.1.2"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "943f6d92804ed0100803d51fa9b21fd9432b5d122ba4c713dc26fe6d2f619cf6"
+checksum = "38c592efaf1b3250df14c8f3c2d952233f0302bb81d3586db2f303666c1cd607"
dependencies = [
"array-bytes",
"blake3",
@@ -18146,6 +18146,7 @@ dependencies = [
"serde_json",
"sp-api 26.0.0",
"sp-block-builder 26.0.0",
+ "sp-consensus",
"sp-consensus-aura 0.32.0",
"sp-core 28.0.0",
"sp-crypto-hashing 0.1.0",
@@ -31752,10 +31753,13 @@ name = "xcm-executor-integration-tests"
version = "1.0.0"
dependencies = [
"frame-support 28.0.0",
+ "frame-system 28.0.0",
"futures",
+ "pallet-sudo 28.0.0",
"pallet-transaction-payment 28.0.0",
"pallet-xcm 7.0.0",
"parity-scale-codec",
+ "polkadot-runtime-parachains 7.0.0",
"polkadot-test-client",
"polkadot-test-runtime",
"polkadot-test-service",
diff --git a/Cargo.toml b/Cargo.toml
index bb75bd4b023e..ddbc842beeee 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -854,7 +854,7 @@ macro_magic = { version = "0.5.1" }
maplit = { version = "1.0.2" }
memmap2 = { version = "0.9.3" }
memory-db = { version = "0.32.0", default-features = false }
-merkleized-metadata = { version = "0.1.2" }
+merkleized-metadata = { version = "0.2.0" }
merlin = { version = "3.0", default-features = false }
messages-relay = { path = "bridges/relays/messages" }
metered = { version = "0.6.1", default-features = false, package = "prioritized-metered-channel" }
diff --git a/bridges/bin/runtime-common/Cargo.toml b/bridges/bin/runtime-common/Cargo.toml
index 37b56140c289..49cd086fd3eb 100644
--- a/bridges/bin/runtime-common/Cargo.toml
+++ b/bridges/bin/runtime-common/Cargo.toml
@@ -99,6 +99,7 @@ runtime-benchmarks = [
"pallet-utility/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"sp-trie",
+ "xcm/runtime-benchmarks",
]
integrity-test = ["static_assertions"]
test-helpers = ["bp-runtime/test-helpers", "sp-trie"]
diff --git a/bridges/modules/xcm-bridge-hub-router/Cargo.toml b/bridges/modules/xcm-bridge-hub-router/Cargo.toml
index 55824f6a7fe7..b0286938f36d 100644
--- a/bridges/modules/xcm-bridge-hub-router/Cargo.toml
+++ b/bridges/modules/xcm-bridge-hub-router/Cargo.toml
@@ -56,6 +56,7 @@ runtime-benchmarks = [
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
diff --git a/bridges/modules/xcm-bridge-hub/Cargo.toml b/bridges/modules/xcm-bridge-hub/Cargo.toml
index 251dcfb45bcb..ef49b3396b5c 100644
--- a/bridges/modules/xcm-bridge-hub/Cargo.toml
+++ b/bridges/modules/xcm-bridge-hub/Cargo.toml
@@ -77,6 +77,7 @@ runtime-benchmarks = [
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
diff --git a/bridges/snowbridge/pallets/inbound-queue/Cargo.toml b/bridges/snowbridge/pallets/inbound-queue/Cargo.toml
index 3ab633bfcd79..c0789940a9e8 100644
--- a/bridges/snowbridge/pallets/inbound-queue/Cargo.toml
+++ b/bridges/snowbridge/pallets/inbound-queue/Cargo.toml
@@ -81,6 +81,7 @@ runtime-benchmarks = [
"snowbridge-router-primitives/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
diff --git a/bridges/snowbridge/pallets/system/Cargo.toml b/bridges/snowbridge/pallets/system/Cargo.toml
index f1e749afb997..d8e124d73d14 100644
--- a/bridges/snowbridge/pallets/system/Cargo.toml
+++ b/bridges/snowbridge/pallets/system/Cargo.toml
@@ -71,6 +71,7 @@ runtime-benchmarks = [
"snowbridge-pallet-outbound-queue/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
diff --git a/bridges/snowbridge/primitives/core/Cargo.toml b/bridges/snowbridge/primitives/core/Cargo.toml
index fa37c795b2d1..af002a5a965c 100644
--- a/bridges/snowbridge/primitives/core/Cargo.toml
+++ b/bridges/snowbridge/primitives/core/Cargo.toml
@@ -64,4 +64,5 @@ runtime-benchmarks = [
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
diff --git a/bridges/snowbridge/primitives/router/Cargo.toml b/bridges/snowbridge/primitives/router/Cargo.toml
index ee8d481cec12..1f7f489c6b18 100644
--- a/bridges/snowbridge/primitives/router/Cargo.toml
+++ b/bridges/snowbridge/primitives/router/Cargo.toml
@@ -51,4 +51,5 @@ runtime-benchmarks = [
"snowbridge-core/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
diff --git a/bridges/snowbridge/runtime/runtime-common/Cargo.toml b/bridges/snowbridge/runtime/runtime-common/Cargo.toml
index d47cb3cb7101..514a4c186696 100644
--- a/bridges/snowbridge/runtime/runtime-common/Cargo.toml
+++ b/bridges/snowbridge/runtime/runtime-common/Cargo.toml
@@ -43,4 +43,5 @@ runtime-benchmarks = [
"snowbridge-core/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
diff --git a/bridges/snowbridge/runtime/test-common/Cargo.toml b/bridges/snowbridge/runtime/test-common/Cargo.toml
index 9f47f158ed4a..cc1ed1288ca0 100644
--- a/bridges/snowbridge/runtime/test-common/Cargo.toml
+++ b/bridges/snowbridge/runtime/test-common/Cargo.toml
@@ -92,5 +92,6 @@ runtime-benchmarks = [
"snowbridge-pallet-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
fast-runtime = []
diff --git a/cumulus/client/consensus/aura/Cargo.toml b/cumulus/client/consensus/aura/Cargo.toml
index 6e0c124591cb..33f24e30ccfb 100644
--- a/cumulus/client/consensus/aura/Cargo.toml
+++ b/cumulus/client/consensus/aura/Cargo.toml
@@ -35,6 +35,7 @@ sp-blockchain = { workspace = true, default-features = true }
sp-consensus = { workspace = true, default-features = true }
sp-consensus-aura = { workspace = true, default-features = true }
sp-core = { workspace = true, default-features = true }
+sp-trie = { workspace = true, default-features = true }
sp-inherents = { workspace = true, default-features = true }
sp-keystore = { workspace = true, default-features = true }
sp-runtime = { workspace = true, default-features = true }
diff --git a/cumulus/client/consensus/aura/src/collators/slot_based/block_import.rs b/cumulus/client/consensus/aura/src/collators/slot_based/block_import.rs
new file mode 100644
index 000000000000..9c53da6a6b7d
--- /dev/null
+++ b/cumulus/client/consensus/aura/src/collators/slot_based/block_import.rs
@@ -0,0 +1,144 @@
+// Copyright (C) Parity Technologies (UK) Ltd.
+// This file is part of Cumulus.
+
+// Cumulus is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Cumulus is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Cumulus. If not, see .
+
+use futures::{stream::FusedStream, StreamExt};
+use sc_consensus::{BlockImport, StateAction};
+use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
+use sp_api::{ApiExt, CallApiAt, CallContext, Core, ProvideRuntimeApi, StorageProof};
+use sp_runtime::traits::{Block as BlockT, Header as _};
+use sp_trie::proof_size_extension::ProofSizeExt;
+use std::sync::Arc;
+
+/// Handle for receiving the block and the storage proof from the [`SlotBasedBlockImport`].
+///
+/// This handle should be passed to [`Params`](super::Params) or can also be dropped if the node is
+/// not running as collator.
+pub struct SlotBasedBlockImportHandle {
+ receiver: TracingUnboundedReceiver<(Block, StorageProof)>,
+}
+
+impl SlotBasedBlockImportHandle {
+ /// Returns the next item.
+ ///
+ /// The future will never return when the internal channel is closed.
+ pub async fn next(&mut self) -> (Block, StorageProof) {
+ loop {
+ if self.receiver.is_terminated() {
+ futures::pending!()
+ } else if let Some(res) = self.receiver.next().await {
+ return res
+ }
+ }
+ }
+}
+
+/// Special block import for the slot based collator.
+pub struct SlotBasedBlockImport {
+ inner: BI,
+ client: Arc,
+ sender: TracingUnboundedSender<(Block, StorageProof)>,
+}
+
+impl SlotBasedBlockImport {
+ /// Create a new instance.
+ ///
+ /// The returned [`SlotBasedBlockImportHandle`] needs to be passed to the
+ /// [`Params`](super::Params), so that this block import instance can communicate with the
+ /// collation task. If the node is not running as a collator, just dropping the handle is fine.
+ pub fn new(inner: BI, client: Arc) -> (Self, SlotBasedBlockImportHandle) {
+ let (sender, receiver) = tracing_unbounded("SlotBasedBlockImportChannel", 1000);
+
+ (Self { sender, client, inner }, SlotBasedBlockImportHandle { receiver })
+ }
+}
+
+impl Clone for SlotBasedBlockImport {
+ fn clone(&self) -> Self {
+ Self { inner: self.inner.clone(), client: self.client.clone(), sender: self.sender.clone() }
+ }
+}
+
+#[async_trait::async_trait]
+impl BlockImport for SlotBasedBlockImport
+where
+ Block: BlockT,
+ BI: BlockImport + Send + Sync,
+ BI::Error: Into,
+ Client: ProvideRuntimeApi + CallApiAt + Send + Sync,
+ Client::StateBackend: Send,
+ Client::Api: Core,
+{
+ type Error = sp_consensus::Error;
+
+ async fn check_block(
+ &self,
+ block: sc_consensus::BlockCheckParams,
+ ) -> Result {
+ self.inner.check_block(block).await.map_err(Into::into)
+ }
+
+ async fn import_block(
+ &self,
+ mut params: sc_consensus::BlockImportParams,
+ ) -> Result {
+ // If the channel exists and it is required to execute the block, we will execute the block
+ // here. This is done to collect the storage proof and to prevent re-execution, we push
+ // downwards the state changes. `StateAction::ApplyChanges` is ignored, because it either
+ // means that the node produced the block itself or the block was imported via state sync.
+ if !self.sender.is_closed() && !matches!(params.state_action, StateAction::ApplyChanges(_))
+ {
+ let mut runtime_api = self.client.runtime_api();
+
+ runtime_api.set_call_context(CallContext::Onchain);
+
+ runtime_api.record_proof();
+ let recorder = runtime_api
+ .proof_recorder()
+ .expect("Proof recording is enabled in the line above; qed.");
+ runtime_api.register_extension(ProofSizeExt::new(recorder));
+
+ let parent_hash = *params.header.parent_hash();
+
+ let block = Block::new(params.header.clone(), params.body.clone().unwrap_or_default());
+
+ runtime_api
+ .execute_block(parent_hash, block.clone())
+ .map_err(|e| Box::new(e) as Box<_>)?;
+
+ let storage_proof =
+ runtime_api.extract_proof().expect("Proof recording was enabled above; qed");
+
+ let state = self.client.state_at(parent_hash).map_err(|e| Box::new(e) as Box<_>)?;
+ let gen_storage_changes = runtime_api
+ .into_storage_changes(&state, parent_hash)
+ .map_err(sp_consensus::Error::ChainLookup)?;
+
+ if params.header.state_root() != &gen_storage_changes.transaction_storage_root {
+ return Err(sp_consensus::Error::Other(Box::new(
+ sp_blockchain::Error::InvalidStateRoot,
+ )))
+ }
+
+ params.state_action = StateAction::ApplyChanges(sc_consensus::StorageChanges::Changes(
+ gen_storage_changes,
+ ));
+
+ let _ = self.sender.unbounded_send((block, storage_proof));
+ }
+
+ self.inner.import_block(params).await.map_err(Into::into)
+ }
+}
diff --git a/cumulus/client/consensus/aura/src/collators/slot_based/collation_task.rs b/cumulus/client/consensus/aura/src/collators/slot_based/collation_task.rs
index 5b8151f6302c..abaeb8319a40 100644
--- a/cumulus/client/consensus/aura/src/collators/slot_based/collation_task.rs
+++ b/cumulus/client/consensus/aura/src/collators/slot_based/collation_task.rs
@@ -47,6 +47,8 @@ pub struct Params {
pub collator_service: CS,
/// Receiver channel for communication with the block builder task.
pub collator_receiver: TracingUnboundedReceiver>,
+ /// The handle from the special slot based block import.
+ pub block_import_handle: super::SlotBasedBlockImportHandle,
}
/// Asynchronously executes the collation task for a parachain.
@@ -55,28 +57,49 @@ pub struct Params {
/// collations to the relay chain. It listens for new best relay chain block notifications and
/// handles collator messages. If our parachain is scheduled on a core and we have a candidate,
/// the task will build a collation and send it to the relay chain.
-pub async fn run_collation_task(mut params: Params)
-where
+pub async fn run_collation_task(
+ Params {
+ relay_client,
+ collator_key,
+ para_id,
+ reinitialize,
+ collator_service,
+ mut collator_receiver,
+ mut block_import_handle,
+ }: Params,
+) where
Block: BlockT,
CS: CollatorServiceInterface + Send + Sync + 'static,
RClient: RelayChainInterface + Clone + 'static,
{
- let Ok(mut overseer_handle) = params.relay_client.overseer_handle() else {
+ let Ok(mut overseer_handle) = relay_client.overseer_handle() else {
tracing::error!(target: LOG_TARGET, "Failed to get overseer handle.");
return
};
cumulus_client_collator::initialize_collator_subsystems(
&mut overseer_handle,
- params.collator_key,
- params.para_id,
- params.reinitialize,
+ collator_key,
+ para_id,
+ reinitialize,
)
.await;
- let collator_service = params.collator_service;
- while let Some(collator_message) = params.collator_receiver.next().await {
- handle_collation_message(collator_message, &collator_service, &mut overseer_handle).await;
+ loop {
+ futures::select! {
+ collator_message = collator_receiver.next() => {
+ let Some(message) = collator_message else {
+ return;
+ };
+
+ handle_collation_message(message, &collator_service, &mut overseer_handle).await;
+ },
+ block_import_msg = block_import_handle.next().fuse() => {
+ // TODO: Implement me.
+ // Issue: https://github.com/paritytech/polkadot-sdk/issues/6495
+ let _ = block_import_msg;
+ }
+ }
}
}
diff --git a/cumulus/client/consensus/aura/src/collators/slot_based/mod.rs b/cumulus/client/consensus/aura/src/collators/slot_based/mod.rs
index 18e63681d578..09afa18e6fbb 100644
--- a/cumulus/client/consensus/aura/src/collators/slot_based/mod.rs
+++ b/cumulus/client/consensus/aura/src/collators/slot_based/mod.rs
@@ -54,11 +54,14 @@ use sp_keystore::KeystorePtr;
use sp_runtime::traits::{Block as BlockT, Member};
use std::{sync::Arc, time::Duration};
+pub use block_import::{SlotBasedBlockImport, SlotBasedBlockImportHandle};
+
mod block_builder_task;
+mod block_import;
mod collation_task;
/// Parameters for [`run`].
-pub struct Params {
+pub struct Params {
/// Inherent data providers. Only non-consensus inherent data should be provided, i.e.
/// the timestamp, slot, and paras inherents should be omitted, as they are set by this
/// collator.
@@ -90,6 +93,8 @@ pub struct Params,
/// Spawner for spawning futures.
pub spawner: Spawner,
}
@@ -111,8 +116,9 @@ pub fn run,
+ }: Params,
) where
Block: BlockT,
Client: ProvideRuntimeApi
@@ -147,6 +153,7 @@ pub fn run(collator_task_params);
diff --git a/cumulus/pallets/dmp-queue/Cargo.toml b/cumulus/pallets/dmp-queue/Cargo.toml
index 936526290d93..ae85a108fe72 100644
--- a/cumulus/pallets/dmp-queue/Cargo.toml
+++ b/cumulus/pallets/dmp-queue/Cargo.toml
@@ -56,6 +56,7 @@ runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
try-runtime = [
diff --git a/cumulus/pallets/parachain-system/Cargo.toml b/cumulus/pallets/parachain-system/Cargo.toml
index 05498a474e42..c911f8531da2 100644
--- a/cumulus/pallets/parachain-system/Cargo.toml
+++ b/cumulus/pallets/parachain-system/Cargo.toml
@@ -38,7 +38,6 @@ sp-version = { workspace = true }
# Polkadot
polkadot-parachain-primitives = { features = ["wasm-api"], workspace = true }
polkadot-runtime-parachains = { workspace = true }
-polkadot-runtime-common = { optional = true, workspace = true }
xcm = { workspace = true }
xcm-builder = { workspace = true }
@@ -84,7 +83,6 @@ std = [
"log/std",
"pallet-message-queue/std",
"polkadot-parachain-primitives/std",
- "polkadot-runtime-common/std",
"polkadot-runtime-parachains/std",
"scale-info/std",
"sp-core/std",
@@ -109,17 +107,16 @@ runtime-benchmarks = [
"frame-system/runtime-benchmarks",
"pallet-message-queue/runtime-benchmarks",
"polkadot-parachain-primitives/runtime-benchmarks",
- "polkadot-runtime-common/runtime-benchmarks",
"polkadot-runtime-parachains/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-message-queue/try-runtime",
- "polkadot-runtime-common?/try-runtime",
"polkadot-runtime-parachains/try-runtime",
"sp-runtime/try-runtime",
]
diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs
index 39fc8321a072..0fa759357f65 100644
--- a/cumulus/pallets/parachain-system/src/lib.rs
+++ b/cumulus/pallets/parachain-system/src/lib.rs
@@ -1636,7 +1636,7 @@ impl InspectMessageQueues for Pallet {
}
#[cfg(feature = "runtime-benchmarks")]
-impl polkadot_runtime_common::xcm_sender::EnsureForParachain for Pallet {
+impl polkadot_runtime_parachains::EnsureForParachain for Pallet {
fn ensure(para_id: ParaId) {
if let ChannelStatus::Closed = Self::get_channel_status(para_id) {
Self::open_outbound_hrmp_channel_for_benchmarks_or_tests(para_id)
diff --git a/cumulus/pallets/xcmp-queue/Cargo.toml b/cumulus/pallets/xcmp-queue/Cargo.toml
index af70a3169d8e..432be3027e05 100644
--- a/cumulus/pallets/xcmp-queue/Cargo.toml
+++ b/cumulus/pallets/xcmp-queue/Cargo.toml
@@ -87,6 +87,7 @@ runtime-benchmarks = [
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
try-runtime = [
"cumulus-pallet-parachain-system/try-runtime",
diff --git a/cumulus/parachains/common/Cargo.toml b/cumulus/parachains/common/Cargo.toml
index 641693a6a01b..ae4d7fc1d115 100644
--- a/cumulus/parachains/common/Cargo.toml
+++ b/cumulus/parachains/common/Cargo.toml
@@ -92,4 +92,5 @@ runtime-benchmarks = [
"polkadot-primitives/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
diff --git a/cumulus/parachains/integration-tests/emulated/common/src/impls.rs b/cumulus/parachains/integration-tests/emulated/common/src/impls.rs
index c0d42cf2758e..9dad323aa19c 100644
--- a/cumulus/parachains/integration-tests/emulated/common/src/impls.rs
+++ b/cumulus/parachains/integration-tests/emulated/common/src/impls.rs
@@ -370,6 +370,8 @@ macro_rules! impl_send_transact_helpers_for_relay_chain {
let destination: $crate::impls::Location = ::child_location_of(recipient);
let xcm = $crate::impls::xcm_transact_unpaid_execution(call, $crate::impls::OriginKind::Superuser);
+ $crate::impls::dmp::Pallet::<::Runtime>::make_parachain_reachable(recipient);
+
// Send XCM `Transact`
$crate::impls::assert_ok!(]>::XcmPallet::send(
root_origin,
diff --git a/cumulus/parachains/integration-tests/emulated/common/src/macros.rs b/cumulus/parachains/integration-tests/emulated/common/src/macros.rs
index b776cafb2545..cd2b41e5198f 100644
--- a/cumulus/parachains/integration-tests/emulated/common/src/macros.rs
+++ b/cumulus/parachains/integration-tests/emulated/common/src/macros.rs
@@ -23,6 +23,7 @@ pub use pallet_message_queue;
pub use pallet_xcm;
// Polkadot
+pub use polkadot_runtime_parachains::dmp::Pallet as Dmp;
pub use xcm::{
prelude::{
AccountId32, All, Asset, AssetId, BuyExecution, DepositAsset, ExpectTransactStatus,
@@ -156,6 +157,8 @@ macro_rules! test_relay_is_trusted_teleporter {
// Send XCM message from Relay
<$sender_relay>::execute_with(|| {
+ $crate::macros::Dmp::<<$sender_relay as $crate::macros::Chain>::Runtime>::make_parachain_reachable(<$receiver_para>::para_id());
+
assert_ok!(<$sender_relay as [<$sender_relay Pallet>]>::XcmPallet::limited_teleport_assets(
origin.clone(),
bx!(para_destination.clone().into()),
diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/hybrid_transfers.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/hybrid_transfers.rs
index baec7d20f415..fb95c361f089 100644
--- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/hybrid_transfers.rs
+++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/hybrid_transfers.rs
@@ -13,6 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+use rococo_system_emulated_network::rococo_emulated_chain::rococo_runtime::Dmp;
+
use super::reserve_transfer::*;
use crate::{
imports::*,
@@ -777,6 +779,8 @@ fn transfer_native_asset_from_relay_to_para_through_asset_hub() {
xcm: xcm_on_final_dest,
}]);
+ Dmp::make_parachain_reachable(AssetHubRococo::para_id());
+
// First leg is a teleport, from there a local-reserve-transfer to final dest
::XcmPallet::transfer_assets_using_type_and_then(
t.signed_origin,
diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/reserve_transfer.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/reserve_transfer.rs
index d642e877f002..407a581afeb9 100644
--- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/reserve_transfer.rs
+++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/reserve_transfer.rs
@@ -14,6 +14,7 @@
// limitations under the License.
use crate::imports::*;
+use rococo_system_emulated_network::rococo_emulated_chain::rococo_runtime::Dmp;
use sp_core::{crypto::get_public_from_string_or_panic, sr25519};
fn relay_to_para_sender_assertions(t: RelayToParaTest) {
@@ -487,6 +488,11 @@ pub fn para_to_para_through_hop_receiver_assertions(t: Test DispatchResult {
+ let Junction::Parachain(para_id) = *t.args.dest.chain_location().last().unwrap() else {
+ unimplemented!("Destination is not a parachain?")
+ };
+
+ Dmp::make_parachain_reachable(para_id);
::XcmPallet::limited_reserve_transfer_assets(
t.signed_origin,
bx!(t.args.dest.into()),
@@ -546,6 +552,13 @@ fn para_to_system_para_reserve_transfer_assets(t: ParaToSystemParaTest) -> Dispa
fn para_to_para_through_relay_limited_reserve_transfer_assets(
t: ParaToParaThroughRelayTest,
) -> DispatchResult {
+ let Junction::Parachain(para_id) = *t.args.dest.chain_location().last().unwrap() else {
+ unimplemented!("Destination is not a parachain?")
+ };
+
+ Rococo::ext_wrapper(|| {
+ Dmp::make_parachain_reachable(para_id);
+ });
::PolkadotXcm::limited_reserve_transfer_assets(
t.signed_origin,
bx!(t.args.dest.into()),
diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/treasury.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/treasury.rs
index 69111d38bcac..8648c8ce9311 100644
--- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/treasury.rs
+++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/treasury.rs
@@ -29,6 +29,7 @@ use frame_support::{
use parachains_common::AccountId;
use polkadot_runtime_common::impls::VersionedLocatableAsset;
use rococo_runtime_constants::currency::GRAND;
+use rococo_system_emulated_network::rococo_emulated_chain::rococo_runtime::Dmp;
use xcm_executor::traits::ConvertLocation;
// Fund Treasury account on Asset Hub from Treasury account on Relay Chain with ROCs.
@@ -64,6 +65,7 @@ fn spend_roc_on_asset_hub() {
treasury_balance * 2,
));
+ Dmp::make_parachain_reachable(1000);
let native_asset = Location::here();
let asset_hub_location: Location = [Parachain(1000)].into();
let treasury_location: Location = (Parent, PalletInstance(18)).into();
@@ -199,6 +201,8 @@ fn create_and_claim_treasury_spend_in_usdt() {
// create a conversion rate from `asset_kind` to the native currency.
assert_ok!(AssetRate::create(root.clone(), Box::new(asset_kind.clone()), 2.into()));
+ Dmp::make_parachain_reachable(1000);
+
// create and approve a treasury spend.
assert_ok!(Treasury::spend(
root,
diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/hybrid_transfers.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/hybrid_transfers.rs
index 0686bd71d085..91ebdda16828 100644
--- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/hybrid_transfers.rs
+++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/hybrid_transfers.rs
@@ -13,6 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+use westend_system_emulated_network::westend_emulated_chain::westend_runtime::Dmp;
+
use super::reserve_transfer::*;
use crate::{
imports::*,
@@ -778,6 +780,8 @@ fn transfer_native_asset_from_relay_to_penpal_through_asset_hub() {
xcm: xcm_on_final_dest,
}]);
+ Dmp::make_parachain_reachable(AssetHubWestend::para_id());
+
// First leg is a teleport, from there a local-reserve-transfer to final dest
::XcmPallet::transfer_assets_using_type_and_then(
t.signed_origin,
diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/reserve_transfer.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/reserve_transfer.rs
index 707e8adc8a56..dc36fed42932 100644
--- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/reserve_transfer.rs
+++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/reserve_transfer.rs
@@ -15,6 +15,7 @@
use crate::{create_pool_with_wnd_on, foreign_balance_on, imports::*};
use sp_core::{crypto::get_public_from_string_or_panic, sr25519};
+use westend_system_emulated_network::westend_emulated_chain::westend_runtime::Dmp;
fn relay_to_para_sender_assertions(t: RelayToParaTest) {
type RuntimeEvent = ::RuntimeEvent;
@@ -487,6 +488,11 @@ pub fn para_to_para_through_hop_receiver_assertions(t: Test DispatchResult {
+ let Junction::Parachain(para_id) = *t.args.dest.chain_location().last().unwrap() else {
+ unimplemented!("Destination is not a parachain?")
+ };
+
+ Dmp::make_parachain_reachable(para_id);
::XcmPallet::limited_reserve_transfer_assets(
t.signed_origin,
bx!(t.args.dest.into()),
@@ -533,6 +539,13 @@ fn para_to_system_para_reserve_transfer_assets(t: ParaToSystemParaTest) -> Dispa
fn para_to_para_through_relay_limited_reserve_transfer_assets(
t: ParaToParaThroughRelayTest,
) -> DispatchResult {
+ let Junction::Parachain(para_id) = *t.args.dest.chain_location().last().unwrap() else {
+ unimplemented!("Destination is not a parachain?")
+ };
+
+ Westend::ext_wrapper(|| {
+ Dmp::make_parachain_reachable(para_id);
+ });
::PolkadotXcm::limited_reserve_transfer_assets(
t.signed_origin,
bx!(t.args.dest.into()),
diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/treasury.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/treasury.rs
index c303e6411d33..3b53557fc05c 100644
--- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/treasury.rs
+++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/treasury.rs
@@ -20,6 +20,7 @@ use emulated_integration_tests_common::{
};
use frame_support::traits::fungibles::{Inspect, Mutate};
use polkadot_runtime_common::impls::VersionedLocatableAsset;
+use westend_system_emulated_network::westend_emulated_chain::westend_runtime::Dmp;
use xcm_executor::traits::ConvertLocation;
#[test]
@@ -58,6 +59,8 @@ fn create_and_claim_treasury_spend() {
// create a conversion rate from `asset_kind` to the native currency.
assert_ok!(AssetRate::create(root.clone(), Box::new(asset_kind.clone()), 2.into()));
+ Dmp::make_parachain_reachable(1000);
+
// create and approve a treasury spend.
assert_ok!(Treasury::spend(
root,
diff --git a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/send_xcm.rs b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/send_xcm.rs
index 116ec4dc0e55..cfcb581238e6 100644
--- a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/send_xcm.rs
+++ b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/send_xcm.rs
@@ -13,6 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+use rococo_system_emulated_network::rococo_emulated_chain::rococo_runtime::Dmp;
+
use crate::tests::*;
#[test]
@@ -38,6 +40,8 @@ fn send_xcm_from_rococo_relay_to_westend_asset_hub_should_fail_on_not_applicable
// Rococo Global Consensus
// Send XCM message from Relay Chain to Bridge Hub source Parachain
Rococo::execute_with(|| {
+ Dmp::make_parachain_reachable(BridgeHubRococo::para_id());
+
assert_ok!(::XcmPallet::send(
sudo_origin,
bx!(destination),
diff --git a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/send_xcm.rs b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/send_xcm.rs
index acce60b4fa76..60f8af2242f9 100644
--- a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/send_xcm.rs
+++ b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/send_xcm.rs
@@ -13,6 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+use rococo_westend_system_emulated_network::westend_emulated_chain::westend_runtime::Dmp;
+
use crate::tests::*;
#[test]
@@ -38,6 +40,8 @@ fn send_xcm_from_westend_relay_to_rococo_asset_hub_should_fail_on_not_applicable
// Westend Global Consensus
// Send XCM message from Relay Chain to Bridge Hub source Parachain
Westend::execute_with(|| {
+ Dmp::make_parachain_reachable(BridgeHubWestend::para_id());
+
assert_ok!(::XcmPallet::send(
sudo_origin,
bx!(destination),
diff --git a/cumulus/parachains/integration-tests/emulated/tests/collectives/collectives-westend/src/tests/fellowship_treasury.rs b/cumulus/parachains/integration-tests/emulated/tests/collectives/collectives-westend/src/tests/fellowship_treasury.rs
index 8418e3da3bba..ed7c9bafc607 100644
--- a/cumulus/parachains/integration-tests/emulated/tests/collectives/collectives-westend/src/tests/fellowship_treasury.rs
+++ b/cumulus/parachains/integration-tests/emulated/tests/collectives/collectives-westend/src/tests/fellowship_treasury.rs
@@ -20,6 +20,7 @@ use frame_support::{
};
use polkadot_runtime_common::impls::VersionedLocatableAsset;
use westend_runtime_constants::currency::UNITS;
+use westend_system_emulated_network::westend_emulated_chain::westend_runtime::Dmp;
use xcm_executor::traits::ConvertLocation;
// Fund Fellowship Treasury from Westend Treasury and spend from Fellowship Treasury.
@@ -57,6 +58,8 @@ fn fellowship_treasury_spend() {
treasury_balance * 2,
));
+ Dmp::make_parachain_reachable(1000);
+
let native_asset = Location::here();
let asset_hub_location: Location = [Parachain(1000)].into();
let treasury_location: Location = (Parent, PalletInstance(37)).into();
diff --git a/cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-rococo/src/tests/coretime_interface.rs b/cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-rococo/src/tests/coretime_interface.rs
index 9915b1753ef6..554025e1ecfe 100644
--- a/cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-rococo/src/tests/coretime_interface.rs
+++ b/cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-rococo/src/tests/coretime_interface.rs
@@ -17,6 +17,7 @@ use crate::imports::*;
use frame_support::traits::OnInitialize;
use pallet_broker::{ConfigRecord, Configuration, CoreAssignment, CoreMask, ScheduleItem};
use rococo_runtime_constants::system_parachain::coretime::TIMESLICE_PERIOD;
+use rococo_system_emulated_network::rococo_emulated_chain::rococo_runtime::Dmp;
use sp_runtime::Perbill;
#[test]
@@ -34,6 +35,10 @@ fn transact_hardcoded_weights_are_sane() {
type CoretimeEvent = ::RuntimeEvent;
type RelayEvent = ::RuntimeEvent;
+ Rococo::execute_with(|| {
+ Dmp::make_parachain_reachable(CoretimeRococo::para_id());
+ });
+
// Reserve a workload, configure broker and start sales.
CoretimeRococo::execute_with(|| {
// Hooks don't run in emulated tests - workaround as we need `on_initialize` to tick things
diff --git a/cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-westend/src/tests/coretime_interface.rs b/cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-westend/src/tests/coretime_interface.rs
index 00530f80b958..900994b1afc1 100644
--- a/cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-westend/src/tests/coretime_interface.rs
+++ b/cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-westend/src/tests/coretime_interface.rs
@@ -18,6 +18,7 @@ use frame_support::traits::OnInitialize;
use pallet_broker::{ConfigRecord, Configuration, CoreAssignment, CoreMask, ScheduleItem};
use sp_runtime::Perbill;
use westend_runtime_constants::system_parachain::coretime::TIMESLICE_PERIOD;
+use westend_system_emulated_network::westend_emulated_chain::westend_runtime::Dmp;
#[test]
fn transact_hardcoded_weights_are_sane() {
@@ -34,6 +35,10 @@ fn transact_hardcoded_weights_are_sane() {
type CoretimeEvent = ::RuntimeEvent;
type RelayEvent = ::RuntimeEvent;
+ Westend::execute_with(|| {
+ Dmp::make_parachain_reachable(CoretimeWestend::para_id());
+ });
+
// Reserve a workload, configure broker and start sales.
CoretimeWestend::execute_with(|| {
// Hooks don't run in emulated tests - workaround as we need `on_initialize` to tick things
diff --git a/cumulus/parachains/integration-tests/emulated/tests/people/people-westend/src/tests/governance.rs b/cumulus/parachains/integration-tests/emulated/tests/people/people-westend/src/tests/governance.rs
index 1ba787aaec52..ea438f80552e 100644
--- a/cumulus/parachains/integration-tests/emulated/tests/people/people-westend/src/tests/governance.rs
+++ b/cumulus/parachains/integration-tests/emulated/tests/people/people-westend/src/tests/governance.rs
@@ -20,7 +20,9 @@ use codec::Encode;
use frame_support::sp_runtime::traits::Dispatchable;
use parachains_common::AccountId;
use people_westend_runtime::people::IdentityInfo;
-use westend_runtime::governance::pallet_custom_origins::Origin::GeneralAdmin as GeneralAdminOrigin;
+use westend_runtime::{
+ governance::pallet_custom_origins::Origin::GeneralAdmin as GeneralAdminOrigin, Dmp,
+};
use westend_system_emulated_network::people_westend_emulated_chain::people_westend_runtime;
use pallet_identity::Data;
@@ -39,6 +41,8 @@ fn relay_commands_add_registrar() {
type PeopleCall = ::RuntimeCall;
type PeopleRuntime = ::Runtime;
+ Dmp::make_parachain_reachable(1004);
+
let add_registrar_call =
PeopleCall::Identity(pallet_identity::Call::::add_registrar {
account: registrar.into(),
@@ -102,6 +106,8 @@ fn relay_commands_add_registrar_wrong_origin() {
type PeopleCall = ::RuntimeCall;
type PeopleRuntime = ::Runtime;
+ Dmp::make_parachain_reachable(1004);
+
let add_registrar_call =
PeopleCall::Identity(pallet_identity::Call::::add_registrar {
account: registrar.into(),
@@ -191,6 +197,8 @@ fn relay_commands_kill_identity() {
type RuntimeEvent = ::RuntimeEvent;
type PeopleRuntime = ::Runtime;
+ Dmp::make_parachain_reachable(1004);
+
let kill_identity_call =
PeopleCall::Identity(pallet_identity::Call::::kill_identity {
target: people_westend_runtime::MultiAddress::Id(PeopleWestend::account_id_of(
@@ -253,6 +261,8 @@ fn relay_commands_kill_identity_wrong_origin() {
type RuntimeEvent = ::RuntimeEvent;
type PeopleRuntime = ::Runtime;
+ Dmp::make_parachain_reachable(1004);
+
let kill_identity_call =
PeopleCall::Identity(pallet_identity::Call::::kill_identity {
target: people_westend_runtime::MultiAddress::Id(PeopleWestend::account_id_of(
@@ -303,6 +313,8 @@ fn relay_commands_add_remove_username_authority() {
type PeopleCall = ::RuntimeCall;
type PeopleRuntime = ::Runtime;
+ Dmp::make_parachain_reachable(1004);
+
let add_username_authority =
PeopleCall::Identity(pallet_identity::Call::::add_username_authority {
authority: people_westend_runtime::MultiAddress::Id(people_westend_alice.clone()),
@@ -392,6 +404,8 @@ fn relay_commands_add_remove_username_authority() {
type PeopleCall = ::RuntimeCall;
type PeopleRuntime = ::Runtime;
+ Dmp::make_parachain_reachable(1004);
+
let remove_username_authority = PeopleCall::Identity(pallet_identity::Call::<
PeopleRuntime,
>::remove_username_authority {
@@ -455,6 +469,8 @@ fn relay_commands_add_remove_username_authority_wrong_origin() {
type PeopleCall = ::RuntimeCall;
type PeopleRuntime = ::Runtime;
+ Dmp::make_parachain_reachable(1004);
+
let add_username_authority = PeopleCall::Identity(pallet_identity::Call::<
PeopleRuntime,
>::add_username_authority {
@@ -503,6 +519,8 @@ fn relay_commands_add_remove_username_authority_wrong_origin() {
suffix: b"suffix1".into(),
});
+ Dmp::make_parachain_reachable(1004);
+
let remove_authority_xcm_msg =
RuntimeCall::XcmPallet(pallet_xcm::Call::::send {
dest: bx!(VersionedLocation::from(Location::new(0, [Parachain(1004)]))),
diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml
index 949640dd4be6..81ebc7e09494 100644
--- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml
+++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml
@@ -146,6 +146,7 @@ runtime-benchmarks = [
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
"xcm-runtime-apis/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
try-runtime = [
"cumulus-pallet-aura-ext/try-runtime",
diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml
index 8e47146a06c3..7dd2a4ab4b51 100644
--- a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml
+++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml
@@ -150,6 +150,7 @@ runtime-benchmarks = [
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
"xcm-runtime-apis/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
try-runtime = [
"cumulus-pallet-aura-ext/try-runtime",
diff --git a/cumulus/parachains/runtimes/assets/common/Cargo.toml b/cumulus/parachains/runtimes/assets/common/Cargo.toml
index fa9efbca7a39..552afa4daa68 100644
--- a/cumulus/parachains/runtimes/assets/common/Cargo.toml
+++ b/cumulus/parachains/runtimes/assets/common/Cargo.toml
@@ -66,4 +66,5 @@ runtime-benchmarks = [
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml
index c0d6db5ad500..ff50223ef575 100644
--- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml
+++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml
@@ -266,6 +266,7 @@ runtime-benchmarks = [
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
"xcm-runtime-apis/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
try-runtime = [
diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml
index f429a28a2e52..efdd0abbb8ee 100644
--- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml
+++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml
@@ -263,6 +263,7 @@ runtime-benchmarks = [
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
"xcm-runtime-apis/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
try-runtime = [
diff --git a/cumulus/parachains/runtimes/bridge-hubs/common/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/common/Cargo.toml
index 76a89bcb2e72..9eacb27639a3 100644
--- a/cumulus/parachains/runtimes/bridge-hubs/common/Cargo.toml
+++ b/cumulus/parachains/runtimes/bridge-hubs/common/Cargo.toml
@@ -41,4 +41,5 @@ runtime-benchmarks = [
"pallet-message-queue/runtime-benchmarks",
"snowbridge-core/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml b/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml
index dc4b73db69e3..2e35fe761c04 100644
--- a/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml
+++ b/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml
@@ -138,6 +138,7 @@ runtime-benchmarks = [
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
"xcm-runtime-apis/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
try-runtime = [
"cumulus-pallet-aura-ext/try-runtime",
diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml b/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml
index 1aeff5eb2e48..260c748819ae 100644
--- a/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml
+++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml
@@ -173,6 +173,7 @@ runtime-benchmarks = [
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
"xcm-runtime-apis/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
try-runtime = [
diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml b/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml
index ab621134b252..aa692c3c7e74 100644
--- a/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml
+++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml
@@ -180,6 +180,7 @@ runtime-benchmarks = [
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
"xcm-runtime-apis/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
try-runtime = [
diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/pallet_broker.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/pallet_broker.rs
index 35708f22de20..5cb01f62cd26 100644
--- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/pallet_broker.rs
+++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/pallet_broker.rs
@@ -17,9 +17,9 @@
//! Autogenerated weights for `pallet_broker`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
-//! DATE: 2024-06-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! DATE: 2024-12-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
-//! HOSTNAME: `runner-x5tnzzy-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
+//! HOSTNAME: `runner-acd6uxux-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("coretime-rococo-dev")`, DB CACHE: 1024
// Executed Command:
@@ -54,8 +54,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
- // Minimum execution time: 2_024_000 picoseconds.
- Weight::from_parts(2_121_000, 0)
+ // Minimum execution time: 2_250_000 picoseconds.
+ Weight::from_parts(2_419_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -65,8 +65,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `10888`
// Estimated: `13506`
- // Minimum execution time: 21_654_000 picoseconds.
- Weight::from_parts(22_591_000, 0)
+ // Minimum execution time: 25_785_000 picoseconds.
+ Weight::from_parts(26_335_000, 0)
.saturating_add(Weight::from_parts(0, 13506))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
@@ -77,8 +77,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `12090`
// Estimated: `13506`
- // Minimum execution time: 20_769_000 picoseconds.
- Weight::from_parts(21_328_000, 0)
+ // Minimum execution time: 24_549_000 picoseconds.
+ Weight::from_parts(25_010_000, 0)
.saturating_add(Weight::from_parts(0, 13506))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
@@ -93,8 +93,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `466`
// Estimated: `1951`
- // Minimum execution time: 10_404_000 picoseconds.
- Weight::from_parts(10_941_000, 0)
+ // Minimum execution time: 14_135_000 picoseconds.
+ Weight::from_parts(14_603_000, 0)
.saturating_add(Weight::from_parts(0, 1951))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
@@ -121,6 +121,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
/// Proof: `ParachainSystem::LastRelayChainBlockNumber` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Broker::InstaPoolIo` (r:3 w:3)
/// Proof: `Broker::InstaPoolIo` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
+ /// Storage: `Broker::AutoRenewals` (r:1 w:1)
+ /// Proof: `Broker::AutoRenewals` (`max_values`: Some(1), `max_size`: Some(1002), added: 1497, mode: `MaxEncodedLen`)
/// Storage: `Broker::SaleInfo` (r:0 w:1)
/// Proof: `Broker::SaleInfo` (`max_values`: Some(1), `max_size`: Some(57), added: 552, mode: `MaxEncodedLen`)
/// Storage: `Broker::Status` (r:0 w:1)
@@ -132,31 +134,33 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `12599`
// Estimated: `15065 + n * (1 ±0)`
- // Minimum execution time: 44_085_000 picoseconds.
- Weight::from_parts(127_668_002, 0)
+ // Minimum execution time: 54_087_000 picoseconds.
+ Weight::from_parts(145_466_213, 0)
.saturating_add(Weight::from_parts(0, 15065))
- // Standard Error: 2_231
- .saturating_add(Weight::from_parts(20_604, 0).saturating_mul(n.into()))
- .saturating_add(T::DbWeight::get().reads(13))
- .saturating_add(T::DbWeight::get().writes(59))
+ // Standard Error: 2_407
+ .saturating_add(Weight::from_parts(20_971, 0).saturating_mul(n.into()))
+ .saturating_add(T::DbWeight::get().reads(14))
+ .saturating_add(T::DbWeight::get().writes(60))
.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
}
/// Storage: `Broker::Status` (r:1 w:0)
/// Proof: `Broker::Status` (`max_values`: Some(1), `max_size`: Some(18), added: 513, mode: `MaxEncodedLen`)
/// Storage: `Broker::SaleInfo` (r:1 w:1)
/// Proof: `Broker::SaleInfo` (`max_values`: Some(1), `max_size`: Some(57), added: 552, mode: `MaxEncodedLen`)
+ /// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
+ /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Broker::Regions` (r:0 w:1)
/// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`)
fn purchase() -> Weight {
// Proof Size summary in bytes:
- // Measured: `332`
+ // Measured: `437`
// Estimated: `3593`
- // Minimum execution time: 45_100_000 picoseconds.
- Weight::from_parts(46_263_000, 0)
+ // Minimum execution time: 58_341_000 picoseconds.
+ Weight::from_parts(59_505_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
- .saturating_add(T::DbWeight::get().reads(3))
+ .saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Broker::Configuration` (r:1 w:0)
@@ -169,16 +173,18 @@ impl pallet_broker::WeightInfo for WeightInfo {
/// Proof: `Broker::PotentialRenewals` (`max_values`: None, `max_size`: Some(1233), added: 3708, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
+ /// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
+ /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Broker::Workplan` (r:0 w:1)
/// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`)
fn renew() -> Weight {
// Proof Size summary in bytes:
- // Measured: `553`
+ // Measured: `658`
// Estimated: `4698`
- // Minimum execution time: 65_944_000 picoseconds.
- Weight::from_parts(68_666_000, 0)
+ // Minimum execution time: 92_983_000 picoseconds.
+ Weight::from_parts(99_237_000, 0)
.saturating_add(Weight::from_parts(0, 4698))
- .saturating_add(T::DbWeight::get().reads(5))
+ .saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `Broker::Regions` (r:1 w:1)
@@ -187,8 +193,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `358`
// Estimated: `3551`
- // Minimum execution time: 13_794_000 picoseconds.
- Weight::from_parts(14_450_000, 0)
+ // Minimum execution time: 17_512_000 picoseconds.
+ Weight::from_parts(18_099_000, 0)
.saturating_add(Weight::from_parts(0, 3551))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
@@ -199,8 +205,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `358`
// Estimated: `3551`
- // Minimum execution time: 15_316_000 picoseconds.
- Weight::from_parts(15_787_000, 0)
+ // Minimum execution time: 18_715_000 picoseconds.
+ Weight::from_parts(19_768_000, 0)
.saturating_add(Weight::from_parts(0, 3551))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(2))
@@ -211,8 +217,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `358`
// Estimated: `3551`
- // Minimum execution time: 16_375_000 picoseconds.
- Weight::from_parts(17_113_000, 0)
+ // Minimum execution time: 20_349_000 picoseconds.
+ Weight::from_parts(21_050_000, 0)
.saturating_add(Weight::from_parts(0, 3551))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(3))
@@ -229,8 +235,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `937`
// Estimated: `4681`
- // Minimum execution time: 25_952_000 picoseconds.
- Weight::from_parts(27_198_000, 0)
+ // Minimum execution time: 31_876_000 picoseconds.
+ Weight::from_parts(33_536_000, 0)
.saturating_add(Weight::from_parts(0, 4681))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
@@ -249,8 +255,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `1003`
// Estimated: `5996`
- // Minimum execution time: 31_790_000 picoseconds.
- Weight::from_parts(32_920_000, 0)
+ // Minimum execution time: 39_500_000 picoseconds.
+ Weight::from_parts(40_666_000, 0)
.saturating_add(Weight::from_parts(0, 5996))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
@@ -264,13 +270,13 @@ impl pallet_broker::WeightInfo for WeightInfo {
/// The range of component `m` is `[1, 3]`.
fn claim_revenue(m: u32, ) -> Weight {
// Proof Size summary in bytes:
- // Measured: `652`
+ // Measured: `671`
// Estimated: `6196 + m * (2520 ±0)`
- // Minimum execution time: 56_286_000 picoseconds.
- Weight::from_parts(56_946_240, 0)
+ // Minimum execution time: 65_843_000 picoseconds.
+ Weight::from_parts(65_768_512, 0)
.saturating_add(Weight::from_parts(0, 6196))
- // Standard Error: 44_472
- .saturating_add(Weight::from_parts(1_684_838, 0).saturating_mul(m.into()))
+ // Standard Error: 40_994
+ .saturating_add(Weight::from_parts(2_084_877, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into())))
.saturating_add(T::DbWeight::get().writes(5))
@@ -290,11 +296,11 @@ impl pallet_broker::WeightInfo for WeightInfo {
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn purchase_credit() -> Weight {
// Proof Size summary in bytes:
- // Measured: `322`
- // Estimated: `3787`
- // Minimum execution time: 64_967_000 picoseconds.
- Weight::from_parts(66_504_000, 0)
- .saturating_add(Weight::from_parts(0, 3787))
+ // Measured: `323`
+ // Estimated: `3788`
+ // Minimum execution time: 73_250_000 picoseconds.
+ Weight::from_parts(75_059_000, 0)
+ .saturating_add(Weight::from_parts(0, 3788))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(3))
}
@@ -306,8 +312,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `466`
// Estimated: `3551`
- // Minimum execution time: 37_552_000 picoseconds.
- Weight::from_parts(46_263_000, 0)
+ // Minimum execution time: 55_088_000 picoseconds.
+ Weight::from_parts(65_329_000, 0)
.saturating_add(Weight::from_parts(0, 3551))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
@@ -322,8 +328,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `463`
// Estimated: `3533`
- // Minimum execution time: 79_625_000 picoseconds.
- Weight::from_parts(86_227_000, 0)
+ // Minimum execution time: 102_280_000 picoseconds.
+ Weight::from_parts(130_319_000, 0)
.saturating_add(Weight::from_parts(0, 3533))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
@@ -338,10 +344,10 @@ impl pallet_broker::WeightInfo for WeightInfo {
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn drop_history() -> Weight {
// Proof Size summary in bytes:
- // Measured: `857`
+ // Measured: `979`
// Estimated: `3593`
- // Minimum execution time: 88_005_000 picoseconds.
- Weight::from_parts(92_984_000, 0)
+ // Minimum execution time: 78_195_000 picoseconds.
+ Weight::from_parts(105_946_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(1))
@@ -354,8 +360,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `957`
// Estimated: `4698`
- // Minimum execution time: 38_877_000 picoseconds.
- Weight::from_parts(40_408_000, 0)
+ // Minimum execution time: 41_642_000 picoseconds.
+ Weight::from_parts(48_286_000, 0)
.saturating_add(Weight::from_parts(0, 4698))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
@@ -371,15 +377,13 @@ impl pallet_broker::WeightInfo for WeightInfo {
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `n` is `[0, 1000]`.
- fn request_core_count(n: u32, ) -> Weight {
+ fn request_core_count(_n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `74`
// Estimated: `3539`
- // Minimum execution time: 20_581_000 picoseconds.
- Weight::from_parts(21_610_297, 0)
+ // Minimum execution time: 23_727_000 picoseconds.
+ Weight::from_parts(25_029_439, 0)
.saturating_add(Weight::from_parts(0, 3539))
- // Standard Error: 119
- .saturating_add(Weight::from_parts(144, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
@@ -390,11 +394,11 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `266`
// Estimated: `1487`
- // Minimum execution time: 6_079_000 picoseconds.
- Weight::from_parts(6_540_110, 0)
+ // Minimum execution time: 7_887_000 picoseconds.
+ Weight::from_parts(8_477_863, 0)
.saturating_add(Weight::from_parts(0, 1487))
- // Standard Error: 14
- .saturating_add(Weight::from_parts(10, 0).saturating_mul(n.into()))
+ // Standard Error: 18
+ .saturating_add(Weight::from_parts(76, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -406,36 +410,50 @@ impl pallet_broker::WeightInfo for WeightInfo {
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn process_revenue() -> Weight {
// Proof Size summary in bytes:
- // Measured: `442`
+ // Measured: `461`
// Estimated: `6196`
- // Minimum execution time: 42_947_000 picoseconds.
- Weight::from_parts(43_767_000, 0)
+ // Minimum execution time: 52_505_000 picoseconds.
+ Weight::from_parts(53_392_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
+ /// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
+ /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Broker::InstaPoolIo` (r:3 w:3)
/// Proof: `Broker::InstaPoolIo` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `Broker::Reservations` (r:1 w:0)
/// Proof: `Broker::Reservations` (`max_values`: Some(1), `max_size`: Some(12021), added: 12516, mode: `MaxEncodedLen`)
/// Storage: `Broker::Leases` (r:1 w:1)
/// Proof: `Broker::Leases` (`max_values`: Some(1), `max_size`: Some(401), added: 896, mode: `MaxEncodedLen`)
+ /// Storage: `Broker::AutoRenewals` (r:1 w:1)
+ /// Proof: `Broker::AutoRenewals` (`max_values`: Some(1), `max_size`: Some(1002), added: 1497, mode: `MaxEncodedLen`)
+ /// Storage: `Broker::Configuration` (r:1 w:0)
+ /// Proof: `Broker::Configuration` (`max_values`: Some(1), `max_size`: Some(31), added: 526, mode: `MaxEncodedLen`)
+ /// Storage: `Broker::Status` (r:1 w:0)
+ /// Proof: `Broker::Status` (`max_values`: Some(1), `max_size`: Some(18), added: 513, mode: `MaxEncodedLen`)
+ /// Storage: `Broker::PotentialRenewals` (r:100 w:200)
+ /// Proof: `Broker::PotentialRenewals` (`max_values`: None, `max_size`: Some(1233), added: 3708, mode: `MaxEncodedLen`)
+ /// Storage: `System::Account` (r:101 w:101)
+ /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Broker::SaleInfo` (r:0 w:1)
/// Proof: `Broker::SaleInfo` (`max_values`: Some(1), `max_size`: Some(57), added: 552, mode: `MaxEncodedLen`)
- /// Storage: `Broker::Workplan` (r:0 w:60)
+ /// Storage: `Broker::Workplan` (r:0 w:1000)
/// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 1000]`.
fn rotate_sale(n: u32, ) -> Weight {
// Proof Size summary in bytes:
- // Measured: `12514`
- // Estimated: `13506`
- // Minimum execution time: 93_426_000 picoseconds.
- Weight::from_parts(96_185_447, 0)
- .saturating_add(Weight::from_parts(0, 13506))
- // Standard Error: 116
- .saturating_add(Weight::from_parts(4, 0).saturating_mul(n.into()))
- .saturating_add(T::DbWeight::get().reads(5))
- .saturating_add(T::DbWeight::get().writes(65))
+ // Measured: `32497`
+ // Estimated: `233641 + n * (198 ±9)`
+ // Minimum execution time: 28_834_000 picoseconds.
+ Weight::from_parts(2_467_159_777, 0)
+ .saturating_add(Weight::from_parts(0, 233641))
+ // Standard Error: 149_483
+ .saturating_add(Weight::from_parts(4_045_956, 0).saturating_mul(n.into()))
+ .saturating_add(T::DbWeight::get().reads(126))
+ .saturating_add(T::DbWeight::get().writes(181))
+ .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
+ .saturating_add(Weight::from_parts(0, 198).saturating_mul(n.into()))
}
/// Storage: `Broker::InstaPoolIo` (r:1 w:0)
/// Proof: `Broker::InstaPoolIo` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
@@ -445,8 +463,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `42`
// Estimated: `3493`
- // Minimum execution time: 5_842_000 picoseconds.
- Weight::from_parts(6_077_000, 0)
+ // Minimum execution time: 7_689_000 picoseconds.
+ Weight::from_parts(7_988_000, 0)
.saturating_add(Weight::from_parts(0, 3493))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
@@ -469,8 +487,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `1321`
// Estimated: `4786`
- // Minimum execution time: 33_278_000 picoseconds.
- Weight::from_parts(34_076_000, 0)
+ // Minimum execution time: 37_394_000 picoseconds.
+ Weight::from_parts(38_379_000, 0)
.saturating_add(Weight::from_parts(0, 4786))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
@@ -489,8 +507,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `74`
// Estimated: `3539`
- // Minimum execution time: 15_779_000 picoseconds.
- Weight::from_parts(16_213_000, 0)
+ // Minimum execution time: 19_203_000 picoseconds.
+ Weight::from_parts(19_797_000, 0)
.saturating_add(Weight::from_parts(0, 3539))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
@@ -501,8 +519,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
- // Minimum execution time: 1_774_000 picoseconds.
- Weight::from_parts(1_873_000, 0)
+ // Minimum execution time: 2_129_000 picoseconds.
+ Weight::from_parts(2_266_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -512,8 +530,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
- // Minimum execution time: 1_858_000 picoseconds.
- Weight::from_parts(1_991_000, 0)
+ // Minimum execution time: 2_233_000 picoseconds.
+ Weight::from_parts(2_351_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -531,8 +549,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `408`
// Estimated: `1893`
- // Minimum execution time: 10_874_000 picoseconds.
- Weight::from_parts(11_265_000, 0)
+ // Minimum execution time: 15_716_000 picoseconds.
+ Weight::from_parts(16_160_000, 0)
.saturating_add(Weight::from_parts(0, 1893))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(1))
@@ -543,8 +561,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `470`
// Estimated: `1886`
- // Minimum execution time: 6_525_000 picoseconds.
- Weight::from_parts(6_769_000, 0)
+ // Minimum execution time: 8_887_000 picoseconds.
+ Weight::from_parts(9_178_000, 0)
.saturating_add(Weight::from_parts(0, 1886))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
@@ -557,36 +575,36 @@ impl pallet_broker::WeightInfo for WeightInfo {
/// Proof: `Broker::Configuration` (`max_values`: Some(1), `max_size`: Some(31), added: 526, mode: `MaxEncodedLen`)
/// Storage: `Broker::Status` (r:1 w:0)
/// Proof: `Broker::Status` (`max_values`: Some(1), `max_size`: Some(18), added: 513, mode: `MaxEncodedLen`)
- /// Storage: `System::Account` (r:1 w:1)
+ /// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
- /// Storage: `Authorship::Author` (r:1 w:0)
- /// Proof: `Authorship::Author` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
- /// Storage: `System::Digest` (r:1 w:0)
- /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+ /// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
+ /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Broker::AutoRenewals` (r:1 w:1)
- /// Proof: `Broker::AutoRenewals` (`max_values`: Some(1), `max_size`: Some(31), added: 526, mode: `MaxEncodedLen`)
+ /// Proof: `Broker::AutoRenewals` (`max_values`: Some(1), `max_size`: Some(1002), added: 1497, mode: `MaxEncodedLen`)
/// Storage: `Broker::Workplan` (r:0 w:1)
/// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`)
fn enable_auto_renew() -> Weight {
// Proof Size summary in bytes:
- // Measured: `914`
- // Estimated: `4698`
- // Minimum execution time: 51_938_000 picoseconds.
- Weight::from_parts(55_025_000, 4698)
- .saturating_add(T::DbWeight::get().reads(8_u64))
- .saturating_add(T::DbWeight::get().writes(6_u64))
+ // Measured: `2829`
+ // Estimated: `6196`
+ // Minimum execution time: 130_799_000 picoseconds.
+ Weight::from_parts(139_893_000, 0)
+ .saturating_add(Weight::from_parts(0, 6196))
+ .saturating_add(T::DbWeight::get().reads(8))
+ .saturating_add(T::DbWeight::get().writes(7))
}
/// Storage: `Broker::AutoRenewals` (r:1 w:1)
- /// Proof: `Broker::AutoRenewals` (`max_values`: Some(1), `max_size`: Some(31), added: 526, mode: `MaxEncodedLen`)
+ /// Proof: `Broker::AutoRenewals` (`max_values`: Some(1), `max_size`: Some(1002), added: 1497, mode: `MaxEncodedLen`)
fn disable_auto_renew() -> Weight {
// Proof Size summary in bytes:
- // Measured: `480`
- // Estimated: `1516`
- // Minimum execution time: 9_628_000 picoseconds.
- Weight::from_parts(10_400_000, 1516)
- .saturating_add(T::DbWeight::get().reads(1_u64))
- .saturating_add(T::DbWeight::get().writes(1_u64))
- }
+ // Measured: `1307`
+ // Estimated: `2487`
+ // Minimum execution time: 22_945_000 picoseconds.
+ Weight::from_parts(24_855_000, 0)
+ .saturating_add(Weight::from_parts(0, 2487))
+ .saturating_add(T::DbWeight::get().reads(1))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
@@ -601,11 +619,11 @@ impl pallet_broker::WeightInfo for WeightInfo {
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn on_new_timeslice() -> Weight {
// Proof Size summary in bytes:
- // Measured: `322`
- // Estimated: `3787`
- // Minimum execution time: 45_561_000 picoseconds.
- Weight::from_parts(47_306_000, 0)
- .saturating_add(Weight::from_parts(0, 3787))
+ // Measured: `323`
+ // Estimated: `3788`
+ // Minimum execution time: 56_864_000 picoseconds.
+ Weight::from_parts(59_119_000, 0)
+ .saturating_add(Weight::from_parts(0, 3788))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(3))
}
diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml b/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml
index 44dfbf93c30e..226e1c817bb8 100644
--- a/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml
+++ b/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml
@@ -177,6 +177,7 @@ runtime-benchmarks = [
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
"xcm-runtime-apis/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
try-runtime = [
diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/pallet_broker.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/pallet_broker.rs
index 74b1c4e47029..ad71691b2174 100644
--- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/pallet_broker.rs
+++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/pallet_broker.rs
@@ -17,9 +17,9 @@
//! Autogenerated weights for `pallet_broker`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
-//! DATE: 2024-06-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! DATE: 2024-12-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
-//! HOSTNAME: `runner-x5tnzzy-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
+//! HOSTNAME: `runner-acd6uxux-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("coretime-westend-dev")`, DB CACHE: 1024
// Executed Command:
@@ -54,8 +54,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
- // Minimum execution time: 1_899_000 picoseconds.
- Weight::from_parts(2_051_000, 0)
+ // Minimum execution time: 2_274_000 picoseconds.
+ Weight::from_parts(2_421_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -65,8 +65,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `10888`
// Estimated: `13506`
- // Minimum execution time: 21_965_000 picoseconds.
- Weight::from_parts(22_774_000, 0)
+ // Minimum execution time: 26_257_000 picoseconds.
+ Weight::from_parts(26_802_000, 0)
.saturating_add(Weight::from_parts(0, 13506))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
@@ -77,8 +77,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `12090`
// Estimated: `13506`
- // Minimum execution time: 20_748_000 picoseconds.
- Weight::from_parts(21_464_000, 0)
+ // Minimum execution time: 24_692_000 picoseconds.
+ Weight::from_parts(25_275_000, 0)
.saturating_add(Weight::from_parts(0, 13506))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
@@ -93,8 +93,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `146`
// Estimated: `1631`
- // Minimum execution time: 10_269_000 picoseconds.
- Weight::from_parts(10_508_000, 0)
+ // Minimum execution time: 13_872_000 picoseconds.
+ Weight::from_parts(14_509_000, 0)
.saturating_add(Weight::from_parts(0, 1631))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
@@ -121,6 +121,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
/// Proof: `ParachainSystem::LastRelayChainBlockNumber` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Broker::InstaPoolIo` (r:3 w:3)
/// Proof: `Broker::InstaPoolIo` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
+ /// Storage: `Broker::AutoRenewals` (r:1 w:1)
+ /// Proof: `Broker::AutoRenewals` (`max_values`: Some(1), `max_size`: Some(201), added: 696, mode: `MaxEncodedLen`)
/// Storage: `Broker::SaleInfo` (r:0 w:1)
/// Proof: `Broker::SaleInfo` (`max_values`: Some(1), `max_size`: Some(57), added: 552, mode: `MaxEncodedLen`)
/// Storage: `Broker::Status` (r:0 w:1)
@@ -132,32 +134,34 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `12279`
// Estimated: `14805 + n * (1 ±0)`
- // Minimum execution time: 41_900_000 picoseconds.
- Weight::from_parts(80_392_728, 0)
+ // Minimum execution time: 52_916_000 picoseconds.
+ Weight::from_parts(96_122_236, 0)
.saturating_add(Weight::from_parts(0, 14805))
- // Standard Error: 870
- .saturating_add(Weight::from_parts(4_361, 0).saturating_mul(n.into()))
- .saturating_add(T::DbWeight::get().reads(13))
- .saturating_add(T::DbWeight::get().writes(26))
+ // Standard Error: 969
+ .saturating_add(Weight::from_parts(5_732, 0).saturating_mul(n.into()))
+ .saturating_add(T::DbWeight::get().reads(14))
+ .saturating_add(T::DbWeight::get().writes(27))
.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
}
/// Storage: `Broker::Status` (r:1 w:0)
/// Proof: `Broker::Status` (`max_values`: Some(1), `max_size`: Some(18), added: 513, mode: `MaxEncodedLen`)
/// Storage: `Broker::SaleInfo` (r:1 w:1)
/// Proof: `Broker::SaleInfo` (`max_values`: Some(1), `max_size`: Some(57), added: 552, mode: `MaxEncodedLen`)
- /// Storage: `System::Account` (r:1 w:0)
+ /// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
+ /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+ /// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Broker::Regions` (r:0 w:1)
/// Proof: `Broker::Regions` (`max_values`: None, `max_size`: Some(86), added: 2561, mode: `MaxEncodedLen`)
fn purchase() -> Weight {
// Proof Size summary in bytes:
- // Measured: `332`
+ // Measured: `437`
// Estimated: `3593`
- // Minimum execution time: 40_911_000 picoseconds.
- Weight::from_parts(43_102_000, 0)
+ // Minimum execution time: 56_955_000 picoseconds.
+ Weight::from_parts(59_005_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
- .saturating_add(T::DbWeight::get().reads(3))
- .saturating_add(T::DbWeight::get().writes(2))
+ .saturating_add(T::DbWeight::get().reads(4))
+ .saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Broker::Configuration` (r:1 w:0)
/// Proof: `Broker::Configuration` (`max_values`: Some(1), `max_size`: Some(31), added: 526, mode: `MaxEncodedLen`)
@@ -169,16 +173,18 @@ impl pallet_broker::WeightInfo for WeightInfo {
/// Proof: `Broker::PotentialRenewals` (`max_values`: None, `max_size`: Some(1233), added: 3708, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:0)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
+ /// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
+ /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Broker::Workplan` (r:0 w:1)
/// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`)
fn renew() -> Weight {
// Proof Size summary in bytes:
- // Measured: `450`
+ // Measured: `658`
// Estimated: `4698`
- // Minimum execution time: 70_257_000 picoseconds.
- Weight::from_parts(73_889_000, 0)
+ // Minimum execution time: 108_853_000 picoseconds.
+ Weight::from_parts(117_467_000, 0)
.saturating_add(Weight::from_parts(0, 4698))
- .saturating_add(T::DbWeight::get().reads(5))
+ .saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `Broker::Regions` (r:1 w:1)
@@ -187,8 +193,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `358`
// Estimated: `3551`
- // Minimum execution time: 13_302_000 picoseconds.
- Weight::from_parts(13_852_000, 0)
+ // Minimum execution time: 16_922_000 picoseconds.
+ Weight::from_parts(17_544_000, 0)
.saturating_add(Weight::from_parts(0, 3551))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
@@ -199,8 +205,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `358`
// Estimated: `3551`
- // Minimum execution time: 14_927_000 picoseconds.
- Weight::from_parts(15_553_000, 0)
+ // Minimum execution time: 18_762_000 picoseconds.
+ Weight::from_parts(19_162_000, 0)
.saturating_add(Weight::from_parts(0, 3551))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(2))
@@ -211,8 +217,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `358`
// Estimated: `3551`
- // Minimum execution time: 16_237_000 picoseconds.
- Weight::from_parts(16_995_000, 0)
+ // Minimum execution time: 20_297_000 picoseconds.
+ Weight::from_parts(20_767_000, 0)
.saturating_add(Weight::from_parts(0, 3551))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(3))
@@ -229,8 +235,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `736`
// Estimated: `4681`
- // Minimum execution time: 24_621_000 picoseconds.
- Weight::from_parts(25_165_000, 0)
+ // Minimum execution time: 31_347_000 picoseconds.
+ Weight::from_parts(32_259_000, 0)
.saturating_add(Weight::from_parts(0, 4681))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
@@ -249,8 +255,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `802`
// Estimated: `5996`
- // Minimum execution time: 29_832_000 picoseconds.
- Weight::from_parts(30_894_000, 0)
+ // Minimum execution time: 38_310_000 picoseconds.
+ Weight::from_parts(39_777_000, 0)
.saturating_add(Weight::from_parts(0, 5996))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
@@ -264,13 +270,13 @@ impl pallet_broker::WeightInfo for WeightInfo {
/// The range of component `m` is `[1, 3]`.
fn claim_revenue(m: u32, ) -> Weight {
// Proof Size summary in bytes:
- // Measured: `652`
+ // Measured: `671`
// Estimated: `6196 + m * (2520 ±0)`
- // Minimum execution time: 55_390_000 picoseconds.
- Weight::from_parts(56_124_789, 0)
+ // Minimum execution time: 65_960_000 picoseconds.
+ Weight::from_parts(66_194_985, 0)
.saturating_add(Weight::from_parts(0, 6196))
- // Standard Error: 41_724
- .saturating_add(Weight::from_parts(1_551_266, 0).saturating_mul(m.into()))
+ // Standard Error: 42_455
+ .saturating_add(Weight::from_parts(1_808_497, 0).saturating_mul(m.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(m.into())))
.saturating_add(T::DbWeight::get().writes(5))
@@ -290,11 +296,11 @@ impl pallet_broker::WeightInfo for WeightInfo {
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn purchase_credit() -> Weight {
// Proof Size summary in bytes:
- // Measured: `320`
- // Estimated: `3785`
- // Minimum execution time: 59_759_000 picoseconds.
- Weight::from_parts(61_310_000, 0)
- .saturating_add(Weight::from_parts(0, 3785))
+ // Measured: `321`
+ // Estimated: `3786`
+ // Minimum execution time: 69_918_000 picoseconds.
+ Weight::from_parts(72_853_000, 0)
+ .saturating_add(Weight::from_parts(0, 3786))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(3))
}
@@ -306,8 +312,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `466`
// Estimated: `3551`
- // Minimum execution time: 37_007_000 picoseconds.
- Weight::from_parts(51_927_000, 0)
+ // Minimum execution time: 44_775_000 picoseconds.
+ Weight::from_parts(58_978_000, 0)
.saturating_add(Weight::from_parts(0, 3551))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
@@ -322,8 +328,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `463`
// Estimated: `3533`
- // Minimum execution time: 86_563_000 picoseconds.
- Weight::from_parts(91_274_000, 0)
+ // Minimum execution time: 67_098_000 picoseconds.
+ Weight::from_parts(93_626_000, 0)
.saturating_add(Weight::from_parts(0, 3533))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
@@ -338,10 +344,10 @@ impl pallet_broker::WeightInfo for WeightInfo {
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn drop_history() -> Weight {
// Proof Size summary in bytes:
- // Measured: `857`
+ // Measured: `979`
// Estimated: `3593`
- // Minimum execution time: 93_655_000 picoseconds.
- Weight::from_parts(98_160_000, 0)
+ // Minimum execution time: 89_463_000 picoseconds.
+ Weight::from_parts(113_286_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(1))
@@ -354,8 +360,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `556`
// Estimated: `4698`
- // Minimum execution time: 33_985_000 picoseconds.
- Weight::from_parts(43_618_000, 0)
+ // Minimum execution time: 42_073_000 picoseconds.
+ Weight::from_parts(52_211_000, 0)
.saturating_add(Weight::from_parts(0, 4698))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
@@ -371,30 +377,26 @@ impl pallet_broker::WeightInfo for WeightInfo {
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// The range of component `n` is `[0, 1000]`.
- fn request_core_count(n: u32, ) -> Weight {
+ fn request_core_count(_n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `74`
// Estimated: `3539`
- // Minimum execution time: 18_778_000 picoseconds.
- Weight::from_parts(19_543_425, 0)
+ // Minimum execution time: 22_937_000 picoseconds.
+ Weight::from_parts(23_898_154, 0)
.saturating_add(Weight::from_parts(0, 3539))
- // Standard Error: 41
- .saturating_add(Weight::from_parts(33, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Broker::CoreCountInbox` (r:1 w:1)
/// Proof: `Broker::CoreCountInbox` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 1000]`.
- fn process_core_count(n: u32, ) -> Weight {
+ fn process_core_count(_n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `266`
// Estimated: `1487`
- // Minimum execution time: 5_505_000 picoseconds.
- Weight::from_parts(5_982_015, 0)
+ // Minimum execution time: 7_650_000 picoseconds.
+ Weight::from_parts(8_166_809, 0)
.saturating_add(Weight::from_parts(0, 1487))
- // Standard Error: 13
- .saturating_add(Weight::from_parts(44, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -402,40 +404,54 @@ impl pallet_broker::WeightInfo for WeightInfo {
/// Proof: `Broker::RevenueInbox` (`max_values`: Some(1), `max_size`: Some(20), added: 515, mode: `MaxEncodedLen`)
/// Storage: `Broker::InstaPoolHistory` (r:1 w:1)
/// Proof: `Broker::InstaPoolHistory` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
- /// Storage: `System::Account` (r:2 w:1)
+ /// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn process_revenue() -> Weight {
// Proof Size summary in bytes:
- // Measured: `442`
+ // Measured: `461`
// Estimated: `6196`
- // Minimum execution time: 38_128_000 picoseconds.
- Weight::from_parts(40_979_000, 0)
+ // Minimum execution time: 53_023_000 picoseconds.
+ Weight::from_parts(54_564_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(4))
- .saturating_add(T::DbWeight::get().writes(3))
+ .saturating_add(T::DbWeight::get().writes(4))
}
+ /// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
+ /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Broker::InstaPoolIo` (r:3 w:3)
/// Proof: `Broker::InstaPoolIo` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `Broker::Reservations` (r:1 w:0)
/// Proof: `Broker::Reservations` (`max_values`: Some(1), `max_size`: Some(12021), added: 12516, mode: `MaxEncodedLen`)
/// Storage: `Broker::Leases` (r:1 w:1)
/// Proof: `Broker::Leases` (`max_values`: Some(1), `max_size`: Some(81), added: 576, mode: `MaxEncodedLen`)
+ /// Storage: `Broker::AutoRenewals` (r:1 w:1)
+ /// Proof: `Broker::AutoRenewals` (`max_values`: Some(1), `max_size`: Some(201), added: 696, mode: `MaxEncodedLen`)
+ /// Storage: `Broker::Configuration` (r:1 w:0)
+ /// Proof: `Broker::Configuration` (`max_values`: Some(1), `max_size`: Some(31), added: 526, mode: `MaxEncodedLen`)
+ /// Storage: `Broker::Status` (r:1 w:0)
+ /// Proof: `Broker::Status` (`max_values`: Some(1), `max_size`: Some(18), added: 513, mode: `MaxEncodedLen`)
+ /// Storage: `Broker::PotentialRenewals` (r:20 w:40)
+ /// Proof: `Broker::PotentialRenewals` (`max_values`: None, `max_size`: Some(1233), added: 3708, mode: `MaxEncodedLen`)
+ /// Storage: `System::Account` (r:21 w:20)
+ /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Broker::SaleInfo` (r:0 w:1)
/// Proof: `Broker::SaleInfo` (`max_values`: Some(1), `max_size`: Some(57), added: 552, mode: `MaxEncodedLen`)
- /// Storage: `Broker::Workplan` (r:0 w:20)
+ /// Storage: `Broker::Workplan` (r:0 w:1000)
/// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 1000]`.
fn rotate_sale(n: u32, ) -> Weight {
// Proof Size summary in bytes:
- // Measured: `12194`
- // Estimated: `13506`
- // Minimum execution time: 49_041_000 picoseconds.
- Weight::from_parts(50_522_788, 0)
- .saturating_add(Weight::from_parts(0, 13506))
- // Standard Error: 72
- .saturating_add(Weight::from_parts(78, 0).saturating_mul(n.into()))
- .saturating_add(T::DbWeight::get().reads(5))
- .saturating_add(T::DbWeight::get().writes(25))
+ // Measured: `16480`
+ // Estimated: `69404 + n * (8 ±1)`
+ // Minimum execution time: 29_313_000 picoseconds.
+ Weight::from_parts(746_062_644, 0)
+ .saturating_add(Weight::from_parts(0, 69404))
+ // Standard Error: 22_496
+ .saturating_add(Weight::from_parts(1_545_204, 0).saturating_mul(n.into()))
+ .saturating_add(T::DbWeight::get().reads(44))
+ .saturating_add(T::DbWeight::get().writes(57))
+ .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
+ .saturating_add(Weight::from_parts(0, 8).saturating_mul(n.into()))
}
/// Storage: `Broker::InstaPoolIo` (r:1 w:0)
/// Proof: `Broker::InstaPoolIo` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
@@ -445,8 +461,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `42`
// Estimated: `3493`
- // Minimum execution time: 5_903_000 picoseconds.
- Weight::from_parts(6_202_000, 0)
+ // Minimum execution time: 7_625_000 picoseconds.
+ Weight::from_parts(7_910_000, 0)
.saturating_add(Weight::from_parts(0, 3493))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
@@ -469,8 +485,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `1321`
// Estimated: `4786`
- // Minimum execution time: 31_412_000 picoseconds.
- Weight::from_parts(31_964_000, 0)
+ // Minimum execution time: 36_572_000 picoseconds.
+ Weight::from_parts(37_316_000, 0)
.saturating_add(Weight::from_parts(0, 4786))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
@@ -489,8 +505,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `74`
// Estimated: `3539`
- // Minimum execution time: 14_098_000 picoseconds.
- Weight::from_parts(14_554_000, 0)
+ // Minimum execution time: 18_362_000 picoseconds.
+ Weight::from_parts(18_653_000, 0)
.saturating_add(Weight::from_parts(0, 3539))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
@@ -501,8 +517,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
- // Minimum execution time: 1_723_000 picoseconds.
- Weight::from_parts(1_822_000, 0)
+ // Minimum execution time: 2_193_000 picoseconds.
+ Weight::from_parts(2_393_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -512,8 +528,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
- // Minimum execution time: 1_865_000 picoseconds.
- Weight::from_parts(1_983_000, 0)
+ // Minimum execution time: 2_344_000 picoseconds.
+ Weight::from_parts(2_486_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -531,8 +547,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `408`
// Estimated: `1893`
- // Minimum execution time: 10_387_000 picoseconds.
- Weight::from_parts(10_819_000, 0)
+ // Minimum execution time: 15_443_000 picoseconds.
+ Weight::from_parts(15_753_000, 0)
.saturating_add(Weight::from_parts(0, 1893))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(1))
@@ -543,8 +559,8 @@ impl pallet_broker::WeightInfo for WeightInfo {
// Proof Size summary in bytes:
// Measured: `150`
// Estimated: `1566`
- // Minimum execution time: 5_996_000 picoseconds.
- Weight::from_parts(6_278_000, 0)
+ // Minimum execution time: 8_637_000 picoseconds.
+ Weight::from_parts(8_883_000, 0)
.saturating_add(Weight::from_parts(0, 1566))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
@@ -557,44 +573,44 @@ impl pallet_broker::WeightInfo for WeightInfo {
/// Proof: `Broker::Configuration` (`max_values`: Some(1), `max_size`: Some(31), added: 526, mode: `MaxEncodedLen`)
/// Storage: `Broker::Status` (r:1 w:0)
/// Proof: `Broker::Status` (`max_values`: Some(1), `max_size`: Some(18), added: 513, mode: `MaxEncodedLen`)
- /// Storage: `System::Account` (r:1 w:1)
+ /// Storage: `System::Account` (r:2 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
- /// Storage: `Authorship::Author` (r:1 w:0)
- /// Proof: `Authorship::Author` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
- /// Storage: `System::Digest` (r:1 w:0)
- /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+ /// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
+ /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Broker::AutoRenewals` (r:1 w:1)
- /// Proof: `Broker::AutoRenewals` (`max_values`: Some(1), `max_size`: Some(31), added: 526, mode: `MaxEncodedLen`)
+ /// Proof: `Broker::AutoRenewals` (`max_values`: Some(1), `max_size`: Some(201), added: 696, mode: `MaxEncodedLen`)
/// Storage: `Broker::Workplan` (r:0 w:1)
/// Proof: `Broker::Workplan` (`max_values`: None, `max_size`: Some(1216), added: 3691, mode: `MaxEncodedLen`)
fn enable_auto_renew() -> Weight {
// Proof Size summary in bytes:
- // Measured: `914`
- // Estimated: `4698`
- // Minimum execution time: 51_938_000 picoseconds.
- Weight::from_parts(55_025_000, 4698)
- .saturating_add(T::DbWeight::get().reads(8_u64))
- .saturating_add(T::DbWeight::get().writes(6_u64))
+ // Measured: `1451`
+ // Estimated: `6196`
+ // Minimum execution time: 120_585_000 picoseconds.
+ Weight::from_parts(148_755_000, 0)
+ .saturating_add(Weight::from_parts(0, 6196))
+ .saturating_add(T::DbWeight::get().reads(8))
+ .saturating_add(T::DbWeight::get().writes(6))
}
/// Storage: `Broker::AutoRenewals` (r:1 w:1)
- /// Proof: `Broker::AutoRenewals` (`max_values`: Some(1), `max_size`: Some(31), added: 526, mode: `MaxEncodedLen`)
+ /// Proof: `Broker::AutoRenewals` (`max_values`: Some(1), `max_size`: Some(201), added: 696, mode: `MaxEncodedLen`)
fn disable_auto_renew() -> Weight {
// Proof Size summary in bytes:
- // Measured: `480`
- // Estimated: `1516`
- // Minimum execution time: 9_628_000 picoseconds.
- Weight::from_parts(10_400_000, 1516)
- .saturating_add(T::DbWeight::get().reads(1_u64))
- .saturating_add(T::DbWeight::get().writes(1_u64))
- }
+ // Measured: `506`
+ // Estimated: `1686`
+ // Minimum execution time: 18_235_000 picoseconds.
+ Weight::from_parts(19_113_000, 0)
+ .saturating_add(Weight::from_parts(0, 1686))
+ .saturating_add(T::DbWeight::get().reads(1))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
/// Storage: `System::Account` (r:1 w:0)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn on_new_timeslice() -> Weight {
// Proof Size summary in bytes:
- // Measured: `0`
+ // Measured: `103`
// Estimated: `3593`
- // Minimum execution time: 2_187_000 picoseconds.
- Weight::from_parts(2_372_000, 0)
+ // Minimum execution time: 4_863_000 picoseconds.
+ Weight::from_parts(5_045_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
}
diff --git a/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml b/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml
index 9bbdb8d2ee08..f2922b710e24 100644
--- a/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml
+++ b/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml
@@ -77,6 +77,7 @@ runtime-benchmarks = [
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
std = [
"codec/std",
diff --git a/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml b/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml
index 893133bf3c1a..4984f6314f87 100644
--- a/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml
+++ b/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml
@@ -176,6 +176,7 @@ runtime-benchmarks = [
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
"xcm-runtime-apis/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
try-runtime = [
diff --git a/cumulus/parachains/runtimes/people/people-westend/Cargo.toml b/cumulus/parachains/runtimes/people/people-westend/Cargo.toml
index 66b324b51af4..7822df585a58 100644
--- a/cumulus/parachains/runtimes/people/people-westend/Cargo.toml
+++ b/cumulus/parachains/runtimes/people/people-westend/Cargo.toml
@@ -176,6 +176,7 @@ runtime-benchmarks = [
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
"xcm-runtime-apis/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
try-runtime = [
diff --git a/cumulus/parachains/runtimes/testing/penpal/Cargo.toml b/cumulus/parachains/runtimes/testing/penpal/Cargo.toml
index 3a6b9d42f211..3bd1e5c6f436 100644
--- a/cumulus/parachains/runtimes/testing/penpal/Cargo.toml
+++ b/cumulus/parachains/runtimes/testing/penpal/Cargo.toml
@@ -175,6 +175,7 @@ runtime-benchmarks = [
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
"xcm-runtime-apis/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
try-runtime = [
diff --git a/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml b/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml
index 4713f4398eaa..035d0ac94be6 100644
--- a/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml
+++ b/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml
@@ -136,6 +136,7 @@ runtime-benchmarks = [
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
+ "xcm/runtime-benchmarks",
]
# A feature that should be enabled when the runtime should be built for on-chain
diff --git a/cumulus/polkadot-omni-node/lib/Cargo.toml b/cumulus/polkadot-omni-node/lib/Cargo.toml
index 4d003a69456e..afbe03ada89c 100644
--- a/cumulus/polkadot-omni-node/lib/Cargo.toml
+++ b/cumulus/polkadot-omni-node/lib/Cargo.toml
@@ -67,6 +67,7 @@ pallet-transaction-payment = { workspace = true, default-features = true }
pallet-transaction-payment-rpc-runtime-api = { workspace = true, default-features = true }
sp-inherents = { workspace = true, default-features = true }
sp-api = { workspace = true, default-features = true }
+sp-consensus = { workspace = true, default-features = true }
sp-consensus-aura = { workspace = true, default-features = true }
sp-io = { workspace = true, default-features = true }
sp-wasm-interface = { workspace = true, default-features = true }
diff --git a/cumulus/polkadot-omni-node/lib/src/common/spec.rs b/cumulus/polkadot-omni-node/lib/src/common/spec.rs
index 38f0e7d72881..868368f3ca1a 100644
--- a/cumulus/polkadot-omni-node/lib/src/common/spec.rs
+++ b/cumulus/polkadot-omni-node/lib/src/common/spec.rs
@@ -44,23 +44,28 @@ use sc_transaction_pool::TransactionPoolHandle;
use sp_keystore::KeystorePtr;
use std::{future::Future, pin::Pin, sync::Arc, time::Duration};
-pub(crate) trait BuildImportQueue {
+pub(crate) trait BuildImportQueue<
+ Block: BlockT,
+ RuntimeApi,
+ BlockImport: sc_consensus::BlockImport,
+>
+{
fn build_import_queue(
client: Arc>,
- block_import: ParachainBlockImport,
+ block_import: ParachainBlockImport,
config: &Configuration,
telemetry_handle: Option,
task_manager: &TaskManager,
) -> sc_service::error::Result>;
}
-pub(crate) trait StartConsensus
+pub(crate) trait StartConsensus
where
RuntimeApi: ConstructNodeRuntimeApi>,
{
fn start_consensus(
client: Arc>,
- block_import: ParachainBlockImport,
+ block_import: ParachainBlockImport,
prometheus_registry: Option<&Registry>,
telemetry: Option,
task_manager: &TaskManager,
@@ -74,6 +79,7 @@ where
announce_block: Arc>) + Send + Sync>,
backend: Arc>,
node_extra_args: NodeExtraArgs,
+ block_import_extra_return_value: BIAuxiliaryData,
) -> Result<(), sc_service::Error>;
}
@@ -92,6 +98,31 @@ fn warn_if_slow_hardware(hwbench: &sc_sysinfo::HwBench) {
}
}
+pub(crate) trait InitBlockImport {
+ type BlockImport: sc_consensus::BlockImport + Clone + Send + Sync;
+ type BlockImportAuxiliaryData;
+
+ fn init_block_import(
+ client: Arc>,
+ ) -> sc_service::error::Result<(Self::BlockImport, Self::BlockImportAuxiliaryData)>;
+}
+
+pub(crate) struct ClientBlockImport;
+
+impl InitBlockImport for ClientBlockImport
+where
+ RuntimeApi: Send + ConstructNodeRuntimeApi>,
+{
+ type BlockImport = Arc>;
+ type BlockImportAuxiliaryData = ();
+
+ fn init_block_import(
+ client: Arc>,
+ ) -> sc_service::error::Result<(Self::BlockImport, Self::BlockImportAuxiliaryData)> {
+ Ok((client.clone(), ()))
+ }
+}
+
pub(crate) trait BaseNodeSpec {
type Block: NodeBlock;
@@ -100,7 +131,13 @@ pub(crate) trait BaseNodeSpec {
ParachainClient,
>;
- type BuildImportQueue: BuildImportQueue;
+ type BuildImportQueue: BuildImportQueue<
+ Self::Block,
+ Self::RuntimeApi,
+ >::BlockImport,
+ >;
+
+ type InitBlockImport: self::InitBlockImport;
/// Starts a `ServiceBuilder` for a full service.
///
@@ -108,7 +145,14 @@ pub(crate) trait BaseNodeSpec {
/// be able to perform chain operations.
fn new_partial(
config: &Configuration,
- ) -> sc_service::error::Result> {
+ ) -> sc_service::error::Result<
+ ParachainService<
+ Self::Block,
+ Self::RuntimeApi,
+ >::BlockImport,
+ >::BlockImportAuxiliaryData
+ >
+ >{
let telemetry = config
.telemetry_endpoints
.clone()
@@ -160,7 +204,10 @@ pub(crate) trait BaseNodeSpec {
.build(),
);
- let block_import = ParachainBlockImport::new(client.clone(), backend.clone());
+ let (block_import, block_import_auxiliary_data) =
+ Self::InitBlockImport::init_block_import(client.clone())?;
+
+ let block_import = ParachainBlockImport::new(block_import, backend.clone());
let import_queue = Self::BuildImportQueue::build_import_queue(
client.clone(),
@@ -178,7 +225,7 @@ pub(crate) trait BaseNodeSpec {
task_manager,
transaction_pool,
select_chain: (),
- other: (block_import, telemetry, telemetry_worker_handle),
+ other: (block_import, telemetry, telemetry_worker_handle, block_import_auxiliary_data),
})
}
}
@@ -190,7 +237,12 @@ pub(crate) trait NodeSpec: BaseNodeSpec {
TransactionPoolHandle>,
>;
- type StartConsensus: StartConsensus;
+ type StartConsensus: StartConsensus<
+ Self::Block,
+ Self::RuntimeApi,
+ >::BlockImport,
+ >::BlockImportAuxiliaryData,
+ >;
const SYBIL_RESISTANCE: CollatorSybilResistance;
@@ -212,7 +264,8 @@ pub(crate) trait NodeSpec: BaseNodeSpec {
let parachain_config = prepare_node_config(parachain_config);
let params = Self::new_partial(¶chain_config)?;
- let (block_import, mut telemetry, telemetry_worker_handle) = params.other;
+ let (block_import, mut telemetry, telemetry_worker_handle, block_import_auxiliary_data) =
+ params.other;
let client = params.client.clone();
let backend = params.backend.clone();
let mut task_manager = params.task_manager;
@@ -340,6 +393,7 @@ pub(crate) trait NodeSpec: BaseNodeSpec {
announce_block,
backend.clone(),
node_extra_args,
+ block_import_auxiliary_data,
)?;
}
diff --git a/cumulus/polkadot-omni-node/lib/src/common/types.rs b/cumulus/polkadot-omni-node/lib/src/common/types.rs
index 4bc58dc9db7e..978368be2584 100644
--- a/cumulus/polkadot-omni-node/lib/src/common/types.rs
+++ b/cumulus/polkadot-omni-node/lib/src/common/types.rs
@@ -22,7 +22,6 @@ use sc_service::{PartialComponents, TFullBackend, TFullClient};
use sc_telemetry::{Telemetry, TelemetryWorkerHandle};
use sc_transaction_pool::TransactionPoolHandle;
use sp_runtime::{generic, traits::BlakeTwo256};
-use std::sync::Arc;
pub use parachains_common::{AccountId, Balance, Hash, Nonce};
@@ -42,15 +41,20 @@ pub type ParachainClient =
pub type ParachainBackend = TFullBackend;
-pub type ParachainBlockImport =
- TParachainBlockImport>, ParachainBackend>;
+pub type ParachainBlockImport =
+ TParachainBlockImport>;
/// Assembly of PartialComponents (enough to run chain ops subcommands)
-pub type ParachainService = PartialComponents<
+pub type ParachainService = PartialComponents<
ParachainClient,
ParachainBackend,
(),
DefaultImportQueue,
TransactionPoolHandle>,
- (ParachainBlockImport, Option, Option),
+ (
+ ParachainBlockImport,
+ Option