[testnet] Remove Wococo stuff from BridgeHubRococo/AssetHubRococo (#2300)

Rococo<>Wococo bridge is replaced by Rococo<Westend bridge, so this PR
removes unneeded code.

- [x] update bridges subtree after
https://github.com/paritytech/parity-bridges-common/pull/2692

---------

Co-authored-by: command-bot <>
Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
This commit is contained in:
Branislav Kontur
2023-11-15 16:40:07 +01:00
committed by GitHub
parent 824b782390
commit f4bb17cc86
92 changed files with 967 additions and 6394 deletions
@@ -1,14 +1,5 @@
- [Bridge-hub Parachains](#bridge-hub-parachains)
- [Requirements for local run/testing](#requirements-for-local-runtesting)
- [How to test local Rococo <-> Wococo bridge](#how-to-test-local-rococo---wococo-bridge)
- [Run Rococo/Wococo chains with zombienet](#run-rococowococo-chains-with-zombienet)
- [Init bridge and run relayer between BridgeHubRococo and
BridgeHubWococo](#init-bridge-and-run-relayer-between-bridgehubrococo-and-bridgehubwococo)
- [Initialize configuration for transfer asset over bridge
(ROCs/WOCs)](#initialize-configuration-for-transfer-asset-over-bridge-rocswocs)
- [Send messages - transfer asset over bridge (ROCs/WOCs)](#send-messages---transfer-asset-over-bridge-rocswocs)
- [Claim relayer's rewards on BridgeHubRococo and
BridgeHubWococo](#claim-relayers-rewards-on-bridgehubrococo-and-bridgehubwococo)
- [How to test local Rococo <-> Westend bridge](#how-to-test-local-rococo---westend-bridge)
- [Run Rococo/Westend chains with zombienet](#run-rococowestend-chains-with-zombienet)
- [Init bridge and run relayer between BridgeHubRococo and
@@ -53,17 +44,7 @@ Copy the apropriate binary (zombienet-linux) from the latest release to ~/local_
---
# 2. Build polkadot binary
# If you want to test Kusama/Polkadot bridge, we need "sudo pallet + fast-runtime",
# so we need to use sudofi in polkadot directory.
#
# Install sudofi: (skip if already installed)
# cd <somewhere-outside-polkadot-sdk-git-repo-dir>
# git clone https://github.com/paritytech/parachain-utils.git
# cd parachain-utils # -> this is <parachain-utils-git-repo-dir>
# cargo build --release --bin sudofi
#
# cd <polkadot-sdk-git-repo-dir>/polkadot
# <parachain-utils-git-repo-dir>/target/release/sudofi
We need polkadot binary with "fast-runtime" feature:
cd <polkadot-sdk-git-repo-dir>
cargo build --release --features fast-runtime --bin polkadot
@@ -100,112 +81,6 @@ cp target/release/polkadot-parachain ~/local_bridge_testing/bin/polkadot-paracha
cp target/release/polkadot-parachain ~/local_bridge_testing/bin/polkadot-parachain-asset-hub
```
## How to test local Rococo <-> Wococo bridge
### Run Rococo/Wococo chains with zombienet
```
cd <polkadot-sdk-git-repo-dir>
# Rococo + BridgeHubRococo + AssetHub for Rococo (mirroring Kusama)
POLKADOT_BINARY_PATH=~/local_bridge_testing/bin/polkadot \
POLKADOT_PARACHAIN_BINARY_PATH=~/local_bridge_testing/bin/polkadot-parachain \
POLKADOT_PARACHAIN_BINARY_PATH_FOR_ASSET_HUB_ROCOCO=~/local_bridge_testing/bin/polkadot-parachain-asset-hub \
~/local_bridge_testing/bin/zombienet-linux --provider native spawn ./cumulus/zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml
```
```
cd <polkadot-sdk-git-repo-dir>
# Wococo + BridgeHubWococo + AssetHub for Wococo (mirroring Polkadot)
POLKADOT_BINARY_PATH=~/local_bridge_testing/bin/polkadot \
POLKADOT_PARACHAIN_BINARY_PATH=~/local_bridge_testing/bin/polkadot-parachain \
POLKADOT_PARACHAIN_BINARY_PATH_FOR_ASSET_HUB_WOCOCO=~/local_bridge_testing/bin/polkadot-parachain-asset-hub \
~/local_bridge_testing/bin/zombienet-linux --provider native spawn ./cumulus/zombienet/bridge-hubs/bridge_hub_wococo_local_network.toml
```
### Init bridge and run relayer between BridgeHubRococo and BridgeHubWococo
**Accounts of BridgeHub parachains:**
- `Bob` is pallet owner of all bridge pallets
#### Run with script
```
cd <polkadot-sdk-git-repo-dir>
./cumulus/scripts/bridges_rococo_wococo.sh run-relay
```
**Check relay-chain headers relaying:**
- Rococo parachain: - https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A8943#/chainstate - Pallet:
**bridgeWococoGrandpa** - Keys: **bestFinalized()**
- Wococo parachain: - https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A8945#/chainstate - Pallet:
**bridgeRococoGrandpa** - Keys: **bestFinalized()**
**Check parachain headers relaying:**
- Rococo parachain: - https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A8943#/chainstate - Pallet:
**bridgeWococoParachains** - Keys: **parasInfo(None)**
- Wococo parachain: - https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A8945#/chainstate - Pallet:
**bridgeRococoParachains** - Keys: **parasInfo(None)**
### Initialize configuration for transfer asset over bridge (ROCs/WOCs)
This initialization does several things:
- creates `ForeignAssets` for wrappedROCs/wrappedWOCs
- drips SA for AssetHubRococo on AssetHubWococo (and vice versa) which holds reserved assets on source chains
```
cd <polkadot-sdk-git-repo-dir>
./cumulus/scripts/bridges_rococo_wococo.sh init-asset-hub-rococo-local
./cumulus/scripts/bridges_rococo_wococo.sh init-bridge-hub-rococo-local
./cumulus/scripts/bridges_rococo_wococo.sh init-asset-hub-wococo-local
./cumulus/scripts/bridges_rococo_wococo.sh init-bridge-hub-wococo-local
```
### Send messages - transfer asset over bridge (ROCs/WOCs)
Do (asset) transfers:
```
cd <polkadot-sdk-git-repo-dir>
# ROCs from Rococo's Asset Hub to Wococo's.
./cumulus/scripts/bridges_rococo_wococo.sh reserve-transfer-assets-from-asset-hub-rococo-local
```
```
cd <polkadot-sdk-git-repo-dir>
# WOCs from Wococo's Asset Hub to Rococo's.
./cumulus/scripts/bridges_rococo_wococo.sh reserve-transfer-assets-from-asset-hub-wococo-local
```
- open explorers: (see zombienets)
- AssetHubRococo (see events `xcmpQueue.XcmpMessageSent`, `polkadotXcm.Attempted`) https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9910#/explorer
- BridgeHubRococo (see `bridgeWococoMessages.MessageAccepted`) https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:8943#/explorer
- BridgeHubWococo (see `bridgeRococoMessages.MessagesReceived`, `xcmpQueue.XcmpMessageSent`) https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:8945#/explorer
- AssetHubWococo (see `foreignAssets.Issued`, `xcmpQueue.Success`) https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9010#/explorer
- BridgeHubRocococ (see `bridgeWococoMessages.MessagesDelivered`) https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:8943#/explorer
### Claim relayer's rewards on BridgeHubRococo and BridgeHubWococo
**Accounts of BridgeHub parachains:**
- `//Charlie` is relayer account on BridgeHubRococo
- `//Charlie` is relayer account on BridgeHubWococo
```
cd <polkadot-sdk-git-repo-dir>
# Claim rewards on BridgeHubWococo:
./cumulus/scripts/bridges_rococo_wococo.sh claim-rewards-bridge-hub-rococo-local
# Claim rewards on BridgeHubWococo:
./cumulus/scripts/bridges_rococo_wococo.sh claim-rewards-bridge-hub-wococo-local
```
- open explorers: (see zombienets)
- BridgeHubRococo (see 2x `bridgeRelayers.RewardPaid`) https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:8943#/explorer
- BridgeHubWococo (see 2x `bridgeRelayers.RewardPaid`) https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:8945#/explorer
## How to test local Rococo <-> Westend bridge
### Run Rococo/Westend chains with zombienet
@@ -77,10 +77,8 @@ parachains-common = { path = "../../../common", default-features = false }
# Bridges
bp-asset-hub-rococo = { path = "../../../../../bridges/primitives/chain-asset-hub-rococo", default-features = false }
bp-asset-hub-westend = { path = "../../../../../bridges/primitives/chain-asset-hub-westend", default-features = false }
bp-asset-hub-wococo = { path = "../../../../../bridges/primitives/chain-asset-hub-wococo", default-features = false }
bp-bridge-hub-rococo = { path = "../../../../../bridges/primitives/chain-bridge-hub-rococo", default-features = false }
bp-bridge-hub-westend = { path = "../../../../../bridges/primitives/chain-bridge-hub-westend", default-features = false }
bp-bridge-hub-wococo = { path = "../../../../../bridges/primitives/chain-bridge-hub-wococo", default-features = false }
bp-header-chain = { path = "../../../../../bridges/primitives/header-chain", default-features = false }
bp-messages = { path = "../../../../../bridges/primitives/messages", default-features = false }
bp-parachains = { path = "../../../../../bridges/primitives/parachains", default-features = false }
@@ -89,7 +87,6 @@ bp-relayers = { path = "../../../../../bridges/primitives/relayers", default-fea
bp-runtime = { path = "../../../../../bridges/primitives/runtime", default-features = false }
bp-rococo = { path = "../../../../../bridges/primitives/chain-rococo", default-features = false }
bp-westend = { path = "../../../../../bridges/primitives/chain-westend", default-features = false }
bp-wococo = { path = "../../../../../bridges/primitives/chain-wococo", default-features = false }
pallet-bridge-grandpa = { path = "../../../../../bridges/modules/grandpa", default-features = false }
pallet-bridge-messages = { path = "../../../../../bridges/modules/messages", default-features = false }
pallet-bridge-parachains = { path = "../../../../../bridges/modules/parachains", default-features = false }
@@ -107,10 +104,8 @@ default = [ "std" ]
std = [
"bp-asset-hub-rococo/std",
"bp-asset-hub-westend/std",
"bp-asset-hub-wococo/std",
"bp-bridge-hub-rococo/std",
"bp-bridge-hub-westend/std",
"bp-bridge-hub-wococo/std",
"bp-header-chain/std",
"bp-messages/std",
"bp-parachains/std",
@@ -119,7 +114,6 @@ std = [
"bp-rococo/std",
"bp-runtime/std",
"bp-westend/std",
"bp-wococo/std",
"bridge-runtime-common/std",
"codec/std",
"cumulus-pallet-aura-ext/std",
@@ -29,10 +29,6 @@ parameter_types! {
pub const RelayChainHeadersToKeep: u32 = 1024;
pub const ParachainHeadsToKeep: u32 = 64;
pub const RococoBridgeParachainPalletName: &'static str = "Paras";
pub const MaxRococoParaHeadDataSize: u32 = bp_rococo::MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE;
pub const WococoBridgeParachainPalletName: &'static str = "Paras";
pub const MaxWococoParaHeadDataSize: u32 = bp_wococo::MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE;
pub const WestendBridgeParachainPalletName: &'static str = "Paras";
pub const MaxWestendParaHeadDataSize: u32 = bp_westend::MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE;
@@ -43,52 +39,6 @@ parameter_types! {
pub storage DeliveryRewardInBalance: u64 = 1_000_000;
}
/// Add GRANDPA bridge pallet to track Wococo relay chain.
pub type BridgeGrandpaWococoInstance = pallet_bridge_grandpa::Instance1;
impl pallet_bridge_grandpa::Config<BridgeGrandpaWococoInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type BridgedChain = bp_wococo::Wococo;
type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>;
type HeadersToKeep = RelayChainHeadersToKeep;
type WeightInfo = weights::pallet_bridge_grandpa_wococo_finality::WeightInfo<Runtime>;
}
/// Add parachain bridge pallet to track Wococo BridgeHub parachain
pub type BridgeParachainWococoInstance = pallet_bridge_parachains::Instance1;
impl pallet_bridge_parachains::Config<BridgeParachainWococoInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = weights::pallet_bridge_parachains_within_wococo::WeightInfo<Runtime>;
type BridgesGrandpaPalletInstance = BridgeGrandpaWococoInstance;
type ParasPalletName = WococoBridgeParachainPalletName;
type ParaStoredHeaderDataBuilder =
SingleParaStoredHeaderDataBuilder<bp_bridge_hub_wococo::BridgeHubWococo>;
type HeadsToKeep = ParachainHeadsToKeep;
type MaxParaHeadDataSize = MaxWococoParaHeadDataSize;
}
/// Add GRANDPA bridge pallet to track Rococo relay chain.
pub type BridgeGrandpaRococoInstance = pallet_bridge_grandpa::Instance2;
impl pallet_bridge_grandpa::Config<BridgeGrandpaRococoInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type BridgedChain = bp_rococo::Rococo;
type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>;
type HeadersToKeep = RelayChainHeadersToKeep;
type WeightInfo = weights::pallet_bridge_grandpa_rococo_finality::WeightInfo<Runtime>;
}
/// Add parachain bridge pallet to track Rococo BridgeHub parachain
pub type BridgeParachainRococoInstance = pallet_bridge_parachains::Instance2;
impl pallet_bridge_parachains::Config<BridgeParachainRococoInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = weights::pallet_bridge_parachains_within_rococo::WeightInfo<Runtime>;
type BridgesGrandpaPalletInstance = BridgeGrandpaRococoInstance;
type ParasPalletName = RococoBridgeParachainPalletName;
type ParaStoredHeaderDataBuilder =
SingleParaStoredHeaderDataBuilder<bp_bridge_hub_rococo::BridgeHubRococo>;
type HeadsToKeep = ParachainHeadsToKeep;
type MaxParaHeadDataSize = MaxRococoParaHeadDataSize;
}
/// Add GRANDPA bridge pallet to track Westend relay chain.
pub type BridgeGrandpaWestendInstance = pallet_bridge_grandpa::Instance3;
impl pallet_bridge_grandpa::Config<BridgeGrandpaWestendInstance> for Runtime {
@@ -96,14 +46,14 @@ impl pallet_bridge_grandpa::Config<BridgeGrandpaWestendInstance> for Runtime {
type BridgedChain = bp_westend::Westend;
type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>;
type HeadersToKeep = RelayChainHeadersToKeep;
type WeightInfo = weights::pallet_bridge_grandpa_westend_finality::WeightInfo<Runtime>;
type WeightInfo = weights::pallet_bridge_grandpa::WeightInfo<Runtime>;
}
/// Add parachain bridge pallet to track Westend BridgeHub parachain
pub type BridgeParachainWestendInstance = pallet_bridge_parachains::Instance3;
impl pallet_bridge_parachains::Config<BridgeParachainWestendInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = weights::pallet_bridge_parachains_within_westend::WeightInfo<Runtime>;
type WeightInfo = weights::pallet_bridge_parachains::WeightInfo<Runtime>;
type BridgesGrandpaPalletInstance = BridgeGrandpaWestendInstance;
type ParasPalletName = WestendBridgeParachainPalletName;
type ParaStoredHeaderDataBuilder =
@@ -1,317 +0,0 @@
// 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 <http://www.gnu.org/licenses/>.
//! Bridge definitions used on BridgeHub with the Wococo flavor for bridging to BridgeHubRococo.
use crate::{
bridge_common_config::{BridgeParachainRococoInstance, DeliveryRewardInBalance},
weights, AccountId, BridgeRococoMessages, ParachainInfo, Runtime, RuntimeEvent, RuntimeOrigin,
XcmRouter,
};
use bp_messages::LaneId;
use bridge_runtime_common::{
messages,
messages::{
source::{FromBridgedChainMessagesDeliveryProof, TargetHeaderChainAdapter},
target::{FromBridgedChainMessagesProof, SourceHeaderChainAdapter},
MessageBridge, ThisChainWithMessages, UnderlyingChainProvider,
},
messages_xcm_extension::{
SenderAndLane, XcmAsPlainPayload, XcmBlobHauler, XcmBlobHaulerAdapter,
XcmBlobMessageDispatch,
},
refund_relayer_extension::{
ActualFeeRefund, RefundBridgedParachainMessages, RefundSignedExtensionAdapter,
RefundableMessagesLane, RefundableParachain,
},
};
use codec::Encode;
use frame_support::{parameter_types, traits::PalletInfoAccess};
use sp_runtime::RuntimeDebug;
use xcm::{
latest::prelude::*,
prelude::{InteriorMultiLocation, NetworkId},
};
use xcm_builder::{BridgeBlobDispatcher, HaulBlobExporter};
parameter_types! {
pub const MaxUnrewardedRelayerEntriesAtInboundLane: bp_messages::MessageNonce =
bp_bridge_hub_wococo::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX;
pub const MaxUnconfirmedMessagesAtInboundLane: bp_messages::MessageNonce =
bp_bridge_hub_wococo::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX;
pub const BridgeHubRococoChainId: bp_runtime::ChainId = bp_runtime::BRIDGE_HUB_ROCOCO_CHAIN_ID;
pub BridgeHubWococoUniversalLocation: InteriorMultiLocation = X2(GlobalConsensus(Wococo), Parachain(ParachainInfo::parachain_id().into()));
pub BridgeWococoToRococoMessagesPalletInstance: InteriorMultiLocation = X1(PalletInstance(<BridgeRococoMessages as PalletInfoAccess>::index() as u8));
pub RococoGlobalConsensusNetwork: NetworkId = NetworkId::Rococo;
pub ActiveOutboundLanesToBridgeHubRococo: &'static [bp_messages::LaneId] = &[XCM_LANE_FOR_ASSET_HUB_WOCOCO_TO_ASSET_HUB_ROCOCO];
pub const AssetHubWococoToAssetHubRococoMessagesLane: bp_messages::LaneId = XCM_LANE_FOR_ASSET_HUB_WOCOCO_TO_ASSET_HUB_ROCOCO;
// see the `FEE_BOOST_PER_MESSAGE` constant to get the meaning of this value
pub PriorityBoostPerMessage: u64 = 182_044_444_444_444;
pub AssetHubWococoParaId: cumulus_primitives_core::ParaId = bp_asset_hub_wococo::ASSET_HUB_WOCOCO_PARACHAIN_ID.into();
pub AssetHubRococoParaId: cumulus_primitives_core::ParaId = bp_asset_hub_rococo::ASSET_HUB_ROCOCO_PARACHAIN_ID.into();
pub FromAssetHubWococoToAssetHubRococoRoute: SenderAndLane = SenderAndLane::new(
ParentThen(X1(Parachain(AssetHubWococoParaId::get().into()))).into(),
XCM_LANE_FOR_ASSET_HUB_WOCOCO_TO_ASSET_HUB_ROCOCO,
);
pub CongestedMessage: Xcm<()> = build_congestion_message(true).into();
pub UncongestedMessage: Xcm<()> = build_congestion_message(false).into();
}
pub const XCM_LANE_FOR_ASSET_HUB_WOCOCO_TO_ASSET_HUB_ROCOCO: LaneId = LaneId([0, 0, 0, 1]);
fn build_congestion_message<Call>(is_congested: bool) -> sp_std::vec::Vec<Instruction<Call>> {
sp_std::vec![
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
Transact {
origin_kind: OriginKind::Xcm,
require_weight_at_most:
bp_asset_hub_wococo::XcmBridgeHubRouterTransactCallMaxWeight::get(),
call: bp_asset_hub_wococo::Call::ToRococoXcmRouter(
bp_asset_hub_wococo::XcmBridgeHubRouterCall::report_bridge_status {
bridge_id: Default::default(),
is_congested,
}
)
.encode()
.into(),
}
]
}
/// Proof of messages, coming from Rococo.
pub type FromRococoBridgeHubMessagesProof =
FromBridgedChainMessagesProof<bp_bridge_hub_rococo::Hash>;
/// Messages delivery proof for RococoBridge Hub -> Wococo BridgeHub messages.
pub type ToRococoBridgeHubMessagesDeliveryProof =
FromBridgedChainMessagesDeliveryProof<bp_bridge_hub_rococo::Hash>;
/// Dispatches received XCM messages from other bridge
type FromRococoMessageBlobDispatcher = BridgeBlobDispatcher<
XcmRouter,
BridgeHubWococoUniversalLocation,
BridgeWococoToRococoMessagesPalletInstance,
>;
/// Export XCM messages to be relayed to the other side
pub type ToBridgeHubRococoHaulBlobExporter = HaulBlobExporter<
XcmBlobHaulerAdapter<ToBridgeHubRococoXcmBlobHauler>,
RococoGlobalConsensusNetwork,
(),
>;
pub struct ToBridgeHubRococoXcmBlobHauler;
impl XcmBlobHauler for ToBridgeHubRococoXcmBlobHauler {
type Runtime = Runtime;
type MessagesInstance = WithBridgeHubRococoMessagesInstance;
type SenderAndLane = FromAssetHubWococoToAssetHubRococoRoute;
type ToSourceChainSender = XcmRouter;
type CongestedMessage = CongestedMessage;
type UncongestedMessage = UncongestedMessage;
}
/// On messages delivered callback.
type OnMessagesDelivered = XcmBlobHaulerAdapter<ToBridgeHubRococoXcmBlobHauler>;
/// Messaging Bridge configuration for BridgeHubWococo -> BridgeHubRococo
pub struct WithBridgeHubRococoMessageBridge;
impl MessageBridge for WithBridgeHubRococoMessageBridge {
const BRIDGED_MESSAGES_PALLET_NAME: &'static str =
bp_bridge_hub_wococo::WITH_BRIDGE_HUB_WOCOCO_MESSAGES_PALLET_NAME;
type ThisChain = BridgeHubWococo;
type BridgedChain = BridgeHubRococo;
type BridgedHeaderChain = pallet_bridge_parachains::ParachainHeaders<
Runtime,
BridgeParachainRococoInstance,
bp_bridge_hub_rococo::BridgeHubRococo,
>;
}
/// Message verifier for BridgeHubRococo messages sent from BridgeHubWococo
pub type ToBridgeHubRococoMessageVerifier =
messages::source::FromThisChainMessageVerifier<WithBridgeHubRococoMessageBridge>;
/// Maximal outbound payload size of BridgeHubWococo -> BridgeHubRococo messages.
pub type ToBridgeHubRococoMaximalOutboundPayloadSize =
messages::source::FromThisChainMaximalOutboundPayloadSize<WithBridgeHubRococoMessageBridge>;
/// BridgeHubRococo chain from message lane point of view.
#[derive(RuntimeDebug, Clone, Copy)]
pub struct BridgeHubRococo;
impl UnderlyingChainProvider for BridgeHubRococo {
type Chain = bp_bridge_hub_rococo::BridgeHubRococo;
}
impl messages::BridgedChainWithMessages for BridgeHubRococo {}
/// BridgeHubWococo chain from message lane point of view.
#[derive(RuntimeDebug, Clone, Copy)]
pub struct BridgeHubWococo;
impl UnderlyingChainProvider for BridgeHubWococo {
type Chain = bp_bridge_hub_wococo::BridgeHubWococo;
}
impl ThisChainWithMessages for BridgeHubWococo {
type RuntimeOrigin = RuntimeOrigin;
}
/// Signed extension that refunds relayers that are delivering messages from the Rococo parachain.
pub type OnBridgeHubWococoRefundBridgeHubRococoMessages = RefundSignedExtensionAdapter<
RefundBridgedParachainMessages<
Runtime,
RefundableParachain<BridgeParachainRococoInstance, bp_bridge_hub_rococo::BridgeHubRococo>,
RefundableMessagesLane<
WithBridgeHubRococoMessagesInstance,
AssetHubWococoToAssetHubRococoMessagesLane,
>,
ActualFeeRefund<Runtime>,
PriorityBoostPerMessage,
StrOnBridgeHubWococoRefundBridgeHubRococoMessages,
>,
>;
bp_runtime::generate_static_str_provider!(OnBridgeHubWococoRefundBridgeHubRococoMessages);
/// Add XCM messages support for BridgeHubWococo to support Wococo->Rococo XCM messages
pub type WithBridgeHubRococoMessagesInstance = pallet_bridge_messages::Instance2;
impl pallet_bridge_messages::Config<WithBridgeHubRococoMessagesInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = weights::pallet_bridge_messages_wococo_to_rococo::WeightInfo<Runtime>;
type BridgedChainId = BridgeHubRococoChainId;
type ActiveOutboundLanes = ActiveOutboundLanesToBridgeHubRococo;
type MaxUnrewardedRelayerEntriesAtInboundLane = MaxUnrewardedRelayerEntriesAtInboundLane;
type MaxUnconfirmedMessagesAtInboundLane = MaxUnconfirmedMessagesAtInboundLane;
type MaximalOutboundPayloadSize = ToBridgeHubRococoMaximalOutboundPayloadSize;
type OutboundPayload = XcmAsPlainPayload;
type InboundPayload = XcmAsPlainPayload;
type InboundRelayer = AccountId;
type DeliveryPayments = ();
type TargetHeaderChain = TargetHeaderChainAdapter<WithBridgeHubRococoMessageBridge>;
type LaneMessageVerifier = ToBridgeHubRococoMessageVerifier;
type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
Runtime,
WithBridgeHubRococoMessagesInstance,
DeliveryRewardInBalance,
>;
type SourceHeaderChain = SourceHeaderChainAdapter<WithBridgeHubRococoMessageBridge>;
type MessageDispatch = XcmBlobMessageDispatch<
FromRococoMessageBlobDispatcher,
Self::WeightInfo,
cumulus_pallet_xcmp_queue::bridging::OutXcmpChannelStatusProvider<
AssetHubWococoParaId,
Runtime,
>,
>;
type OnMessagesDelivered = OnMessagesDelivered;
}
#[cfg(test)]
mod tests {
use super::*;
use crate::bridge_common_config::BridgeGrandpaRococoInstance;
use bridge_runtime_common::{
assert_complete_bridge_types,
integrity::{
assert_complete_bridge_constants, check_message_lane_weights,
AssertBridgeMessagesPalletConstants, AssertBridgePalletNames, AssertChainConstants,
AssertCompleteBridgeConstants,
},
};
use parachains_common::{wococo, Balance};
/// Every additional message in the message delivery transaction boosts its priority.
/// So the priority of transaction with `N+1` messages is larger than priority of
/// transaction with `N` messages by the `PriorityBoostPerMessage`.
///
/// Economically, it is an equivalent of adding tip to the transaction with `N` messages.
/// The `FEE_BOOST_PER_MESSAGE` constant is the value of this tip.
///
/// We want this tip to be large enough (delivery transactions with more messages = less
/// operational costs and a faster bridge), so this value should be significant.
const FEE_BOOST_PER_MESSAGE: Balance = 2 * wococo::currency::UNITS;
#[test]
fn ensure_bridge_hub_wococo_message_lane_weights_are_correct() {
check_message_lane_weights::<
bp_bridge_hub_wococo::BridgeHubWococo,
Runtime,
WithBridgeHubRococoMessagesInstance,
>(
bp_bridge_hub_rococo::EXTRA_STORAGE_PROOF_SIZE,
bp_bridge_hub_wococo::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX,
bp_bridge_hub_wococo::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
true,
);
}
#[test]
fn ensure_bridge_integrity() {
assert_complete_bridge_types!(
runtime: Runtime,
with_bridged_chain_grandpa_instance: BridgeGrandpaRococoInstance,
with_bridged_chain_messages_instance: WithBridgeHubRococoMessagesInstance,
bridge: WithBridgeHubRococoMessageBridge,
this_chain: bp_wococo::Wococo,
bridged_chain: bp_rococo::Rococo,
);
assert_complete_bridge_constants::<
Runtime,
BridgeGrandpaRococoInstance,
WithBridgeHubRococoMessagesInstance,
WithBridgeHubRococoMessageBridge,
>(AssertCompleteBridgeConstants {
this_chain_constants: AssertChainConstants {
block_length: bp_bridge_hub_wococo::BlockLength::get(),
block_weights: bp_bridge_hub_wococo::BlockWeights::get(),
},
messages_pallet_constants: AssertBridgeMessagesPalletConstants {
max_unrewarded_relayers_in_bridged_confirmation_tx:
bp_bridge_hub_rococo::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX,
max_unconfirmed_messages_in_bridged_confirmation_tx:
bp_bridge_hub_rococo::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
bridged_chain_id: bp_runtime::BRIDGE_HUB_ROCOCO_CHAIN_ID,
},
pallet_names: AssertBridgePalletNames {
with_this_chain_messages_pallet_name:
bp_bridge_hub_wococo::WITH_BRIDGE_HUB_WOCOCO_MESSAGES_PALLET_NAME,
with_bridged_chain_grandpa_pallet_name: bp_rococo::WITH_ROCOCO_GRANDPA_PALLET_NAME,
with_bridged_chain_messages_pallet_name:
bp_bridge_hub_rococo::WITH_BRIDGE_HUB_ROCOCO_MESSAGES_PALLET_NAME,
},
});
bridge_runtime_common::priority_calculator::ensure_priority_boost_is_sane::<
Runtime,
WithBridgeHubRococoMessagesInstance,
PriorityBoostPerMessage,
>(FEE_BOOST_PER_MESSAGE);
assert_eq!(
BridgeWococoToRococoMessagesPalletInstance::get(),
X1(PalletInstance(
bp_bridge_hub_wococo::WITH_BRIDGE_WOCOCO_TO_ROCOCO_MESSAGES_PALLET_INDEX
))
);
}
}
@@ -196,7 +196,7 @@ bp_runtime::generate_static_str_provider!(OnBridgeHubRococoRefundBridgeHubWesten
pub type WithBridgeHubWestendMessagesInstance = pallet_bridge_messages::Instance3;
impl pallet_bridge_messages::Config<WithBridgeHubWestendMessagesInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = weights::pallet_bridge_messages_rococo_to_westend::WeightInfo<Runtime>;
type WeightInfo = weights::pallet_bridge_messages::WeightInfo<Runtime>;
type BridgedChainId = BridgeHubWestendChainId;
type ActiveOutboundLanes = ActiveOutboundLanesToBridgeHubWestend;
type MaxUnrewardedRelayerEntriesAtInboundLane = MaxUnrewardedRelayerEntriesAtInboundLane;
@@ -1,318 +0,0 @@
// 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 <http://www.gnu.org/licenses/>.
//! Bridge definitions used on BridgeHub with the Rococo flavor for bridging to BridgeHubWococo.
use crate::{
bridge_common_config::{BridgeParachainWococoInstance, DeliveryRewardInBalance},
weights, AccountId, BridgeWococoMessages, ParachainInfo, Runtime, RuntimeEvent, RuntimeOrigin,
XcmRouter,
};
use bp_messages::LaneId;
use bridge_runtime_common::{
messages,
messages::{
source::{FromBridgedChainMessagesDeliveryProof, TargetHeaderChainAdapter},
target::{FromBridgedChainMessagesProof, SourceHeaderChainAdapter},
MessageBridge, ThisChainWithMessages, UnderlyingChainProvider,
},
messages_xcm_extension::{
SenderAndLane, XcmAsPlainPayload, XcmBlobHauler, XcmBlobHaulerAdapter,
XcmBlobMessageDispatch,
},
refund_relayer_extension::{
ActualFeeRefund, RefundBridgedParachainMessages, RefundSignedExtensionAdapter,
RefundableMessagesLane, RefundableParachain,
},
};
use codec::Encode;
use frame_support::{parameter_types, traits::PalletInfoAccess};
use sp_runtime::RuntimeDebug;
use xcm::{
latest::prelude::*,
prelude::{InteriorMultiLocation, NetworkId},
};
use xcm_builder::{BridgeBlobDispatcher, HaulBlobExporter};
parameter_types! {
pub const MaxUnrewardedRelayerEntriesAtInboundLane: bp_messages::MessageNonce =
bp_bridge_hub_rococo::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX;
pub const MaxUnconfirmedMessagesAtInboundLane: bp_messages::MessageNonce =
bp_bridge_hub_rococo::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX;
pub const BridgeHubWococoChainId: bp_runtime::ChainId = bp_runtime::BRIDGE_HUB_WOCOCO_CHAIN_ID;
pub BridgeRococoToWococoMessagesPalletInstance: InteriorMultiLocation = X1(PalletInstance(<BridgeWococoMessages as PalletInfoAccess>::index() as u8));
pub BridgeHubRococoUniversalLocation: InteriorMultiLocation = X2(GlobalConsensus(Rococo), Parachain(ParachainInfo::parachain_id().into()));
pub WococoGlobalConsensusNetwork: NetworkId = NetworkId::Wococo;
pub ActiveOutboundLanesToBridgeHubWococo: &'static [bp_messages::LaneId] = &[XCM_LANE_FOR_ASSET_HUB_ROCOCO_TO_ASSET_HUB_WOCOCO];
pub const AssetHubRococoToAssetHubWococoMessagesLane: bp_messages::LaneId = XCM_LANE_FOR_ASSET_HUB_ROCOCO_TO_ASSET_HUB_WOCOCO;
// see the `FEE_BOOST_PER_MESSAGE` constant to get the meaning of this value
pub PriorityBoostPerMessage: u64 = 182_044_444_444_444;
pub AssetHubRococoParaId: cumulus_primitives_core::ParaId = bp_asset_hub_rococo::ASSET_HUB_ROCOCO_PARACHAIN_ID.into();
pub AssetHubWococoParaId: cumulus_primitives_core::ParaId = bp_asset_hub_wococo::ASSET_HUB_WOCOCO_PARACHAIN_ID.into();
pub FromAssetHubRococoToAssetHubWococoRoute: SenderAndLane = SenderAndLane::new(
ParentThen(X1(Parachain(AssetHubRococoParaId::get().into()))).into(),
XCM_LANE_FOR_ASSET_HUB_ROCOCO_TO_ASSET_HUB_WOCOCO,
);
pub CongestedMessage: Xcm<()> = build_congestion_message(true).into();
pub UncongestedMessage: Xcm<()> = build_congestion_message(false).into();
}
pub const XCM_LANE_FOR_ASSET_HUB_ROCOCO_TO_ASSET_HUB_WOCOCO: LaneId = LaneId([0, 0, 0, 1]);
fn build_congestion_message<Call>(is_congested: bool) -> sp_std::vec::Vec<Instruction<Call>> {
sp_std::vec![
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
Transact {
origin_kind: OriginKind::Xcm,
require_weight_at_most:
bp_asset_hub_rococo::XcmBridgeHubRouterTransactCallMaxWeight::get(),
call: bp_asset_hub_rococo::Call::ToWococoXcmRouter(
bp_asset_hub_rococo::XcmBridgeHubRouterCall::report_bridge_status {
bridge_id: Default::default(),
is_congested,
}
)
.encode()
.into(),
}
]
}
/// Proof of messages, coming from Wococo.
pub type FromWococoBridgeHubMessagesProof =
FromBridgedChainMessagesProof<bp_bridge_hub_wococo::Hash>;
/// Messages delivery proof for Rococo Bridge Hub -> Wococo Bridge Hub messages.
pub type ToWococoBridgeHubMessagesDeliveryProof =
FromBridgedChainMessagesDeliveryProof<bp_bridge_hub_wococo::Hash>;
/// Dispatches received XCM messages from other bridge
type FromWococoMessageBlobDispatcher = BridgeBlobDispatcher<
XcmRouter,
BridgeHubRococoUniversalLocation,
BridgeRococoToWococoMessagesPalletInstance,
>;
/// Export XCM messages to be relayed to the other side
pub type ToBridgeHubWococoHaulBlobExporter = HaulBlobExporter<
XcmBlobHaulerAdapter<ToBridgeHubWococoXcmBlobHauler>,
WococoGlobalConsensusNetwork,
(),
>;
pub struct ToBridgeHubWococoXcmBlobHauler;
impl XcmBlobHauler for ToBridgeHubWococoXcmBlobHauler {
type Runtime = Runtime;
type MessagesInstance = WithBridgeHubWococoMessagesInstance;
type SenderAndLane = FromAssetHubRococoToAssetHubWococoRoute;
type ToSourceChainSender = XcmRouter;
type CongestedMessage = CongestedMessage;
type UncongestedMessage = UncongestedMessage;
}
/// On messages delivered callback.
type OnMessagesDeliveredFromWococo = XcmBlobHaulerAdapter<ToBridgeHubWococoXcmBlobHauler>;
/// Messaging Bridge configuration for BridgeHubRococo -> BridgeHubWococo
pub struct WithBridgeHubWococoMessageBridge;
impl MessageBridge for WithBridgeHubWococoMessageBridge {
const BRIDGED_MESSAGES_PALLET_NAME: &'static str =
bp_bridge_hub_rococo::WITH_BRIDGE_HUB_ROCOCO_MESSAGES_PALLET_NAME;
type ThisChain = BridgeHubRococo;
type BridgedChain = BridgeHubWococo;
type BridgedHeaderChain = pallet_bridge_parachains::ParachainHeaders<
Runtime,
BridgeParachainWococoInstance,
bp_bridge_hub_wococo::BridgeHubWococo,
>;
}
/// Message verifier for BridgeHubWococo messages sent from BridgeHubRococo
pub type ToBridgeHubWococoMessageVerifier =
messages::source::FromThisChainMessageVerifier<WithBridgeHubWococoMessageBridge>;
/// Maximal outbound payload size of BridgeHubRococo -> BridgeHubWococo messages.
pub type ToBridgeHubWococoMaximalOutboundPayloadSize =
messages::source::FromThisChainMaximalOutboundPayloadSize<WithBridgeHubWococoMessageBridge>;
/// BridgeHubWococo chain from message lane point of view.
#[derive(RuntimeDebug, Clone, Copy)]
pub struct BridgeHubWococo;
impl UnderlyingChainProvider for BridgeHubWococo {
type Chain = bp_bridge_hub_wococo::BridgeHubWococo;
}
impl messages::BridgedChainWithMessages for BridgeHubWococo {}
/// BridgeHubRococo chain from message lane point of view.
#[derive(RuntimeDebug, Clone, Copy)]
pub struct BridgeHubRococo;
impl UnderlyingChainProvider for BridgeHubRococo {
type Chain = bp_bridge_hub_rococo::BridgeHubRococo;
}
impl ThisChainWithMessages for BridgeHubRococo {
type RuntimeOrigin = RuntimeOrigin;
}
/// Signed extension that refunds relayers that are delivering messages from the Wococo parachain.
pub type OnBridgeHubRococoRefundBridgeHubWococoMessages = RefundSignedExtensionAdapter<
RefundBridgedParachainMessages<
Runtime,
RefundableParachain<BridgeParachainWococoInstance, bp_bridge_hub_wococo::BridgeHubWococo>,
RefundableMessagesLane<
WithBridgeHubWococoMessagesInstance,
AssetHubRococoToAssetHubWococoMessagesLane,
>,
ActualFeeRefund<Runtime>,
PriorityBoostPerMessage,
StrOnBridgeHubRococoRefundBridgeHubWococoMessages,
>,
>;
bp_runtime::generate_static_str_provider!(OnBridgeHubRococoRefundBridgeHubWococoMessages);
/// Add XCM messages support for BridgeHubRococo to support Rococo->Wococo XCM messages
pub type WithBridgeHubWococoMessagesInstance = pallet_bridge_messages::Instance1;
impl pallet_bridge_messages::Config<WithBridgeHubWococoMessagesInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = weights::pallet_bridge_messages_rococo_to_wococo::WeightInfo<Runtime>;
type BridgedChainId = BridgeHubWococoChainId;
type ActiveOutboundLanes = ActiveOutboundLanesToBridgeHubWococo;
type MaxUnrewardedRelayerEntriesAtInboundLane = MaxUnrewardedRelayerEntriesAtInboundLane;
type MaxUnconfirmedMessagesAtInboundLane = MaxUnconfirmedMessagesAtInboundLane;
type MaximalOutboundPayloadSize = ToBridgeHubWococoMaximalOutboundPayloadSize;
type OutboundPayload = XcmAsPlainPayload;
type InboundPayload = XcmAsPlainPayload;
type InboundRelayer = AccountId;
type DeliveryPayments = ();
type TargetHeaderChain = TargetHeaderChainAdapter<WithBridgeHubWococoMessageBridge>;
type LaneMessageVerifier = ToBridgeHubWococoMessageVerifier;
type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
Runtime,
WithBridgeHubWococoMessagesInstance,
DeliveryRewardInBalance,
>;
type SourceHeaderChain = SourceHeaderChainAdapter<WithBridgeHubWococoMessageBridge>;
type MessageDispatch = XcmBlobMessageDispatch<
FromWococoMessageBlobDispatcher,
Self::WeightInfo,
cumulus_pallet_xcmp_queue::bridging::OutXcmpChannelStatusProvider<
AssetHubRococoParaId,
Runtime,
>,
>;
type OnMessagesDelivered = OnMessagesDeliveredFromWococo;
}
#[cfg(test)]
mod tests {
use super::*;
use crate::bridge_common_config::BridgeGrandpaWococoInstance;
use bridge_runtime_common::{
assert_complete_bridge_types,
integrity::{
assert_complete_bridge_constants, check_message_lane_weights,
AssertBridgeMessagesPalletConstants, AssertBridgePalletNames, AssertChainConstants,
AssertCompleteBridgeConstants,
},
};
use parachains_common::{rococo, Balance};
/// Every additional message in the message delivery transaction boosts its priority.
/// So the priority of transaction with `N+1` messages is larger than priority of
/// transaction with `N` messages by the `PriorityBoostPerMessage`.
///
/// Economically, it is an equivalent of adding tip to the transaction with `N` messages.
/// The `FEE_BOOST_PER_MESSAGE` constant is the value of this tip.
///
/// We want this tip to be large enough (delivery transactions with more messages = less
/// operational costs and a faster bridge), so this value should be significant.
const FEE_BOOST_PER_MESSAGE: Balance = 2 * rococo::currency::UNITS;
#[test]
fn ensure_bridge_hub_rococo_message_lane_weights_are_correct() {
check_message_lane_weights::<
bp_bridge_hub_rococo::BridgeHubRococo,
Runtime,
WithBridgeHubWococoMessagesInstance,
>(
bp_bridge_hub_wococo::EXTRA_STORAGE_PROOF_SIZE,
bp_bridge_hub_rococo::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX,
bp_bridge_hub_rococo::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
true,
);
}
#[test]
fn ensure_bridge_integrity() {
assert_complete_bridge_types!(
runtime: Runtime,
with_bridged_chain_grandpa_instance: BridgeGrandpaWococoInstance,
with_bridged_chain_messages_instance: WithBridgeHubWococoMessagesInstance,
bridge: WithBridgeHubWococoMessageBridge,
this_chain: bp_rococo::Rococo,
bridged_chain: bp_wococo::Wococo,
);
assert_complete_bridge_constants::<
Runtime,
BridgeGrandpaWococoInstance,
WithBridgeHubWococoMessagesInstance,
WithBridgeHubWococoMessageBridge,
>(AssertCompleteBridgeConstants {
this_chain_constants: AssertChainConstants {
block_length: bp_bridge_hub_rococo::BlockLength::get(),
block_weights: bp_bridge_hub_rococo::BlockWeights::get(),
},
messages_pallet_constants: AssertBridgeMessagesPalletConstants {
max_unrewarded_relayers_in_bridged_confirmation_tx:
bp_bridge_hub_wococo::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX,
max_unconfirmed_messages_in_bridged_confirmation_tx:
bp_bridge_hub_wococo::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
bridged_chain_id: bp_runtime::BRIDGE_HUB_WOCOCO_CHAIN_ID,
},
pallet_names: AssertBridgePalletNames {
with_this_chain_messages_pallet_name:
bp_bridge_hub_rococo::WITH_BRIDGE_HUB_ROCOCO_MESSAGES_PALLET_NAME,
with_bridged_chain_grandpa_pallet_name: bp_wococo::WITH_WOCOCO_GRANDPA_PALLET_NAME,
with_bridged_chain_messages_pallet_name:
bp_bridge_hub_wococo::WITH_BRIDGE_HUB_WOCOCO_MESSAGES_PALLET_NAME,
},
});
bridge_runtime_common::priority_calculator::ensure_priority_boost_is_sane::<
Runtime,
WithBridgeHubWococoMessagesInstance,
PriorityBoostPerMessage,
>(FEE_BOOST_PER_MESSAGE);
assert_eq!(
BridgeRococoToWococoMessagesPalletInstance::get(),
X1(PalletInstance(
bp_bridge_hub_rococo::WITH_BRIDGE_ROCOCO_TO_WOCOCO_MESSAGES_PALLET_INDEX
))
);
}
}
@@ -16,14 +16,7 @@
//! # Bridge Hub Rococo Runtime
//!
//! This runtime is also used for Bridge Hub Wococo. We dont want to create
//! another exact copy of Bridge Hub Rococo, so we injected some tweaks backed by `RuntimeFlavor`
//! and `pub storage Flavor: RuntimeFlavor`. (For example this is needed for successful asset
//! transfer between Asset Hub Rococo and Asset Hub Wococo, where we need to have correct
//! `xcm_config::UniversalLocation` with correct `GlobalConsensus`.
//!
//! This runtime currently supports bridging between:
//! - Rococo <> Wococo
//! - Rococo <> Westend
#![cfg_attr(not(feature = "std"), no_std)]
@@ -35,13 +28,10 @@
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
pub mod bridge_common_config;
pub mod bridge_to_rococo_config;
pub mod bridge_to_westend_config;
pub mod bridge_to_wococo_config;
mod weights;
pub mod xcm_config;
use codec::{Decode, Encode};
use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases;
use sp_api::impl_runtime_apis;
use sp_core::{crypto::KeyTypeId, OpaqueMetadata};
@@ -93,15 +83,6 @@ use parachains_common::{
HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION,
};
/// Enum for handling differences in the runtime configuration for BridgeHubRococo vs
/// BridgeHubWococo.
#[derive(Default, Eq, PartialEq, Debug, Clone, Copy, Decode, Encode)]
pub enum RuntimeFlavor {
#[default]
Rococo,
Wococo,
}
/// The address format for describing accounts.
pub type Address = MultiAddress<AccountId, ()>;
@@ -125,11 +106,7 @@ pub type SignedExtra = (
frame_system::CheckWeight<Runtime>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
BridgeRejectObsoleteHeadersAndMessages,
(
bridge_to_wococo_config::OnBridgeHubRococoRefundBridgeHubWococoMessages,
bridge_to_westend_config::OnBridgeHubRococoRefundBridgeHubWestendMessages,
bridge_to_rococo_config::OnBridgeHubWococoRefundBridgeHubRococoMessages,
),
(bridge_to_westend_config::OnBridgeHubRococoRefundBridgeHubWestendMessages,),
);
/// Unchecked extrinsic type as expected by this runtime.
@@ -529,37 +506,19 @@ construct_runtime!(
Utility: pallet_utility::{Pallet, Call, Event} = 40,
Multisig: pallet_multisig::{Pallet, Call, Storage, Event<T>} = 36,
// Rococo, Wococo and Westend BridgeHubs are sharing the runtime, so this runtime has several sets of
// bridge pallets.
//
// BridgeHubRococo uses:
// - BridgeWococoGrandpa
// - BridgeWestendGrandpa
// - BridgeWococoParachains
// - BridgeWestendParachains
// - BridgeWococoMessages
// - BridgeWestendMessages
// - BridgeRelayers
//
// BridgeHubWococo uses:
// - BridgeRococoGrandpa
// - BridgeRococoParachains
// - BridgeRococoMessages
// - BridgeRelayers
// GRANDPA bridge modules.
BridgeWococoGrandpa: pallet_bridge_grandpa::<Instance1>::{Pallet, Call, Storage, Event<T>, Config<T>} = 41,
BridgeRococoGrandpa: pallet_bridge_grandpa::<Instance2>::{Pallet, Call, Storage, Event<T>, Config<T>} = 43,
BridgeWestendGrandpa: pallet_bridge_grandpa::<Instance3>::{Pallet, Call, Storage, Event<T>, Config<T>} = 48,
// Parachain bridge modules.
BridgeWococoParachains: pallet_bridge_parachains::<Instance1>::{Pallet, Call, Storage, Event<T>} = 42,
BridgeRococoParachains: pallet_bridge_parachains::<Instance2>::{Pallet, Call, Storage, Event<T>} = 44,
BridgeWestendParachains: pallet_bridge_parachains::<Instance3>::{Pallet, Call, Storage, Event<T>} = 49,
// Messaging bridge modules.
BridgeWococoMessages: pallet_bridge_messages::<Instance1>::{Pallet, Call, Storage, Event<T>, Config<T>} = 46,
BridgeRococoMessages: pallet_bridge_messages::<Instance2>::{Pallet, Call, Storage, Event<T>, Config<T>} = 45,
BridgeWestendMessages: pallet_bridge_messages::<Instance3>::{Pallet, Call, Storage, Event<T>, Config<T>} = 51,
BridgeRelayers: pallet_bridge_relayers::{Pallet, Call, Storage, Event<T>} = 47,
@@ -573,11 +532,11 @@ construct_runtime!(
bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages! {
RuntimeCall, AccountId,
// Grandpa
BridgeRococoGrandpa, BridgeWococoGrandpa, BridgeWestendGrandpa,
BridgeWestendGrandpa,
// Parachains
BridgeRococoParachains, BridgeWococoParachains, BridgeWestendParachains,
BridgeWestendParachains,
// Messages
BridgeRococoMessages, BridgeWococoMessages, BridgeWestendMessages
BridgeWestendMessages
}
#[cfg(feature = "runtime-benchmarks")]
@@ -600,15 +559,9 @@ mod benches {
[pallet_xcm_benchmarks::fungible, XcmBalances]
[pallet_xcm_benchmarks::generic, XcmGeneric]
// Bridge pallets
[pallet_bridge_grandpa, WococoFinality]
[pallet_bridge_grandpa, WestendFinality]
[pallet_bridge_grandpa, RococoFinality]
[pallet_bridge_parachains, WithinWococo]
[pallet_bridge_parachains, WithinWestend]
[pallet_bridge_parachains, WithinRococo]
[pallet_bridge_messages, RococoToWococo]
[pallet_bridge_messages, RococoToWestend]
[pallet_bridge_messages, WococoToRococo]
[pallet_bridge_relayers, BridgeRelayersBench::<Runtime>]
);
}
@@ -757,26 +710,6 @@ impl_runtime_apis! {
}
}
impl bp_rococo::RococoFinalityApi<Block> for Runtime {
fn best_finalized() -> Option<HeaderId<bp_rococo::Hash, bp_rococo::BlockNumber>> {
BridgeRococoGrandpa::best_finalized()
}
fn synced_headers_grandpa_info(
) -> Vec<bp_header_chain::StoredHeaderGrandpaInfo<bp_rococo::Header>> {
BridgeRococoGrandpa::synced_headers_grandpa_info()
}
}
impl bp_wococo::WococoFinalityApi<Block> for Runtime {
fn best_finalized() -> Option<HeaderId<bp_wococo::Hash, bp_wococo::BlockNumber>> {
BridgeWococoGrandpa::best_finalized()
}
fn synced_headers_grandpa_info(
) -> Vec<bp_header_chain::StoredHeaderGrandpaInfo<bp_wococo::Header>> {
BridgeWococoGrandpa::synced_headers_grandpa_info()
}
}
impl bp_westend::WestendFinalityApi<Block> for Runtime {
fn best_finalized() -> Option<HeaderId<bp_westend::Hash, bp_westend::BlockNumber>> {
BridgeWestendGrandpa::best_finalized()
@@ -787,22 +720,6 @@ impl_runtime_apis! {
}
}
impl bp_bridge_hub_rococo::BridgeHubRococoFinalityApi<Block> for Runtime {
fn best_finalized() -> Option<HeaderId<Hash, BlockNumber>> {
BridgeRococoParachains::best_parachain_head_id::<
bp_bridge_hub_rococo::BridgeHubRococo
>().unwrap_or(None)
}
}
impl bp_bridge_hub_wococo::BridgeHubWococoFinalityApi<Block> for Runtime {
fn best_finalized() -> Option<HeaderId<Hash, BlockNumber>> {
BridgeWococoParachains::best_parachain_head_id::<
bp_bridge_hub_wococo::BridgeHubWococo
>().unwrap_or(None)
}
}
impl bp_bridge_hub_westend::BridgeHubWestendFinalityApi<Block> for Runtime {
fn best_finalized() -> Option<HeaderId<Hash, BlockNumber>> {
BridgeWestendParachains::best_parachain_head_id::<
@@ -811,33 +728,6 @@ impl_runtime_apis! {
}
}
// This is exposed by BridgeHubRococo
impl bp_bridge_hub_wococo::FromBridgeHubWococoInboundLaneApi<Block> for Runtime {
fn message_details(
lane: bp_messages::LaneId,
messages: Vec<(bp_messages::MessagePayload, bp_messages::OutboundMessageDetails)>,
) -> Vec<bp_messages::InboundMessageDetails> {
bridge_runtime_common::messages_api::inbound_message_details::<
Runtime,
bridge_to_wococo_config::WithBridgeHubWococoMessagesInstance,
>(lane, messages)
}
}
// This is exposed by BridgeHubRococo
impl bp_bridge_hub_wococo::ToBridgeHubWococoOutboundLaneApi<Block> for Runtime {
fn message_details(
lane: bp_messages::LaneId,
begin: bp_messages::MessageNonce,
end: bp_messages::MessageNonce,
) -> Vec<bp_messages::OutboundMessageDetails> {
bridge_runtime_common::messages_api::outbound_message_details::<
Runtime,
bridge_to_wococo_config::WithBridgeHubWococoMessagesInstance,
>(lane, begin, end)
}
}
// This is exposed by BridgeHubRococo
impl bp_bridge_hub_westend::FromBridgeHubWestendInboundLaneApi<Block> for Runtime {
fn message_details(
@@ -865,45 +755,6 @@ impl_runtime_apis! {
}
}
// This is exposed by BridgeHubWococo
impl bp_bridge_hub_rococo::FromBridgeHubRococoInboundLaneApi<Block> for Runtime {
fn message_details(
lane: bp_messages::LaneId,
messages: Vec<(bp_messages::MessagePayload, bp_messages::OutboundMessageDetails)>,
) -> Vec<bp_messages::InboundMessageDetails> {
// use different instance according to flavor
match xcm_config::Flavor::get() {
RuntimeFlavor::Wococo => {
bridge_runtime_common::messages_api::inbound_message_details::<
Runtime,
bridge_to_rococo_config::WithBridgeHubRococoMessagesInstance,
>(lane, messages)
},
flavor @ _ => unimplemented!("Unsupported `FromBridgeHubRococoInboundLaneApi` for flavor: {:?}", flavor)
}
}
}
// This is exposed by BridgeHubWococo and BridgeHubWestend
impl bp_bridge_hub_rococo::ToBridgeHubRococoOutboundLaneApi<Block> for Runtime {
fn message_details(
lane: bp_messages::LaneId,
begin: bp_messages::MessageNonce,
end: bp_messages::MessageNonce,
) -> Vec<bp_messages::OutboundMessageDetails> {
// use different instance according to flavor
match xcm_config::Flavor::get() {
RuntimeFlavor::Wococo => {
bridge_runtime_common::messages_api::outbound_message_details::<
Runtime,
bridge_to_rococo_config::WithBridgeHubRococoMessagesInstance,
>(lane, begin, end)
},
flavor @ _ => unimplemented!("Unsupported `ToBridgeHubRococoOutboundLaneApi` for flavor: {:?}", flavor)
}
}
}
#[cfg(feature = "try-runtime")]
impl frame_try_runtime::TryRuntime<Block> for Runtime {
fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
@@ -943,15 +794,9 @@ impl_runtime_apis! {
use pallet_bridge_relayers::benchmarking::Pallet as BridgeRelayersBench;
// Change weight file names.
type WococoFinality = BridgeWococoGrandpa;
type WestendFinality = BridgeWestendGrandpa;
type RococoFinality = BridgeRococoGrandpa;
type WithinWococo = pallet_bridge_parachains::benchmarking::Pallet::<Runtime, bridge_common_config::BridgeParachainWococoInstance>;
type WithinWestend = pallet_bridge_parachains::benchmarking::Pallet::<Runtime, bridge_common_config::BridgeParachainWestendInstance>;
type WithinRococo = pallet_bridge_parachains::benchmarking::Pallet::<Runtime, bridge_common_config::BridgeParachainRococoInstance>;
type RococoToWococo = pallet_bridge_messages::benchmarking::Pallet ::<Runtime, bridge_to_wococo_config::WithBridgeHubWococoMessagesInstance>;
type RococoToWestend = pallet_bridge_messages::benchmarking::Pallet ::<Runtime, bridge_to_westend_config::WithBridgeHubWestendMessagesInstance>;
type WococoToRococo = pallet_bridge_messages::benchmarking::Pallet ::<Runtime, bridge_to_rococo_config::WithBridgeHubRococoMessagesInstance>;
let mut list = Vec::<BenchmarkList>::new();
list_benchmarks!(list, extra);
@@ -1098,7 +943,7 @@ impl_runtime_apis! {
fn export_message_origin_and_destination(
) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> {
Ok((TokenLocation::get(), NetworkId::Wococo, X1(Parachain(100))))
Ok((TokenLocation::get(), NetworkId::Westend, X1(Parachain(100))))
}
fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> {
@@ -1109,15 +954,9 @@ impl_runtime_apis! {
type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::<Runtime>;
type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::<Runtime>;
type WococoFinality = BridgeWococoGrandpa;
type WestendFinality = BridgeWestendGrandpa;
type RococoFinality = BridgeRococoGrandpa;
type WithinWococo = pallet_bridge_parachains::benchmarking::Pallet::<Runtime, bridge_common_config::BridgeParachainWococoInstance>;
type WithinWestend = pallet_bridge_parachains::benchmarking::Pallet::<Runtime, bridge_common_config::BridgeParachainWestendInstance>;
type WithinRococo = pallet_bridge_parachains::benchmarking::Pallet::<Runtime, bridge_common_config::BridgeParachainRococoInstance>;
type RococoToWococo = pallet_bridge_messages::benchmarking::Pallet ::<Runtime, bridge_to_wococo_config::WithBridgeHubWococoMessagesInstance>;
type RococoToWestend = pallet_bridge_messages::benchmarking::Pallet ::<Runtime, bridge_to_westend_config::WithBridgeHubWestendMessagesInstance>;
type WococoToRococo = pallet_bridge_messages::benchmarking::Pallet ::<Runtime, bridge_to_rococo_config::WithBridgeHubRococoMessagesInstance>;
use bridge_runtime_common::messages_benchmarking::{
prepare_message_delivery_proof_from_parachain,
@@ -1130,49 +969,6 @@ impl_runtime_apis! {
MessageProofParams,
};
impl BridgeMessagesConfig<bridge_to_wococo_config::WithBridgeHubWococoMessagesInstance> for Runtime {
fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool {
let bench_lane_id = <Self as BridgeMessagesConfig<bridge_to_wococo_config::WithBridgeHubWococoMessagesInstance>>::bench_lane_id();
let bridged_chain_id = bp_runtime::BRIDGE_HUB_WOCOCO_CHAIN_ID;
pallet_bridge_relayers::Pallet::<Runtime>::relayer_reward(
relayer,
bp_relayers::RewardsAccountParams::new(
bench_lane_id,
bridged_chain_id,
bp_relayers::RewardsAccountOwner::BridgedChain
)
).is_some()
}
fn prepare_message_proof(
params: MessageProofParams,
) -> (bridge_to_wococo_config::FromWococoBridgeHubMessagesProof, Weight) {
use cumulus_primitives_core::XcmpMessageSource;
assert!(XcmpQueue::take_outbound_messages(usize::MAX).is_empty());
ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests(42.into());
prepare_message_proof_from_parachain::<
Runtime,
bridge_common_config::BridgeGrandpaWococoInstance,
bridge_to_wococo_config::WithBridgeHubWococoMessageBridge,
>(params, generate_xcm_builder_bridge_message_sample(X2(GlobalConsensus(Rococo), Parachain(42))))
}
fn prepare_message_delivery_proof(
params: MessageDeliveryProofParams<AccountId>,
) -> bridge_to_wococo_config::ToWococoBridgeHubMessagesDeliveryProof {
prepare_message_delivery_proof_from_parachain::<
Runtime,
bridge_common_config::BridgeGrandpaWococoInstance,
bridge_to_wococo_config::WithBridgeHubWococoMessageBridge,
>(params)
}
fn is_message_successfully_dispatched(_nonce: bp_messages::MessageNonce) -> bool {
use cumulus_primitives_core::XcmpMessageSource;
!XcmpQueue::take_outbound_messages(usize::MAX).is_empty()
}
}
impl BridgeMessagesConfig<bridge_to_westend_config::WithBridgeHubWestendMessagesInstance> for Runtime {
fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool {
let bench_lane_id = <Self as BridgeMessagesConfig<bridge_to_westend_config::WithBridgeHubWestendMessagesInstance>>::bench_lane_id();
@@ -1216,49 +1012,6 @@ impl_runtime_apis! {
}
}
impl BridgeMessagesConfig<bridge_to_rococo_config::WithBridgeHubRococoMessagesInstance> for Runtime {
fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool {
let bench_lane_id = <Self as BridgeMessagesConfig<bridge_to_rococo_config::WithBridgeHubRococoMessagesInstance>>::bench_lane_id();
let bridged_chain_id = bp_runtime::BRIDGE_HUB_ROCOCO_CHAIN_ID;
pallet_bridge_relayers::Pallet::<Runtime>::relayer_reward(
relayer,
bp_relayers::RewardsAccountParams::new(
bench_lane_id,
bridged_chain_id,
bp_relayers::RewardsAccountOwner::BridgedChain
)
).is_some()
}
fn prepare_message_proof(
params: MessageProofParams,
) -> (bridge_to_rococo_config::FromRococoBridgeHubMessagesProof, Weight) {
use cumulus_primitives_core::XcmpMessageSource;
assert!(XcmpQueue::take_outbound_messages(usize::MAX).is_empty());
ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests(42.into());
prepare_message_proof_from_parachain::<
Runtime,
bridge_common_config::BridgeGrandpaRococoInstance,
bridge_to_rococo_config::WithBridgeHubRococoMessageBridge,
>(params, generate_xcm_builder_bridge_message_sample(X2(GlobalConsensus(Wococo), Parachain(42))))
}
fn prepare_message_delivery_proof(
params: MessageDeliveryProofParams<AccountId>,
) -> bridge_to_rococo_config::ToRococoBridgeHubMessagesDeliveryProof {
prepare_message_delivery_proof_from_parachain::<
Runtime,
bridge_common_config::BridgeGrandpaRococoInstance,
bridge_to_rococo_config::WithBridgeHubRococoMessageBridge,
>(params)
}
fn is_message_successfully_dispatched(_nonce: bp_messages::MessageNonce) -> bool {
use cumulus_primitives_core::XcmpMessageSource;
!XcmpQueue::take_outbound_messages(usize::MAX).is_empty()
}
}
use bridge_runtime_common::parachains_benchmarking::prepare_parachain_heads_proof;
use pallet_bridge_parachains::benchmarking::Config as BridgeParachainsConfig;
use pallet_bridge_relayers::benchmarking::{
@@ -1266,30 +1019,6 @@ impl_runtime_apis! {
Config as BridgeRelayersConfig,
};
impl BridgeParachainsConfig<bridge_common_config::BridgeParachainWococoInstance> for Runtime {
fn parachains() -> Vec<bp_polkadot_core::parachains::ParaId> {
use bp_runtime::Parachain;
vec![bp_polkadot_core::parachains::ParaId(bp_bridge_hub_wococo::BridgeHubWococo::PARACHAIN_ID)]
}
fn prepare_parachain_heads_proof(
parachains: &[bp_polkadot_core::parachains::ParaId],
parachain_head_size: u32,
proof_size: bp_runtime::StorageProofSize,
) -> (
pallet_bridge_parachains::RelayBlockNumber,
pallet_bridge_parachains::RelayBlockHash,
bp_polkadot_core::parachains::ParaHeadsProof,
Vec<(bp_polkadot_core::parachains::ParaId, bp_polkadot_core::parachains::ParaHash)>,
) {
prepare_parachain_heads_proof::<Runtime, bridge_common_config::BridgeParachainWococoInstance>(
parachains,
parachain_head_size,
proof_size,
)
}
}
impl BridgeParachainsConfig<bridge_common_config::BridgeParachainWestendInstance> for Runtime {
fn parachains() -> Vec<bp_polkadot_core::parachains::ParaId> {
use bp_runtime::Parachain;
@@ -1314,30 +1043,6 @@ impl_runtime_apis! {
}
}
impl BridgeParachainsConfig<bridge_common_config::BridgeParachainRococoInstance> for Runtime {
fn parachains() -> Vec<bp_polkadot_core::parachains::ParaId> {
use bp_runtime::Parachain;
vec![bp_polkadot_core::parachains::ParaId(bp_bridge_hub_rococo::BridgeHubRococo::PARACHAIN_ID)]
}
fn prepare_parachain_heads_proof(
parachains: &[bp_polkadot_core::parachains::ParaId],
parachain_head_size: u32,
proof_size: bp_runtime::StorageProofSize,
) -> (
pallet_bridge_parachains::RelayBlockNumber,
pallet_bridge_parachains::RelayBlockHash,
bp_polkadot_core::parachains::ParaHeadsProof,
Vec<(bp_polkadot_core::parachains::ParaId, bp_polkadot_core::parachains::ParaHash)>,
) {
prepare_parachain_heads_proof::<Runtime, bridge_common_config::BridgeParachainRococoInstance>(
parachains,
parachain_head_size,
proof_size,
)
}
}
impl BridgeRelayersConfig for Runtime {
fn prepare_rewards_account(
account_params: bp_relayers::RewardsAccountParams,
@@ -1418,11 +1123,7 @@ mod tests {
frame_system::CheckWeight::new(),
pallet_transaction_payment::ChargeTransactionPayment::from(10),
BridgeRejectObsoleteHeadersAndMessages,
(
bridge_to_wococo_config::OnBridgeHubRococoRefundBridgeHubWococoMessages::default(),
bridge_to_westend_config::OnBridgeHubRococoRefundBridgeHubWestendMessages::default(),
bridge_to_rococo_config::OnBridgeHubWococoRefundBridgeHubRococoMessages::default(),
),
(bridge_to_westend_config::OnBridgeHubRococoRefundBridgeHubWestendMessages::default(),)
);
// for BridgeHubRococo
@@ -1442,24 +1143,6 @@ mod tests {
bhr_indirect_payload.additional_signed().unwrap().encode()
)
}
// for BridgeHubWococo
{
let bhw_indirect_payload = bp_bridge_hub_wococo::SignedExtension::from_params(
VERSION.spec_version,
VERSION.transaction_version,
bp_runtime::TransactionEra::Immortal,
System::block_hash(BlockNumber::zero()),
10,
10,
(((), ()), ((), ())),
);
assert_eq!(payload.encode(), bhw_indirect_payload.encode());
assert_eq!(
payload.additional_signed().unwrap().encode(),
bhw_indirect_payload.additional_signed().unwrap().encode()
)
}
});
}
}
@@ -17,6 +17,9 @@
//! Expose the auto generated weight files.
use ::pallet_bridge_messages::WeightInfoExt as MessagesWeightInfoExt;
use ::pallet_bridge_parachains::WeightInfoExt as ParachainsWeightInfoExt;
pub mod block_weights;
pub mod cumulus_pallet_dmp_queue;
pub mod cumulus_pallet_parachain_system;
@@ -24,15 +27,9 @@ pub mod cumulus_pallet_xcmp_queue;
pub mod extrinsic_weights;
pub mod frame_system;
pub mod pallet_balances;
pub mod pallet_bridge_grandpa_rococo_finality;
pub mod pallet_bridge_grandpa_westend_finality;
pub mod pallet_bridge_grandpa_wococo_finality;
pub mod pallet_bridge_messages_rococo_to_westend;
pub mod pallet_bridge_messages_rococo_to_wococo;
pub mod pallet_bridge_messages_wococo_to_rococo;
pub mod pallet_bridge_parachains_within_rococo;
pub mod pallet_bridge_parachains_within_westend;
pub mod pallet_bridge_parachains_within_wococo;
pub mod pallet_bridge_grandpa;
pub mod pallet_bridge_messages;
pub mod pallet_bridge_parachains;
pub mod pallet_bridge_relayers;
pub mod pallet_collator_selection;
pub mod pallet_message_queue;
@@ -56,43 +53,7 @@ use frame_support::weights::Weight;
// import trait from dependency module
use ::pallet_bridge_relayers::WeightInfoExt as _;
impl pallet_bridge_messages::WeightInfoExt
for pallet_bridge_messages_wococo_to_rococo::WeightInfo<crate::Runtime>
{
fn expected_extra_storage_proof_size() -> u32 {
bp_bridge_hub_rococo::EXTRA_STORAGE_PROOF_SIZE
}
fn receive_messages_proof_overhead_from_runtime() -> Weight {
pallet_bridge_relayers::WeightInfo::<Runtime>::receive_messages_proof_overhead_from_runtime(
)
}
fn receive_messages_delivery_proof_overhead_from_runtime() -> Weight {
pallet_bridge_relayers::WeightInfo::<Runtime>::receive_messages_delivery_proof_overhead_from_runtime()
}
}
impl pallet_bridge_messages::WeightInfoExt
for pallet_bridge_messages_rococo_to_wococo::WeightInfo<crate::Runtime>
{
fn expected_extra_storage_proof_size() -> u32 {
bp_bridge_hub_wococo::EXTRA_STORAGE_PROOF_SIZE
}
fn receive_messages_proof_overhead_from_runtime() -> Weight {
pallet_bridge_relayers::WeightInfo::<Runtime>::receive_messages_proof_overhead_from_runtime(
)
}
fn receive_messages_delivery_proof_overhead_from_runtime() -> Weight {
pallet_bridge_relayers::WeightInfo::<Runtime>::receive_messages_delivery_proof_overhead_from_runtime()
}
}
impl pallet_bridge_messages::WeightInfoExt
for pallet_bridge_messages_rococo_to_westend::WeightInfo<crate::Runtime>
{
impl MessagesWeightInfoExt for pallet_bridge_messages::WeightInfo<crate::Runtime> {
fn expected_extra_storage_proof_size() -> u32 {
bp_bridge_hub_westend::EXTRA_STORAGE_PROOF_SIZE
}
@@ -107,26 +68,8 @@ impl pallet_bridge_messages::WeightInfoExt
}
}
impl pallet_bridge_parachains::WeightInfoExt
for pallet_bridge_parachains_within_rococo::WeightInfo<crate::Runtime>
{
fn expected_extra_storage_proof_size() -> u32 {
bp_bridge_hub_rococo::EXTRA_STORAGE_PROOF_SIZE
}
}
impl pallet_bridge_parachains::WeightInfoExt
for pallet_bridge_parachains_within_westend::WeightInfo<crate::Runtime>
{
impl ParachainsWeightInfoExt for pallet_bridge_parachains::WeightInfo<crate::Runtime> {
fn expected_extra_storage_proof_size() -> u32 {
bp_bridge_hub_westend::EXTRA_STORAGE_PROOF_SIZE
}
}
impl pallet_bridge_parachains::WeightInfoExt
for pallet_bridge_parachains_within_wococo::WeightInfo<crate::Runtime>
{
fn expected_extra_storage_proof_size() -> u32 {
bp_bridge_hub_wococo::EXTRA_STORAGE_PROOF_SIZE
}
}
@@ -1,40 +1,41 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// This file is part of Cumulus.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// 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 <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_bridge_grandpa`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-05-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-11-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024
//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// target/production/polkadot-parachain
// benchmark
// pallet
// --chain=bridge-hub-rococo-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_bridge_grandpa
// --extrinsic=*
// --steps=50
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_bridge_grandpa.rs
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=pallet_bridge_grandpa
// --chain=bridge-hub-rococo-dev
// --header=./cumulus/file_header.txt
// --output=./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -47,33 +48,31 @@ use core::marker::PhantomData;
/// Weight functions for `pallet_bridge_grandpa`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_bridge_grandpa::WeightInfo for WeightInfo<T> {
/// Storage: BridgeRococoGrandpa PalletOperatingMode (r:1 w:0)
/// Proof: BridgeRococoGrandpa PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen)
/// Storage: BridgeRococoGrandpa BestFinalized (r:1 w:1)
/// Proof: BridgeRococoGrandpa BestFinalized (max_values: Some(1), max_size: Some(36), added: 531, mode: MaxEncodedLen)
/// Storage: BridgeRococoGrandpa CurrentAuthoritySet (r:1 w:0)
/// Proof: BridgeRococoGrandpa CurrentAuthoritySet (max_values: Some(1), max_size: Some(50250), added: 50745, mode: MaxEncodedLen)
/// Storage: BridgeRococoGrandpa ImportedHashesPointer (r:1 w:1)
/// Proof: BridgeRococoGrandpa ImportedHashesPointer (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
/// Storage: BridgeRococoGrandpa ImportedHashes (r:1 w:1)
/// Proof: BridgeRococoGrandpa ImportedHashes (max_values: Some(1024), max_size: Some(36), added: 1521, mode: MaxEncodedLen)
/// Storage: BridgeRococoGrandpa ImportedHeaders (r:0 w:2)
/// Proof: BridgeRococoGrandpa ImportedHeaders (max_values: Some(1024), max_size: Some(68), added: 1553, mode: MaxEncodedLen)
/// The range of component `p` is `[1, 838]`.
/// The range of component `v` is `[50, 100]`.
/// Storage: `BridgeWestendGrandpa::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWestendGrandpa::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendGrandpa::BestFinalized` (r:1 w:1)
/// Proof: `BridgeWestendGrandpa::BestFinalized` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendGrandpa::CurrentAuthoritySet` (r:1 w:0)
/// Proof: `BridgeWestendGrandpa::CurrentAuthoritySet` (`max_values`: Some(1), `max_size`: Some(50250), added: 50745, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendGrandpa::ImportedHashesPointer` (r:1 w:1)
/// Proof: `BridgeWestendGrandpa::ImportedHashesPointer` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendGrandpa::ImportedHashes` (r:1 w:1)
/// Proof: `BridgeWestendGrandpa::ImportedHashes` (`max_values`: Some(1024), `max_size`: Some(36), added: 1521, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendGrandpa::ImportedHeaders` (r:0 w:2)
/// Proof: `BridgeWestendGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 838]`.
/// The range of component `v` is `[50, 100]`.
fn submit_finality_proof(p: u32, v: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `231 + p * (60 ±0)`
// Measured: `335 + p * (60 ±0)`
// Estimated: `51735`
// Minimum execution time: 241_332_000 picoseconds.
Weight::from_parts(69_790_821, 0)
// Minimum execution time: 311_267_000 picoseconds.
Weight::from_parts(313_903_000, 0)
.saturating_add(Weight::from_parts(0, 51735))
// Standard Error: 6_013
.saturating_add(Weight::from_parts(47_580_554, 0).saturating_mul(p.into()))
// Standard Error: 100_298
.saturating_add(Weight::from_parts(1_213_475, 0).saturating_mul(v.into()))
// Standard Error: 4_779
.saturating_add(Weight::from_parts(55_265_953, 0).saturating_mul(p.into()))
// Standard Error: 36_883
.saturating_add(Weight::from_parts(153_660, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
@@ -1,82 +0,0 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pallet_bridge_grandpa`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-10-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-vmdtonbz-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
// Executed Command:
// target/production/polkadot-parachain
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=pallet_bridge_grandpa
// --chain=bridge-hub-rococo-dev
// --header=./cumulus/file_header.txt
// --output=./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_bridge_grandpa`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_bridge_grandpa::WeightInfo for WeightInfo<T> {
/// Storage: `BridgeRococoGrandpa::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoGrandpa::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoGrandpa::BestFinalized` (r:1 w:1)
/// Proof: `BridgeRococoGrandpa::BestFinalized` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoGrandpa::CurrentAuthoritySet` (r:1 w:0)
/// Proof: `BridgeRococoGrandpa::CurrentAuthoritySet` (`max_values`: Some(1), `max_size`: Some(50250), added: 50745, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoGrandpa::ImportedHashesPointer` (r:1 w:1)
/// Proof: `BridgeRococoGrandpa::ImportedHashesPointer` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoGrandpa::ImportedHashes` (r:1 w:1)
/// Proof: `BridgeRococoGrandpa::ImportedHashes` (`max_values`: Some(1024), `max_size`: Some(36), added: 1521, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoGrandpa::ImportedHeaders` (r:0 w:2)
/// Proof: `BridgeRococoGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 838]`.
/// The range of component `v` is `[50, 100]`.
/// The range of component `p` is `[1, 838]`.
/// The range of component `v` is `[50, 100]`.
/// The range of component `p` is `[1, 838]`.
/// The range of component `v` is `[50, 100]`.
fn submit_finality_proof(p: u32, v: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `268 + p * (60 ±0)`
// Estimated: `51735`
// Minimum execution time: 304_726_000 picoseconds.
Weight::from_parts(16_868_060, 0)
.saturating_add(Weight::from_parts(0, 51735))
// Standard Error: 2_802
.saturating_add(Weight::from_parts(55_200_017, 0).saturating_mul(p.into()))
// Standard Error: 46_745
.saturating_add(Weight::from_parts(2_689_151, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
}
@@ -1,83 +0,0 @@
// 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 <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_bridge_grandpa`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-10-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-vmdtonbz-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
// Executed Command:
// target/production/polkadot-parachain
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=pallet_bridge_grandpa
// --chain=bridge-hub-rococo-dev
// --header=./cumulus/file_header.txt
// --output=./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_bridge_grandpa`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_bridge_grandpa::WeightInfo for WeightInfo<T> {
/// Storage: `BridgeWestendGrandpa::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWestendGrandpa::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendGrandpa::BestFinalized` (r:1 w:1)
/// Proof: `BridgeWestendGrandpa::BestFinalized` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendGrandpa::CurrentAuthoritySet` (r:1 w:0)
/// Proof: `BridgeWestendGrandpa::CurrentAuthoritySet` (`max_values`: Some(1), `max_size`: Some(50250), added: 50745, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendGrandpa::ImportedHashesPointer` (r:1 w:1)
/// Proof: `BridgeWestendGrandpa::ImportedHashesPointer` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendGrandpa::ImportedHashes` (r:1 w:1)
/// Proof: `BridgeWestendGrandpa::ImportedHashes` (`max_values`: Some(1024), `max_size`: Some(36), added: 1521, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendGrandpa::ImportedHeaders` (r:0 w:2)
/// Proof: `BridgeWestendGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 838]`.
/// The range of component `v` is `[50, 100]`.
/// The range of component `p` is `[1, 838]`.
/// The range of component `v` is `[50, 100]`.
/// The range of component `p` is `[1, 838]`.
/// The range of component `v` is `[50, 100]`.
fn submit_finality_proof(p: u32, v: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `335 + p * (60 ±0)`
// Estimated: `51735`
// Minimum execution time: 305_905_000 picoseconds.
Weight::from_parts(2_636_863, 0)
.saturating_add(Weight::from_parts(0, 51735))
// Standard Error: 2_724
.saturating_add(Weight::from_parts(55_199_477, 0).saturating_mul(p.into()))
// Standard Error: 45_444
.saturating_add(Weight::from_parts(2_835_596, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
}
@@ -1,82 +0,0 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pallet_bridge_grandpa`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-10-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-vmdtonbz-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
// Executed Command:
// target/production/polkadot-parachain
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=pallet_bridge_grandpa
// --chain=bridge-hub-rococo-dev
// --header=./cumulus/file_header.txt
// --output=./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_bridge_grandpa`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_bridge_grandpa::WeightInfo for WeightInfo<T> {
/// Storage: `BridgeWococoGrandpa::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWococoGrandpa::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoGrandpa::BestFinalized` (r:1 w:1)
/// Proof: `BridgeWococoGrandpa::BestFinalized` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoGrandpa::CurrentAuthoritySet` (r:1 w:0)
/// Proof: `BridgeWococoGrandpa::CurrentAuthoritySet` (`max_values`: Some(1), `max_size`: Some(50250), added: 50745, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoGrandpa::ImportedHashesPointer` (r:1 w:1)
/// Proof: `BridgeWococoGrandpa::ImportedHashesPointer` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoGrandpa::ImportedHashes` (r:1 w:1)
/// Proof: `BridgeWococoGrandpa::ImportedHashes` (`max_values`: Some(1024), `max_size`: Some(36), added: 1521, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoGrandpa::ImportedHeaders` (r:0 w:2)
/// Proof: `BridgeWococoGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 838]`.
/// The range of component `v` is `[50, 100]`.
/// The range of component `p` is `[1, 838]`.
/// The range of component `v` is `[50, 100]`.
/// The range of component `p` is `[1, 838]`.
/// The range of component `v` is `[50, 100]`.
fn submit_finality_proof(p: u32, v: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `302 + p * (60 ±0)`
// Estimated: `51735`
// Minimum execution time: 305_146_000 picoseconds.
Weight::from_parts(308_711_000, 0)
.saturating_add(Weight::from_parts(0, 51735))
// Standard Error: 2_651
.saturating_add(Weight::from_parts(55_082_480, 0).saturating_mul(p.into()))
// Standard Error: 20_462
.saturating_add(Weight::from_parts(298_367, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
}
@@ -1,40 +1,41 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// This file is part of Cumulus.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// 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 <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_bridge_messages`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-05-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-11-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024
//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// target/production/polkadot-parachain
// benchmark
// pallet
// --chain=bridge-hub-rococo-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_bridge_messages
// --extrinsic=*
// --steps=50
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_bridge_messages.rs
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=pallet_bridge_messages
// --chain=bridge-hub-rococo-dev
// --header=./cumulus/file_header.txt
// --output=./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -47,184 +48,195 @@ use core::marker::PhantomData;
/// Weight functions for `pallet_bridge_messages`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<T> {
/// Storage: BridgeRococoMessages PalletOperatingMode (r:1 w:0)
/// Proof: BridgeRococoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen)
/// Storage: BridgeRococoParachain ImportedParaHeads (r:1 w:0)
/// Proof: BridgeRococoParachain ImportedParaHeads (max_values: Some(64), max_size: Some(196), added: 1186, mode: MaxEncodedLen)
/// Storage: BridgeRococoMessages InboundLanes (r:1 w:1)
/// Proof: BridgeRococoMessages InboundLanes (max_values: None, max_size: Some(49180), added: 51655, mode: MaxEncodedLen)
/// Storage: ParachainInfo ParachainId (r:1 w:0)
/// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
/// Storage: `BridgeWestendMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWestendMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeWestendParachains::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWestendParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeWestendMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn receive_single_message_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `367`
// Measured: `538`
// Estimated: `52645`
// Minimum execution time: 43_187_000 picoseconds.
Weight::from_parts(43_681_000, 0)
// Minimum execution time: 41_577_000 picoseconds.
Weight::from_parts(42_621_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: BridgeRococoMessages PalletOperatingMode (r:1 w:0)
/// Proof: BridgeRococoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen)
/// Storage: BridgeRococoParachain ImportedParaHeads (r:1 w:0)
/// Proof: BridgeRococoParachain ImportedParaHeads (max_values: Some(64), max_size: Some(196), added: 1186, mode: MaxEncodedLen)
/// Storage: BridgeRococoMessages InboundLanes (r:1 w:1)
/// Proof: BridgeRococoMessages InboundLanes (max_values: None, max_size: Some(49180), added: 51655, mode: MaxEncodedLen)
/// Storage: ParachainInfo ParachainId (r:1 w:0)
/// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
/// Storage: `BridgeWestendMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWestendMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeWestendParachains::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWestendParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeWestendMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn receive_two_messages_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `367`
// Measured: `538`
// Estimated: `52645`
// Minimum execution time: 54_131_000 picoseconds.
Weight::from_parts(54_813_000, 0)
// Minimum execution time: 52_880_000 picoseconds.
Weight::from_parts(53_697_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: BridgeRococoMessages PalletOperatingMode (r:1 w:0)
/// Proof: BridgeRococoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen)
/// Storage: BridgeRococoParachain ImportedParaHeads (r:1 w:0)
/// Proof: BridgeRococoParachain ImportedParaHeads (max_values: Some(64), max_size: Some(196), added: 1186, mode: MaxEncodedLen)
/// Storage: BridgeRococoMessages InboundLanes (r:1 w:1)
/// Proof: BridgeRococoMessages InboundLanes (max_values: None, max_size: Some(49180), added: 51655, mode: MaxEncodedLen)
/// Storage: ParachainInfo ParachainId (r:1 w:0)
/// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
/// Storage: `BridgeWestendMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWestendMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeWestendParachains::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWestendParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeWestendMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn receive_single_message_proof_with_outbound_lane_state() -> Weight {
// Proof Size summary in bytes:
// Measured: `367`
// Measured: `538`
// Estimated: `52645`
// Minimum execution time: 48_120_000 picoseconds.
Weight::from_parts(48_733_000, 0)
// Minimum execution time: 47_424_000 picoseconds.
Weight::from_parts(48_445_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeWestendMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWestendMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeWestendParachains::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWestendParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeWestendMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
fn receive_single_message_proof_1_kb() -> Weight {
// Proof Size summary in bytes:
// Measured: `506`
// Estimated: `52645`
// Minimum execution time: 40_619_000 picoseconds.
Weight::from_parts(42_262_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: BridgeRococoMessages PalletOperatingMode (r:1 w:0)
/// Proof: BridgeRococoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen)
/// Storage: BridgeRococoParachain ImportedParaHeads (r:1 w:0)
/// Proof: BridgeRococoParachain ImportedParaHeads (max_values: Some(64), max_size: Some(196), added: 1186, mode: MaxEncodedLen)
/// Storage: BridgeRococoMessages InboundLanes (r:1 w:1)
/// Proof: BridgeRococoMessages InboundLanes (max_values: None, max_size: Some(49180), added: 51655, mode: MaxEncodedLen)
fn receive_single_message_proof_1_kb() -> Weight {
// Proof Size summary in bytes:
// Measured: `335`
// Estimated: `52645`
// Minimum execution time: 41_028_000 picoseconds.
Weight::from_parts(41_635_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: BridgeRococoMessages PalletOperatingMode (r:1 w:0)
/// Proof: BridgeRococoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen)
/// Storage: BridgeRococoParachain ImportedParaHeads (r:1 w:0)
/// Proof: BridgeRococoParachain ImportedParaHeads (max_values: Some(64), max_size: Some(196), added: 1186, mode: MaxEncodedLen)
/// Storage: BridgeRococoMessages InboundLanes (r:1 w:1)
/// Proof: BridgeRococoMessages InboundLanes (max_values: None, max_size: Some(49180), added: 51655, mode: MaxEncodedLen)
/// Storage: `BridgeWestendMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWestendMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeWestendParachains::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWestendParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeWestendMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
fn receive_single_message_proof_16_kb() -> Weight {
// Proof Size summary in bytes:
// Measured: `335`
// Measured: `506`
// Estimated: `52645`
// Minimum execution time: 68_499_000 picoseconds.
Weight::from_parts(69_263_000, 0)
// Minimum execution time: 74_603_000 picoseconds.
Weight::from_parts(78_209_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: BridgeRococoMessages PalletOperatingMode (r:1 w:0)
/// Proof: BridgeRococoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen)
/// Storage: BridgeRococoParachain ImportedParaHeads (r:1 w:0)
/// Proof: BridgeRococoParachain ImportedParaHeads (max_values: Some(64), max_size: Some(196), added: 1186, mode: MaxEncodedLen)
/// Storage: BridgeRococoMessages OutboundLanes (r:1 w:1)
/// Proof: BridgeRococoMessages OutboundLanes (max_values: Some(1), max_size: Some(44), added: 539, mode: MaxEncodedLen)
/// Storage: unknown `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Proof Skipped: unknown `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Storage: BridgeRelayers RelayerRewards (r:1 w:1)
/// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(73), added: 2548, mode: MaxEncodedLen)
/// Storage: `BridgeWestendMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWestendMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachains::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWestendParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendMessages::OutboundLanes` (r:1 w:1)
/// Proof: `BridgeWestendMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`)
/// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1)
/// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn receive_delivery_proof_for_single_message() -> Weight {
// Proof Size summary in bytes:
// Measured: `339`
// Estimated: `3804`
// Minimum execution time: 32_277_000 picoseconds.
Weight::from_parts(32_880_000, 0)
.saturating_add(Weight::from_parts(0, 3804))
// Measured: `377`
// Estimated: `3842`
// Minimum execution time: 33_762_000 picoseconds.
Weight::from_parts(34_405_000, 0)
.saturating_add(Weight::from_parts(0, 3842))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: BridgeRococoMessages PalletOperatingMode (r:1 w:0)
/// Proof: BridgeRococoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen)
/// Storage: BridgeRococoParachain ImportedParaHeads (r:1 w:0)
/// Proof: BridgeRococoParachain ImportedParaHeads (max_values: Some(64), max_size: Some(196), added: 1186, mode: MaxEncodedLen)
/// Storage: BridgeRococoMessages OutboundLanes (r:1 w:1)
/// Proof: BridgeRococoMessages OutboundLanes (max_values: Some(1), max_size: Some(44), added: 539, mode: MaxEncodedLen)
/// Storage: unknown `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Proof Skipped: unknown `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Storage: BridgeRelayers RelayerRewards (r:1 w:1)
/// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(73), added: 2548, mode: MaxEncodedLen)
/// Storage: `BridgeWestendMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWestendMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachains::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWestendParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendMessages::OutboundLanes` (r:1 w:1)
/// Proof: `BridgeWestendMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`)
/// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1)
/// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight {
// Proof Size summary in bytes:
// Measured: `339`
// Estimated: `3804`
// Minimum execution time: 32_504_000 picoseconds.
Weight::from_parts(33_085_000, 0)
.saturating_add(Weight::from_parts(0, 3804))
// Measured: `377`
// Estimated: `3842`
// Minimum execution time: 33_805_000 picoseconds.
Weight::from_parts(35_051_000, 0)
.saturating_add(Weight::from_parts(0, 3842))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: BridgeRococoMessages PalletOperatingMode (r:1 w:0)
/// Proof: BridgeRococoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen)
/// Storage: BridgeRococoParachain ImportedParaHeads (r:1 w:0)
/// Proof: BridgeRococoParachain ImportedParaHeads (max_values: Some(64), max_size: Some(196), added: 1186, mode: MaxEncodedLen)
/// Storage: BridgeRococoMessages OutboundLanes (r:1 w:1)
/// Proof: BridgeRococoMessages OutboundLanes (max_values: Some(1), max_size: Some(44), added: 539, mode: MaxEncodedLen)
/// Storage: unknown `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Proof Skipped: unknown `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Storage: BridgeRelayers RelayerRewards (r:2 w:2)
/// Proof: BridgeRelayers RelayerRewards (max_values: None, max_size: Some(73), added: 2548, mode: MaxEncodedLen)
/// Storage: `BridgeWestendMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWestendMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachains::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWestendParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendMessages::OutboundLanes` (r:1 w:1)
/// Proof: `BridgeWestendMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`)
/// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Storage: `BridgeRelayers::RelayerRewards` (r:2 w:2)
/// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight {
// Proof Size summary in bytes:
// Measured: `339`
// Measured: `377`
// Estimated: `6086`
// Minimum execution time: 34_963_000 picoseconds.
Weight::from_parts(35_473_000, 0)
// Minimum execution time: 38_612_000 picoseconds.
Weight::from_parts(39_412_000, 0)
.saturating_add(Weight::from_parts(0, 6086))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: BridgeRococoMessages PalletOperatingMode (r:1 w:0)
/// Proof: BridgeRococoMessages PalletOperatingMode (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen)
/// Storage: BridgeRococoParachain ImportedParaHeads (r:1 w:0)
/// Proof: BridgeRococoParachain ImportedParaHeads (max_values: Some(64), max_size: Some(196), added: 1186, mode: MaxEncodedLen)
/// Storage: BridgeRococoMessages InboundLanes (r:1 w:1)
/// Proof: BridgeRococoMessages InboundLanes (max_values: None, max_size: Some(49180), added: 51655, mode: MaxEncodedLen)
/// Storage: ParachainInfo ParachainId (r:1 w:0)
/// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
/// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
/// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
/// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
/// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
/// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: ParachainSystem RelevantMessagingState (r:1 w:0)
/// Proof Skipped: ParachainSystem RelevantMessagingState (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: XcmpQueue OutboundXcmpStatus (r:1 w:1)
/// Proof Skipped: XcmpQueue OutboundXcmpStatus (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: XcmpQueue OutboundXcmpMessages (r:0 w:1)
/// Proof Skipped: XcmpQueue OutboundXcmpMessages (max_values: None, max_size: None, mode: Measured)
/// The range of component `i` is `[128, 2048]`.
/// Storage: `BridgeWestendMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWestendMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeWestendParachains::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWestendParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeWestendMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `i` is `[128, 2048]`.
fn receive_single_message_proof_with_dispatch(i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `635`
// Measured: `669`
// Estimated: `52645`
// Minimum execution time: 129_978_000 picoseconds.
Weight::from_parts(98_246_356, 0)
// Minimum execution time: 69_285_000 picoseconds.
Weight::from_parts(70_867_498, 0)
.saturating_add(Weight::from_parts(0, 52645))
// Standard Error: 2_554
.saturating_add(Weight::from_parts(544_728, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().reads(9))
// Standard Error: 111
.saturating_add(Weight::from_parts(7_489, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().reads(10))
.saturating_add(T::DbWeight::get().writes(4))
}
}
@@ -1,245 +0,0 @@
// 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 <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_bridge_messages`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-10-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-vmdtonbz-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
// Executed Command:
// target/production/polkadot-parachain
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=pallet_bridge_messages
// --chain=bridge-hub-rococo-dev
// --header=./cumulus/file_header.txt
// --output=./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_bridge_messages`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<T> {
/// Storage: `BridgeRococoToWestendMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoToWestendMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeWestendParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWestendParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoToWestendMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeRococoToWestendMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn receive_single_message_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `643`
// Estimated: `52645`
// Minimum execution time: 41_873_000 picoseconds.
Weight::from_parts(43_434_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeRococoToWestendMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoToWestendMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeWestendParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWestendParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoToWestendMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeRococoToWestendMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn receive_two_messages_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `643`
// Estimated: `52645`
// Minimum execution time: 53_328_000 picoseconds.
Weight::from_parts(54_592_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeRococoToWestendMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoToWestendMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeWestendParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWestendParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoToWestendMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeRococoToWestendMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn receive_single_message_proof_with_outbound_lane_state() -> Weight {
// Proof Size summary in bytes:
// Measured: `643`
// Estimated: `52645`
// Minimum execution time: 47_486_000 picoseconds.
Weight::from_parts(48_721_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeRococoToWestendMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoToWestendMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeWestendParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWestendParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoToWestendMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeRococoToWestendMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
fn receive_single_message_proof_1_kb() -> Weight {
// Proof Size summary in bytes:
// Measured: `611`
// Estimated: `52645`
// Minimum execution time: 41_093_000 picoseconds.
Weight::from_parts(42_050_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeRococoToWestendMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoToWestendMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeWestendParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWestendParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoToWestendMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeRococoToWestendMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
fn receive_single_message_proof_16_kb() -> Weight {
// Proof Size summary in bytes:
// Measured: `611`
// Estimated: `52645`
// Minimum execution time: 71_947_000 picoseconds.
Weight::from_parts(74_564_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeRococoToWestendMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoToWestendMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWestendParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoToWestendMessages::OutboundLanes` (r:1 w:1)
/// Proof: `BridgeRococoToWestendMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`)
/// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1)
/// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn receive_delivery_proof_for_single_message() -> Weight {
// Proof Size summary in bytes:
// Measured: `482`
// Estimated: `3947`
// Minimum execution time: 31_235_000 picoseconds.
Weight::from_parts(32_051_000, 0)
.saturating_add(Weight::from_parts(0, 3947))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `BridgeRococoToWestendMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoToWestendMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWestendParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoToWestendMessages::OutboundLanes` (r:1 w:1)
/// Proof: `BridgeRococoToWestendMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`)
/// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1)
/// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight {
// Proof Size summary in bytes:
// Measured: `482`
// Estimated: `3947`
// Minimum execution time: 31_320_000 picoseconds.
Weight::from_parts(31_973_000, 0)
.saturating_add(Weight::from_parts(0, 3947))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `BridgeRococoToWestendMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoToWestendMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWestendParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoToWestendMessages::OutboundLanes` (r:1 w:1)
/// Proof: `BridgeRococoToWestendMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`)
/// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Storage: `BridgeRelayers::RelayerRewards` (r:2 w:2)
/// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight {
// Proof Size summary in bytes:
// Measured: `482`
// Estimated: `6086`
// Minimum execution time: 33_656_000 picoseconds.
Weight::from_parts(34_779_000, 0)
.saturating_add(Weight::from_parts(0, 6086))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `BridgeRococoToWestendMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoToWestendMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeWestendParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWestendParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoToWestendMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeRococoToWestendMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `i` is `[128, 2048]`.
/// The range of component `i` is `[128, 2048]`.
/// The range of component `i` is `[128, 2048]`.
/// The range of component `i` is `[128, 2048]`.
fn receive_single_message_proof_with_dispatch(i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `772`
// Estimated: `52645`
// Minimum execution time: 61_671_000 picoseconds.
Weight::from_parts(62_656_321, 0)
.saturating_add(Weight::from_parts(0, 52645))
// Standard Error: 25
.saturating_add(Weight::from_parts(6_641, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().reads(10))
.saturating_add(T::DbWeight::get().writes(4))
}
}
@@ -1,244 +0,0 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pallet_bridge_messages`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-10-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-vmdtonbz-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
// Executed Command:
// target/production/polkadot-parachain
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=pallet_bridge_messages
// --chain=bridge-hub-rococo-dev
// --header=./cumulus/file_header.txt
// --output=./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_bridge_messages`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<T> {
/// Storage: `BridgeRococoToWococoMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoToWococoMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeWococoParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoToWococoMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeRococoToWococoMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn receive_single_message_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `609`
// Estimated: `52645`
// Minimum execution time: 42_407_000 picoseconds.
Weight::from_parts(43_917_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeRococoToWococoMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoToWococoMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeWococoParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoToWococoMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeRococoToWococoMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn receive_two_messages_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `609`
// Estimated: `52645`
// Minimum execution time: 53_258_000 picoseconds.
Weight::from_parts(55_144_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeRococoToWococoMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoToWococoMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeWococoParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoToWococoMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeRococoToWococoMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn receive_single_message_proof_with_outbound_lane_state() -> Weight {
// Proof Size summary in bytes:
// Measured: `609`
// Estimated: `52645`
// Minimum execution time: 47_950_000 picoseconds.
Weight::from_parts(49_315_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeRococoToWococoMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoToWococoMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeWococoParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoToWococoMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeRococoToWococoMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
fn receive_single_message_proof_1_kb() -> Weight {
// Proof Size summary in bytes:
// Measured: `577`
// Estimated: `52645`
// Minimum execution time: 41_383_000 picoseconds.
Weight::from_parts(42_898_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeRococoToWococoMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoToWococoMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeWococoParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoToWococoMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeRococoToWococoMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
fn receive_single_message_proof_16_kb() -> Weight {
// Proof Size summary in bytes:
// Measured: `577`
// Estimated: `52645`
// Minimum execution time: 72_118_000 picoseconds.
Weight::from_parts(74_643_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeRococoToWococoMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoToWococoMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoToWococoMessages::OutboundLanes` (r:1 w:1)
/// Proof: `BridgeRococoToWococoMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`)
/// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1)
/// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn receive_delivery_proof_for_single_message() -> Weight {
// Proof Size summary in bytes:
// Measured: `448`
// Estimated: `3913`
// Minimum execution time: 30_993_000 picoseconds.
Weight::from_parts(31_793_000, 0)
.saturating_add(Weight::from_parts(0, 3913))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `BridgeRococoToWococoMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoToWococoMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoToWococoMessages::OutboundLanes` (r:1 w:1)
/// Proof: `BridgeRococoToWococoMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`)
/// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1)
/// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight {
// Proof Size summary in bytes:
// Measured: `448`
// Estimated: `3913`
// Minimum execution time: 30_894_000 picoseconds.
Weight::from_parts(31_925_000, 0)
.saturating_add(Weight::from_parts(0, 3913))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `BridgeRococoToWococoMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoToWococoMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoToWococoMessages::OutboundLanes` (r:1 w:1)
/// Proof: `BridgeRococoToWococoMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`)
/// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Storage: `BridgeRelayers::RelayerRewards` (r:2 w:2)
/// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight {
// Proof Size summary in bytes:
// Measured: `448`
// Estimated: `6086`
// Minimum execution time: 33_804_000 picoseconds.
Weight::from_parts(34_560_000, 0)
.saturating_add(Weight::from_parts(0, 6086))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `BridgeRococoToWococoMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoToWococoMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeWococoParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeWococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoToWococoMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeRococoToWococoMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `i` is `[128, 2048]`.
/// The range of component `i` is `[128, 2048]`.
/// The range of component `i` is `[128, 2048]`.
/// The range of component `i` is `[128, 2048]`.
fn receive_single_message_proof_with_dispatch(i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `811`
// Estimated: `52645`
// Minimum execution time: 62_616_000 picoseconds.
Weight::from_parts(64_073_891, 0)
.saturating_add(Weight::from_parts(0, 52645))
// Standard Error: 43
.saturating_add(Weight::from_parts(6_525, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().reads(10))
.saturating_add(T::DbWeight::get().writes(4))
}
}
@@ -1,244 +0,0 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pallet_bridge_messages`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-10-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-vmdtonbz-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
// Executed Command:
// target/production/polkadot-parachain
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=pallet_bridge_messages
// --chain=bridge-hub-rococo-dev
// --header=./cumulus/file_header.txt
// --output=./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_bridge_messages`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<T> {
/// Storage: `BridgeWococoToRococoMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWococoToRococoMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeRococoParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeRococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoToRococoMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeWococoToRococoMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn receive_single_message_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `537`
// Estimated: `52645`
// Minimum execution time: 42_086_000 picoseconds.
Weight::from_parts(42_833_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeWococoToRococoMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWococoToRococoMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeRococoParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeRococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoToRococoMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeWococoToRococoMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn receive_two_messages_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `537`
// Estimated: `52645`
// Minimum execution time: 51_927_000 picoseconds.
Weight::from_parts(53_847_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeWococoToRococoMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWococoToRococoMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeRococoParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeRococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoToRococoMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeWococoToRococoMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn receive_single_message_proof_with_outbound_lane_state() -> Weight {
// Proof Size summary in bytes:
// Measured: `537`
// Estimated: `52645`
// Minimum execution time: 47_218_000 picoseconds.
Weight::from_parts(48_380_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeWococoToRococoMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWococoToRococoMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeRococoParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeRococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoToRococoMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeWococoToRococoMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
fn receive_single_message_proof_1_kb() -> Weight {
// Proof Size summary in bytes:
// Measured: `505`
// Estimated: `52645`
// Minimum execution time: 40_585_000 picoseconds.
Weight::from_parts(41_714_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeWococoToRococoMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWococoToRococoMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeRococoParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeRococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoToRococoMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeWococoToRococoMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
fn receive_single_message_proof_16_kb() -> Weight {
// Proof Size summary in bytes:
// Measured: `505`
// Estimated: `52645`
// Minimum execution time: 71_197_000 picoseconds.
Weight::from_parts(73_983_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeWococoToRococoMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWococoToRococoMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeRococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoToRococoMessages::OutboundLanes` (r:1 w:1)
/// Proof: `BridgeWococoToRococoMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`)
/// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1)
/// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn receive_delivery_proof_for_single_message() -> Weight {
// Proof Size summary in bytes:
// Measured: `376`
// Estimated: `3841`
// Minimum execution time: 30_823_000 picoseconds.
Weight::from_parts(31_501_000, 0)
.saturating_add(Weight::from_parts(0, 3841))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `BridgeWococoToRococoMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWococoToRococoMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeRococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoToRococoMessages::OutboundLanes` (r:1 w:1)
/// Proof: `BridgeWococoToRococoMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`)
/// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1)
/// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight {
// Proof Size summary in bytes:
// Measured: `376`
// Estimated: `3841`
// Minimum execution time: 30_854_000 picoseconds.
Weight::from_parts(31_663_000, 0)
.saturating_add(Weight::from_parts(0, 3841))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `BridgeWococoToRococoMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWococoToRococoMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeRococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoToRococoMessages::OutboundLanes` (r:1 w:1)
/// Proof: `BridgeWococoToRococoMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`)
/// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Storage: `BridgeRelayers::RelayerRewards` (r:2 w:2)
/// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight {
// Proof Size summary in bytes:
// Measured: `376`
// Estimated: `6086`
// Minimum execution time: 33_463_000 picoseconds.
Weight::from_parts(34_290_000, 0)
.saturating_add(Weight::from_parts(0, 6086))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `BridgeWococoToRococoMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWococoToRococoMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `BridgeRococoParachain::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeRococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoToRococoMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeWococoToRococoMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `i` is `[128, 2048]`.
/// The range of component `i` is `[128, 2048]`.
/// The range of component `i` is `[128, 2048]`.
/// The range of component `i` is `[128, 2048]`.
fn receive_single_message_proof_with_dispatch(i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `739`
// Estimated: `52645`
// Minimum execution time: 61_523_000 picoseconds.
Weight::from_parts(62_686_055, 0)
.saturating_add(Weight::from_parts(0, 52645))
// Standard Error: 26
.saturating_add(Weight::from_parts(6_563, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().reads(10))
.saturating_add(T::DbWeight::get().writes(4))
}
}
@@ -1,40 +1,41 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// This file is part of Cumulus.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// 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 <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_bridge_parachains`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-05-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-11-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024
//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// target/production/polkadot-parachain
// benchmark
// pallet
// --chain=bridge-hub-rococo-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_bridge_parachains
// --extrinsic=*
// --steps=50
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/pallet_bridge_parachains.rs
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=pallet_bridge_parachains
// --chain=bridge-hub-rococo-dev
// --header=./cumulus/file_header.txt
// --output=./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -47,64 +48,63 @@ use core::marker::PhantomData;
/// Weight functions for `pallet_bridge_parachains`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_bridge_parachains::WeightInfo for WeightInfo<T> {
/// Storage: BridgeWococoParachain PalletOperatingMode (r:1 w:0)
/// Proof: BridgeWococoParachain PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen)
/// Storage: BridgeWococoGrandpa ImportedHeaders (r:1 w:0)
/// Proof: BridgeWococoGrandpa ImportedHeaders (max_values: Some(1024), max_size: Some(68), added: 1553, mode: MaxEncodedLen)
/// Storage: BridgeWococoParachain ParasInfo (r:1 w:1)
/// Proof: BridgeWococoParachain ParasInfo (max_values: Some(1), max_size: Some(60), added: 555, mode: MaxEncodedLen)
/// Storage: BridgeWococoParachain ImportedParaHashes (r:1 w:1)
/// Proof: BridgeWococoParachain ImportedParaHashes (max_values: Some(64), max_size: Some(64), added: 1054, mode: MaxEncodedLen)
/// Storage: BridgeWococoParachain ImportedParaHeads (r:0 w:1)
/// Proof: BridgeWococoParachain ImportedParaHeads (max_values: Some(64), max_size: Some(196), added: 1186, mode: MaxEncodedLen)
/// The range of component `p` is `[1, 2]`.
/// Storage: `BridgeWestendParachains::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWestendParachains::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgeWestendGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachains::ParasInfo` (r:1 w:1)
/// Proof: `BridgeWestendParachains::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachains::ImportedParaHashes` (r:1 w:1)
/// Proof: `BridgeWestendParachains::ImportedParaHashes` (`max_values`: Some(64), `max_size`: Some(64), added: 1054, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachains::ImportedParaHeads` (r:0 w:1)
/// Proof: `BridgeWestendParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 2]`.
fn submit_parachain_heads_with_n_parachains(_p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `367`
// Measured: `434`
// Estimated: `2543`
// Minimum execution time: 34_759_000 picoseconds.
Weight::from_parts(35_709_034, 0)
// Minimum execution time: 31_987_000 picoseconds.
Weight::from_parts(33_060_534, 0)
.saturating_add(Weight::from_parts(0, 2543))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: BridgeWococoParachain PalletOperatingMode (r:1 w:0)
/// Proof: BridgeWococoParachain PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen)
/// Storage: BridgeWococoGrandpa ImportedHeaders (r:1 w:0)
/// Proof: BridgeWococoGrandpa ImportedHeaders (max_values: Some(1024), max_size: Some(68), added: 1553, mode: MaxEncodedLen)
/// Storage: BridgeWococoParachain ParasInfo (r:1 w:1)
/// Proof: BridgeWococoParachain ParasInfo (max_values: Some(1), max_size: Some(60), added: 555, mode: MaxEncodedLen)
/// Storage: BridgeWococoParachain ImportedParaHashes (r:1 w:1)
/// Proof: BridgeWococoParachain ImportedParaHashes (max_values: Some(64), max_size: Some(64), added: 1054, mode: MaxEncodedLen)
/// Storage: BridgeWococoParachain ImportedParaHeads (r:0 w:1)
/// Proof: BridgeWococoParachain ImportedParaHeads (max_values: Some(64), max_size: Some(196), added: 1186, mode: MaxEncodedLen)
/// Storage: `BridgeWestendParachains::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWestendParachains::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgeWestendGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachains::ParasInfo` (r:1 w:1)
/// Proof: `BridgeWestendParachains::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachains::ImportedParaHashes` (r:1 w:1)
/// Proof: `BridgeWestendParachains::ImportedParaHashes` (`max_values`: Some(64), `max_size`: Some(64), added: 1054, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachains::ImportedParaHeads` (r:0 w:1)
/// Proof: `BridgeWestendParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
fn submit_parachain_heads_with_1kb_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `367`
// Measured: `434`
// Estimated: `2543`
// Minimum execution time: 36_005_000 picoseconds.
Weight::from_parts(36_492_000, 0)
// Minimum execution time: 33_360_000 picoseconds.
Weight::from_parts(34_182_000, 0)
.saturating_add(Weight::from_parts(0, 2543))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: BridgeWococoParachain PalletOperatingMode (r:1 w:0)
/// Proof: BridgeWococoParachain PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen)
/// Storage: BridgeWococoGrandpa ImportedHeaders (r:1 w:0)
/// Proof: BridgeWococoGrandpa ImportedHeaders (max_values: Some(1024), max_size: Some(68), added: 1553, mode: MaxEncodedLen)
/// Storage: BridgeWococoParachain ParasInfo (r:1 w:1)
/// Proof: BridgeWococoParachain ParasInfo (max_values: Some(1), max_size: Some(60), added: 555, mode: MaxEncodedLen)
/// Storage: BridgeWococoParachain ImportedParaHashes (r:1 w:1)
/// Proof: BridgeWococoParachain ImportedParaHashes (max_values: Some(64), max_size: Some(64), added: 1054, mode: MaxEncodedLen)
/// Storage: BridgeWococoParachain ImportedParaHeads (r:0 w:1)
/// Proof: BridgeWococoParachain ImportedParaHeads (max_values: Some(64), max_size: Some(196), added: 1186, mode: MaxEncodedLen)
/// Storage: `BridgeWestendParachains::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWestendParachains::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgeWestendGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachains::ParasInfo` (r:1 w:1)
/// Proof: `BridgeWestendParachains::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachains::ImportedParaHashes` (r:1 w:1)
/// Proof: `BridgeWestendParachains::ImportedParaHashes` (`max_values`: Some(64), `max_size`: Some(64), added: 1054, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachains::ImportedParaHeads` (r:0 w:1)
/// Proof: `BridgeWestendParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
fn submit_parachain_heads_with_16kb_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `367`
// Measured: `434`
// Estimated: `2543`
// Minimum execution time: 62_374_000 picoseconds.
Weight::from_parts(62_977_000, 0)
// Minimum execution time: 65_246_000 picoseconds.
Weight::from_parts(65_985_000, 0)
.saturating_add(Weight::from_parts(0, 2543))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
@@ -1,113 +0,0 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pallet_bridge_parachains`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-10-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-vmdtonbz-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
// Executed Command:
// target/production/polkadot-parachain
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=pallet_bridge_parachains
// --chain=bridge-hub-rococo-dev
// --header=./cumulus/file_header.txt
// --output=./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_bridge_parachains`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_bridge_parachains::WeightInfo for WeightInfo<T> {
/// Storage: `BridgeRococoParachain::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoParachain::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgeRococoGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoParachain::ParasInfo` (r:1 w:1)
/// Proof: `BridgeRococoParachain::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoParachain::ImportedParaHashes` (r:1 w:1)
/// Proof: `BridgeRococoParachain::ImportedParaHashes` (`max_values`: Some(64), `max_size`: Some(64), added: 1054, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoParachain::ImportedParaHeads` (r:0 w:1)
/// Proof: `BridgeRococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 2]`.
/// The range of component `p` is `[1, 2]`.
/// The range of component `p` is `[1, 2]`.
fn submit_parachain_heads_with_n_parachains(_p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `367`
// Estimated: `2543`
// Minimum execution time: 31_241_000 picoseconds.
Weight::from_parts(32_488_584, 0)
.saturating_add(Weight::from_parts(0, 2543))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `BridgeRococoParachain::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoParachain::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgeRococoGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoParachain::ParasInfo` (r:1 w:1)
/// Proof: `BridgeRococoParachain::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoParachain::ImportedParaHashes` (r:1 w:1)
/// Proof: `BridgeRococoParachain::ImportedParaHashes` (`max_values`: Some(64), `max_size`: Some(64), added: 1054, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoParachain::ImportedParaHeads` (r:0 w:1)
/// Proof: `BridgeRococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
fn submit_parachain_heads_with_1kb_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `367`
// Estimated: `2543`
// Minimum execution time: 32_962_000 picoseconds.
Weight::from_parts(33_658_000, 0)
.saturating_add(Weight::from_parts(0, 2543))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `BridgeRococoParachain::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeRococoParachain::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgeRococoGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoParachain::ParasInfo` (r:1 w:1)
/// Proof: `BridgeRococoParachain::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoParachain::ImportedParaHashes` (r:1 w:1)
/// Proof: `BridgeRococoParachain::ImportedParaHashes` (`max_values`: Some(64), `max_size`: Some(64), added: 1054, mode: `MaxEncodedLen`)
/// Storage: `BridgeRococoParachain::ImportedParaHeads` (r:0 w:1)
/// Proof: `BridgeRococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
fn submit_parachain_heads_with_16kb_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `367`
// Estimated: `2543`
// Minimum execution time: 62_685_000 picoseconds.
Weight::from_parts(64_589_000, 0)
.saturating_add(Weight::from_parts(0, 2543))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
}
@@ -1,116 +0,0 @@
// 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 <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_bridge_parachains`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-10-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-vmdtonbz-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
// Executed Command:
// target/production/polkadot-parachain
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=pallet_bridge_parachains
// --chain=bridge-hub-rococo-dev
// --header=./cumulus/file_header.txt
// --output=./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_bridge_parachains`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_bridge_parachains::WeightInfo for WeightInfo<T> {
/// Storage: `BridgeWestendParachain::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWestendParachain::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgeWestendGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachain::ParasInfo` (r:1 w:1)
/// Proof: `BridgeWestendParachain::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachain::ImportedParaHashes` (r:1 w:1)
/// Proof: `BridgeWestendParachain::ImportedParaHashes` (`max_values`: Some(64), `max_size`: Some(64), added: 1054, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachain::ImportedParaHeads` (r:0 w:1)
/// Proof: `BridgeWestendParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 2]`.
/// The range of component `p` is `[1, 2]`.
/// The range of component `p` is `[1, 2]`.
fn submit_parachain_heads_with_n_parachains(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `468`
// Estimated: `2543`
// Minimum execution time: 31_493_000 picoseconds.
Weight::from_parts(32_511_270, 0)
.saturating_add(Weight::from_parts(0, 2543))
// Standard Error: 33_650
.saturating_add(Weight::from_parts(20_764, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `BridgeWestendParachain::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWestendParachain::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgeWestendGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachain::ParasInfo` (r:1 w:1)
/// Proof: `BridgeWestendParachain::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachain::ImportedParaHashes` (r:1 w:1)
/// Proof: `BridgeWestendParachain::ImportedParaHashes` (`max_values`: Some(64), `max_size`: Some(64), added: 1054, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachain::ImportedParaHeads` (r:0 w:1)
/// Proof: `BridgeWestendParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
fn submit_parachain_heads_with_1kb_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `468`
// Estimated: `2543`
// Minimum execution time: 32_976_000 picoseconds.
Weight::from_parts(33_647_000, 0)
.saturating_add(Weight::from_parts(0, 2543))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `BridgeWestendParachain::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWestendParachain::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgeWestendGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachain::ParasInfo` (r:1 w:1)
/// Proof: `BridgeWestendParachain::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachain::ImportedParaHashes` (r:1 w:1)
/// Proof: `BridgeWestendParachain::ImportedParaHashes` (`max_values`: Some(64), `max_size`: Some(64), added: 1054, mode: `MaxEncodedLen`)
/// Storage: `BridgeWestendParachain::ImportedParaHeads` (r:0 w:1)
/// Proof: `BridgeWestendParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
fn submit_parachain_heads_with_16kb_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `468`
// Estimated: `2543`
// Minimum execution time: 62_898_000 picoseconds.
Weight::from_parts(64_463_000, 0)
.saturating_add(Weight::from_parts(0, 2543))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
}
@@ -1,115 +0,0 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pallet_bridge_parachains`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-10-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-vmdtonbz-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
// Executed Command:
// target/production/polkadot-parachain
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=pallet_bridge_parachains
// --chain=bridge-hub-rococo-dev
// --header=./cumulus/file_header.txt
// --output=./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pallet_bridge_parachains`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_bridge_parachains::WeightInfo for WeightInfo<T> {
/// Storage: `BridgeWococoParachain::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWococoParachain::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgeWococoGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoParachain::ParasInfo` (r:1 w:1)
/// Proof: `BridgeWococoParachain::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoParachain::ImportedParaHashes` (r:1 w:1)
/// Proof: `BridgeWococoParachain::ImportedParaHashes` (`max_values`: Some(64), `max_size`: Some(64), added: 1054, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoParachain::ImportedParaHeads` (r:0 w:1)
/// Proof: `BridgeWococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 2]`.
/// The range of component `p` is `[1, 2]`.
/// The range of component `p` is `[1, 2]`.
fn submit_parachain_heads_with_n_parachains(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `435`
// Estimated: `2543`
// Minimum execution time: 31_573_000 picoseconds.
Weight::from_parts(32_739_400, 0)
.saturating_add(Weight::from_parts(0, 2543))
// Standard Error: 49_518
.saturating_add(Weight::from_parts(5_166, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `BridgeWococoParachain::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWococoParachain::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgeWococoGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoParachain::ParasInfo` (r:1 w:1)
/// Proof: `BridgeWococoParachain::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoParachain::ImportedParaHashes` (r:1 w:1)
/// Proof: `BridgeWococoParachain::ImportedParaHashes` (`max_values`: Some(64), `max_size`: Some(64), added: 1054, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoParachain::ImportedParaHeads` (r:0 w:1)
/// Proof: `BridgeWococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
fn submit_parachain_heads_with_1kb_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `435`
// Estimated: `2543`
// Minimum execution time: 32_780_000 picoseconds.
Weight::from_parts(33_797_000, 0)
.saturating_add(Weight::from_parts(0, 2543))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `BridgeWococoParachain::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeWococoParachain::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgeWococoGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoParachain::ParasInfo` (r:1 w:1)
/// Proof: `BridgeWococoParachain::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoParachain::ImportedParaHashes` (r:1 w:1)
/// Proof: `BridgeWococoParachain::ImportedParaHashes` (`max_values`: Some(64), `max_size`: Some(64), added: 1054, mode: `MaxEncodedLen`)
/// Storage: `BridgeWococoParachain::ImportedParaHeads` (r:0 w:1)
/// Proof: `BridgeWococoParachain::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
fn submit_parachain_heads_with_16kb_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `435`
// Estimated: `2543`
// Minimum execution time: 62_847_000 picoseconds.
Weight::from_parts(63_991_000, 0)
.saturating_add(Weight::from_parts(0, 2543))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
}
@@ -1,24 +1,25 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// This file is part of Cumulus.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// 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 <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_bridge_relayers`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-10-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-11-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-vmdtonbz-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
// Executed Command:
@@ -55,8 +56,8 @@ impl<T: frame_system::Config> pallet_bridge_relayers::WeightInfo for WeightInfo<
// Proof Size summary in bytes:
// Measured: `207`
// Estimated: `3593`
// Minimum execution time: 45_338_000 picoseconds.
Weight::from_parts(45_836_000, 0)
// Minimum execution time: 46_579_000 picoseconds.
Weight::from_parts(48_298_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
@@ -71,8 +72,8 @@ impl<T: frame_system::Config> pallet_bridge_relayers::WeightInfo for WeightInfo<
// Proof Size summary in bytes:
// Measured: `61`
// Estimated: `4714`
// Minimum execution time: 23_561_000 picoseconds.
Weight::from_parts(24_012_000, 0)
// Minimum execution time: 24_219_000 picoseconds.
Weight::from_parts(24_993_000, 0)
.saturating_add(Weight::from_parts(0, 4714))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
@@ -85,8 +86,8 @@ impl<T: frame_system::Config> pallet_bridge_relayers::WeightInfo for WeightInfo<
// Proof Size summary in bytes:
// Measured: `160`
// Estimated: `4714`
// Minimum execution time: 25_133_000 picoseconds.
Weight::from_parts(25_728_000, 0)
// Minimum execution time: 26_279_000 picoseconds.
Weight::from_parts(26_810_000, 0)
.saturating_add(Weight::from_parts(0, 4714))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
@@ -101,8 +102,8 @@ impl<T: frame_system::Config> pallet_bridge_relayers::WeightInfo for WeightInfo<
// Proof Size summary in bytes:
// Measured: `263`
// Estimated: `4714`
// Minimum execution time: 27_356_000 picoseconds.
Weight::from_parts(27_828_000, 0)
// Minimum execution time: 27_672_000 picoseconds.
Weight::from_parts(28_946_000, 0)
.saturating_add(Weight::from_parts(0, 4714))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
@@ -113,8 +114,8 @@ impl<T: frame_system::Config> pallet_bridge_relayers::WeightInfo for WeightInfo<
// Proof Size summary in bytes:
// Measured: `6`
// Estimated: `3538`
// Minimum execution time: 2_955_000 picoseconds.
Weight::from_parts(3_084_000, 0)
// Minimum execution time: 5_487_000 picoseconds.
Weight::from_parts(5_725_000, 0)
.saturating_add(Weight::from_parts(0, 3538))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
@@ -1,24 +1,25 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// This file is part of Cumulus.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// 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 <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_xcm_benchmarks::fungible`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-10-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-11-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-vmdtonbz-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024
// Executed Command:
@@ -53,8 +54,8 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `101`
// Estimated: `3593`
// Minimum execution time: 19_037_000 picoseconds.
Weight::from_parts(19_602_000, 3593)
// Minimum execution time: 19_610_000 picoseconds.
Weight::from_parts(19_980_000, 3593)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -64,15 +65,13 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `153`
// Estimated: `6196`
// Minimum execution time: 43_115_000 picoseconds.
Weight::from_parts(43_897_000, 6196)
// Minimum execution time: 44_411_000 picoseconds.
Weight::from_parts(45_110_000, 6196)
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: `System::Account` (r:3 w:3)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
// Storage: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
// Proof: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
@@ -89,11 +88,11 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
pub fn transfer_reserve_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `294`
// Measured: `223`
// Estimated: `8799`
// Minimum execution time: 90_267_000 picoseconds.
Weight::from_parts(91_460_000, 8799)
.saturating_add(T::DbWeight::get().reads(11))
// Minimum execution time: 89_739_000 picoseconds.
Weight::from_parts(91_256_000, 8799)
.saturating_add(T::DbWeight::get().reads(10))
.saturating_add(T::DbWeight::get().writes(5))
}
// Storage: `Benchmark::Override` (r:0 w:0)
@@ -105,8 +104,6 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
}
// Storage: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
// Proof: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
@@ -125,19 +122,19 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
pub fn initiate_reserve_withdraw() -> Weight {
// Proof Size summary in bytes:
// Measured: `242`
// Measured: `171`
// Estimated: `6196`
// Minimum execution time: 60_477_000 picoseconds.
Weight::from_parts(61_314_000, 6196)
.saturating_add(T::DbWeight::get().reads(10))
// Minimum execution time: 60_045_000 picoseconds.
Weight::from_parts(60_710_000, 6196)
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(4))
}
pub fn receive_teleported_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_996_000 picoseconds.
Weight::from_parts(3_107_000, 0)
// Minimum execution time: 3_257_000 picoseconds.
Weight::from_parts(3_392_000, 0)
}
// Storage: `System::Account` (r:1 w:1)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
@@ -145,15 +142,13 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `52`
// Estimated: `3593`
// Minimum execution time: 18_907_000 picoseconds.
Weight::from_parts(19_475_000, 3593)
// Minimum execution time: 19_423_000 picoseconds.
Weight::from_parts(19_823_000, 3593)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: `System::Account` (r:2 w:2)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
// Storage: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
// Proof: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
@@ -170,15 +165,13 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
pub fn deposit_reserve_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `193`
// Measured: `122`
// Estimated: `6196`
// Minimum execution time: 59_143_000 picoseconds.
Weight::from_parts(60_316_000, 6196)
.saturating_add(T::DbWeight::get().reads(10))
// Minimum execution time: 60_484_000 picoseconds.
Weight::from_parts(61_634_000, 6196)
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(4))
}
// Storage: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
// Proof: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
@@ -197,11 +190,11 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
pub fn initiate_teleport() -> Weight {
// Proof Size summary in bytes:
// Measured: `141`
// Estimated: `3606`
// Minimum execution time: 44_459_000 picoseconds.
Weight::from_parts(45_365_000, 3606)
.saturating_add(T::DbWeight::get().reads(9))
// Measured: `70`
// Estimated: `3593`
// Minimum execution time: 44_863_000 picoseconds.
Weight::from_parts(45_549_000, 3593)
.saturating_add(T::DbWeight::get().reads(8))
.saturating_add(T::DbWeight::get().writes(3))
}
}
@@ -1,24 +1,25 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// This file is part of Cumulus.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// 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 <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_xcm_benchmarks::generic`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-10-26, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-11-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-vmdtonbz-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! HOSTNAME: `runner-yprdrvc7-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024
// Executed Command:
@@ -47,8 +48,6 @@ use sp_std::marker::PhantomData;
/// Weights for `pallet_xcm_benchmarks::generic`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo<T> {
// Storage: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
// Proof: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
@@ -67,81 +66,79 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
pub fn report_holding() -> Weight {
// Proof Size summary in bytes:
// Measured: `242`
// Measured: `171`
// Estimated: `6196`
// Minimum execution time: 62_732_000 picoseconds.
Weight::from_parts(64_581_000, 6196)
.saturating_add(T::DbWeight::get().reads(10))
// Minimum execution time: 63_453_000 picoseconds.
Weight::from_parts(64_220_000, 6196)
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(4))
}
pub fn buy_execution() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_987_000 picoseconds.
Weight::from_parts(2_107_000, 0)
// Minimum execution time: 2_238_000 picoseconds.
Weight::from_parts(2_351_000, 0)
}
// Storage: `PolkadotXcm::Queries` (r:1 w:0)
// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
pub fn query_response() -> Weight {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `3568`
// Minimum execution time: 8_098_000 picoseconds.
Weight::from_parts(8_564_000, 3568)
// Measured: `32`
// Estimated: `3497`
// Minimum execution time: 7_953_000 picoseconds.
Weight::from_parts(8_162_000, 3497)
.saturating_add(T::DbWeight::get().reads(1))
}
pub fn transact() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_539_000 picoseconds.
Weight::from_parts(9_085_000, 0)
// Minimum execution time: 9_080_000 picoseconds.
Weight::from_parts(9_333_000, 0)
}
pub fn refund_surplus() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_205_000 picoseconds.
Weight::from_parts(2_369_000, 0)
// Minimum execution time: 2_415_000 picoseconds.
Weight::from_parts(2_519_000, 0)
}
pub fn set_error_handler() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_828_000 picoseconds.
Weight::from_parts(1_994_000, 0)
// Minimum execution time: 2_045_000 picoseconds.
Weight::from_parts(2_184_000, 0)
}
pub fn set_appendix() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_869_000 picoseconds.
Weight::from_parts(1_946_000, 0)
// Minimum execution time: 2_065_000 picoseconds.
Weight::from_parts(2_125_000, 0)
}
pub fn clear_error() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_842_000 picoseconds.
Weight::from_parts(1_949_000, 0)
// Minimum execution time: 2_077_000 picoseconds.
Weight::from_parts(2_164_000, 0)
}
pub fn descend_origin() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_460_000 picoseconds.
Weight::from_parts(2_593_000, 0)
// Minimum execution time: 2_868_000 picoseconds.
Weight::from_parts(2_933_000, 0)
}
pub fn clear_origin() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_868_000 picoseconds.
Weight::from_parts(2_003_000, 0)
// Minimum execution time: 2_058_000 picoseconds.
Weight::from_parts(2_164_000, 0)
}
// Storage: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
// Proof: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
@@ -160,21 +157,21 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
pub fn report_error() -> Weight {
// Proof Size summary in bytes:
// Measured: `242`
// Measured: `171`
// Estimated: `6196`
// Minimum execution time: 56_813_000 picoseconds.
Weight::from_parts(57_728_000, 6196)
.saturating_add(T::DbWeight::get().reads(10))
// Minimum execution time: 55_971_000 picoseconds.
Weight::from_parts(56_869_000, 6196)
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(4))
}
// Storage: `PolkadotXcm::AssetTraps` (r:1 w:1)
// Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`)
pub fn claim_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `160`
// Estimated: `3625`
// Minimum execution time: 11_364_000 picoseconds.
Weight::from_parts(11_872_000, 3625)
// Measured: `90`
// Estimated: `3555`
// Minimum execution time: 11_382_000 picoseconds.
Weight::from_parts(11_672_000, 3555)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -182,8 +179,8 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_821_000 picoseconds.
Weight::from_parts(1_936_000, 0)
// Minimum execution time: 2_071_000 picoseconds.
Weight::from_parts(2_193_000, 0)
}
// Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1)
// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
@@ -201,10 +198,10 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
pub fn subscribe_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `109`
// Estimated: `3574`
// Minimum execution time: 23_081_000 picoseconds.
Weight::from_parts(23_512_000, 3574)
// Measured: `38`
// Estimated: `3503`
// Minimum execution time: 22_573_000 picoseconds.
Weight::from_parts(23_423_000, 3503)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(3))
}
@@ -214,47 +211,45 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_747_000 picoseconds.
Weight::from_parts(4_068_000, 0)
// Minimum execution time: 3_870_000 picoseconds.
Weight::from_parts(3_993_000, 0)
.saturating_add(T::DbWeight::get().writes(1))
}
pub fn burn_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_045_000 picoseconds.
Weight::from_parts(3_208_000, 0)
// Minimum execution time: 3_483_000 picoseconds.
Weight::from_parts(3_598_000, 0)
}
pub fn expect_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_962_000 picoseconds.
Weight::from_parts(2_284_000, 0)
// Minimum execution time: 2_241_000 picoseconds.
Weight::from_parts(2_297_000, 0)
}
pub fn expect_origin() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_951_000 picoseconds.
Weight::from_parts(2_026_000, 0)
// Minimum execution time: 2_230_000 picoseconds.
Weight::from_parts(2_318_000, 0)
}
pub fn expect_error() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_837_000 picoseconds.
Weight::from_parts(2_084_000, 0)
// Minimum execution time: 2_051_000 picoseconds.
Weight::from_parts(2_153_000, 0)
}
pub fn expect_transact_status() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_042_000 picoseconds.
Weight::from_parts(2_145_000, 0)
// Minimum execution time: 2_306_000 picoseconds.
Weight::from_parts(2_380_000, 0)
}
// Storage: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
// Proof: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
@@ -273,22 +268,20 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
pub fn query_pallet() -> Weight {
// Proof Size summary in bytes:
// Measured: `242`
// Measured: `171`
// Estimated: `6196`
// Minimum execution time: 61_350_000 picoseconds.
Weight::from_parts(62_440_000, 6196)
.saturating_add(T::DbWeight::get().reads(10))
// Minimum execution time: 60_201_000 picoseconds.
Weight::from_parts(61_132_000, 6196)
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(4))
}
pub fn expect_pallet() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_993_000 picoseconds.
Weight::from_parts(5_309_000, 0)
// Minimum execution time: 4_554_000 picoseconds.
Weight::from_parts(4_704_000, 0)
}
// Storage: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
// Proof: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
@@ -307,70 +300,68 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
pub fn report_transact_status() -> Weight {
// Proof Size summary in bytes:
// Measured: `242`
// Measured: `171`
// Estimated: `6196`
// Minimum execution time: 57_133_000 picoseconds.
Weight::from_parts(58_100_000, 6196)
.saturating_add(T::DbWeight::get().reads(10))
// Minimum execution time: 56_071_000 picoseconds.
Weight::from_parts(56_889_000, 6196)
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(4))
}
pub fn clear_transact_status() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_899_000 picoseconds.
Weight::from_parts(2_153_000, 0)
// Minimum execution time: 2_093_000 picoseconds.
Weight::from_parts(2_169_000, 0)
}
pub fn set_topic() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_880_000 picoseconds.
Weight::from_parts(1_960_000, 0)
// Minimum execution time: 2_027_000 picoseconds.
Weight::from_parts(2_172_000, 0)
}
pub fn clear_topic() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_825_000 picoseconds.
Weight::from_parts(1_960_000, 0)
// Minimum execution time: 2_035_000 picoseconds.
Weight::from_parts(2_164_000, 0)
}
// Storage: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
// Proof: UNKNOWN KEY `0x48297505634037ef48c848c99c0b1f1b` (r:1 w:0)
// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
// Storage: `BridgeRococoToWococoMessages::PalletOperatingMode` (r:1 w:0)
// Proof: `BridgeRococoToWococoMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
// Storage: `BridgeRococoToWococoMessages::OutboundLanes` (r:1 w:1)
// Proof: `BridgeRococoToWococoMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`)
// Storage: `BridgeRococoToWococoMessages::OutboundLanesCongestedSignals` (r:1 w:0)
// Proof: `BridgeRococoToWococoMessages::OutboundLanesCongestedSignals` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`)
// Storage: `BridgeRococoToWococoMessages::OutboundMessages` (r:0 w:1)
// Proof: `BridgeRococoToWococoMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(2621472), added: 2623947, mode: `MaxEncodedLen`)
// Storage: `BridgeWestendMessages::PalletOperatingMode` (r:1 w:0)
// Proof: `BridgeWestendMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
// Storage: `BridgeWestendMessages::OutboundLanes` (r:1 w:1)
// Proof: `BridgeWestendMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`)
// Storage: `BridgeWestendMessages::OutboundLanesCongestedSignals` (r:1 w:0)
// Proof: `BridgeWestendMessages::OutboundLanesCongestedSignals` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`)
// Storage: `BridgeWestendMessages::OutboundMessages` (r:0 w:1)
// Proof: `BridgeWestendMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(2621472), added: 2623947, mode: `MaxEncodedLen`)
/// The range of component `x` is `[1, 1000]`.
pub fn export_message(x: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `139`
// Estimated: `3604`
// Minimum execution time: 28_419_000 picoseconds.
Weight::from_parts(29_387_791, 3604)
// Standard Error: 552
.saturating_add(Weight::from_parts(316_277, 0).saturating_mul(x.into()))
.saturating_add(T::DbWeight::get().reads(5))
// Measured: `96`
// Estimated: `1529`
// Minimum execution time: 25_636_000 picoseconds.
Weight::from_parts(25_405_640, 1529)
// Standard Error: 321
.saturating_add(Weight::from_parts(365_002, 0).saturating_mul(x.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
}
pub fn set_fees_mode() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_903_000 picoseconds.
Weight::from_parts(2_023_000, 0)
// Minimum execution time: 2_036_000 picoseconds.
Weight::from_parts(2_136_000, 0)
}
pub fn unpaid_execution() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_963_000 picoseconds.
Weight::from_parts(2_143_000, 0)
// Minimum execution time: 2_147_000 picoseconds.
Weight::from_parts(2_276_000, 0)
}
}
@@ -16,12 +16,11 @@
use super::{
AccountId, AllPalletsWithSystem, Balances, BaseDeliveryFee, FeeAssetId, ParachainInfo,
ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeFlavor, RuntimeOrigin,
ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin,
TransactionByteFee, WeightToFee, XcmpQueue,
};
use crate::bridge_common_config::{
BridgeGrandpaRococoInstance, BridgeGrandpaWestendInstance, BridgeGrandpaWococoInstance,
DeliveryRewardInBalance, RequiredStakeForStakeAndSlash,
BridgeGrandpaWestendInstance, DeliveryRewardInBalance, RequiredStakeForStakeAndSlash,
};
use bp_messages::LaneId;
use bp_relayers::{PayRewardFromAccount, RewardsAccountOwner, RewardsAccountParams};
@@ -60,9 +59,9 @@ use xcm_executor::{
};
parameter_types! {
pub storage Flavor: RuntimeFlavor = RuntimeFlavor::default();
pub const TokenLocation: MultiLocation = MultiLocation::parent();
pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
pub RelayNetwork: NetworkId = NetworkId::Rococo;
pub UniversalLocation: InteriorMultiLocation =
X2(GlobalConsensus(RelayNetwork::get()), Parachain(ParachainInfo::parachain_id().into()));
pub const MaxInstructions: u32 = 100;
@@ -71,22 +70,6 @@ parameter_types! {
pub RelayTreasuryLocation: MultiLocation = (Parent, PalletInstance(rococo_runtime_constants::TREASURY_PALLET_ID)).into();
}
/// Adapter for resolving `NetworkId` based on `pub storage Flavor: RuntimeFlavor`.
pub struct RelayNetwork;
impl Get<Option<NetworkId>> for RelayNetwork {
fn get() -> Option<NetworkId> {
Some(Self::get())
}
}
impl Get<NetworkId> for RelayNetwork {
fn get() -> NetworkId {
match Flavor::get() {
RuntimeFlavor::Rococo => NetworkId::Rococo,
RuntimeFlavor::Wococo => NetworkId::Wococo,
}
}
}
/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used
/// when determining ownership of accounts for asset transacting and when attempting to use XCM
/// `Transact` in order to determine the dispatch Origin.
@@ -170,8 +153,7 @@ impl Contains<RuntimeCall> for SafeCallFilter {
RuntimeCall::System(frame_system::Call::set_storage { items })
if items.iter().all(|(k, _)| {
k.eq(&DeliveryRewardInBalance::key()) |
k.eq(&RequiredStakeForStakeAndSlash::key()) |
k.eq(&Flavor::key())
k.eq(&RequiredStakeForStakeAndSlash::key())
}) =>
return true,
_ => (),
@@ -199,17 +181,9 @@ impl Contains<RuntimeCall> for SafeCallFilter {
) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) |
RuntimeCall::XcmpQueue(..) |
RuntimeCall::MessageQueue(..) |
RuntimeCall::BridgeRococoGrandpa(pallet_bridge_grandpa::Call::<
Runtime,
BridgeGrandpaRococoInstance,
>::initialize { .. }) |
RuntimeCall::BridgeWestendGrandpa(pallet_bridge_grandpa::Call::<
Runtime,
BridgeGrandpaWestendInstance,
>::initialize { .. }) |
RuntimeCall::BridgeWococoGrandpa(pallet_bridge_grandpa::Call::<
Runtime,
BridgeGrandpaWococoInstance,
>::initialize { .. })
)
}
@@ -298,13 +272,6 @@ impl xcm_executor::Config for XcmConfig {
type FeeManager = XcmFeeManagerFromComponents<
WaivedLocations,
(
XcmExportFeeToRelayerRewardAccounts<
Self::AssetTransactor,
crate::bridge_to_wococo_config::WococoGlobalConsensusNetwork,
crate::bridge_to_wococo_config::AssetHubWococoParaId,
crate::bridge_to_wococo_config::BridgeHubWococoChainId,
crate::bridge_to_wococo_config::AssetHubRococoToAssetHubWococoMessagesLane,
>,
XcmExportFeeToRelayerRewardAccounts<
Self::AssetTransactor,
crate::bridge_to_westend_config::WestendGlobalConsensusNetwork,
@@ -312,21 +279,10 @@ impl xcm_executor::Config for XcmConfig {
crate::bridge_to_westend_config::BridgeHubWestendChainId,
crate::bridge_to_westend_config::AssetHubRococoToAssetHubWestendMessagesLane,
>,
XcmExportFeeToRelayerRewardAccounts<
Self::AssetTransactor,
crate::bridge_to_rococo_config::RococoGlobalConsensusNetwork,
crate::bridge_to_rococo_config::AssetHubRococoParaId,
crate::bridge_to_rococo_config::BridgeHubRococoChainId,
crate::bridge_to_rococo_config::AssetHubWococoToAssetHubRococoMessagesLane,
>,
XcmFeeToAccount<Self::AssetTransactor, AccountId, TreasuryAccount>,
),
>;
type MessageExporter = (
crate::bridge_to_westend_config::ToBridgeHubWestendHaulBlobExporter,
crate::bridge_to_wococo_config::ToBridgeHubWococoHaulBlobExporter,
crate::bridge_to_rococo_config::ToBridgeHubRococoHaulBlobExporter,
);
type MessageExporter = (crate::bridge_to_westend_config::ToBridgeHubWestendHaulBlobExporter,);
type UniversalAliases = Nothing;
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
type SafeCallFilter = SafeCallFilter;
@@ -18,8 +18,7 @@
use bp_polkadot_core::Signature;
use bridge_hub_rococo_runtime::{
bridge_common_config, bridge_to_rococo_config, bridge_to_westend_config,
bridge_to_wococo_config,
bridge_common_config, bridge_to_westend_config,
xcm_config::{RelayNetwork, TokenLocation, XcmConfig},
AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit,
ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra,
@@ -57,11 +56,7 @@ fn construct_extrinsic(
frame_system::CheckWeight::<Runtime>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(0),
BridgeRejectObsoleteHeadersAndMessages::default(),
(
bridge_to_wococo_config::OnBridgeHubRococoRefundBridgeHubWococoMessages::default(),
bridge_to_westend_config::OnBridgeHubRococoRefundBridgeHubWestendMessages::default(),
bridge_to_rococo_config::OnBridgeHubWococoRefundBridgeHubRococoMessages::default(),
),
(bridge_to_westend_config::OnBridgeHubRococoRefundBridgeHubWestendMessages::default(),),
);
let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap();
let signature = payload.using_encoded(|e| sender.sign(e));
@@ -105,18 +100,13 @@ fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys<Runtime
mod bridge_hub_rococo_tests {
use super::*;
use bridge_common_config::{
BridgeGrandpaWestendInstance, BridgeGrandpaWococoInstance, BridgeParachainWestendInstance,
BridgeParachainWococoInstance, DeliveryRewardInBalance, RequiredStakeForStakeAndSlash,
BridgeGrandpaWestendInstance, BridgeParachainWestendInstance, DeliveryRewardInBalance,
RequiredStakeForStakeAndSlash,
};
use bridge_to_westend_config::{
BridgeHubWestendChainId, WestendGlobalConsensusNetwork, WithBridgeHubWestendMessageBridge,
WithBridgeHubWestendMessagesInstance, XCM_LANE_FOR_ASSET_HUB_ROCOCO_TO_ASSET_HUB_WESTEND,
};
use bridge_to_wococo_config::{
BridgeHubWococoChainId, WithBridgeHubWococoMessageBridge,
WithBridgeHubWococoMessagesInstance, WococoGlobalConsensusNetwork,
XCM_LANE_FOR_ASSET_HUB_ROCOCO_TO_ASSET_HUB_WOCOCO,
};
bridge_hub_test_utils::test_cases::include_teleports_for_native_asset_works!(
Runtime,
@@ -138,15 +128,6 @@ mod bridge_hub_rococo_tests {
#[test]
fn initialize_bridge_by_governance_works() {
// for Wococo finality
bridge_hub_test_utils::test_cases::initialize_bridge_by_governance_works::<
Runtime,
BridgeGrandpaWococoInstance,
>(
collator_session_keys(),
bp_bridge_hub_rococo::BRIDGE_HUB_ROCOCO_PARACHAIN_ID,
Box::new(|call| RuntimeCall::BridgeWococoGrandpa(call).encode()),
);
// for Westend finality
bridge_hub_test_utils::test_cases::initialize_bridge_by_governance_works::<
Runtime,
@@ -195,28 +176,6 @@ mod bridge_hub_rococo_tests {
#[test]
fn handle_export_message_from_system_parachain_add_to_outbound_queue_works() {
// for Wococo
bridge_hub_test_utils::test_cases::handle_export_message_from_system_parachain_to_outbound_queue_works::<
Runtime,
XcmConfig,
WithBridgeHubWococoMessagesInstance,
>(
collator_session_keys(),
bp_bridge_hub_rococo::BRIDGE_HUB_ROCOCO_PARACHAIN_ID,
SIBLING_PARACHAIN_ID,
Box::new(|runtime_event_encoded: Vec<u8>| {
match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) {
Ok(RuntimeEvent::BridgeWococoMessages(event)) => Some(event),
_ => None,
}
}),
|| ExportMessage { network: Wococo, destination: X1(Parachain(1234)), xcm: Xcm(vec![]) },
XCM_LANE_FOR_ASSET_HUB_ROCOCO_TO_ASSET_HUB_WOCOCO,
Some((TokenLocation::get(), ExistentialDeposit::get()).into()),
// value should be >= than value generated by `can_calculate_weight_for_paid_export_message_with_reserve_transfer`
Some((TokenLocation::get(), bp_bridge_hub_rococo::BridgeHubRococoBaseXcmFeeInRocs::get()).into()),
|| (),
);
// for Westend
bridge_hub_test_utils::test_cases::handle_export_message_from_system_parachain_to_outbound_queue_works::<
Runtime,
@@ -243,41 +202,13 @@ mod bridge_hub_rococo_tests {
#[test]
fn message_dispatch_routing_works() {
// from Wococo
bridge_hub_test_utils::test_cases::message_dispatch_routing_works::<
Runtime,
AllPalletsWithoutSystem,
XcmConfig,
ParachainSystem,
WithBridgeHubWococoMessagesInstance,
RelayNetwork,
WococoGlobalConsensusNetwork,
>(
collator_session_keys(),
bp_bridge_hub_rococo::BRIDGE_HUB_ROCOCO_PARACHAIN_ID,
SIBLING_PARACHAIN_ID,
Box::new(|runtime_event_encoded: Vec<u8>| {
match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) {
Ok(RuntimeEvent::ParachainSystem(event)) => Some(event),
_ => None,
}
}),
Box::new(|runtime_event_encoded: Vec<u8>| {
match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) {
Ok(RuntimeEvent::XcmpQueue(event)) => Some(event),
_ => None,
}
}),
XCM_LANE_FOR_ASSET_HUB_ROCOCO_TO_ASSET_HUB_WOCOCO,
|| (),
);
// from Westend
bridge_hub_test_utils::test_cases::message_dispatch_routing_works::<
Runtime,
AllPalletsWithoutSystem,
XcmConfig,
ParachainSystem,
WithBridgeHubWococoMessagesInstance,
WithBridgeHubWestendMessagesInstance,
RelayNetwork,
WestendGlobalConsensusNetwork,
>(
@@ -303,25 +234,6 @@ mod bridge_hub_rococo_tests {
#[test]
fn relayed_incoming_message_works() {
// from Wococo
bridge_hub_test_utils::test_cases::relayed_incoming_message_works::<
Runtime,
AllPalletsWithoutSystem,
XcmConfig,
ParachainSystem,
BridgeGrandpaWococoInstance,
BridgeParachainWococoInstance,
WithBridgeHubWococoMessagesInstance,
WithBridgeHubWococoMessageBridge,
>(
collator_session_keys(),
bp_bridge_hub_rococo::BRIDGE_HUB_ROCOCO_PARACHAIN_ID,
bp_bridge_hub_wococo::BRIDGE_HUB_WOCOCO_PARACHAIN_ID,
SIBLING_PARACHAIN_ID,
Rococo,
XCM_LANE_FOR_ASSET_HUB_ROCOCO_TO_ASSET_HUB_WOCOCO,
|| (),
);
// from Westend
bridge_hub_test_utils::test_cases::relayed_incoming_message_works::<
Runtime,
@@ -345,29 +257,6 @@ mod bridge_hub_rococo_tests {
#[test]
pub fn complex_relay_extrinsic_works() {
// for Wococo
bridge_hub_test_utils::test_cases::complex_relay_extrinsic_works::<
Runtime,
AllPalletsWithoutSystem,
XcmConfig,
ParachainSystem,
BridgeGrandpaWococoInstance,
BridgeParachainWococoInstance,
WithBridgeHubWococoMessagesInstance,
WithBridgeHubWococoMessageBridge,
>(
collator_session_keys(),
bp_bridge_hub_rococo::BRIDGE_HUB_ROCOCO_PARACHAIN_ID,
bp_bridge_hub_wococo::BRIDGE_HUB_WOCOCO_PARACHAIN_ID,
SIBLING_PARACHAIN_ID,
BridgeHubWococoChainId::get(),
Rococo,
XCM_LANE_FOR_ASSET_HUB_ROCOCO_TO_ASSET_HUB_WOCOCO,
ExistentialDeposit::get(),
executive_init_block,
construct_and_apply_extrinsic,
|| (),
);
// for Westend
bridge_hub_test_utils::test_cases::complex_relay_extrinsic_works::<
Runtime,
@@ -457,275 +346,3 @@ mod bridge_hub_rococo_tests {
);
}
}
mod bridge_hub_wococo_tests {
use super::*;
use bridge_common_config::{
BridgeGrandpaRococoInstance, BridgeParachainRococoInstance, DeliveryRewardInBalance,
RequiredStakeForStakeAndSlash,
};
use bridge_hub_rococo_runtime::{xcm_config, AllPalletsWithoutSystem, RuntimeFlavor};
use bridge_to_rococo_config::{
BridgeHubRococoChainId, RococoGlobalConsensusNetwork, WithBridgeHubRococoMessageBridge,
WithBridgeHubRococoMessagesInstance, XCM_LANE_FOR_ASSET_HUB_WOCOCO_TO_ASSET_HUB_ROCOCO,
};
use frame_support::assert_ok;
type RuntimeHelper = bridge_hub_test_utils::RuntimeHelper<Runtime, AllPalletsWithoutSystem>;
pub(crate) fn set_wococo_flavor() {
let flavor_key = xcm_config::Flavor::key().to_vec();
let flavor = RuntimeFlavor::Wococo;
// encode `set_storage` call
let set_storage_call = RuntimeCall::System(frame_system::Call::<Runtime>::set_storage {
items: vec![(flavor_key, flavor.encode())],
})
.encode();
// estimate - storing just 1 value
use frame_system::WeightInfo;
let require_weight_at_most =
<Runtime as frame_system::Config>::SystemWeightInfo::set_storage(1);
// execute XCM with Transact to `set_storage` as governance does
assert_ok!(RuntimeHelper::execute_as_governance(set_storage_call, require_weight_at_most)
.ensure_complete());
// check if stored
assert_eq!(flavor, xcm_config::Flavor::get());
}
bridge_hub_test_utils::test_cases::include_teleports_for_native_asset_works!(
Runtime,
AllPalletsWithoutSystem,
XcmConfig,
CheckingAccount,
WeightToFee,
ParachainSystem,
collator_session_keys(),
ExistentialDeposit::get(),
Box::new(|runtime_event_encoded: Vec<u8>| {
match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) {
Ok(RuntimeEvent::PolkadotXcm(event)) => Some(event),
_ => None,
}
}),
bp_bridge_hub_wococo::BRIDGE_HUB_WOCOCO_PARACHAIN_ID
);
#[test]
fn initialize_bridge_by_governance_works() {
bridge_hub_test_utils::test_cases::initialize_bridge_by_governance_works::<
Runtime,
BridgeGrandpaRococoInstance,
>(
collator_session_keys(),
bp_bridge_hub_wococo::BRIDGE_HUB_WOCOCO_PARACHAIN_ID,
Box::new(|call| RuntimeCall::BridgeRococoGrandpa(call).encode()),
)
}
#[test]
fn change_delivery_reward_by_governance_works() {
bridge_hub_test_utils::test_cases::change_storage_constant_by_governance_works::<
Runtime,
DeliveryRewardInBalance,
u64,
>(
collator_session_keys(),
bp_bridge_hub_wococo::BRIDGE_HUB_WOCOCO_PARACHAIN_ID,
Box::new(|call| RuntimeCall::System(call).encode()),
|| (DeliveryRewardInBalance::key().to_vec(), DeliveryRewardInBalance::get()),
|old_value| old_value.checked_mul(2).unwrap(),
)
}
#[test]
fn change_required_stake_by_governance_works() {
bridge_hub_test_utils::test_cases::change_storage_constant_by_governance_works::<
Runtime,
RequiredStakeForStakeAndSlash,
Balance,
>(
collator_session_keys(),
bp_bridge_hub_wococo::BRIDGE_HUB_WOCOCO_PARACHAIN_ID,
Box::new(|call| RuntimeCall::System(call).encode()),
|| {
(
RequiredStakeForStakeAndSlash::key().to_vec(),
RequiredStakeForStakeAndSlash::get(),
)
},
|old_value| old_value.checked_mul(2).unwrap(),
)
}
#[test]
fn handle_export_message_from_system_parachain_add_to_outbound_queue_works() {
bridge_hub_test_utils::test_cases::handle_export_message_from_system_parachain_to_outbound_queue_works::<
Runtime,
XcmConfig,
WithBridgeHubRococoMessagesInstance,
>(
collator_session_keys(),
bp_bridge_hub_wococo::BRIDGE_HUB_WOCOCO_PARACHAIN_ID,
SIBLING_PARACHAIN_ID,
Box::new(|runtime_event_encoded: Vec<u8>| {
match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) {
Ok(RuntimeEvent::BridgeRococoMessages(event)) => Some(event),
_ => None,
}
}),
|| ExportMessage { network: Rococo, destination: X1(Parachain(4321)), xcm: Xcm(vec![]) },
XCM_LANE_FOR_ASSET_HUB_WOCOCO_TO_ASSET_HUB_ROCOCO,
Some((TokenLocation::get(), ExistentialDeposit::get()).into()),
// value should be >= than value generated by `can_calculate_weight_for_paid_export_message_with_reserve_transfer`
Some((TokenLocation::get(), bp_bridge_hub_wococo::BridgeHubWococoBaseXcmFeeInWocs::get()).into()),
set_wococo_flavor,
)
}
#[test]
fn message_dispatch_routing_works() {
bridge_hub_test_utils::test_cases::message_dispatch_routing_works::<
Runtime,
AllPalletsWithoutSystem,
XcmConfig,
ParachainSystem,
WithBridgeHubRococoMessagesInstance,
RelayNetwork,
RococoGlobalConsensusNetwork,
>(
collator_session_keys(),
bp_bridge_hub_wococo::BRIDGE_HUB_WOCOCO_PARACHAIN_ID,
SIBLING_PARACHAIN_ID,
Box::new(|runtime_event_encoded: Vec<u8>| {
match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) {
Ok(RuntimeEvent::ParachainSystem(event)) => Some(event),
_ => None,
}
}),
Box::new(|runtime_event_encoded: Vec<u8>| {
match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) {
Ok(RuntimeEvent::XcmpQueue(event)) => Some(event),
_ => None,
}
}),
XCM_LANE_FOR_ASSET_HUB_WOCOCO_TO_ASSET_HUB_ROCOCO,
set_wococo_flavor,
)
}
#[test]
fn relayed_incoming_message_works() {
bridge_hub_test_utils::test_cases::relayed_incoming_message_works::<
Runtime,
AllPalletsWithoutSystem,
XcmConfig,
ParachainSystem,
BridgeGrandpaRococoInstance,
BridgeParachainRococoInstance,
WithBridgeHubRococoMessagesInstance,
WithBridgeHubRococoMessageBridge,
>(
collator_session_keys(),
bp_bridge_hub_wococo::BRIDGE_HUB_WOCOCO_PARACHAIN_ID,
bp_bridge_hub_rococo::BRIDGE_HUB_ROCOCO_PARACHAIN_ID,
SIBLING_PARACHAIN_ID,
Wococo,
XCM_LANE_FOR_ASSET_HUB_WOCOCO_TO_ASSET_HUB_ROCOCO,
set_wococo_flavor,
)
}
#[test]
pub fn complex_relay_extrinsic_works() {
bridge_hub_test_utils::test_cases::complex_relay_extrinsic_works::<
Runtime,
AllPalletsWithoutSystem,
XcmConfig,
ParachainSystem,
BridgeGrandpaRococoInstance,
BridgeParachainRococoInstance,
WithBridgeHubRococoMessagesInstance,
WithBridgeHubRococoMessageBridge,
>(
collator_session_keys(),
bp_bridge_hub_wococo::BRIDGE_HUB_WOCOCO_PARACHAIN_ID,
bp_bridge_hub_rococo::BRIDGE_HUB_ROCOCO_PARACHAIN_ID,
SIBLING_PARACHAIN_ID,
BridgeHubRococoChainId::get(),
Wococo,
XCM_LANE_FOR_ASSET_HUB_WOCOCO_TO_ASSET_HUB_ROCOCO,
ExistentialDeposit::get(),
executive_init_block,
construct_and_apply_extrinsic,
set_wococo_flavor,
);
}
#[test]
pub fn can_calculate_weight_for_paid_export_message_with_reserve_transfer() {
let estimated = bridge_hub_test_utils::test_cases::can_calculate_weight_for_paid_export_message_with_reserve_transfer::<
Runtime,
XcmConfig,
WeightToFee,
>();
// check if estimated value is sane
let max_expected = bp_bridge_hub_wococo::BridgeHubWococoBaseXcmFeeInWocs::get();
assert!(
estimated <= max_expected,
"calculated: {:?}, max_expected: {:?}, please adjust `bp_bridge_hub_wococo::BridgeHubWococoBaseXcmFeeInWocs` value",
estimated,
max_expected
);
}
#[test]
pub fn can_calculate_fee_for_complex_message_delivery_transaction() {
let estimated = bridge_hub_test_utils::test_cases::can_calculate_fee_for_complex_message_delivery_transaction::<
Runtime,
BridgeGrandpaRococoInstance,
BridgeParachainRococoInstance,
WithBridgeHubRococoMessagesInstance,
WithBridgeHubRococoMessageBridge,
>(
collator_session_keys(),
construct_and_estimate_extrinsic_fee
);
// check if estimated value is sane
let max_expected = bp_bridge_hub_wococo::BridgeHubWococoBaseDeliveryFeeInWocs::get();
assert!(
estimated <= max_expected,
"calculated: {:?}, max_expected: {:?}, please adjust `bp_bridge_hub_wococo::BridgeHubWococoBaseDeliveryFeeInWocs` value",
estimated,
max_expected
);
}
#[test]
pub fn can_calculate_fee_for_complex_message_confirmation_transaction() {
let estimated = bridge_hub_test_utils::test_cases::can_calculate_fee_for_complex_message_confirmation_transaction::<
Runtime,
BridgeGrandpaRococoInstance,
BridgeParachainRococoInstance,
WithBridgeHubRococoMessagesInstance,
WithBridgeHubRococoMessageBridge,
>(
collator_session_keys(),
construct_and_estimate_extrinsic_fee
);
// check if estimated value is sane
let max_expected = bp_bridge_hub_wococo::BridgeHubWococoBaseConfirmationFeeInWocs::get();
assert!(
estimated <= max_expected,
"calculated: {:?}, max_expected: {:?}, please adjust `bp_bridge_hub_wococo::BridgeHubWococoBaseConfirmationFeeInWocs` value",
estimated,
max_expected
);
}
}
@@ -41,8 +41,6 @@ xcm-builder = { package = "staging-xcm-builder", path = "../../../../../polkadot
xcm-executor = { package = "staging-xcm-executor", path = "../../../../../polkadot/xcm/xcm-executor", default-features = false}
# Bridges
bp-bridge-hub-rococo = { path = "../../../../../bridges/primitives/chain-bridge-hub-rococo", default-features = false }
bp-bridge-hub-wococo = { path = "../../../../../bridges/primitives/chain-bridge-hub-wococo", default-features = false }
bp-header-chain = { path = "../../../../../bridges/primitives/header-chain", default-features = false }
bp-messages = { path = "../../../../../bridges/primitives/messages", default-features = false }
bp-parachains = { path = "../../../../../bridges/primitives/parachains", default-features = false }
@@ -60,8 +58,6 @@ bridge-runtime-common = { path = "../../../../../bridges/bin/runtime-common", de
default = [ "std" ]
std = [
"asset-test-utils/std",
"bp-bridge-hub-rococo/std",
"bp-bridge-hub-wococo/std",
"bp-header-chain/std",
"bp-messages/std",
"bp-parachains/std",