From c0f0fdccce26286dc7284b835025d51f5848d505 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Sat, 21 Oct 2023 22:51:09 +0200 Subject: [PATCH] Benchmarks for BridgeHub refactor (1) --- .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index de581e6e1266a..406119ca069e4 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -540,13 +540,13 @@ mod benches { [pallet_xcm_benchmarks::fungible, XcmBalances] [pallet_xcm_benchmarks::generic, XcmGeneric] // Bridge pallets at Rococo - [pallet_bridge_grandpa, BridgeWococoGrandpa] - [pallet_bridge_parachains, BridgeParachainsBench::] - [pallet_bridge_messages, BridgeMessagesBench::] + [pallet_bridge_grandpa, WococoFinality] + [pallet_bridge_parachains, WithinWococo] + [pallet_bridge_messages, RococoToWococo] // Bridge pallets at Wococo - [pallet_bridge_grandpa, BridgeRococoGrandpa] - [pallet_bridge_parachains, BridgeParachainsBench::] - [pallet_bridge_messages, BridgeMessagesBench::] + [pallet_bridge_grandpa, RococoFinality] + [pallet_bridge_parachains, WithinRococo] + [pallet_bridge_messages, WococoToRococo] // Bridge relayer pallets [pallet_bridge_relayers, BridgeRelayersBench::] ); @@ -823,9 +823,14 @@ impl_runtime_apis! { type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; - use pallet_bridge_parachains::benchmarking::Pallet as BridgeParachainsBench; - use pallet_bridge_messages::benchmarking::Pallet as BridgeMessagesBench; use pallet_bridge_relayers::benchmarking::Pallet as BridgeRelayersBench; + // Change weight file names. + type WococoFinality = BridgeWococoGrandpa; + type RococoFinality = BridgeRococoGrandpa; + type WithinWococo = pallet_bridge_parachains::benchmarking::Pallet::; + type WithinRococo = pallet_bridge_parachains::benchmarking::Pallet::; + type RococoToWococo = pallet_bridge_messages::benchmarking::Pallet ::; + type WococoToRococo = pallet_bridge_messages::benchmarking::Pallet ::; let mut list = Vec::::new(); list_benchmarks!(list, extra); @@ -960,6 +965,13 @@ impl_runtime_apis! { type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; + type WococoFinality = BridgeWococoGrandpa; + type RococoFinality = BridgeRococoGrandpa; + type WithinWococo = pallet_bridge_parachains::benchmarking::Pallet::; + type WithinRococo = pallet_bridge_parachains::benchmarking::Pallet::; + type RococoToWococo = pallet_bridge_messages::benchmarking::Pallet ::; + type WococoToRococo = pallet_bridge_messages::benchmarking::Pallet ::; + use bridge_runtime_common::messages_benchmarking::{ prepare_message_delivery_proof_from_parachain, prepare_message_proof_from_parachain, @@ -967,7 +979,6 @@ impl_runtime_apis! { }; use pallet_bridge_messages::benchmarking::{ Config as BridgeMessagesConfig, - Pallet as BridgeMessagesBench, MessageDeliveryProofParams, MessageProofParams, }; @@ -1059,10 +1070,7 @@ impl_runtime_apis! { } use bridge_runtime_common::parachains_benchmarking::prepare_parachain_heads_proof; - use pallet_bridge_parachains::benchmarking::{ - Config as BridgeParachainsConfig, - Pallet as BridgeParachainsBench, - }; + use pallet_bridge_parachains::benchmarking::Config as BridgeParachainsConfig; use pallet_bridge_relayers::benchmarking::{ Pallet as BridgeRelayersBench, Config as BridgeRelayersConfig,