mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 03:07:56 +00:00
[testnet] BridgeHubRococo nits (#1972)
This PR does not introduce any functional changes to the existing code, it merely addresses several minor refactors: - Moving bridging pallets to separate files. - Improving the readability and naming of weight files for bridging pallets and bridging pallet instances. The reason for this refactor is to facilitate easier plugin integration for the upcoming bridge between Rococo and Westend. --------- Co-authored-by: command-bot <>
This commit is contained in:
@@ -68,14 +68,15 @@ pub type Address = MultiAddress<AccountId, ()>;
|
||||
pub const BRIDGE_HUB_ROCOCO_PARACHAIN_ID: u32 = 1013;
|
||||
|
||||
/// Name of the With-BridgeHubRococo messages pallet instance that is deployed at bridged chains.
|
||||
pub const WITH_BRIDGE_HUB_ROCOCO_MESSAGES_PALLET_NAME: &str = "BridgeRococoMessages";
|
||||
pub const WITH_BRIDGE_HUB_WOCOCO_TO_ROCOCO_MESSAGES_PALLET_NAME: &str =
|
||||
"BridgeWococoToRococoMessages";
|
||||
|
||||
/// Name of the With-BridgeHubRococo bridge-relayers pallet instance that is deployed at bridged
|
||||
/// chains.
|
||||
pub const WITH_BRIDGE_HUB_ROCOCO_RELAYERS_PALLET_NAME: &str = "BridgeRelayers";
|
||||
|
||||
/// Pallet index of `BridgeWococoMessages: pallet_bridge_messages::<Instance1>`.
|
||||
pub const WITH_BRIDGE_WOCOCO_MESSAGES_PALLET_INDEX: u8 = 46;
|
||||
/// Pallet index of `BridgeRococoToWococoMessages: pallet_bridge_messages::<Instance1>`.
|
||||
pub const WITH_BRIDGE_ROCOCO_TO_WOCOCO_MESSAGES_PALLET_INDEX: u8 = 46;
|
||||
|
||||
decl_bridge_finality_runtime_apis!(bridge_hub_rococo);
|
||||
decl_bridge_messages_runtime_apis!(bridge_hub_rococo);
|
||||
|
||||
@@ -62,14 +62,15 @@ impl Parachain for BridgeHubWococo {
|
||||
pub const BRIDGE_HUB_WOCOCO_PARACHAIN_ID: u32 = 1014;
|
||||
|
||||
/// Name of the With-BridgeHubWococo messages pallet instance that is deployed at bridged chains.
|
||||
pub const WITH_BRIDGE_HUB_WOCOCO_MESSAGES_PALLET_NAME: &str = "BridgeWococoMessages";
|
||||
pub const WITH_BRIDGE_HUB_ROCOCO_TO_WOCOCO_MESSAGES_PALLET_NAME: &str =
|
||||
"BridgeRococoToWococoMessages";
|
||||
|
||||
/// Name of the With-BridgeHubWococo bridge-relayers pallet instance that is deployed at bridged
|
||||
/// chains.
|
||||
pub const WITH_BRIDGE_HUB_WOCOCO_RELAYERS_PALLET_NAME: &str = "BridgeRelayers";
|
||||
|
||||
/// Pallet index of `BridgeRococoMessages: pallet_bridge_messages::<Instance2>`.
|
||||
pub const WITH_BRIDGE_ROCOCO_MESSAGES_PALLET_INDEX: u8 = 45;
|
||||
/// Pallet index of `BridgeWococoToRococoMessages: pallet_bridge_messages::<Instance2>`.
|
||||
pub const WITH_BRIDGE_WOCOCO_TO_ROCOCO_MESSAGES_PALLET_INDEX: u8 = 45;
|
||||
|
||||
decl_bridge_finality_runtime_apis!(bridge_hub_wococo);
|
||||
decl_bridge_messages_runtime_apis!(bridge_hub_wococo);
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ fn example() {
|
||||
outcome: Outcome::Complete(_),
|
||||
..
|
||||
}) => {},
|
||||
RuntimeEvent::BridgeWococoMessages(pallet_bridge_messages::Event::MessageAccepted {
|
||||
RuntimeEvent::BridgeRococoToWococoMessages(pallet_bridge_messages::Event::MessageAccepted {
|
||||
lane_id: LaneId([0, 0, 0, 1]),
|
||||
nonce: 1,
|
||||
}) => {},
|
||||
|
||||
@@ -669,14 +669,16 @@ pub mod bridge_hub_rococo {
|
||||
owner: Some(get_account_id_from_seed::<sr25519::Public>(accounts::BOB)),
|
||||
..Default::default()
|
||||
},
|
||||
bridge_rococo_messages: bridge_hub_rococo_runtime::BridgeRococoMessagesConfig {
|
||||
owner: Some(get_account_id_from_seed::<sr25519::Public>(accounts::BOB)),
|
||||
..Default::default()
|
||||
},
|
||||
bridge_wococo_messages: bridge_hub_rococo_runtime::BridgeWococoMessagesConfig {
|
||||
owner: Some(get_account_id_from_seed::<sr25519::Public>(accounts::BOB)),
|
||||
..Default::default()
|
||||
},
|
||||
bridge_wococo_to_rococo_messages:
|
||||
bridge_hub_rococo_runtime::BridgeWococoToRococoMessagesConfig {
|
||||
owner: Some(get_account_id_from_seed::<sr25519::Public>(accounts::BOB)),
|
||||
..Default::default()
|
||||
},
|
||||
bridge_rococo_to_wococo_messages:
|
||||
bridge_hub_rococo_runtime::BridgeRococoToWococoMessagesConfig {
|
||||
owner: Some(get_account_id_from_seed::<sr25519::Public>(accounts::BOB)),
|
||||
..Default::default()
|
||||
},
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
|
||||
@@ -838,7 +838,7 @@ impl pallet_xcm_bridge_hub_router::Config<ToWococoXcmRouterInstance> for Runtime
|
||||
|
||||
type UniversalLocation = xcm_config::UniversalLocation;
|
||||
type BridgedNetworkId = xcm_config::bridging::to_wococo::WococoNetwork;
|
||||
type Bridges = xcm_config::bridging::to_wococo::NetworkExportTable;
|
||||
type Bridges = xcm_config::bridging::NetworkExportTable;
|
||||
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
type BridgeHubOrigin = EnsureXcm<Equals<xcm_config::bridging::SiblingBridgeHub>>;
|
||||
@@ -869,7 +869,7 @@ impl pallet_xcm_bridge_hub_router::Config<ToRococoXcmRouterInstance> for Runtime
|
||||
|
||||
type UniversalLocation = xcm_config::UniversalLocation;
|
||||
type BridgedNetworkId = xcm_config::bridging::to_rococo::RococoNetwork;
|
||||
type Bridges = xcm_config::bridging::to_rococo::NetworkExportTable;
|
||||
type Bridges = xcm_config::bridging::NetworkExportTable;
|
||||
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
type BridgeHubOrigin = EnsureXcm<Equals<xcm_config::bridging::SiblingBridgeHub>>;
|
||||
|
||||
@@ -763,8 +763,16 @@ pub mod bridging {
|
||||
pub XcmBridgeHubRouterFeeAssetId: AssetId = TokenLocation::get().into();
|
||||
/// Price per byte - can be adjusted via governance `set_storage` call.
|
||||
pub storage XcmBridgeHubRouterByteFee: Balance = TransactionByteFee::get();
|
||||
|
||||
pub BridgeTable: sp_std::vec::Vec<NetworkExportTableItem> =
|
||||
sp_std::vec::Vec::new().into_iter()
|
||||
.chain(to_wococo::BridgeTable::get())
|
||||
.chain(to_rococo::BridgeTable::get())
|
||||
.collect();
|
||||
}
|
||||
|
||||
pub type NetworkExportTable = xcm_builder::NetworkExportTable<BridgeTable>;
|
||||
|
||||
pub mod to_wococo {
|
||||
use super::*;
|
||||
|
||||
@@ -773,7 +781,7 @@ pub mod bridging {
|
||||
1,
|
||||
X2(
|
||||
Parachain(SiblingBridgeHubParaId::get()),
|
||||
PalletInstance(bp_bridge_hub_rococo::WITH_BRIDGE_WOCOCO_MESSAGES_PALLET_INDEX)
|
||||
PalletInstance(bp_bridge_hub_rococo::WITH_BRIDGE_ROCOCO_TO_WOCOCO_MESSAGES_PALLET_INDEX)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -824,8 +832,6 @@ pub mod bridging {
|
||||
}
|
||||
}
|
||||
|
||||
pub type NetworkExportTable = xcm_builder::NetworkExportTable<BridgeTable>;
|
||||
|
||||
/// Trusted reserve locations filter for `xcm_executor::Config::IsReserve`.
|
||||
/// Locations from which the runtime accepts reserved assets.
|
||||
pub type IsTrustedBridgedReserveLocationForConcreteAsset =
|
||||
@@ -864,7 +870,7 @@ pub mod bridging {
|
||||
1,
|
||||
X2(
|
||||
Parachain(SiblingBridgeHubParaId::get()),
|
||||
PalletInstance(bp_bridge_hub_wococo::WITH_BRIDGE_ROCOCO_MESSAGES_PALLET_INDEX)
|
||||
PalletInstance(bp_bridge_hub_wococo::WITH_BRIDGE_WOCOCO_TO_ROCOCO_MESSAGES_PALLET_INDEX)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -915,8 +921,6 @@ pub mod bridging {
|
||||
}
|
||||
}
|
||||
|
||||
pub type NetworkExportTable = xcm_builder::NetworkExportTable<BridgeTable>;
|
||||
|
||||
/// Reserve locations filter for `xcm_executor::Config::IsReserve`.
|
||||
/// Locations from which the runtime accepts reserved assets.
|
||||
pub type IsTrustedBridgedReserveLocationForConcreteAsset =
|
||||
|
||||
@@ -704,7 +704,7 @@ mod asset_hub_rococo_tests {
|
||||
(MultiLocation { parents: 2, interior: X1(GlobalConsensus(Wococo)) }, 1000000000000, 1_000_000_000),
|
||||
bridging_to_asset_hub_wococo,
|
||||
(
|
||||
X1(PalletInstance(bp_bridge_hub_rococo::WITH_BRIDGE_WOCOCO_MESSAGES_PALLET_INDEX)),
|
||||
X1(PalletInstance(bp_bridge_hub_rococo::WITH_BRIDGE_ROCOCO_TO_WOCOCO_MESSAGES_PALLET_INDEX)),
|
||||
GlobalConsensus(Wococo),
|
||||
X1(Parachain(1000))
|
||||
)
|
||||
@@ -909,7 +909,7 @@ mod asset_hub_wococo_tests {
|
||||
(MultiLocation { parents: 2, interior: X1(GlobalConsensus(Rococo)) }, 1000000000000, 1_000_000_000),
|
||||
with_wococo_flavor_bridging_to_asset_hub_rococo,
|
||||
(
|
||||
X1(PalletInstance(bp_bridge_hub_wococo::WITH_BRIDGE_ROCOCO_MESSAGES_PALLET_INDEX)),
|
||||
X1(PalletInstance(bp_bridge_hub_wococo::WITH_BRIDGE_WOCOCO_TO_ROCOCO_MESSAGES_PALLET_INDEX)),
|
||||
GlobalConsensus(Rococo),
|
||||
X1(Parachain(1000))
|
||||
)
|
||||
|
||||
@@ -172,10 +172,10 @@ cd <polkadot-sdk-git-repo-dir>
|
||||
|
||||
- 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
|
||||
- BridgeHubRococo (see `bridgeRococoToWococoMessages.MessageAccepted`) https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:8943#/explorer
|
||||
- BridgeHubWococo (see `bridgeWococoToRococoMessages.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
|
||||
- BridgeHubRocococ (see `bridgeRococoToWococoMessages.MessagesDelivered`) https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:8943#/explorer
|
||||
|
||||
### Claim relayer's rewards on BridgeHubRococo and BridgeHubWococo
|
||||
|
||||
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
// 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 that can be used by multiple BridgeHub flavors.
|
||||
//! All configurations here should be dedicated to a single chain; in other words, we don't need two
|
||||
//! chains for a single pallet configuration.
|
||||
//!
|
||||
//! For example, the messaging pallet needs to know the sending and receiving chains, but the
|
||||
//! GRANDPA tracking pallet only needs to be aware of one chain.
|
||||
|
||||
use super::{weights, AccountId, Balance, Balances, BlockNumber, Runtime, RuntimeEvent};
|
||||
use bp_parachains::SingleParaStoredHeaderDataBuilder;
|
||||
use frame_support::{parameter_types, traits::ConstU32};
|
||||
|
||||
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 storage RequiredStakeForStakeAndSlash: Balance = 1_000_000;
|
||||
pub const RelayerStakeLease: u32 = 8;
|
||||
pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs";
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/// Allows collect and claim rewards for relayers
|
||||
impl pallet_bridge_relayers::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Reward = Balance;
|
||||
type PaymentProcedure =
|
||||
bp_relayers::PayRewardFromAccount<pallet_balances::Pallet<Runtime>, AccountId>;
|
||||
type StakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed<
|
||||
AccountId,
|
||||
BlockNumber,
|
||||
Balances,
|
||||
RelayerStakeReserveId,
|
||||
RequiredStakeForStakeAndSlash,
|
||||
RelayerStakeLease,
|
||||
>;
|
||||
type WeightInfo = weights::pallet_bridge_relayers::WeightInfo<Runtime>;
|
||||
}
|
||||
+59
-14
@@ -14,25 +14,31 @@
|
||||
// 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 that are used on Rococo to bridge with Wococo.
|
||||
//! Bridge definitions used on BridgeHub with the Rococo flavor.
|
||||
|
||||
use crate::{
|
||||
BridgeParachainWococoInstance, BridgeWococoMessages, ParachainInfo, Runtime,
|
||||
WithBridgeHubWococoMessagesInstance, XcmRouter,
|
||||
bridge_common_config::{BridgeParachainWococoInstance, DeliveryRewardInBalance},
|
||||
weights, AccountId, BridgeRococoToWococoMessages, ParachainInfo, Runtime, RuntimeEvent,
|
||||
RuntimeOrigin, XcmRouter,
|
||||
};
|
||||
use bp_messages::LaneId;
|
||||
use bridge_runtime_common::{
|
||||
messages,
|
||||
messages::{
|
||||
source::FromBridgedChainMessagesDeliveryProof, target::FromBridgedChainMessagesProof,
|
||||
source::{FromBridgedChainMessagesDeliveryProof, TargetHeaderChainAdapter},
|
||||
target::{FromBridgedChainMessagesProof, SourceHeaderChainAdapter},
|
||||
MessageBridge, ThisChainWithMessages, UnderlyingChainProvider,
|
||||
},
|
||||
messages_xcm_extension::{SenderAndLane, XcmBlobHauler, XcmBlobHaulerAdapter},
|
||||
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;
|
||||
@@ -48,7 +54,7 @@ parameter_types! {
|
||||
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 BridgeWococoMessagesPalletInstance: InteriorMultiLocation = X1(PalletInstance(<BridgeWococoMessages as PalletInfoAccess>::index() as u8));
|
||||
pub BridgeRococoToWococoMessagesPalletInstance: InteriorMultiLocation = X1(PalletInstance(<BridgeRococoToWococoMessages 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] = &[DEFAULT_XCM_LANE_TO_BRIDGE_HUB_WOCOCO];
|
||||
@@ -97,7 +103,7 @@ pub type ToWococoBridgeHubMessagesDeliveryProof =
|
||||
pub type OnBridgeHubRococoBlobDispatcher = BridgeBlobDispatcher<
|
||||
XcmRouter,
|
||||
BridgeHubRococoUniversalLocation,
|
||||
BridgeWococoMessagesPalletInstance,
|
||||
BridgeRococoToWococoMessagesPalletInstance,
|
||||
>;
|
||||
|
||||
/// Export XCM messages to be relayed to the other side
|
||||
@@ -125,7 +131,7 @@ pub type OnMessagesDelivered = XcmBlobHaulerAdapter<ToBridgeHubWococoXcmBlobHaul
|
||||
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;
|
||||
bp_bridge_hub_rococo::WITH_BRIDGE_HUB_WOCOCO_TO_ROCOCO_MESSAGES_PALLET_NAME;
|
||||
type ThisChain = BridgeHubRococo;
|
||||
type BridgedChain = BridgeHubWococo;
|
||||
type BridgedHeaderChain = pallet_bridge_parachains::ParachainHeaders<
|
||||
@@ -162,7 +168,7 @@ impl UnderlyingChainProvider for BridgeHubRococo {
|
||||
}
|
||||
|
||||
impl ThisChainWithMessages for BridgeHubRococo {
|
||||
type RuntimeOrigin = crate::RuntimeOrigin;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
}
|
||||
|
||||
/// Signed extension that refunds relayers that are delivering messages from the Wococo parachain.
|
||||
@@ -182,10 +188,47 @@ parameter_types! {
|
||||
pub const BridgeHubWococoMessagesLane: bp_messages::LaneId = DEFAULT_XCM_LANE_TO_BRIDGE_HUB_WOCOCO;
|
||||
}
|
||||
|
||||
/// 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<
|
||||
OnBridgeHubRococoBlobDispatcher,
|
||||
Self::WeightInfo,
|
||||
cumulus_pallet_xcmp_queue::bridging::OutXcmpChannelStatusProvider<
|
||||
AssetHubRococoParaId,
|
||||
Runtime,
|
||||
>,
|
||||
>;
|
||||
type OnMessagesDelivered = OnMessagesDelivered;
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::BridgeGrandpaWococoInstance;
|
||||
use crate::bridge_common_config::BridgeGrandpaWococoInstance;
|
||||
use bridge_runtime_common::{
|
||||
assert_complete_bridge_types,
|
||||
integrity::{
|
||||
@@ -251,10 +294,10 @@ mod tests {
|
||||
},
|
||||
pallet_names: AssertBridgePalletNames {
|
||||
with_this_chain_messages_pallet_name:
|
||||
bp_bridge_hub_rococo::WITH_BRIDGE_HUB_ROCOCO_MESSAGES_PALLET_NAME,
|
||||
bp_bridge_hub_rococo::WITH_BRIDGE_HUB_WOCOCO_TO_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,
|
||||
bp_bridge_hub_wococo::WITH_BRIDGE_HUB_ROCOCO_TO_WOCOCO_MESSAGES_PALLET_NAME,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -265,8 +308,10 @@ mod tests {
|
||||
>(FEE_BOOST_PER_MESSAGE);
|
||||
|
||||
assert_eq!(
|
||||
BridgeWococoMessagesPalletInstance::get(),
|
||||
X1(PalletInstance(bp_bridge_hub_rococo::WITH_BRIDGE_WOCOCO_MESSAGES_PALLET_INDEX))
|
||||
BridgeRococoToWococoMessagesPalletInstance::get(),
|
||||
X1(PalletInstance(
|
||||
bp_bridge_hub_rococo::WITH_BRIDGE_ROCOCO_TO_WOCOCO_MESSAGES_PALLET_INDEX
|
||||
))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
+58
-14
@@ -14,20 +14,25 @@
|
||||
// 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 that are used on Wococo to bridge with Rococo.
|
||||
//! Bridge definitions used on BridgeHub with the Wococo flavor.
|
||||
|
||||
use crate::{
|
||||
BridgeParachainRococoInstance, BridgeRococoMessages, ParachainInfo, Runtime,
|
||||
WithBridgeHubRococoMessagesInstance, XcmRouter,
|
||||
bridge_common_config::{BridgeParachainRococoInstance, DeliveryRewardInBalance},
|
||||
weights, AccountId, BridgeWococoToRococoMessages, ParachainInfo, Runtime, RuntimeEvent,
|
||||
RuntimeOrigin, XcmRouter,
|
||||
};
|
||||
use bp_messages::LaneId;
|
||||
use bridge_runtime_common::{
|
||||
messages,
|
||||
messages::{
|
||||
source::FromBridgedChainMessagesDeliveryProof, target::FromBridgedChainMessagesProof,
|
||||
source::{FromBridgedChainMessagesDeliveryProof, TargetHeaderChainAdapter},
|
||||
target::{FromBridgedChainMessagesProof, SourceHeaderChainAdapter},
|
||||
MessageBridge, ThisChainWithMessages, UnderlyingChainProvider,
|
||||
},
|
||||
messages_xcm_extension::{SenderAndLane, XcmBlobHauler, XcmBlobHaulerAdapter},
|
||||
messages_xcm_extension::{
|
||||
SenderAndLane, XcmAsPlainPayload, XcmBlobHauler, XcmBlobHaulerAdapter,
|
||||
XcmBlobMessageDispatch,
|
||||
},
|
||||
refund_relayer_extension::{
|
||||
ActualFeeRefund, RefundBridgedParachainMessages, RefundSignedExtensionAdapter,
|
||||
RefundableMessagesLane, RefundableParachain,
|
||||
@@ -49,7 +54,7 @@ parameter_types! {
|
||||
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 BridgeRococoMessagesPalletInstance: InteriorMultiLocation = X1(PalletInstance(<BridgeRococoMessages as PalletInfoAccess>::index() as u8));
|
||||
pub BridgeWococoToRococoMessagesPalletInstance: InteriorMultiLocation = X1(PalletInstance(<BridgeWococoToRococoMessages as PalletInfoAccess>::index() as u8));
|
||||
pub RococoGlobalConsensusNetwork: NetworkId = NetworkId::Rococo;
|
||||
pub ActiveOutboundLanesToBridgeHubRococo: &'static [bp_messages::LaneId] = &[DEFAULT_XCM_LANE_TO_BRIDGE_HUB_ROCOCO];
|
||||
// see the `FEE_BOOST_PER_MESSAGE` constant to get the meaning of this value
|
||||
@@ -97,7 +102,7 @@ pub type ToRococoBridgeHubMessagesDeliveryProof =
|
||||
pub type OnBridgeHubWococoBlobDispatcher = BridgeBlobDispatcher<
|
||||
XcmRouter,
|
||||
BridgeHubWococoUniversalLocation,
|
||||
BridgeRococoMessagesPalletInstance,
|
||||
BridgeWococoToRococoMessagesPalletInstance,
|
||||
>;
|
||||
|
||||
/// Export XCM messages to be relayed to the other side
|
||||
@@ -125,7 +130,7 @@ pub type OnMessagesDelivered = XcmBlobHaulerAdapter<ToBridgeHubRococoXcmBlobHaul
|
||||
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;
|
||||
bp_bridge_hub_wococo::WITH_BRIDGE_HUB_ROCOCO_TO_WOCOCO_MESSAGES_PALLET_NAME;
|
||||
type ThisChain = BridgeHubWococo;
|
||||
type BridgedChain = BridgeHubRococo;
|
||||
type BridgedHeaderChain = pallet_bridge_parachains::ParachainHeaders<
|
||||
@@ -162,7 +167,7 @@ impl UnderlyingChainProvider for BridgeHubWococo {
|
||||
}
|
||||
|
||||
impl ThisChainWithMessages for BridgeHubWococo {
|
||||
type RuntimeOrigin = crate::RuntimeOrigin;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
}
|
||||
|
||||
/// Signed extension that refunds relayers that are delivering messages from the Rococo parachain.
|
||||
@@ -182,10 +187,47 @@ parameter_types! {
|
||||
pub const BridgeHubRococoMessagesLane: bp_messages::LaneId = DEFAULT_XCM_LANE_TO_BRIDGE_HUB_ROCOCO;
|
||||
}
|
||||
|
||||
/// 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<
|
||||
OnBridgeHubWococoBlobDispatcher,
|
||||
Self::WeightInfo,
|
||||
cumulus_pallet_xcmp_queue::bridging::OutXcmpChannelStatusProvider<
|
||||
AssetHubWococoParaId,
|
||||
Runtime,
|
||||
>,
|
||||
>;
|
||||
type OnMessagesDelivered = OnMessagesDelivered;
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::BridgeGrandpaRococoInstance;
|
||||
use crate::bridge_common_config::BridgeGrandpaRococoInstance;
|
||||
use bridge_runtime_common::{
|
||||
assert_complete_bridge_types,
|
||||
integrity::{
|
||||
@@ -251,10 +293,10 @@ mod tests {
|
||||
},
|
||||
pallet_names: AssertBridgePalletNames {
|
||||
with_this_chain_messages_pallet_name:
|
||||
bp_bridge_hub_wococo::WITH_BRIDGE_HUB_WOCOCO_MESSAGES_PALLET_NAME,
|
||||
bp_bridge_hub_wococo::WITH_BRIDGE_HUB_ROCOCO_TO_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,
|
||||
bp_bridge_hub_rococo::WITH_BRIDGE_HUB_WOCOCO_TO_ROCOCO_MESSAGES_PALLET_NAME,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -265,8 +307,10 @@ mod tests {
|
||||
>(FEE_BOOST_PER_MESSAGE);
|
||||
|
||||
assert_eq!(
|
||||
BridgeRococoMessagesPalletInstance::get(),
|
||||
X1(PalletInstance(bp_bridge_hub_wococo::WITH_BRIDGE_ROCOCO_MESSAGES_PALLET_INDEX))
|
||||
BridgeWococoToRococoMessagesPalletInstance::get(),
|
||||
X1(PalletInstance(
|
||||
bp_bridge_hub_wococo::WITH_BRIDGE_WOCOCO_TO_ROCOCO_MESSAGES_PALLET_INDEX
|
||||
))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#[cfg(feature = "std")]
|
||||
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
|
||||
|
||||
pub mod bridge_common_config;
|
||||
pub mod bridge_hub_rococo_config;
|
||||
pub mod bridge_hub_wococo_config;
|
||||
mod weights;
|
||||
@@ -68,7 +69,6 @@ pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
|
||||
pub use sp_runtime::{MultiAddress, Perbill, Permill};
|
||||
use xcm_config::{XcmConfig, XcmOriginToTransactDispatchOrigin};
|
||||
|
||||
use bp_parachains::SingleParaStoredHeaderDataBuilder;
|
||||
use bp_runtime::HeaderId;
|
||||
|
||||
#[cfg(any(feature = "std", test))]
|
||||
@@ -80,19 +80,8 @@ use xcm::latest::prelude::*;
|
||||
use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight};
|
||||
|
||||
use crate::{
|
||||
bridge_hub_rococo_config::{
|
||||
BridgeRefundBridgeHubWococoMessages, OnBridgeHubRococoBlobDispatcher,
|
||||
WithBridgeHubWococoMessageBridge,
|
||||
},
|
||||
bridge_hub_wococo_config::{
|
||||
BridgeRefundBridgeHubRococoMessages, OnBridgeHubWococoBlobDispatcher,
|
||||
WithBridgeHubRococoMessageBridge,
|
||||
},
|
||||
xcm_config::XcmRouter,
|
||||
};
|
||||
use bridge_runtime_common::{
|
||||
messages::{source::TargetHeaderChainAdapter, target::SourceHeaderChainAdapter},
|
||||
messages_xcm_extension::{XcmAsPlainPayload, XcmBlobMessageDispatch},
|
||||
bridge_hub_rococo_config::BridgeRefundBridgeHubWococoMessages,
|
||||
bridge_hub_wococo_config::BridgeRefundBridgeHubRococoMessages, xcm_config::XcmRouter,
|
||||
};
|
||||
use parachains_common::{
|
||||
impls::DealWithFees,
|
||||
@@ -468,167 +457,6 @@ impl pallet_utility::Config for Runtime {
|
||||
type WeightInfo = weights::pallet_utility::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
// Add bridge pallets (GPA)
|
||||
|
||||
/// Add GRANDPA bridge pallet to track Wococo relay chain on Rococo BridgeHub
|
||||
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_bridge_wococo_grandpa::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
/// Add GRANDPA bridge pallet to track Rococo relay chain on Wococo BridgeHub
|
||||
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_bridge_rococo_grandpa::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const RelayChainHeadersToKeep: u32 = 1024;
|
||||
pub const ParachainHeadsToKeep: u32 = 64;
|
||||
pub const RelayerStakeLease: u32 = 8;
|
||||
|
||||
pub const RococoBridgeParachainPalletName: &'static str = "Paras";
|
||||
pub const WococoBridgeParachainPalletName: &'static str = "Paras";
|
||||
pub const MaxRococoParaHeadDataSize: u32 = bp_rococo::MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE;
|
||||
pub const MaxWococoParaHeadDataSize: u32 = bp_wococo::MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE;
|
||||
|
||||
pub storage DeliveryRewardInBalance: u64 = 1_000_000;
|
||||
pub storage RequiredStakeForStakeAndSlash: Balance = 1_000_000;
|
||||
|
||||
pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs";
|
||||
}
|
||||
|
||||
/// 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_bridge_parachains_bench_runtime_bridge_parachain_wococo_instance::WeightInfo<Runtime>;
|
||||
type BridgesGrandpaPalletInstance = BridgeGrandpaWococoInstance;
|
||||
type ParasPalletName = WococoBridgeParachainPalletName;
|
||||
type ParaStoredHeaderDataBuilder =
|
||||
SingleParaStoredHeaderDataBuilder<bp_bridge_hub_wococo::BridgeHubWococo>;
|
||||
type HeadsToKeep = ParachainHeadsToKeep;
|
||||
type MaxParaHeadDataSize = MaxWococoParaHeadDataSize;
|
||||
}
|
||||
|
||||
/// 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_bridge_parachains_bench_runtime_bridge_parachain_rococo_instance::WeightInfo<Runtime>;
|
||||
type BridgesGrandpaPalletInstance = BridgeGrandpaRococoInstance;
|
||||
type ParasPalletName = RococoBridgeParachainPalletName;
|
||||
type ParaStoredHeaderDataBuilder =
|
||||
SingleParaStoredHeaderDataBuilder<bp_bridge_hub_rococo::BridgeHubRococo>;
|
||||
type HeadsToKeep = ParachainHeadsToKeep;
|
||||
type MaxParaHeadDataSize = MaxRococoParaHeadDataSize;
|
||||
}
|
||||
|
||||
/// 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_bridge_messages_bench_runtime_with_bridge_hub_wococo_messages_instance::WeightInfo<Runtime>;
|
||||
type BridgedChainId = bridge_hub_rococo_config::BridgeHubWococoChainId;
|
||||
type ActiveOutboundLanes = bridge_hub_rococo_config::ActiveOutboundLanesToBridgeHubWococo;
|
||||
type MaxUnrewardedRelayerEntriesAtInboundLane =
|
||||
bridge_hub_rococo_config::MaxUnrewardedRelayerEntriesAtInboundLane;
|
||||
type MaxUnconfirmedMessagesAtInboundLane =
|
||||
bridge_hub_rococo_config::MaxUnconfirmedMessagesAtInboundLane;
|
||||
|
||||
type MaximalOutboundPayloadSize =
|
||||
bridge_hub_rococo_config::ToBridgeHubWococoMaximalOutboundPayloadSize;
|
||||
type OutboundPayload = XcmAsPlainPayload;
|
||||
|
||||
type InboundPayload = XcmAsPlainPayload;
|
||||
type InboundRelayer = AccountId;
|
||||
type DeliveryPayments = ();
|
||||
|
||||
type TargetHeaderChain = TargetHeaderChainAdapter<WithBridgeHubWococoMessageBridge>;
|
||||
type LaneMessageVerifier = bridge_hub_rococo_config::ToBridgeHubWococoMessageVerifier;
|
||||
type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
|
||||
Runtime,
|
||||
WithBridgeHubWococoMessagesInstance,
|
||||
DeliveryRewardInBalance,
|
||||
>;
|
||||
|
||||
type SourceHeaderChain = SourceHeaderChainAdapter<WithBridgeHubWococoMessageBridge>;
|
||||
type MessageDispatch = XcmBlobMessageDispatch<
|
||||
OnBridgeHubRococoBlobDispatcher,
|
||||
Self::WeightInfo,
|
||||
cumulus_pallet_xcmp_queue::bridging::OutXcmpChannelStatusProvider<
|
||||
bridge_hub_rococo_config::AssetHubRococoParaId,
|
||||
Runtime,
|
||||
>,
|
||||
>;
|
||||
type OnMessagesDelivered = bridge_hub_rococo_config::OnMessagesDelivered;
|
||||
}
|
||||
|
||||
/// 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_bridge_messages_bench_runtime_with_bridge_hub_rococo_messages_instance::WeightInfo<Runtime>;
|
||||
type BridgedChainId = bridge_hub_wococo_config::BridgeHubRococoChainId;
|
||||
type ActiveOutboundLanes = bridge_hub_wococo_config::ActiveOutboundLanesToBridgeHubRococo;
|
||||
type MaxUnrewardedRelayerEntriesAtInboundLane =
|
||||
bridge_hub_wococo_config::MaxUnrewardedRelayerEntriesAtInboundLane;
|
||||
type MaxUnconfirmedMessagesAtInboundLane =
|
||||
bridge_hub_wococo_config::MaxUnconfirmedMessagesAtInboundLane;
|
||||
|
||||
type MaximalOutboundPayloadSize =
|
||||
bridge_hub_wococo_config::ToBridgeHubRococoMaximalOutboundPayloadSize;
|
||||
type OutboundPayload = XcmAsPlainPayload;
|
||||
|
||||
type InboundPayload = XcmAsPlainPayload;
|
||||
type InboundRelayer = AccountId;
|
||||
type DeliveryPayments = ();
|
||||
|
||||
type TargetHeaderChain = TargetHeaderChainAdapter<WithBridgeHubRococoMessageBridge>;
|
||||
type LaneMessageVerifier = bridge_hub_wococo_config::ToBridgeHubRococoMessageVerifier;
|
||||
type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
|
||||
Runtime,
|
||||
WithBridgeHubRococoMessagesInstance,
|
||||
DeliveryRewardInBalance,
|
||||
>;
|
||||
|
||||
type SourceHeaderChain = SourceHeaderChainAdapter<WithBridgeHubRococoMessageBridge>;
|
||||
type MessageDispatch = XcmBlobMessageDispatch<
|
||||
OnBridgeHubWococoBlobDispatcher,
|
||||
Self::WeightInfo,
|
||||
cumulus_pallet_xcmp_queue::bridging::OutXcmpChannelStatusProvider<
|
||||
bridge_hub_wococo_config::AssetHubWococoParaId,
|
||||
Runtime,
|
||||
>,
|
||||
>;
|
||||
type OnMessagesDelivered = bridge_hub_wococo_config::OnMessagesDelivered;
|
||||
}
|
||||
|
||||
/// Allows collect and claim rewards for relayers
|
||||
impl pallet_bridge_relayers::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Reward = Balance;
|
||||
type PaymentProcedure =
|
||||
bp_relayers::PayRewardFromAccount<pallet_balances::Pallet<Runtime>, AccountId>;
|
||||
type StakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed<
|
||||
AccountId,
|
||||
BlockNumber,
|
||||
Balances,
|
||||
RelayerStakeReserveId,
|
||||
RequiredStakeForStakeAndSlash,
|
||||
RelayerStakeLease,
|
||||
>;
|
||||
type WeightInfo = weights::pallet_bridge_relayers::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
// Create the runtime by composing the FRAME pallets that were previously configured.
|
||||
construct_runtime!(
|
||||
pub enum Runtime
|
||||
@@ -669,12 +497,12 @@ construct_runtime!(
|
||||
// With-Wococo bridge modules that are active (used) at Rococo BridgeHub runtime.
|
||||
BridgeWococoGrandpa: pallet_bridge_grandpa::<Instance1>::{Pallet, Call, Storage, Event<T>, Config<T>} = 41,
|
||||
BridgeWococoParachain: pallet_bridge_parachains::<Instance1>::{Pallet, Call, Storage, Event<T>} = 42,
|
||||
BridgeWococoMessages: pallet_bridge_messages::<Instance1>::{Pallet, Call, Storage, Event<T>, Config<T>} = 46,
|
||||
BridgeRococoToWococoMessages: pallet_bridge_messages::<Instance1>::{Pallet, Call, Storage, Event<T>, Config<T>} = 46,
|
||||
|
||||
// With-Rococo bridge modules that are active (used) at Wococo BridgeHub runtime.
|
||||
BridgeRococoGrandpa: pallet_bridge_grandpa::<Instance2>::{Pallet, Call, Storage, Event<T>, Config<T>} = 43,
|
||||
BridgeRococoParachain: pallet_bridge_parachains::<Instance2>::{Pallet, Call, Storage, Event<T>} = 44,
|
||||
BridgeRococoMessages: pallet_bridge_messages::<Instance2>::{Pallet, Call, Storage, Event<T>, Config<T>} = 45,
|
||||
BridgeWococoToRococoMessages: pallet_bridge_messages::<Instance2>::{Pallet, Call, Storage, Event<T>, Config<T>} = 45,
|
||||
|
||||
BridgeRelayers: pallet_bridge_relayers::{Pallet, Call, Storage, Event<T>} = 47,
|
||||
}
|
||||
@@ -687,7 +515,7 @@ bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages! {
|
||||
// Parachains
|
||||
BridgeRococoParachain, BridgeWococoParachain,
|
||||
// Messages
|
||||
BridgeRococoMessages, BridgeWococoMessages
|
||||
BridgeWococoToRococoMessages, BridgeRococoToWococoMessages
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
@@ -711,13 +539,13 @@ mod benches {
|
||||
[pallet_xcm_benchmarks::fungible, XcmBalances]
|
||||
[pallet_xcm_benchmarks::generic, XcmGeneric]
|
||||
// Bridge pallets at Rococo
|
||||
[pallet_bridge_grandpa, BridgeWococoGrandpa]
|
||||
[pallet_bridge_parachains, BridgeParachainsBench::<Runtime, BridgeParachainWococoInstance>]
|
||||
[pallet_bridge_messages, BridgeMessagesBench::<Runtime, WithBridgeHubWococoMessagesInstance>]
|
||||
[pallet_bridge_grandpa, WococoFinality]
|
||||
[pallet_bridge_parachains, WithinWococo]
|
||||
[pallet_bridge_messages, RococoToWococo]
|
||||
// Bridge pallets at Wococo
|
||||
[pallet_bridge_grandpa, BridgeRococoGrandpa]
|
||||
[pallet_bridge_parachains, BridgeParachainsBench::<Runtime, BridgeParachainRococoInstance>]
|
||||
[pallet_bridge_messages, BridgeMessagesBench::<Runtime, WithBridgeHubRococoMessagesInstance>]
|
||||
[pallet_bridge_grandpa, RococoFinality]
|
||||
[pallet_bridge_parachains, WithinRococo]
|
||||
[pallet_bridge_messages, WococoToRococo]
|
||||
// Bridge relayer pallets
|
||||
[pallet_bridge_relayers, BridgeRelayersBench::<Runtime>]
|
||||
);
|
||||
@@ -904,7 +732,7 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
// This exposed by BridgeHubRococo
|
||||
// This is exposed by BridgeHubRococo
|
||||
impl bp_bridge_hub_wococo::FromBridgeHubWococoInboundLaneApi<Block> for Runtime {
|
||||
fn message_details(
|
||||
lane: bp_messages::LaneId,
|
||||
@@ -912,12 +740,12 @@ impl_runtime_apis! {
|
||||
) -> Vec<bp_messages::InboundMessageDetails> {
|
||||
bridge_runtime_common::messages_api::inbound_message_details::<
|
||||
Runtime,
|
||||
WithBridgeHubWococoMessagesInstance,
|
||||
bridge_hub_rococo_config::WithBridgeHubWococoMessagesInstance,
|
||||
>(lane, messages)
|
||||
}
|
||||
}
|
||||
|
||||
// This exposed by BridgeHubRococo
|
||||
// This is exposed by BridgeHubRococo
|
||||
impl bp_bridge_hub_wococo::ToBridgeHubWococoOutboundLaneApi<Block> for Runtime {
|
||||
fn message_details(
|
||||
lane: bp_messages::LaneId,
|
||||
@@ -926,7 +754,7 @@ impl_runtime_apis! {
|
||||
) -> Vec<bp_messages::OutboundMessageDetails> {
|
||||
bridge_runtime_common::messages_api::outbound_message_details::<
|
||||
Runtime,
|
||||
WithBridgeHubWococoMessagesInstance,
|
||||
bridge_hub_rococo_config::WithBridgeHubWococoMessagesInstance,
|
||||
>(lane, begin, end)
|
||||
}
|
||||
}
|
||||
@@ -939,7 +767,7 @@ impl_runtime_apis! {
|
||||
) -> Vec<bp_messages::InboundMessageDetails> {
|
||||
bridge_runtime_common::messages_api::inbound_message_details::<
|
||||
Runtime,
|
||||
WithBridgeHubRococoMessagesInstance,
|
||||
bridge_hub_wococo_config::WithBridgeHubRococoMessagesInstance,
|
||||
>(lane, messages)
|
||||
}
|
||||
}
|
||||
@@ -953,7 +781,7 @@ impl_runtime_apis! {
|
||||
) -> Vec<bp_messages::OutboundMessageDetails> {
|
||||
bridge_runtime_common::messages_api::outbound_message_details::<
|
||||
Runtime,
|
||||
WithBridgeHubRococoMessagesInstance,
|
||||
bridge_hub_wococo_config::WithBridgeHubRococoMessagesInstance,
|
||||
>(lane, begin, end)
|
||||
}
|
||||
}
|
||||
@@ -994,9 +822,14 @@ impl_runtime_apis! {
|
||||
type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::<Runtime>;
|
||||
type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::<Runtime>;
|
||||
|
||||
use pallet_bridge_parachains::benchmarking::Pallet as BridgeParachainsBench;
|
||||
use pallet_bridge_messages::benchmarking::Pallet as BridgeMessagesBench;
|
||||
use pallet_bridge_relayers::benchmarking::Pallet as BridgeRelayersBench;
|
||||
// Change weight file names.
|
||||
type WococoFinality = BridgeWococoGrandpa;
|
||||
type RococoFinality = BridgeRococoGrandpa;
|
||||
type WithinWococo = pallet_bridge_parachains::benchmarking::Pallet::<Runtime, bridge_common_config::BridgeParachainWococoInstance>;
|
||||
type WithinRococo = pallet_bridge_parachains::benchmarking::Pallet::<Runtime, bridge_common_config::BridgeParachainRococoInstance>;
|
||||
type RococoToWococo = pallet_bridge_messages::benchmarking::Pallet ::<Runtime, bridge_hub_rococo_config::WithBridgeHubWococoMessagesInstance>;
|
||||
type WococoToRococo = pallet_bridge_messages::benchmarking::Pallet ::<Runtime, bridge_hub_wococo_config::WithBridgeHubRococoMessagesInstance>;
|
||||
|
||||
let mut list = Vec::<BenchmarkList>::new();
|
||||
list_benchmarks!(list, extra);
|
||||
@@ -1131,6 +964,13 @@ impl_runtime_apis! {
|
||||
type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::<Runtime>;
|
||||
type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::<Runtime>;
|
||||
|
||||
type WococoFinality = BridgeWococoGrandpa;
|
||||
type RococoFinality = BridgeRococoGrandpa;
|
||||
type WithinWococo = pallet_bridge_parachains::benchmarking::Pallet::<Runtime, bridge_common_config::BridgeParachainWococoInstance>;
|
||||
type WithinRococo = pallet_bridge_parachains::benchmarking::Pallet::<Runtime, bridge_common_config::BridgeParachainRococoInstance>;
|
||||
type RococoToWococo = pallet_bridge_messages::benchmarking::Pallet ::<Runtime, bridge_hub_rococo_config::WithBridgeHubWococoMessagesInstance>;
|
||||
type WococoToRococo = pallet_bridge_messages::benchmarking::Pallet ::<Runtime, bridge_hub_wococo_config::WithBridgeHubRococoMessagesInstance>;
|
||||
|
||||
use bridge_runtime_common::messages_benchmarking::{
|
||||
prepare_message_delivery_proof_from_parachain,
|
||||
prepare_message_proof_from_parachain,
|
||||
@@ -1138,14 +978,13 @@ impl_runtime_apis! {
|
||||
};
|
||||
use pallet_bridge_messages::benchmarking::{
|
||||
Config as BridgeMessagesConfig,
|
||||
Pallet as BridgeMessagesBench,
|
||||
MessageDeliveryProofParams,
|
||||
MessageProofParams,
|
||||
};
|
||||
|
||||
impl BridgeMessagesConfig<WithBridgeHubWococoMessagesInstance> for Runtime {
|
||||
impl BridgeMessagesConfig<bridge_hub_rococo_config::WithBridgeHubWococoMessagesInstance> for Runtime {
|
||||
fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool {
|
||||
let bench_lane_id = <Self as BridgeMessagesConfig<WithBridgeHubWococoMessagesInstance>>::bench_lane_id();
|
||||
let bench_lane_id = <Self as BridgeMessagesConfig<bridge_hub_rococo_config::WithBridgeHubWococoMessagesInstance>>::bench_lane_id();
|
||||
let bridged_chain_id = bp_runtime::BRIDGE_HUB_WOCOCO_CHAIN_ID;
|
||||
pallet_bridge_relayers::Pallet::<Runtime>::relayer_reward(
|
||||
relayer,
|
||||
@@ -1165,7 +1004,7 @@ impl_runtime_apis! {
|
||||
ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests(42.into());
|
||||
prepare_message_proof_from_parachain::<
|
||||
Runtime,
|
||||
BridgeGrandpaWococoInstance,
|
||||
bridge_common_config::BridgeGrandpaWococoInstance,
|
||||
bridge_hub_rococo_config::WithBridgeHubWococoMessageBridge,
|
||||
>(params, generate_xcm_builder_bridge_message_sample(X2(GlobalConsensus(Rococo), Parachain(42))))
|
||||
}
|
||||
@@ -1175,7 +1014,7 @@ impl_runtime_apis! {
|
||||
) -> bridge_hub_rococo_config::ToWococoBridgeHubMessagesDeliveryProof {
|
||||
prepare_message_delivery_proof_from_parachain::<
|
||||
Runtime,
|
||||
BridgeGrandpaWococoInstance,
|
||||
bridge_common_config::BridgeGrandpaWococoInstance,
|
||||
bridge_hub_rococo_config::WithBridgeHubWococoMessageBridge,
|
||||
>(params)
|
||||
}
|
||||
@@ -1186,9 +1025,9 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl BridgeMessagesConfig<WithBridgeHubRococoMessagesInstance> for Runtime {
|
||||
impl BridgeMessagesConfig<bridge_hub_wococo_config::WithBridgeHubRococoMessagesInstance> for Runtime {
|
||||
fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool {
|
||||
let bench_lane_id = <Self as BridgeMessagesConfig<WithBridgeHubRococoMessagesInstance>>::bench_lane_id();
|
||||
let bench_lane_id = <Self as BridgeMessagesConfig<bridge_hub_wococo_config::WithBridgeHubRococoMessagesInstance>>::bench_lane_id();
|
||||
let bridged_chain_id = bp_runtime::BRIDGE_HUB_ROCOCO_CHAIN_ID;
|
||||
pallet_bridge_relayers::Pallet::<Runtime>::relayer_reward(
|
||||
relayer,
|
||||
@@ -1208,7 +1047,7 @@ impl_runtime_apis! {
|
||||
ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests(42.into());
|
||||
prepare_message_proof_from_parachain::<
|
||||
Runtime,
|
||||
BridgeGrandpaRococoInstance,
|
||||
bridge_common_config::BridgeGrandpaRococoInstance,
|
||||
bridge_hub_wococo_config::WithBridgeHubRococoMessageBridge,
|
||||
>(params, generate_xcm_builder_bridge_message_sample(X2(GlobalConsensus(Wococo), Parachain(42))))
|
||||
}
|
||||
@@ -1218,7 +1057,7 @@ impl_runtime_apis! {
|
||||
) -> bridge_hub_wococo_config::ToRococoBridgeHubMessagesDeliveryProof {
|
||||
prepare_message_delivery_proof_from_parachain::<
|
||||
Runtime,
|
||||
BridgeGrandpaRococoInstance,
|
||||
bridge_common_config::BridgeGrandpaRococoInstance,
|
||||
bridge_hub_wococo_config::WithBridgeHubRococoMessageBridge,
|
||||
>(params)
|
||||
}
|
||||
@@ -1230,16 +1069,13 @@ impl_runtime_apis! {
|
||||
}
|
||||
|
||||
use bridge_runtime_common::parachains_benchmarking::prepare_parachain_heads_proof;
|
||||
use pallet_bridge_parachains::benchmarking::{
|
||||
Config as BridgeParachainsConfig,
|
||||
Pallet as BridgeParachainsBench,
|
||||
};
|
||||
use pallet_bridge_parachains::benchmarking::Config as BridgeParachainsConfig;
|
||||
use pallet_bridge_relayers::benchmarking::{
|
||||
Pallet as BridgeRelayersBench,
|
||||
Config as BridgeRelayersConfig,
|
||||
};
|
||||
|
||||
impl BridgeParachainsConfig<BridgeParachainWococoInstance> for Runtime {
|
||||
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)]
|
||||
@@ -1255,7 +1091,7 @@ impl_runtime_apis! {
|
||||
bp_polkadot_core::parachains::ParaHeadsProof,
|
||||
Vec<(bp_polkadot_core::parachains::ParaId, bp_polkadot_core::parachains::ParaHash)>,
|
||||
) {
|
||||
prepare_parachain_heads_proof::<Runtime, BridgeParachainWococoInstance>(
|
||||
prepare_parachain_heads_proof::<Runtime, bridge_common_config::BridgeParachainWococoInstance>(
|
||||
parachains,
|
||||
parachain_head_size,
|
||||
proof_size,
|
||||
@@ -1263,7 +1099,7 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl BridgeParachainsConfig<BridgeParachainRococoInstance> for Runtime {
|
||||
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)]
|
||||
@@ -1279,7 +1115,7 @@ impl_runtime_apis! {
|
||||
bp_polkadot_core::parachains::ParaHeadsProof,
|
||||
Vec<(bp_polkadot_core::parachains::ParaId, bp_polkadot_core::parachains::ParaHash)>,
|
||||
) {
|
||||
prepare_parachain_heads_proof::<Runtime, BridgeParachainRococoInstance>(
|
||||
prepare_parachain_heads_proof::<Runtime, bridge_common_config::BridgeParachainRococoInstance>(
|
||||
parachains,
|
||||
parachain_head_size,
|
||||
proof_size,
|
||||
|
||||
@@ -22,12 +22,12 @@ pub mod cumulus_pallet_xcmp_queue;
|
||||
pub mod extrinsic_weights;
|
||||
pub mod frame_system;
|
||||
pub mod pallet_balances;
|
||||
pub mod pallet_bridge_grandpa_bridge_rococo_grandpa;
|
||||
pub mod pallet_bridge_grandpa_bridge_wococo_grandpa;
|
||||
pub mod pallet_bridge_messages_bridge_messages_bench_runtime_with_bridge_hub_rococo_messages_instance;
|
||||
pub mod pallet_bridge_messages_bridge_messages_bench_runtime_with_bridge_hub_wococo_messages_instance;
|
||||
pub mod pallet_bridge_parachains_bridge_parachains_bench_runtime_bridge_parachain_rococo_instance;
|
||||
pub mod pallet_bridge_parachains_bridge_parachains_bench_runtime_bridge_parachain_wococo_instance;
|
||||
pub mod pallet_bridge_grandpa_rococo_finality;
|
||||
pub mod pallet_bridge_grandpa_wococo_finality;
|
||||
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_wococo;
|
||||
pub mod pallet_bridge_relayers;
|
||||
pub mod pallet_collator_selection;
|
||||
pub mod pallet_multisig;
|
||||
@@ -50,13 +50,16 @@ 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_bridge_messages_bench_runtime_with_bridge_hub_rococo_messages_instance::WeightInfo<crate::Runtime> {
|
||||
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()
|
||||
pallet_bridge_relayers::WeightInfo::<Runtime>::receive_messages_proof_overhead_from_runtime(
|
||||
)
|
||||
}
|
||||
|
||||
fn receive_messages_delivery_proof_overhead_from_runtime() -> Weight {
|
||||
@@ -64,13 +67,16 @@ impl pallet_bridge_messages::WeightInfoExt for pallet_bridge_messages_bridge_mes
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_bridge_messages::WeightInfoExt for pallet_bridge_messages_bridge_messages_bench_runtime_with_bridge_hub_wococo_messages_instance::WeightInfo<crate::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()
|
||||
pallet_bridge_relayers::WeightInfo::<Runtime>::receive_messages_proof_overhead_from_runtime(
|
||||
)
|
||||
}
|
||||
|
||||
fn receive_messages_delivery_proof_overhead_from_runtime() -> Weight {
|
||||
@@ -78,13 +84,17 @@ impl pallet_bridge_messages::WeightInfoExt for pallet_bridge_messages_bridge_mes
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_bridge_parachains::WeightInfoExt for pallet_bridge_parachains_bridge_parachains_bench_runtime_bridge_parachain_rococo_instance::WeightInfo<crate::Runtime> {
|
||||
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_bridge_parachains_bench_runtime_bridge_parachain_wococo_instance::WeightInfo<crate::Runtime> {
|
||||
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
|
||||
}
|
||||
|
||||
+18
-20
@@ -17,27 +17,25 @@
|
||||
//! Autogenerated weights for `pallet_bridge_grandpa`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2023-10-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
|
||||
//! HOSTNAME: `runner-t2sp1qqs-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
|
||||
// target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=bridge-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_bridge_grandpa
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
|
||||
// --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)]
|
||||
@@ -70,13 +68,13 @@ impl<T: frame_system::Config> pallet_bridge_grandpa::WeightInfo for WeightInfo<T
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `231 + p * (60 ±0)`
|
||||
// Estimated: `51735`
|
||||
// Minimum execution time: 258_708_000 picoseconds.
|
||||
Weight::from_parts(36_816_946, 0)
|
||||
// Minimum execution time: 292_425_000 picoseconds.
|
||||
Weight::from_parts(294_025_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 51735))
|
||||
// Standard Error: 3_891
|
||||
.saturating_add(Weight::from_parts(55_186_206, 0).saturating_mul(p.into()))
|
||||
// Standard Error: 64_911
|
||||
.saturating_add(Weight::from_parts(1_803_772, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 3_450
|
||||
.saturating_add(Weight::from_parts(55_743_036, 0).saturating_mul(p.into()))
|
||||
// Standard Error: 26_622
|
||||
.saturating_add(Weight::from_parts(327_706, 0).saturating_mul(v.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
+18
-20
@@ -17,27 +17,25 @@
|
||||
//! Autogenerated weights for `pallet_bridge_grandpa`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2023-10-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
|
||||
//! HOSTNAME: `runner-t2sp1qqs-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
|
||||
// target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=bridge-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_bridge_grandpa
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
|
||||
// --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)]
|
||||
@@ -70,13 +68,13 @@ impl<T: frame_system::Config> pallet_bridge_grandpa::WeightInfo for WeightInfo<T
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `268 + p * (60 ±0)`
|
||||
// Estimated: `51735`
|
||||
// Minimum execution time: 260_423_000 picoseconds.
|
||||
Weight::from_parts(46_213_879, 0)
|
||||
// Minimum execution time: 294_211_000 picoseconds.
|
||||
Weight::from_parts(43_087_768, 0)
|
||||
.saturating_add(Weight::from_parts(0, 51735))
|
||||
// Standard Error: 4_794
|
||||
.saturating_add(Weight::from_parts(55_195_440, 0).saturating_mul(p.into()))
|
||||
// Standard Error: 79_973
|
||||
.saturating_add(Weight::from_parts(1_710_302, 0).saturating_mul(v.into()))
|
||||
// Standard Error: 5_610
|
||||
.saturating_add(Weight::from_parts(55_863_061, 0).saturating_mul(p.into()))
|
||||
// Standard Error: 93_579
|
||||
.saturating_add(Weight::from_parts(2_409_156, 0).saturating_mul(v.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
+57
-47
@@ -17,27 +17,25 @@
|
||||
//! Autogenerated weights for `pallet_bridge_messages`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2023-10-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
|
||||
//! HOSTNAME: `runner-t2sp1qqs-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
|
||||
// target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=bridge-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_bridge_messages
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
|
||||
// --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)]
|
||||
@@ -52,6 +50,8 @@ pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `BridgeWococoMessages::PalletOperatingMode` (r:1 w:0)
|
||||
/// Proof: `BridgeWococoMessages::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: `BridgeWococoMessages::InboundLanes` (r:1 w:1)
|
||||
@@ -60,16 +60,18 @@ impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<
|
||||
/// 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: `404`
|
||||
// Measured: `504`
|
||||
// Estimated: `52645`
|
||||
// Minimum execution time: 43_991_000 picoseconds.
|
||||
Weight::from_parts(45_465_000, 0)
|
||||
// Minimum execution time: 42_043_000 picoseconds.
|
||||
Weight::from_parts(43_557_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: `BridgeWococoMessages::PalletOperatingMode` (r:1 w:0)
|
||||
/// Proof: `BridgeWococoMessages::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: `BridgeWococoMessages::InboundLanes` (r:1 w:1)
|
||||
@@ -78,16 +80,18 @@ impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<
|
||||
/// 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: `404`
|
||||
// Measured: `504`
|
||||
// Estimated: `52645`
|
||||
// Minimum execution time: 54_906_000 picoseconds.
|
||||
Weight::from_parts(56_412_000, 0)
|
||||
// Minimum execution time: 53_080_000 picoseconds.
|
||||
Weight::from_parts(55_107_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: `BridgeWococoMessages::PalletOperatingMode` (r:1 w:0)
|
||||
/// Proof: `BridgeWococoMessages::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: `BridgeWococoMessages::InboundLanes` (r:1 w:1)
|
||||
@@ -96,44 +100,48 @@ impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<
|
||||
/// 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: `404`
|
||||
// Measured: `504`
|
||||
// Estimated: `52645`
|
||||
// Minimum execution time: 48_906_000 picoseconds.
|
||||
Weight::from_parts(51_665_000, 0)
|
||||
// Minimum execution time: 47_757_000 picoseconds.
|
||||
Weight::from_parts(49_024_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: `BridgeWococoMessages::PalletOperatingMode` (r:1 w:0)
|
||||
/// Proof: `BridgeWococoMessages::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: `BridgeWococoMessages::InboundLanes` (r:1 w:1)
|
||||
/// Proof: `BridgeWococoMessages::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: `372`
|
||||
// Measured: `472`
|
||||
// Estimated: `52645`
|
||||
// Minimum execution time: 42_784_000 picoseconds.
|
||||
Weight::from_parts(44_788_000, 0)
|
||||
// Minimum execution time: 41_434_000 picoseconds.
|
||||
Weight::from_parts(42_468_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: `BridgeWococoMessages::PalletOperatingMode` (r:1 w:0)
|
||||
/// Proof: `BridgeWococoMessages::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: `BridgeWococoMessages::InboundLanes` (r:1 w:1)
|
||||
/// Proof: `BridgeWococoMessages::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: `372`
|
||||
// Measured: `472`
|
||||
// Estimated: `52645`
|
||||
// Minimum execution time: 75_805_000 picoseconds.
|
||||
Weight::from_parts(77_731_000, 0)
|
||||
// Minimum execution time: 76_285_000 picoseconds.
|
||||
Weight::from_parts(77_717_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: `BridgeWococoMessages::PalletOperatingMode` (r:1 w:0)
|
||||
@@ -150,8 +158,8 @@ impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `376`
|
||||
// Estimated: `3841`
|
||||
// Minimum execution time: 32_012_000 picoseconds.
|
||||
Weight::from_parts(32_653_000, 0)
|
||||
// Minimum execution time: 31_296_000 picoseconds.
|
||||
Weight::from_parts(32_147_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3841))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
@@ -170,8 +178,8 @@ impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `376`
|
||||
// Estimated: `3841`
|
||||
// Minimum execution time: 31_851_000 picoseconds.
|
||||
Weight::from_parts(33_017_000, 0)
|
||||
// Minimum execution time: 31_114_000 picoseconds.
|
||||
Weight::from_parts(31_937_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3841))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
@@ -190,20 +198,24 @@ impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `376`
|
||||
// Estimated: `6086`
|
||||
// Minimum execution time: 34_818_000 picoseconds.
|
||||
Weight::from_parts(35_728_000, 0)
|
||||
// Minimum execution time: 33_620_000 picoseconds.
|
||||
Weight::from_parts(34_604_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6086))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `BridgeWococoMessages::PalletOperatingMode` (r:1 w:0)
|
||||
/// Proof: `BridgeWococoMessages::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: `BridgeWococoMessages::InboundLanes` (r:1 w:1)
|
||||
/// Proof: `BridgeWococoMessages::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)
|
||||
@@ -212,8 +224,6 @@ impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<
|
||||
/// 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::OutboundXcmpStatus` (r:1 w:1)
|
||||
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`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]`.
|
||||
@@ -222,12 +232,12 @@ impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `672`
|
||||
// Estimated: `52645`
|
||||
// Minimum execution time: 172_737_000 picoseconds.
|
||||
Weight::from_parts(175_172_000, 0)
|
||||
// Minimum execution time: 63_809_000 picoseconds.
|
||||
Weight::from_parts(65_441_614, 0)
|
||||
.saturating_add(Weight::from_parts(0, 52645))
|
||||
// Standard Error: 3_669
|
||||
.saturating_add(Weight::from_parts(1_013_545, 0).saturating_mul(i.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(9))
|
||||
// Standard Error: 61
|
||||
.saturating_add(Weight::from_parts(6_729, 0).saturating_mul(i.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(10))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
}
|
||||
+57
-47
@@ -17,27 +17,25 @@
|
||||
//! Autogenerated weights for `pallet_bridge_messages`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2023-10-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
|
||||
//! HOSTNAME: `runner-t2sp1qqs-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
|
||||
// target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=bridge-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_bridge_messages
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
|
||||
// --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)]
|
||||
@@ -52,6 +50,8 @@ 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: `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: `BridgeRococoMessages::InboundLanes` (r:1 w:1)
|
||||
@@ -60,16 +60,18 @@ impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<
|
||||
/// 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: `467`
|
||||
// Estimated: `52645`
|
||||
// Minimum execution time: 43_473_000 picoseconds.
|
||||
Weight::from_parts(44_789_000, 0)
|
||||
// Minimum execution time: 41_613_000 picoseconds.
|
||||
Weight::from_parts(42_942_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: `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: `BridgeRococoMessages::InboundLanes` (r:1 w:1)
|
||||
@@ -78,16 +80,18 @@ impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<
|
||||
/// 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: `467`
|
||||
// Estimated: `52645`
|
||||
// Minimum execution time: 53_826_000 picoseconds.
|
||||
Weight::from_parts(61_945_000, 0)
|
||||
// Minimum execution time: 52_657_000 picoseconds.
|
||||
Weight::from_parts(54_020_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: `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: `BridgeRococoMessages::InboundLanes` (r:1 w:1)
|
||||
@@ -96,44 +100,48 @@ impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<
|
||||
/// 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: `467`
|
||||
// Estimated: `52645`
|
||||
// Minimum execution time: 48_194_000 picoseconds.
|
||||
Weight::from_parts(50_311_000, 0)
|
||||
// Minimum execution time: 47_484_000 picoseconds.
|
||||
Weight::from_parts(48_318_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: `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: `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`
|
||||
// Measured: `435`
|
||||
// Estimated: `52645`
|
||||
// Minimum execution time: 40_783_000 picoseconds.
|
||||
Weight::from_parts(43_019_000, 0)
|
||||
// Minimum execution time: 40_860_000 picoseconds.
|
||||
Weight::from_parts(41_720_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: `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: `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_16_kb() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `335`
|
||||
// Measured: `435`
|
||||
// Estimated: `52645`
|
||||
// Minimum execution time: 74_259_000 picoseconds.
|
||||
Weight::from_parts(76_009_000, 0)
|
||||
// Minimum execution time: 75_743_000 picoseconds.
|
||||
Weight::from_parts(76_862_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)
|
||||
@@ -150,8 +158,8 @@ impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `339`
|
||||
// Estimated: `3804`
|
||||
// Minimum execution time: 31_323_000 picoseconds.
|
||||
Weight::from_parts(32_282_000, 0)
|
||||
// Minimum execution time: 30_195_000 picoseconds.
|
||||
Weight::from_parts(31_047_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3804))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
@@ -170,8 +178,8 @@ impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `339`
|
||||
// Estimated: `3804`
|
||||
// Minimum execution time: 31_725_000 picoseconds.
|
||||
Weight::from_parts(32_250_000, 0)
|
||||
// Minimum execution time: 30_410_000 picoseconds.
|
||||
Weight::from_parts(31_057_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3804))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
@@ -190,20 +198,24 @@ impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `339`
|
||||
// Estimated: `6086`
|
||||
// Minimum execution time: 34_244_000 picoseconds.
|
||||
Weight::from_parts(35_033_000, 0)
|
||||
// Minimum execution time: 33_096_000 picoseconds.
|
||||
Weight::from_parts(33_710_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: `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: `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: `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)
|
||||
@@ -212,8 +224,6 @@ impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<
|
||||
/// 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::OutboundXcmpStatus` (r:1 w:1)
|
||||
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`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]`.
|
||||
@@ -222,12 +232,12 @@ impl<T: frame_system::Config> pallet_bridge_messages::WeightInfo for WeightInfo<
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `635`
|
||||
// Estimated: `52645`
|
||||
// Minimum execution time: 172_521_000 picoseconds.
|
||||
Weight::from_parts(173_742_000, 0)
|
||||
// Minimum execution time: 63_158_000 picoseconds.
|
||||
Weight::from_parts(63_769_302, 0)
|
||||
.saturating_add(Weight::from_parts(0, 52645))
|
||||
// Standard Error: 3_678
|
||||
.saturating_add(Weight::from_parts(1_012_559, 0).saturating_mul(i.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(9))
|
||||
// Standard Error: 35
|
||||
.saturating_add(Weight::from_parts(6_896, 0).saturating_mul(i.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(10))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
}
|
||||
+19
-23
@@ -17,27 +17,25 @@
|
||||
//! Autogenerated weights for `pallet_bridge_parachains`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2023-10-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
|
||||
//! HOSTNAME: `runner-t2sp1qqs-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
|
||||
// target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=bridge-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_bridge_parachains
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
|
||||
// --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)]
|
||||
@@ -62,15 +60,13 @@ impl<T: frame_system::Config> pallet_bridge_parachains::WeightInfo for WeightInf
|
||||
/// 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]`.
|
||||
fn submit_parachain_heads_with_n_parachains(p: u32, ) -> Weight {
|
||||
fn submit_parachain_heads_with_n_parachains(_p: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `294`
|
||||
// Estimated: `2543`
|
||||
// Minimum execution time: 33_519_000 picoseconds.
|
||||
Weight::from_parts(34_527_779, 0)
|
||||
// Minimum execution time: 31_409_000 picoseconds.
|
||||
Weight::from_parts(32_561_631, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2543))
|
||||
// Standard Error: 45_887
|
||||
.saturating_add(Weight::from_parts(120_010, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
@@ -88,8 +84,8 @@ impl<T: frame_system::Config> pallet_bridge_parachains::WeightInfo for WeightInf
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `294`
|
||||
// Estimated: `2543`
|
||||
// Minimum execution time: 35_140_000 picoseconds.
|
||||
Weight::from_parts(35_801_000, 0)
|
||||
// Minimum execution time: 32_828_000 picoseconds.
|
||||
Weight::from_parts(33_681_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2543))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
@@ -108,8 +104,8 @@ impl<T: frame_system::Config> pallet_bridge_parachains::WeightInfo for WeightInf
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `294`
|
||||
// Estimated: `2543`
|
||||
// Minimum execution time: 67_110_000 picoseconds.
|
||||
Weight::from_parts(67_951_000, 0)
|
||||
// Minimum execution time: 65_531_000 picoseconds.
|
||||
Weight::from_parts(66_418_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2543))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
+18
-20
@@ -17,27 +17,25 @@
|
||||
//! Autogenerated weights for `pallet_bridge_parachains`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2023-10-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
||||
//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024
|
||||
//! HOSTNAME: `runner-t2sp1qqs-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
|
||||
// target/production/polkadot-parachain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain=bridge-hub-rococo-dev
|
||||
// --wasm-execution=compiled
|
||||
// --pallet=pallet_bridge_parachains
|
||||
// --no-storage-info
|
||||
// --no-median-slopes
|
||||
// --no-min-squares
|
||||
// --extrinsic=*
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --json
|
||||
// --header=./file_header.txt
|
||||
// --output=./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/
|
||||
// --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)]
|
||||
@@ -66,8 +64,8 @@ impl<T: frame_system::Config> pallet_bridge_parachains::WeightInfo for WeightInf
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `367`
|
||||
// Estimated: `2543`
|
||||
// Minimum execution time: 34_968_000 picoseconds.
|
||||
Weight::from_parts(36_202_569, 0)
|
||||
// Minimum execution time: 32_627_000 picoseconds.
|
||||
Weight::from_parts(33_806_957, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2543))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
@@ -86,8 +84,8 @@ impl<T: frame_system::Config> pallet_bridge_parachains::WeightInfo for WeightInf
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `367`
|
||||
// Estimated: `2543`
|
||||
// Minimum execution time: 36_607_000 picoseconds.
|
||||
Weight::from_parts(37_304_000, 0)
|
||||
// Minimum execution time: 34_360_000 picoseconds.
|
||||
Weight::from_parts(35_212_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2543))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
@@ -106,8 +104,8 @@ impl<T: frame_system::Config> pallet_bridge_parachains::WeightInfo for WeightInf
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `367`
|
||||
// Estimated: `2543`
|
||||
// Minimum execution time: 68_548_000 picoseconds.
|
||||
Weight::from_parts(69_402_000, 0)
|
||||
// Minimum execution time: 66_678_000 picoseconds.
|
||||
Weight::from_parts(67_571_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2543))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
@@ -15,12 +15,15 @@
|
||||
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use super::{
|
||||
AccountId, AllPalletsWithSystem, Balances, BaseDeliveryFee, BridgeGrandpaRococoInstance,
|
||||
BridgeGrandpaWococoInstance, DeliveryRewardInBalance, FeeAssetId, ParachainInfo,
|
||||
ParachainSystem, PolkadotXcm, RequiredStakeForStakeAndSlash, Runtime, RuntimeCall,
|
||||
RuntimeEvent, RuntimeFlavor, RuntimeOrigin, TransactionByteFee, WeightToFee, XcmpQueue,
|
||||
AccountId, AllPalletsWithSystem, Balances, BaseDeliveryFee, FeeAssetId, ParachainInfo,
|
||||
ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeFlavor, RuntimeOrigin,
|
||||
TransactionByteFee, WeightToFee, XcmpQueue,
|
||||
};
|
||||
use crate::{
|
||||
bridge_common_config::{
|
||||
BridgeGrandpaRococoInstance, BridgeGrandpaWococoInstance, DeliveryRewardInBalance,
|
||||
RequiredStakeForStakeAndSlash,
|
||||
},
|
||||
bridge_hub_rococo_config::ToBridgeHubWococoHaulBlobExporter,
|
||||
bridge_hub_wococo_config::ToBridgeHubRococoHaulBlobExporter,
|
||||
};
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
use bp_polkadot_core::Signature;
|
||||
use bridge_hub_rococo_runtime::{
|
||||
bridge_hub_rococo_config, bridge_hub_wococo_config,
|
||||
bridge_common_config, bridge_hub_rococo_config, bridge_hub_wococo_config,
|
||||
xcm_config::{RelayNetwork, TokenLocation, XcmConfig},
|
||||
AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, DeliveryRewardInBalance,
|
||||
Executive, ExistentialDeposit, ParachainSystem, PolkadotXcm, RequiredStakeForStakeAndSlash,
|
||||
Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, UncheckedExtrinsic,
|
||||
AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, ExistentialDeposit,
|
||||
ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra,
|
||||
UncheckedExtrinsic,
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use frame_support::parameter_types;
|
||||
@@ -95,12 +95,13 @@ fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys<Runtime
|
||||
|
||||
mod bridge_hub_rococo_tests {
|
||||
use super::*;
|
||||
use bridge_hub_rococo_config::{
|
||||
WithBridgeHubWococoMessageBridge, DEFAULT_XCM_LANE_TO_BRIDGE_HUB_WOCOCO,
|
||||
use bridge_common_config::{
|
||||
BridgeGrandpaWococoInstance, BridgeParachainWococoInstance, DeliveryRewardInBalance,
|
||||
RequiredStakeForStakeAndSlash,
|
||||
};
|
||||
use bridge_hub_rococo_runtime::{
|
||||
BridgeGrandpaWococoInstance, BridgeParachainWococoInstance,
|
||||
WithBridgeHubWococoMessagesInstance,
|
||||
use bridge_hub_rococo_config::{
|
||||
WithBridgeHubWococoMessageBridge, WithBridgeHubWococoMessagesInstance,
|
||||
DEFAULT_XCM_LANE_TO_BRIDGE_HUB_WOCOCO,
|
||||
};
|
||||
|
||||
bridge_hub_test_utils::test_cases::include_teleports_for_native_asset_works!(
|
||||
@@ -186,7 +187,7 @@ mod bridge_hub_rococo_tests {
|
||||
SIBLING_PARACHAIN_ID,
|
||||
Box::new(|runtime_event_encoded: Vec<u8>| {
|
||||
match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) {
|
||||
Ok(RuntimeEvent::BridgeWococoMessages(event)) => Some(event),
|
||||
Ok(RuntimeEvent::BridgeRococoToWococoMessages(event)) => Some(event),
|
||||
_ => None,
|
||||
}
|
||||
}),
|
||||
@@ -299,12 +300,14 @@ mod bridge_hub_rococo_tests {
|
||||
|
||||
mod bridge_hub_wococo_tests {
|
||||
use super::*;
|
||||
use bridge_hub_rococo_runtime::{
|
||||
xcm_config, AllPalletsWithoutSystem, BridgeGrandpaRococoInstance,
|
||||
BridgeParachainRococoInstance, RuntimeFlavor, WithBridgeHubRococoMessagesInstance,
|
||||
use bridge_common_config::{
|
||||
BridgeGrandpaRococoInstance, BridgeParachainRococoInstance, DeliveryRewardInBalance,
|
||||
RequiredStakeForStakeAndSlash,
|
||||
};
|
||||
use bridge_hub_rococo_runtime::{xcm_config, AllPalletsWithoutSystem, RuntimeFlavor};
|
||||
use bridge_hub_wococo_config::{
|
||||
WithBridgeHubRococoMessageBridge, DEFAULT_XCM_LANE_TO_BRIDGE_HUB_ROCOCO,
|
||||
WithBridgeHubRococoMessageBridge, WithBridgeHubRococoMessagesInstance,
|
||||
DEFAULT_XCM_LANE_TO_BRIDGE_HUB_ROCOCO,
|
||||
};
|
||||
use frame_support::assert_ok;
|
||||
|
||||
@@ -416,7 +419,7 @@ mod bridge_hub_wococo_tests {
|
||||
SIBLING_PARACHAIN_ID,
|
||||
Box::new(|runtime_event_encoded: Vec<u8>| {
|
||||
match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) {
|
||||
Ok(RuntimeEvent::BridgeRococoMessages(event)) => Some(event),
|
||||
Ok(RuntimeEvent::BridgeWococoToRococoMessages(event)) => Some(event),
|
||||
_ => None,
|
||||
}
|
||||
}),
|
||||
|
||||
@@ -315,14 +315,16 @@ pub mod rococo {
|
||||
owner: bridges_pallet_owner.clone(),
|
||||
..Default::default()
|
||||
},
|
||||
bridge_rococo_messages: bridge_hub_rococo_runtime::BridgeRococoMessagesConfig {
|
||||
owner: bridges_pallet_owner.clone(),
|
||||
..Default::default()
|
||||
},
|
||||
bridge_wococo_messages: bridge_hub_rococo_runtime::BridgeWococoMessagesConfig {
|
||||
owner: bridges_pallet_owner,
|
||||
..Default::default()
|
||||
},
|
||||
bridge_wococo_to_rococo_messages:
|
||||
bridge_hub_rococo_runtime::BridgeWococoToRococoMessagesConfig {
|
||||
owner: bridges_pallet_owner.clone(),
|
||||
..Default::default()
|
||||
},
|
||||
bridge_rococo_to_wococo_messages:
|
||||
bridge_hub_rococo_runtime::BridgeRococoToWococoMessagesConfig {
|
||||
owner: bridges_pallet_owner,
|
||||
..Default::default()
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user