feat: Rebrand Polkadot/Substrate references to PezkuwiChain

This commit systematically rebrands various references from Parity Technologies'
Polkadot/Substrate ecosystem to PezkuwiChain within the kurdistan-sdk.

Key changes include:
- Updated external repository URLs (zombienet-sdk, parity-db, parity-scale-codec, wasm-instrument) to point to pezkuwichain forks.
- Modified internal documentation and code comments to reflect PezkuwiChain naming and structure.
- Replaced direct references to  with  or specific paths within the  for XCM, Pezkuwi, and other modules.
- Cleaned up deprecated  issue and PR references in various  and  files, particularly in  and  modules.
- Adjusted image and logo URLs in documentation to point to PezkuwiChain assets.
- Removed or rephrased comments related to external Polkadot/Substrate PRs and issues.

This is a significant step towards fully customizing the SDK for the PezkuwiChain ecosystem.
This commit is contained in:
2025-12-14 00:04:10 +03:00
parent 286de54384
commit 1c0e57d984
9084 changed files with 997839 additions and 997557 deletions
@@ -0,0 +1,362 @@
[package]
name = "bridge-hub-pezkuwichain-runtime"
version = "0.5.0"
authors.workspace = true
edition.workspace = true
description = "Pezkuwichain's BridgeHub teyrchain runtime"
license = "Apache-2.0"
homepage.workspace = true
repository.workspace = true
[lints]
workspace = true
[build-dependencies]
bizinikiwi-wasm-builder = { optional = true, workspace = true, default-features = true }
[dependencies]
codec = { features = ["derive"], workspace = true }
hex-literal = { workspace = true, default-features = true }
scale-info = { features = ["derive"], workspace = true }
serde = { optional = true, features = [
"derive",
], workspace = true, default-features = true }
serde_json = { features = ["alloc"], workspace = true }
tracing = { workspace = true }
# Bizinikiwi
pezframe-benchmarking = { optional = true, workspace = true }
pezframe-executive = { workspace = true }
pezframe-metadata-hash-extension = { workspace = true }
pezframe-support = { workspace = true }
pezframe-system = { workspace = true }
pezframe-system-benchmarking = { optional = true, workspace = true }
pezframe-system-rpc-runtime-api = { workspace = true }
pezframe-try-runtime = { optional = true, workspace = true }
pezpallet-aura = { workspace = true }
pezpallet-authorship = { workspace = true }
pezpallet-balances = { workspace = true }
pezpallet-message-queue = { workspace = true }
pezpallet-multisig = { workspace = true }
pezpallet-session = { workspace = true }
pezpallet-timestamp = { workspace = true }
pezpallet-transaction-payment = { workspace = true }
pezpallet-transaction-payment-rpc-runtime-api = { workspace = true }
pezpallet-utility = { workspace = true }
pezsp-api = { workspace = true }
pezsp-block-builder = { workspace = true }
pezsp-consensus-aura = { workspace = true }
pezsp-core = { workspace = true }
pezsp-genesis-builder = { workspace = true }
pezsp-inherents = { workspace = true }
pezsp-io = { workspace = true }
pezsp-keyring = { workspace = true }
pezsp-offchain = { workspace = true }
pezsp-runtime = { workspace = true }
pezsp-session = { workspace = true }
pezsp-std = { workspace = true }
pezsp-storage = { workspace = true }
pezsp-transaction-pool = { workspace = true }
pezsp-version = { workspace = true }
# Pezkuwi
pezpallet-xcm = { workspace = true }
pezpallet-xcm-benchmarks = { optional = true, workspace = true }
pezkuwi-runtime-common = { workspace = true }
pezkuwi-teyrchain-primitives = { workspace = true }
pezkuwichain-runtime-constants = { workspace = true }
xcm = { workspace = true }
xcm-builder = { workspace = true }
xcm-executor = { workspace = true }
xcm-runtime-apis = { workspace = true }
# Pezcumulus
pezcumulus-pezpallet-aura-ext = { workspace = true }
pezcumulus-pezpallet-session-benchmarking = { workspace = true }
pezcumulus-pezpallet-teyrchain-system = { workspace = true }
pezcumulus-pezpallet-weight-reclaim = { workspace = true }
pezcumulus-pezpallet-xcm = { workspace = true }
pezcumulus-pezpallet-xcmp-queue = { features = ["bridging"], workspace = true }
pezcumulus-primitives-aura = { workspace = true }
pezcumulus-primitives-core = { workspace = true }
pezcumulus-primitives-utility = { workspace = true }
pezpallet-collator-selection = { workspace = true }
testnet-teyrchains-constants = { features = ["pezkuwichain"], workspace = true }
teyrchain-info = { workspace = true }
teyrchains-common = { workspace = true }
# Bridges
bp-asset-hub-pezkuwichain = { workspace = true }
bp-asset-hub-zagros = { workspace = true }
bp-bridge-hub-pezkuwichain = { workspace = true }
bp-bridge-hub-zagros = { workspace = true }
bp-header-chain = { workspace = true }
bp-messages = { workspace = true }
bp-pezkuwi-bulletin = { workspace = true }
bp-pezkuwi-core = { workspace = true }
bp-relayers = { workspace = true }
bp-runtime = { workspace = true }
bp-teyrchains = { workspace = true }
bp-xcm-bridge-hub-router = { workspace = true }
bp-zagros = { workspace = true }
bridge-runtime-common = { workspace = true }
pezpallet-bridge-grandpa = { workspace = true }
pezpallet-bridge-messages = { workspace = true }
pezpallet-bridge-relayers = { workspace = true }
pezpallet-bridge-teyrchains = { workspace = true }
pezpallet-xcm-bridge-hub = { workspace = true }
# Ethereum Bridge (Snowbridge)
snowbridge-beacon-primitives = { workspace = true }
snowbridge-core = { workspace = true }
snowbridge-inbound-queue-primitives = { workspace = true }
snowbridge-merkle-tree = { workspace = true }
snowbridge-outbound-queue-primitives = { workspace = true }
snowbridge-outbound-queue-runtime-api = { workspace = true }
snowbridge-pezpallet-ethereum-client = { workspace = true }
snowbridge-pezpallet-inbound-queue = { workspace = true }
snowbridge-pezpallet-inbound-queue-fixtures = { workspace = true }
snowbridge-pezpallet-outbound-queue = { workspace = true }
snowbridge-pezpallet-system = { workspace = true }
snowbridge-system-runtime-api = { workspace = true }
bridge-hub-common = { workspace = true }
[dev-dependencies]
bridge-hub-test-utils = { workspace = true, default-features = true }
bridge-runtime-common = { features = [
"integrity-test",
], workspace = true, default-features = true }
pezpallet-bridge-relayers = { features = ["integrity-test"], workspace = true }
snowbridge-runtime-test-common = { workspace = true, default-features = true }
teyrchains-runtimes-test-utils = { workspace = true, default-features = true }
[features]
default = ["std"]
std = [
"bp-asset-hub-pezkuwichain/std",
"bp-asset-hub-zagros/std",
"bp-bridge-hub-pezkuwichain/std",
"bp-bridge-hub-zagros/std",
"bp-header-chain/std",
"bp-messages/std",
"bp-pezkuwi-bulletin/std",
"bp-pezkuwi-core/std",
"bp-relayers/std",
"bp-runtime/std",
"bp-teyrchains/std",
"bp-xcm-bridge-hub-router/std",
"bp-zagros/std",
"bridge-hub-common/std",
"bridge-runtime-common/std",
"codec/std",
"pezcumulus-pezpallet-aura-ext/std",
"pezcumulus-pezpallet-session-benchmarking/std",
"pezcumulus-pezpallet-teyrchain-system/std",
"pezcumulus-pezpallet-weight-reclaim/std",
"pezcumulus-pezpallet-xcm/std",
"pezcumulus-pezpallet-xcmp-queue/std",
"pezcumulus-primitives-aura/std",
"pezcumulus-primitives-core/std",
"pezcumulus-primitives-utility/std",
"pezframe-benchmarking/std",
"pezframe-executive/std",
"pezframe-metadata-hash-extension/std",
"pezframe-support/std",
"pezframe-system-benchmarking?/std",
"pezframe-system-rpc-runtime-api/std",
"pezframe-system/std",
"pezframe-try-runtime?/std",
"pezpallet-aura/std",
"pezpallet-authorship/std",
"pezpallet-balances/std",
"pezpallet-bridge-grandpa/std",
"pezpallet-bridge-messages/std",
"pezpallet-bridge-relayers/std",
"pezpallet-bridge-teyrchains/std",
"pezpallet-collator-selection/std",
"pezpallet-message-queue/std",
"pezpallet-multisig/std",
"pezpallet-session/std",
"pezpallet-timestamp/std",
"pezpallet-transaction-payment-rpc-runtime-api/std",
"pezpallet-transaction-payment/std",
"pezpallet-utility/std",
"pezpallet-xcm-benchmarks?/std",
"pezpallet-xcm-bridge-hub/std",
"pezpallet-xcm/std",
"pezkuwi-runtime-common/std",
"pezkuwi-teyrchain-primitives/std",
"pezkuwichain-runtime-constants/std",
"scale-info/std",
"serde",
"serde_json/std",
"snowbridge-beacon-primitives/std",
"snowbridge-core/std",
"snowbridge-inbound-queue-primitives/std",
"snowbridge-merkle-tree/std",
"snowbridge-outbound-queue-primitives/std",
"snowbridge-outbound-queue-runtime-api/std",
"snowbridge-pezpallet-ethereum-client/std",
"snowbridge-pezpallet-inbound-queue-fixtures/std",
"snowbridge-pezpallet-inbound-queue/std",
"snowbridge-pezpallet-outbound-queue/std",
"snowbridge-pezpallet-system/std",
"snowbridge-system-runtime-api/std",
"pezsp-api/std",
"pezsp-block-builder/std",
"pezsp-consensus-aura/std",
"pezsp-core/std",
"pezsp-genesis-builder/std",
"pezsp-inherents/std",
"pezsp-io/std",
"pezsp-keyring/std",
"pezsp-offchain/std",
"pezsp-runtime/std",
"pezsp-session/std",
"pezsp-std/std",
"pezsp-storage/std",
"pezsp-transaction-pool/std",
"pezsp-version/std",
"bizinikiwi-wasm-builder",
"testnet-teyrchains-constants/std",
"teyrchain-info/std",
"teyrchains-common/std",
"tracing/std",
"xcm-builder/std",
"xcm-executor/std",
"xcm-runtime-apis/std",
"xcm/std",
]
runtime-benchmarks = [
"bp-asset-hub-pezkuwichain/runtime-benchmarks",
"bp-asset-hub-zagros/runtime-benchmarks",
"bp-bridge-hub-pezkuwichain/runtime-benchmarks",
"bp-bridge-hub-zagros/runtime-benchmarks",
"bp-header-chain/runtime-benchmarks",
"bp-messages/runtime-benchmarks",
"bp-pezkuwi-bulletin/runtime-benchmarks",
"bp-pezkuwi-core/runtime-benchmarks",
"bp-relayers/runtime-benchmarks",
"bp-runtime/runtime-benchmarks",
"bp-teyrchains/runtime-benchmarks",
"bp-xcm-bridge-hub-router/runtime-benchmarks",
"bp-zagros/runtime-benchmarks",
"bridge-hub-common/runtime-benchmarks",
"bridge-hub-test-utils/runtime-benchmarks",
"bridge-runtime-common/runtime-benchmarks",
"pezcumulus-pezpallet-aura-ext/runtime-benchmarks",
"pezcumulus-pezpallet-session-benchmarking/runtime-benchmarks",
"pezcumulus-pezpallet-teyrchain-system/runtime-benchmarks",
"pezcumulus-pezpallet-weight-reclaim/runtime-benchmarks",
"pezcumulus-pezpallet-xcm/runtime-benchmarks",
"pezcumulus-pezpallet-xcmp-queue/runtime-benchmarks",
"pezcumulus-primitives-aura/runtime-benchmarks",
"pezcumulus-primitives-core/runtime-benchmarks",
"pezcumulus-primitives-utility/runtime-benchmarks",
"pezframe-benchmarking/runtime-benchmarks",
"pezframe-executive/runtime-benchmarks",
"pezframe-metadata-hash-extension/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezframe-system-benchmarking/runtime-benchmarks",
"pezframe-system-rpc-runtime-api/runtime-benchmarks",
"pezframe-system/runtime-benchmarks",
"pezframe-try-runtime?/runtime-benchmarks",
"pezpallet-aura/runtime-benchmarks",
"pezpallet-authorship/runtime-benchmarks",
"pezpallet-balances/runtime-benchmarks",
"pezpallet-bridge-grandpa/runtime-benchmarks",
"pezpallet-bridge-messages/runtime-benchmarks",
"pezpallet-bridge-relayers/runtime-benchmarks",
"pezpallet-bridge-teyrchains/runtime-benchmarks",
"pezpallet-collator-selection/runtime-benchmarks",
"pezpallet-message-queue/runtime-benchmarks",
"pezpallet-multisig/runtime-benchmarks",
"pezpallet-session/runtime-benchmarks",
"pezpallet-timestamp/runtime-benchmarks",
"pezpallet-transaction-payment-rpc-runtime-api/runtime-benchmarks",
"pezpallet-transaction-payment/runtime-benchmarks",
"pezpallet-utility/runtime-benchmarks",
"pezpallet-xcm-benchmarks/runtime-benchmarks",
"pezpallet-xcm-bridge-hub/runtime-benchmarks",
"pezpallet-xcm/runtime-benchmarks",
"pezkuwi-runtime-common/runtime-benchmarks",
"pezkuwi-teyrchain-primitives/runtime-benchmarks",
"pezkuwichain-runtime-constants/runtime-benchmarks",
"snowbridge-beacon-primitives/runtime-benchmarks",
"snowbridge-core/runtime-benchmarks",
"snowbridge-inbound-queue-primitives/runtime-benchmarks",
"snowbridge-merkle-tree/runtime-benchmarks",
"snowbridge-outbound-queue-primitives/runtime-benchmarks",
"snowbridge-outbound-queue-runtime-api/runtime-benchmarks",
"snowbridge-pezpallet-ethereum-client/runtime-benchmarks",
"snowbridge-pezpallet-inbound-queue-fixtures/runtime-benchmarks",
"snowbridge-pezpallet-inbound-queue/runtime-benchmarks",
"snowbridge-pezpallet-outbound-queue/runtime-benchmarks",
"snowbridge-pezpallet-system/runtime-benchmarks",
"snowbridge-runtime-test-common/runtime-benchmarks",
"snowbridge-system-runtime-api/runtime-benchmarks",
"pezsp-api/runtime-benchmarks",
"pezsp-block-builder/runtime-benchmarks",
"pezsp-consensus-aura/runtime-benchmarks",
"pezsp-genesis-builder/runtime-benchmarks",
"pezsp-inherents/runtime-benchmarks",
"pezsp-io/runtime-benchmarks",
"pezsp-keyring/runtime-benchmarks",
"pezsp-offchain/runtime-benchmarks",
"pezsp-runtime/runtime-benchmarks",
"pezsp-session/runtime-benchmarks",
"pezsp-transaction-pool/runtime-benchmarks",
"pezsp-version/runtime-benchmarks",
"bizinikiwi-wasm-builder?/runtime-benchmarks",
"testnet-teyrchains-constants/runtime-benchmarks",
"teyrchain-info/runtime-benchmarks",
"teyrchains-common/runtime-benchmarks",
"teyrchains-runtimes-test-utils/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
"xcm-runtime-apis/runtime-benchmarks",
"xcm/runtime-benchmarks",
]
try-runtime = [
"pezcumulus-pezpallet-aura-ext/try-runtime",
"pezcumulus-pezpallet-teyrchain-system/try-runtime",
"pezcumulus-pezpallet-weight-reclaim/try-runtime",
"pezcumulus-pezpallet-xcm/try-runtime",
"pezcumulus-pezpallet-xcmp-queue/try-runtime",
"pezframe-executive/try-runtime",
"pezframe-support/try-runtime",
"pezframe-system/try-runtime",
"pezframe-try-runtime/try-runtime",
"pezpallet-aura/try-runtime",
"pezpallet-authorship/try-runtime",
"pezpallet-balances/try-runtime",
"pezpallet-bridge-grandpa/try-runtime",
"pezpallet-bridge-messages/try-runtime",
"pezpallet-bridge-relayers/try-runtime",
"pezpallet-bridge-teyrchains/try-runtime",
"pezpallet-collator-selection/try-runtime",
"pezpallet-message-queue/try-runtime",
"pezpallet-multisig/try-runtime",
"pezpallet-session/try-runtime",
"pezpallet-timestamp/try-runtime",
"pezpallet-transaction-payment/try-runtime",
"pezpallet-utility/try-runtime",
"pezpallet-xcm-bridge-hub/try-runtime",
"pezpallet-xcm/try-runtime",
"pezkuwi-runtime-common/try-runtime",
"snowbridge-inbound-queue-primitives/try-runtime",
"snowbridge-pezpallet-ethereum-client/try-runtime",
"snowbridge-pezpallet-inbound-queue/try-runtime",
"snowbridge-pezpallet-outbound-queue/try-runtime",
"snowbridge-pezpallet-system/try-runtime",
"pezsp-runtime/try-runtime",
"teyrchain-info/try-runtime",
"teyrchains-common/try-runtime",
]
fast-runtime = []
# A feature that should be enabled when the runtime should be built for on-chain
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
# to make it smaller, like logging for example.
on-chain-release-build = []
@@ -0,0 +1,52 @@
[package]
name = "bp-bridge-hub-pezkuwichain"
description = "Primitives of BridgeHubPezkuwichain teyrchain runtime."
version = "0.7.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
repository.workspace = true
[package.metadata.pezkuwi-sdk]
exclude-from-umbrella = true
[lints]
workspace = true
[dependencies]
codec = { features = ["derive"], workspace = true }
# Bridge Dependencies
bp-bridge-hub-pezcumulus = { workspace = true }
bp-messages = { workspace = true }
bp-runtime = { workspace = true }
bp-xcm-bridge-hub = { workspace = true }
# Bizinikiwi Based Dependencies
pezframe-support = { workspace = true }
pezsp-api = { workspace = true }
pezsp-runtime = { workspace = true }
pezsp-std = { workspace = true }
[features]
default = ["std"]
std = [
"bp-bridge-hub-pezcumulus/std",
"bp-messages/std",
"bp-runtime/std",
"bp-xcm-bridge-hub/std",
"codec/std",
"pezframe-support/std",
"pezsp-api/std",
"pezsp-runtime/std",
"pezsp-std/std",
]
runtime-benchmarks = [
"bp-bridge-hub-pezcumulus/runtime-benchmarks",
"bp-messages/runtime-benchmarks",
"bp-runtime/runtime-benchmarks",
"bp-xcm-bridge-hub/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezsp-api/runtime-benchmarks",
"pezsp-runtime/runtime-benchmarks",
]
@@ -0,0 +1,125 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Module with configuration which reflects BridgeHubPezkuwichain runtime setup (AccountId,
//! Headers, Hashes...)
#![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
pub use bp_bridge_hub_cumulus::*;
use bp_messages::*;
use bp_runtime::{
decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Teyrchain,
};
use codec::{Decode, Encode};
use pezframe_support::{
dispatch::DispatchClass,
pezsp_runtime::{MultiAddress, MultiSigner, RuntimeDebug, StateVersion},
};
/// BridgeHubPezkuwichain teyrchain.
#[derive(RuntimeDebug)]
pub struct BridgeHubPezkuwichain;
impl Chain for BridgeHubPezkuwichain {
const ID: ChainId = *b"bhro";
type BlockNumber = BlockNumber;
type Hash = Hash;
type Hasher = Hasher;
type Header = Header;
type AccountId = AccountId;
type Balance = Balance;
type Nonce = Nonce;
type Signature = Signature;
const STATE_VERSION: StateVersion = StateVersion::V1;
fn max_extrinsic_size() -> u32 {
*BlockLength::get().max.get(DispatchClass::Normal)
}
fn max_extrinsic_weight() -> Weight {
BlockWeightsForAsyncBacking::get()
.get(DispatchClass::Normal)
.max_extrinsic
.unwrap_or(Weight::MAX)
}
}
impl Teyrchain for BridgeHubPezkuwichain {
const TEYRCHAIN_ID: u32 = BRIDGE_HUB_PEZKUWICHAIN_TEYRCHAIN_ID;
const MAX_HEADER_SIZE: u32 = MAX_BRIDGE_HUB_HEADER_SIZE;
}
impl ChainWithMessages for BridgeHubPezkuwichain {
const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str =
WITH_BRIDGE_HUB_PEZKUWICHAIN_MESSAGES_PALLET_NAME;
const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce =
MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX;
const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce =
MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX;
}
/// Public key of the chain account that may be used to verify signatures.
pub type AccountSigner = MultiSigner;
/// The address format for describing accounts.
pub type Address = MultiAddress<AccountId, ()>;
/// Identifier of BridgeHubPezkuwichain in the Pezkuwichain relay chain.
pub const BRIDGE_HUB_PEZKUWICHAIN_TEYRCHAIN_ID: u32 = 1002;
/// Name of the With-BridgeHubPezkuwichain messages pallet instance that is deployed at bridged
/// chains.
pub const WITH_BRIDGE_HUB_PEZKUWICHAIN_MESSAGES_PALLET_NAME: &str = "BridgePezkuwichainMessages";
/// Name of the With-BridgeHubPezkuwichain bridge-relayers pallet instance that is deployed at
/// bridged chains.
pub const WITH_BRIDGE_HUB_PEZKUWICHAIN_RELAYERS_PALLET_NAME: &str = "BridgeRelayers";
/// Pallet index of `BridgeZagrosMessages: pezpallet_bridge_messages::<Instance3>`.
pub const WITH_BRIDGE_PEZKUWICHAIN_TO_ZAGROS_MESSAGES_PALLET_INDEX: u8 = 51;
/// Pallet index of `BridgePezkuwiBulletinMessages: pezpallet_bridge_messages::<Instance4>`.
pub const WITH_BRIDGE_PEZKUWICHAIN_TO_BULLETIN_MESSAGES_PALLET_INDEX: u8 = 61;
decl_bridge_finality_runtime_apis!(bridge_hub_pezkuwichain);
decl_bridge_messages_runtime_apis!(bridge_hub_pezkuwichain, LegacyLaneId);
pezframe_support::parameter_types! {
/// The XCM fee that is paid for executing XCM program (with `ExportMessage` instruction) at the Pezkuwichain
/// BridgeHub.
/// (initially was calculated by test `BridgeHubPezkuwichain::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`)
pub const BridgeHubPezkuwichainBaseXcmFeeInRocs: u128 = 72_091_666;
/// Transaction fee that is paid at the Pezkuwichain BridgeHub for delivering single inbound message.
/// (initially was calculated by test `BridgeHubPezkuwichain::can_calculate_fee_for_standalone_message_delivery_transaction` + `33%`)
pub const BridgeHubPezkuwichainBaseDeliveryFeeInRocs: u128 = 297_685_840;
/// Transaction fee that is paid at the Pezkuwichain BridgeHub for delivering single outbound message confirmation.
/// (initially was calculated by test `BridgeHubPezkuwichain::can_calculate_fee_for_standalone_message_confirmation_transaction` + `33%`)
pub const BridgeHubPezkuwichainBaseConfirmationFeeInRocs: u128 = 56_782_099;
}
/// Wrapper over `BridgeHubPezkuwichain`'s `RuntimeCall` that can be used without a runtime.
#[derive(Decode, Encode)]
pub enum RuntimeCall {
/// Points to the `pezpallet_xcm_bridge_hub` pallet instance for `BridgeHubZagros`.
#[codec(index = 52)]
XcmOverBridgeHubZagros(bp_xcm_bridge_hub::XcmBridgeHubCall),
}
@@ -0,0 +1,26 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#[cfg(feature = "std")]
fn main() {
bizinikiwi_wasm_builder::WasmBuilder::new()
.with_current_project()
.export_heap_base()
.import_memory()
.build()
}
#[cfg(not(feature = "std"))]
fn main() {}
@@ -0,0 +1,133 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Pezcumulus.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! 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_relayers::RewardsAccountParams;
use bp_teyrchains::SingleParaStoredHeaderDataBuilder;
use pezframe_support::{parameter_types, traits::ConstU32};
parameter_types! {
pub const RelayChainHeadersToKeep: u32 = 1024;
pub const TeyrchainHeadsToKeep: u32 = 64;
pub const ZagrosBridgeTeyrchainPalletName: &'static str = bp_zagros::PARAS_PALLET_NAME;
pub const MaxZagrosParaHeadDataSize: u32 = bp_zagros::MAX_NESTED_TEYRCHAIN_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 Zagros relay chain.
pub type BridgeGrandpaZagrosInstance = pezpallet_bridge_grandpa::Instance3;
impl pezpallet_bridge_grandpa::Config<BridgeGrandpaZagrosInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type BridgedChain = bp_zagros::Zagros;
type MaxFreeHeadersPerBlock = ConstU32<4>;
type FreeHeadersInterval = ConstU32<5>;
type HeadersToKeep = RelayChainHeadersToKeep;
type WeightInfo = weights::pezpallet_bridge_grandpa::WeightInfo<Runtime>;
}
/// Add teyrchain bridge pallet to track Zagros BridgeHub teyrchain
pub type BridgeTeyrchainZagrosInstance = pezpallet_bridge_teyrchains::Instance3;
impl pezpallet_bridge_teyrchains::Config<BridgeTeyrchainZagrosInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = weights::pezpallet_bridge_teyrchains::WeightInfo<Runtime>;
type BridgesGrandpaPalletInstance = BridgeGrandpaZagrosInstance;
type ParasPalletName = ZagrosBridgeTeyrchainPalletName;
type ParaStoredHeaderDataBuilder =
SingleParaStoredHeaderDataBuilder<bp_bridge_hub_zagros::BridgeHubZagros>;
type HeadsToKeep = TeyrchainHeadsToKeep;
type MaxParaHeadDataSize = MaxZagrosParaHeadDataSize;
type OnNewHead = ();
}
/// Allows collect and claim rewards for relayers
pub type RelayersForLegacyLaneIdsMessagesInstance = ();
impl pezpallet_bridge_relayers::Config<RelayersForLegacyLaneIdsMessagesInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type RewardBalance = Balance;
type Reward = RewardsAccountParams<bp_messages::LegacyLaneId>;
type PaymentProcedure = bp_relayers::PayRewardFromAccount<
pezpallet_balances::Pallet<Runtime>,
AccountId,
bp_messages::LegacyLaneId,
Self::RewardBalance,
>;
type StakeAndSlash = pezpallet_bridge_relayers::StakeAndSlashNamed<
AccountId,
BlockNumber,
Balances,
RelayerStakeReserveId,
RequiredStakeForStakeAndSlash,
RelayerStakeLease,
>;
type Balance = Balance;
type WeightInfo = weights::pezpallet_bridge_relayers_legacy::WeightInfo<Runtime>;
}
/// Allows collect and claim rewards for relayers
pub type RelayersForPermissionlessLanesInstance = pezpallet_bridge_relayers::Instance2;
impl pezpallet_bridge_relayers::Config<RelayersForPermissionlessLanesInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type RewardBalance = Balance;
type Reward = RewardsAccountParams<bp_messages::HashedLaneId>;
type PaymentProcedure = bp_relayers::PayRewardFromAccount<
pezpallet_balances::Pallet<Runtime>,
AccountId,
bp_messages::HashedLaneId,
Self::RewardBalance,
>;
type StakeAndSlash = pezpallet_bridge_relayers::StakeAndSlashNamed<
AccountId,
BlockNumber,
Balances,
RelayerStakeReserveId,
RequiredStakeForStakeAndSlash,
RelayerStakeLease,
>;
type Balance = Balance;
type WeightInfo = weights::pezpallet_bridge_relayers_permissionless_lanes::WeightInfo<Runtime>;
}
/// Add GRANDPA bridge pallet to track Pezkuwichain Bulletin chain.
pub type BridgeGrandpaPezkuwichainBulletinInstance = pezpallet_bridge_grandpa::Instance4;
impl pezpallet_bridge_grandpa::Config<BridgeGrandpaPezkuwichainBulletinInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type BridgedChain = bp_pezkuwi_bulletin::PezkuwiBulletin;
type MaxFreeHeadersPerBlock = ConstU32<4>;
type FreeHeadersInterval = ConstU32<5>;
type HeadersToKeep = RelayChainHeadersToKeep;
// Technically this is incorrect - we have two pallet instances and ideally we shall
// benchmark every instance separately. But the benchmarking engine has a flaw - it
// messes with components. E.g. in Kusama maximal validators count is 1024 and in
// Bulletin chain it is 100. But benchmarking engine runs Bulletin benchmarks using
// components range, computed for Kusama => it causes an error.
//
// In practice, however, GRANDPA pallet works the same way for all bridged chains, so
// weights are also the same for both bridges.
type WeightInfo = weights::pezpallet_bridge_grandpa::WeightInfo<Runtime>;
}
@@ -0,0 +1,284 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Pezcumulus.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Bridge definitions used on BridgeHubPezkuwichain for bridging to Pezkuwichain Bulletin.
//!
//! Pezkuwichain Bulletin chain will be the 1:1 copy of the Pezkuwi Bulletin, so we
//! are reusing Pezkuwi Bulletin chain primitives everywhere here.
use crate::{
bridge_common_config::RelayersForPermissionlessLanesInstance, weights,
xcm_config::UniversalLocation, AccountId, Balance, Balances, BridgePezkuwichainBulletinGrandpa,
BridgePezkuwichainBulletinMessages, Runtime, RuntimeEvent, RuntimeHoldReason,
XcmOverPezkuwichainBulletin, XcmRouter,
};
use bp_messages::{
source_chain::FromBridgedChainMessagesDeliveryProof,
target_chain::FromBridgedChainMessagesProof, LegacyLaneId,
};
use pezframe_support::{
parameter_types,
traits::{Equals, PalletInfoAccess},
};
use pezframe_system::{EnsureNever, EnsureRoot};
use pezpallet_bridge_messages::LaneIdOf;
use pezpallet_bridge_relayers::extension::{
BridgeRelayersTransactionExtension, WithMessagesExtensionConfig,
};
use pezpallet_xcm_bridge_hub::XcmAsPlainPayload;
use pezkuwi_teyrchain_primitives::primitives::Sibling;
use testnet_teyrchains_constants::pezkuwichain::currency::UNITS as TYR;
use xcm::{
latest::prelude::*,
prelude::{InteriorLocation, NetworkId},
AlwaysV5,
};
use xcm_builder::{BridgeBlobDispatcher, ParentIsPreset, SiblingTeyrchainConvertsVia};
parameter_types! {
/// Interior location (relative to this runtime) of the with-PezkuwichainBulletin messages pallet.
pub BridgePezkuwichainToPezkuwichainBulletinMessagesPalletInstance: InteriorLocation = [
PalletInstance(<BridgePezkuwichainBulletinMessages as PalletInfoAccess>::index() as u8)
].into();
/// Pezkuwichain Bulletin Network identifier.
pub PezkuwichainBulletinGlobalConsensusNetwork: NetworkId = NetworkId::PezkuwiBulletin;
/// Relative location of the Pezkuwichain Bulletin chain.
pub PezkuwichainBulletinGlobalConsensusNetworkLocation: Location = Location::new(
2,
[GlobalConsensus(PezkuwichainBulletinGlobalConsensusNetwork::get())]
);
// see the `FEE_BOOST_PER_RELAY_HEADER` constant get the meaning of this value
pub PriorityBoostPerRelayHeader: u64 = 58_014_163_614_163;
/// Priority boost that the registered relayer receives for every additional message in the message
/// delivery transaction.
///
/// It is determined semi-automatically - see `FEE_BOOST_PER_MESSAGE` constant to get the
/// meaning of this value.
pub PriorityBoostPerMessage: u64 = 364_088_888_888_888;
/// PeoplePezkuwichain location
pub PeoplePezkuwichainLocation: Location = Location::new(1, [Teyrchain(pezkuwichain_runtime_constants::system_teyrchain::PEOPLE_ID)]);
pub storage BridgeDeposit: Balance = 5 * TYR;
}
/// Proof of messages, coming from Pezkuwichain Bulletin chain.
pub type FromPezkuwichainBulletinMessagesProof<MI> =
FromBridgedChainMessagesProof<bp_pezkuwi_bulletin::Hash, LaneIdOf<Runtime, MI>>;
/// Messages delivery proof for Pezkuwichain Bridge Hub -> Pezkuwichain Bulletin messages.
pub type ToPezkuwichainBulletinMessagesDeliveryProof<MI> =
FromBridgedChainMessagesDeliveryProof<bp_pezkuwi_bulletin::Hash, LaneIdOf<Runtime, MI>>;
/// Dispatches received XCM messages from other bridge.
type FromPezkuwichainBulletinMessageBlobDispatcher = BridgeBlobDispatcher<
XcmRouter,
UniversalLocation,
BridgePezkuwichainToPezkuwichainBulletinMessagesPalletInstance,
>;
/// Transaction extension that refunds relayers that are delivering messages from the Pezkuwichain
/// Bulletin chain.
pub type OnBridgeHubPezkuwichainRefundPezkuwichainBulletinMessages =
BridgeRelayersTransactionExtension<
Runtime,
WithMessagesExtensionConfig<
StrOnBridgeHubPezkuwichainRefundPezkuwichainBulletinMessages,
Runtime,
WithPezkuwichainBulletinMessagesInstance,
RelayersForPermissionlessLanesInstance,
PriorityBoostPerMessage,
>,
>;
bp_runtime::generate_static_str_provider!(
OnBridgeHubPezkuwichainRefundPezkuwichainBulletinMessages
);
/// Add XCM messages support for BridgeHubPezkuwichain to support Pezkuwichain->Pezkuwichain
/// Bulletin XCM messages.
pub type WithPezkuwichainBulletinMessagesInstance = pezpallet_bridge_messages::Instance4;
impl pezpallet_bridge_messages::Config<WithPezkuwichainBulletinMessagesInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo =
weights::pezpallet_bridge_messages_pezkuwichain_to_pezkuwichain_bulletin::WeightInfo<Runtime>;
type ThisChain = bp_bridge_hub_pezkuwichain::BridgeHubPezkuwichain;
type BridgedChain = bp_pezkuwi_bulletin::PezkuwiBulletin;
type BridgedHeaderChain = BridgePezkuwichainBulletinGrandpa;
type OutboundPayload = XcmAsPlainPayload;
type InboundPayload = XcmAsPlainPayload;
type LaneId = LegacyLaneId;
type DeliveryPayments = ();
type DeliveryConfirmationPayments = ();
type MessageDispatch = XcmOverPezkuwichainBulletin;
type OnMessagesDelivered = XcmOverPezkuwichainBulletin;
}
/// Add support for the export and dispatch of XCM programs.
pub type XcmOverPezkuwiBulletinInstance = pezpallet_xcm_bridge_hub::Instance2;
impl pezpallet_xcm_bridge_hub::Config<XcmOverPezkuwiBulletinInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type UniversalLocation = UniversalLocation;
type BridgedNetwork = PezkuwichainBulletinGlobalConsensusNetworkLocation;
type BridgeMessagesPalletInstance = WithPezkuwichainBulletinMessagesInstance;
type MessageExportPrice = ();
type DestinationVersion = AlwaysV5;
type ForceOrigin = EnsureRoot<AccountId>;
// We don't want to allow creating bridges for this instance.
type OpenBridgeOrigin = EnsureNever<Location>;
// Converter aligned with `OpenBridgeOrigin`.
type BridgeOriginAccountIdConverter =
(ParentIsPreset<AccountId>, SiblingTeyrchainConvertsVia<Sibling, AccountId>);
type BridgeDeposit = BridgeDeposit;
type Currency = Balances;
type RuntimeHoldReason = RuntimeHoldReason;
// Do not require deposit from People teyrchains.
type AllowWithoutBridgeDeposit = Equals<PeoplePezkuwichainLocation>;
type LocalXcmChannelManager = ();
type BlobDispatcher = FromPezkuwichainBulletinMessageBlobDispatcher;
}
#[cfg(test)]
mod tests {
use super::*;
use crate::bridge_common_config::BridgeGrandpaPezkuwichainBulletinInstance;
use bridge_runtime_common::{
assert_complete_bridge_types, integrity::check_message_lane_weights,
};
use testnet_teyrchains_constants::pezkuwichain;
use teyrchains_common::Balance;
/// Every additional message in the message delivery transaction boosts its priority.
/// So the priority of transaction with `N+1` messages is larger than priority of
/// transaction with `N` messages by the `PriorityBoostPerMessage`.
///
/// Economically, it is an equivalent of adding tip to the transaction with `N` messages.
/// The `FEE_BOOST_PER_MESSAGE` constant is the value of this tip.
///
/// We want this tip to be large enough (delivery transactions with more messages = less
/// operational costs and a faster bridge), so this value should be significant.
const FEE_BOOST_PER_MESSAGE: Balance = 2 * pezkuwichain::currency::UNITS;
// see `FEE_BOOST_PER_MESSAGE` comment
const FEE_BOOST_PER_RELAY_HEADER: Balance = 2 * pezkuwichain::currency::UNITS;
#[test]
fn ensure_bridge_hub_pezkuwichain_message_lane_weights_are_correct() {
check_message_lane_weights::<
bp_bridge_hub_pezkuwichain::BridgeHubPezkuwichain,
Runtime,
WithPezkuwichainBulletinMessagesInstance,
>(
bp_pezkuwi_bulletin::EXTRA_STORAGE_PROOF_SIZE,
bp_bridge_hub_pezkuwichain::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX,
bp_bridge_hub_pezkuwichain::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
true,
);
}
#[test]
fn ensure_bridge_integrity() {
assert_complete_bridge_types!(
runtime: Runtime,
with_bridged_chain_messages_instance: WithPezkuwichainBulletinMessagesInstance,
this_chain: bp_bridge_hub_pezkuwichain::BridgeHubPezkuwichain,
bridged_chain: bp_pezkuwi_bulletin::PezkuwiBulletin,
expected_payload_type: XcmAsPlainPayload,
);
// we can't use `assert_complete_bridge_constants` here, because there's a trick with
// Bulletin chain - it has the same (almost) runtime for Pezkuwi Bulletin and Pezkuwichain
// Bulletin, so we have to adhere Pezkuwi names here
pezpallet_bridge_relayers::extension::per_relay_header::ensure_priority_boost_is_sane::<
Runtime,
BridgeGrandpaPezkuwichainBulletinInstance,
PriorityBoostPerRelayHeader,
>(FEE_BOOST_PER_RELAY_HEADER);
pezpallet_bridge_relayers::extension::per_message::ensure_priority_boost_is_sane::<
Runtime,
WithPezkuwichainBulletinMessagesInstance,
PriorityBoostPerMessage,
>(FEE_BOOST_PER_MESSAGE);
let expected: InteriorLocation = PalletInstance(
bp_bridge_hub_pezkuwichain::WITH_BRIDGE_PEZKUWICHAIN_TO_BULLETIN_MESSAGES_PALLET_INDEX,
)
.into();
assert_eq!(BridgePezkuwichainToPezkuwichainBulletinMessagesPalletInstance::get(), expected,);
}
}
#[cfg(feature = "runtime-benchmarks")]
pub(crate) fn open_bridge_for_benchmarks<R, XBHI, C>(
with: pezpallet_xcm_bridge_hub::LaneIdOf<R, XBHI>,
sibling_para_id: u32,
) -> InteriorLocation
where
R: pezpallet_xcm_bridge_hub::Config<XBHI>,
XBHI: 'static,
C: xcm_executor::traits::ConvertLocation<
bp_runtime::AccountIdOf<pezpallet_xcm_bridge_hub::ThisChainOf<R, XBHI>>,
>,
{
use pezpallet_xcm_bridge_hub::{Bridge, BridgeId, BridgeState};
use pezsp_runtime::traits::Zero;
use xcm::{latest::PEZKUWICHAIN_GENESIS_HASH, VersionedInteriorLocation};
// insert bridge metadata
let lane_id = with;
let sibling_teyrchain = Location::new(1, [Teyrchain(sibling_para_id)]);
let universal_source =
[GlobalConsensus(ByGenesis(PEZKUWICHAIN_GENESIS_HASH)), Teyrchain(sibling_para_id)].into();
let universal_destination =
[GlobalConsensus(PezkuwichainBulletinGlobalConsensusNetwork::get())].into();
let bridge_id = BridgeId::new(&universal_source, &universal_destination);
// insert only bridge metadata, because the benchmarks create lanes
pezpallet_xcm_bridge_hub::Bridges::<R, XBHI>::insert(
bridge_id,
Bridge {
bridge_origin_relative_location: alloc::boxed::Box::new(
sibling_teyrchain.clone().into(),
),
bridge_origin_universal_location: alloc::boxed::Box::new(
VersionedInteriorLocation::from(universal_source.clone()),
),
bridge_destination_universal_location: alloc::boxed::Box::new(
VersionedInteriorLocation::from(universal_destination),
),
state: BridgeState::Opened,
bridge_owner_account: C::convert_location(&sibling_teyrchain).expect("valid AccountId"),
deposit: Zero::zero(),
lane_id,
},
);
pezpallet_xcm_bridge_hub::LaneToBridge::<R, XBHI>::insert(lane_id, bridge_id);
universal_source
}
@@ -0,0 +1,257 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Pezcumulus.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#[cfg(not(feature = "runtime-benchmarks"))]
use crate::XcmRouter;
use crate::{
xcm_config, xcm_config::UniversalLocation, Balances, EthereumInboundQueue,
EthereumOutboundQueue, EthereumSystem, MessageQueue, Runtime, RuntimeEvent, TransactionByteFee,
TreasuryAccount,
};
use snowbridge_beacon_primitives::{Fork, ForkVersions};
use snowbridge_core::{gwei, meth, AllowSiblingsOnly, PricingParameters, Rewards};
use snowbridge_inbound_queue_primitives::v1::MessageToXcm;
use snowbridge_outbound_queue_primitives::v1::EthereumBlobExporter;
use teyrchains_common::{AccountId, Balance};
use pezsp_core::H160;
use testnet_teyrchains_constants::pezkuwichain::{
currency::*,
fee::WeightToFee,
snowbridge::{EthereumLocation, EthereumNetwork, INBOUND_QUEUE_PALLET_INDEX},
};
use crate::xcm_config::RelayNetwork;
#[cfg(feature = "runtime-benchmarks")]
use benchmark_helpers::DoNothingRouter;
use bp_asset_hub_pezkuwichain::CreateForeignAssetDeposit;
use pezframe_support::{parameter_types, weights::ConstantMultiplier};
use hex_literal::hex;
use pezpallet_xcm::EnsureXcm;
use pezsp_runtime::{
traits::{ConstU32, ConstU8, Keccak256},
FixedU128,
};
use xcm::prelude::{GlobalConsensus, InteriorLocation, Location, Teyrchain};
/// Exports message to the Ethereum Gateway contract.
pub type SnowbridgeExporter = EthereumBlobExporter<
UniversalLocation,
EthereumNetwork,
snowbridge_pallet_outbound_queue::Pallet<Runtime>,
snowbridge_core::AgentIdOf,
EthereumSystem,
>;
// Ethereum Bridge
parameter_types! {
pub storage EthereumGatewayAddress: H160 = H160(hex!("EDa338E4dC46038493b885327842fD3E301CaB39"));
}
parameter_types! {
pub const CreateAssetCall: [u8;2] = [53, 0];
pub Parameters: PricingParameters<u128> = PricingParameters {
exchange_rate: FixedU128::from_rational(1, 400),
fee_per_gas: gwei(20),
rewards: Rewards { local: 1 * UNITS, remote: meth(1) },
multiplier: FixedU128::from_rational(1, 1),
};
pub AssetHubFromEthereum: Location = Location::new(1,[GlobalConsensus(RelayNetwork::get()),Teyrchain(pezkuwichain_runtime_constants::system_teyrchain::ASSET_HUB_ID)]);
pub EthereumUniversalLocation: InteriorLocation = [GlobalConsensus(EthereumNetwork::get())].into();
}
impl snowbridge_pallet_inbound_queue::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Verifier = snowbridge_pallet_ethereum_client::Pallet<Runtime>;
type Token = Balances;
#[cfg(not(feature = "runtime-benchmarks"))]
type XcmSender = XcmRouter;
#[cfg(feature = "runtime-benchmarks")]
type XcmSender = DoNothingRouter;
type ChannelLookup = EthereumSystem;
type GatewayAddress = EthereumGatewayAddress;
#[cfg(feature = "runtime-benchmarks")]
type Helper = Runtime;
type MessageConverter = MessageToXcm<
CreateAssetCall,
CreateForeignAssetDeposit,
ConstU8<INBOUND_QUEUE_PALLET_INDEX>,
AccountId,
Balance,
EthereumSystem,
EthereumUniversalLocation,
AssetHubFromEthereum,
>;
type WeightToFee = WeightToFee;
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
type MaxMessageSize = ConstU32<2048>;
type WeightInfo = crate::weights::snowbridge_pallet_inbound_queue::WeightInfo<Runtime>;
type PricingParameters = EthereumSystem;
type AssetTransactor = <xcm_config::XcmConfig as xcm_executor::Config>::AssetTransactor;
}
impl snowbridge_pallet_outbound_queue::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Hashing = Keccak256;
type MessageQueue = MessageQueue;
type Decimals = ConstU8<12>;
type MaxMessagePayloadSize = ConstU32<2048>;
type MaxMessagesPerBlock = ConstU32<32>;
type GasMeter = crate::ConstantGasMeter;
type Balance = Balance;
type WeightToFee = WeightToFee;
type WeightInfo = crate::weights::snowbridge_pallet_outbound_queue::WeightInfo<Runtime>;
type PricingParameters = EthereumSystem;
type Channels = EthereumSystem;
}
#[cfg(any(feature = "std", feature = "fast-runtime", feature = "runtime-benchmarks", test))]
parameter_types! {
pub const ChainForkVersions: ForkVersions = ForkVersions {
genesis: Fork {
version: hex!("00000000"),
epoch: 0,
},
altair: Fork {
version: hex!("01000000"),
epoch: 0,
},
bellatrix: Fork {
version: hex!("02000000"),
epoch: 0,
},
capella: Fork {
version: hex!("03000000"),
epoch: 0,
},
deneb: Fork {
version: hex!("04000000"),
epoch: 0,
},
electra: Fork {
version: hex!("05000000"),
epoch: 0,
},
fulu: Fork {
version: hex!("06000000"),
epoch: 5000000,
}
};
}
#[cfg(not(any(feature = "std", feature = "fast-runtime", feature = "runtime-benchmarks", test)))]
parameter_types! {
pub const ChainForkVersions: ForkVersions = ForkVersions {
genesis: Fork {
version: hex!("90000069"),
epoch: 0,
},
altair: Fork {
version: hex!("90000070"),
epoch: 50,
},
bellatrix: Fork {
version: hex!("90000071"),
epoch: 100,
},
capella: Fork {
version: hex!("90000072"),
epoch: 56832,
},
deneb: Fork {
version: hex!("90000073"),
epoch: 132608,
},
electra: Fork {
version: hex!("90000074"),
epoch: 222464,
},
fulu: Fork {
version: hex!("90000075"),
epoch: 272640, // https://notes.ethereum.org/@bbusa/fusaka-bpo-timeline
},
};
}
pub const SLOTS_PER_EPOCH: u32 = snowbridge_pallet_ethereum_client::config::SLOTS_PER_EPOCH as u32;
impl snowbridge_pallet_ethereum_client::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type ForkVersions = ChainForkVersions;
// Free consensus update every epoch. Works out to be 225 updates per day.
type FreeHeadersInterval = ConstU32<SLOTS_PER_EPOCH>;
type WeightInfo = crate::weights::snowbridge_pallet_ethereum_client::WeightInfo<Runtime>;
}
impl snowbridge_pallet_system::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type OutboundQueue = EthereumOutboundQueue;
type SiblingOrigin = EnsureXcm<AllowSiblingsOnly>;
type AgentIdOf = snowbridge_core::AgentIdOf;
type TreasuryAccount = TreasuryAccount;
type Token = Balances;
type WeightInfo = crate::weights::snowbridge_pallet_system::WeightInfo<Runtime>;
#[cfg(feature = "runtime-benchmarks")]
type Helper = ();
type DefaultPricingParameters = Parameters;
type InboundDeliveryCost = EthereumInboundQueue;
type UniversalLocation = UniversalLocation;
type EthereumLocation = EthereumLocation;
}
#[cfg(feature = "runtime-benchmarks")]
pub mod benchmark_helpers {
use crate::{EthereumBeaconClient, Runtime, RuntimeOrigin};
use codec::Encode;
use snowbridge_inbound_queue_primitives::EventFixture;
use snowbridge_pallet_inbound_queue::BenchmarkHelper;
use snowbridge_pallet_inbound_queue_fixtures::register_token::make_register_token_message;
use xcm::latest::{Assets, Location, SendError, SendResult, SendXcm, Xcm, XcmHash};
impl<T: snowbridge_pallet_ethereum_client::Config> BenchmarkHelper<T> for Runtime {
fn initialize_storage() -> EventFixture {
let message = make_register_token_message();
EthereumBeaconClient::store_finalized_header(
message.finalized_header,
message.block_roots_root,
)
.unwrap();
message
}
}
pub struct DoNothingRouter;
impl SendXcm for DoNothingRouter {
type Ticket = Xcm<()>;
fn validate(
_dest: &mut Option<Location>,
xcm: &mut Option<Xcm<()>>,
) -> SendResult<Self::Ticket> {
Ok((xcm.clone().unwrap(), Assets::new()))
}
fn deliver(xcm: Xcm<()>) -> Result<XcmHash, SendError> {
let hash = xcm.using_encoded(pezsp_io::hashing::blake2_256);
Ok(hash)
}
}
impl snowbridge_pallet_system::BenchmarkHelper<RuntimeOrigin> for () {
fn make_xcm_origin(location: Location) -> RuntimeOrigin {
RuntimeOrigin::from(pezpallet_xcm::Origin::Xcm(location))
}
}
}
@@ -0,0 +1,434 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Pezcumulus.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Bridge definitions used on BridgeHubPezkuwichain for bridging to BridgeHubZagros.
use crate::{
bridge_common_config::{
BridgeTeyrchainZagrosInstance, DeliveryRewardInBalance,
RelayersForLegacyLaneIdsMessagesInstance,
},
weights,
xcm_config::UniversalLocation,
AccountId, Balance, Balances, BridgeZagrosMessages, PezkuwiXcm, Runtime, RuntimeEvent,
RuntimeHoldReason, XcmOverBridgeHubZagros, XcmRouter, XcmpQueue,
};
use bp_messages::{
source_chain::FromBridgedChainMessagesDeliveryProof,
target_chain::FromBridgedChainMessagesProof, LegacyLaneId,
};
use bridge_hub_common::xcm_version::XcmVersionOfDestAndRemoteBridge;
use pezpallet_xcm_bridge_hub::{BridgeId, XcmAsPlainPayload};
use pezframe_support::{parameter_types, traits::PalletInfoAccess};
use pezframe_system::{EnsureNever, EnsureRoot};
use pezpallet_bridge_messages::LaneIdOf;
use pezpallet_bridge_relayers::extension::{
BridgeRelayersTransactionExtension, WithMessagesExtensionConfig,
};
use pezkuwi_teyrchain_primitives::primitives::Sibling;
use testnet_teyrchains_constants::pezkuwichain::currency::UNITS as TYR;
use teyrchains_common::xcm_config::{AllSiblingSystemTeyrchains, RelayOrOtherSystemTeyrchains};
use xcm::{
latest::{prelude::*, ZAGROS_GENESIS_HASH},
prelude::{InteriorLocation, NetworkId},
};
use xcm_builder::{BridgeBlobDispatcher, ParentIsPreset, SiblingTeyrchainConvertsVia};
parameter_types! {
pub BridgePezkuwichainToZagrosMessagesPalletInstance: InteriorLocation = [PalletInstance(<BridgeZagrosMessages as PalletInfoAccess>::index() as u8)].into();
pub ZagrosGlobalConsensusNetwork: NetworkId = NetworkId::ByGenesis(ZAGROS_GENESIS_HASH);
pub ZagrosGlobalConsensusNetworkLocation: Location = Location::new(
2,
[GlobalConsensus(ZagrosGlobalConsensusNetwork::get())]
);
// see the `FEE_BOOST_PER_RELAY_HEADER` constant get the meaning of this value
pub PriorityBoostPerRelayHeader: u64 = 32_007_814_407_814;
// see the `FEE_BOOST_PER_TEYRCHAIN_HEADER` constant get the meaning of this value
pub PriorityBoostPerTeyrchainHeader: u64 = 1_396_340_903_540_903;
// see the `FEE_BOOST_PER_MESSAGE` constant to get the meaning of this value
pub PriorityBoostPerMessage: u64 = 364_088_888_888_888;
pub BridgeHubZagrosLocation: Location = Location::new(
2,
[
GlobalConsensus(ZagrosGlobalConsensusNetwork::get()),
Teyrchain(<bp_bridge_hub_zagros::BridgeHubZagros as bp_runtime::Teyrchain>::TEYRCHAIN_ID)
]
);
pub storage BridgeDeposit: Balance = 5 * TYR;
}
/// Proof of messages, coming from Zagros.
pub type FromZagrosBridgeHubMessagesProof<MI> =
FromBridgedChainMessagesProof<bp_bridge_hub_zagros::Hash, LaneIdOf<Runtime, MI>>;
/// Messages delivery proof for Pezkuwichain Bridge Hub -> Zagros Bridge Hub messages.
pub type ToZagrosBridgeHubMessagesDeliveryProof<MI> =
FromBridgedChainMessagesDeliveryProof<bp_bridge_hub_zagros::Hash, LaneIdOf<Runtime, MI>>;
/// Dispatches received XCM messages from other bridge
type FromZagrosMessageBlobDispatcher = BridgeBlobDispatcher<
XcmRouter,
UniversalLocation,
BridgePezkuwichainToZagrosMessagesPalletInstance,
>;
/// Transaction extension that refunds relayers that are delivering messages from the Zagros
/// teyrchain.
pub type OnBridgeHubPezkuwichainRefundBridgeHubZagrosMessages = BridgeRelayersTransactionExtension<
Runtime,
WithMessagesExtensionConfig<
StrOnBridgeHubPezkuwichainRefundBridgeHubZagrosMessages,
Runtime,
WithBridgeHubZagrosMessagesInstance,
RelayersForLegacyLaneIdsMessagesInstance,
PriorityBoostPerMessage,
>,
>;
bp_runtime::generate_static_str_provider!(OnBridgeHubPezkuwichainRefundBridgeHubZagrosMessages);
/// Add XCM messages support for BridgeHubPezkuwichain to support Pezkuwichain->Zagros XCM messages
pub type WithBridgeHubZagrosMessagesInstance = pezpallet_bridge_messages::Instance3;
impl pezpallet_bridge_messages::Config<WithBridgeHubZagrosMessagesInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = weights::pezpallet_bridge_messages_pezkuwichain_to_zagros::WeightInfo<Runtime>;
type ThisChain = bp_bridge_hub_pezkuwichain::BridgeHubPezkuwichain;
type BridgedChain = bp_bridge_hub_zagros::BridgeHubZagros;
type BridgedHeaderChain = pezpallet_bridge_teyrchains::TeyrchainHeaders<
Runtime,
BridgeTeyrchainZagrosInstance,
bp_bridge_hub_zagros::BridgeHubZagros,
>;
type OutboundPayload = XcmAsPlainPayload;
type InboundPayload = XcmAsPlainPayload;
type LaneId = LegacyLaneId;
type DeliveryPayments = ();
type DeliveryConfirmationPayments = pezpallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
Runtime,
WithBridgeHubZagrosMessagesInstance,
RelayersForLegacyLaneIdsMessagesInstance,
DeliveryRewardInBalance,
>;
type MessageDispatch = XcmOverBridgeHubZagros;
type OnMessagesDelivered = XcmOverBridgeHubZagros;
}
/// Add support for the export and dispatch of XCM programs withing
/// `WithBridgeHubZagrosMessagesInstance`.
pub type XcmOverBridgeHubZagrosInstance = pezpallet_xcm_bridge_hub::Instance1;
impl pezpallet_xcm_bridge_hub::Config<XcmOverBridgeHubZagrosInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type UniversalLocation = UniversalLocation;
type BridgedNetwork = ZagrosGlobalConsensusNetworkLocation;
type BridgeMessagesPalletInstance = WithBridgeHubZagrosMessagesInstance;
type MessageExportPrice = ();
type DestinationVersion = XcmVersionOfDestAndRemoteBridge<PezkuwiXcm, BridgeHubZagrosLocation>;
type ForceOrigin = EnsureRoot<AccountId>;
// We don't want to allow creating bridges for this instance with `LegacyLaneId`.
type OpenBridgeOrigin = EnsureNever<Location>;
// Converter aligned with `OpenBridgeOrigin`.
type BridgeOriginAccountIdConverter =
(ParentIsPreset<AccountId>, SiblingTeyrchainConvertsVia<Sibling, AccountId>);
type BridgeDeposit = BridgeDeposit;
type Currency = Balances;
type RuntimeHoldReason = RuntimeHoldReason;
// Do not require deposit from system teyrchains or relay chain
type AllowWithoutBridgeDeposit =
RelayOrOtherSystemTeyrchains<AllSiblingSystemTeyrchains, Runtime>;
type LocalXcmChannelManager = CongestionManager;
type BlobDispatcher = FromZagrosMessageBlobDispatcher;
}
/// Implementation of `bp_xcm_bridge_hub::LocalXcmChannelManager` for congestion management.
pub struct CongestionManager;
impl pezpallet_xcm_bridge_hub::LocalXcmChannelManager for CongestionManager {
type Error = SendError;
fn is_congested(with: &Location) -> bool {
// This is used to check the inbound bridge queue/messages to determine if they can be
// dispatched and sent to the sibling teyrchain. Therefore, checking outbound `XcmpQueue`
// is sufficient here.
use bp_xcm_bridge_hub_router::XcmChannelStatusProvider;
cumulus_pallet_xcmp_queue::bridging::OutXcmpChannelStatusProvider::<Runtime>::is_congested(
with,
)
}
fn suspend_bridge(local_origin: &Location, bridge: BridgeId) -> Result<(), Self::Error> {
// This bridge is intended for AH<>AH communication with a hard-coded/static lane,
// so `local_origin` is expected to represent only the local AH.
send_xcm::<XcmpQueue>(
local_origin.clone(),
bp_asset_hub_pezkuwichain::build_congestion_message(bridge.inner(), true).into(),
)
.map(|_| ())
}
fn resume_bridge(local_origin: &Location, bridge: BridgeId) -> Result<(), Self::Error> {
// This bridge is intended for AH<>AH communication with a hard-coded/static lane,
// so `local_origin` is expected to represent only the local AH.
send_xcm::<XcmpQueue>(
local_origin.clone(),
bp_asset_hub_pezkuwichain::build_congestion_message(bridge.inner(), false).into(),
)
.map(|_| ())
}
}
#[cfg(feature = "runtime-benchmarks")]
pub(crate) fn open_bridge_for_benchmarks<R, XBHI, C>(
with: pezpallet_xcm_bridge_hub::LaneIdOf<R, XBHI>,
sibling_para_id: u32,
) -> InteriorLocation
where
R: pezpallet_xcm_bridge_hub::Config<XBHI>,
XBHI: 'static,
C: xcm_executor::traits::ConvertLocation<
bp_runtime::AccountIdOf<pezpallet_xcm_bridge_hub::ThisChainOf<R, XBHI>>,
>,
{
use pezpallet_xcm_bridge_hub::{Bridge, BridgeId, BridgeState};
use pezsp_runtime::traits::Zero;
use xcm::{latest::PEZKUWICHAIN_GENESIS_HASH, VersionedInteriorLocation};
// insert bridge metadata
let lane_id = with;
let sibling_teyrchain = Location::new(1, [Teyrchain(sibling_para_id)]);
let universal_source =
[GlobalConsensus(ByGenesis(PEZKUWICHAIN_GENESIS_HASH)), Teyrchain(sibling_para_id)].into();
let universal_destination =
[GlobalConsensus(ByGenesis(ZAGROS_GENESIS_HASH)), Teyrchain(2075)].into();
let bridge_id = BridgeId::new(&universal_source, &universal_destination);
// insert only bridge metadata, because the benchmarks create lanes
pezpallet_xcm_bridge_hub::Bridges::<R, XBHI>::insert(
bridge_id,
Bridge {
bridge_origin_relative_location: alloc::boxed::Box::new(
sibling_teyrchain.clone().into(),
),
bridge_origin_universal_location: alloc::boxed::Box::new(
VersionedInteriorLocation::from(universal_source.clone()),
),
bridge_destination_universal_location: alloc::boxed::Box::new(
VersionedInteriorLocation::from(universal_destination),
),
state: BridgeState::Opened,
bridge_owner_account: C::convert_location(&sibling_teyrchain).expect("valid AccountId"),
deposit: Zero::zero(),
lane_id,
},
);
pezpallet_xcm_bridge_hub::LaneToBridge::<R, XBHI>::insert(lane_id, bridge_id);
universal_source
}
#[cfg(test)]
mod tests {
use super::*;
use crate::bridge_common_config::BridgeGrandpaZagrosInstance;
use bridge_runtime_common::{
assert_complete_bridge_types,
integrity::{
assert_complete_with_teyrchain_bridge_constants, check_message_lane_weights,
AssertChainConstants, AssertCompleteBridgeConstants,
},
};
/// Every additional message in the message delivery transaction boosts its priority.
/// So the priority of transaction with `N+1` messages is larger than priority of
/// transaction with `N` messages by the `PriorityBoostPerMessage`.
///
/// Economically, it is an equivalent of adding tip to the transaction with `N` messages.
/// The `FEE_BOOST_PER_MESSAGE` constant is the value of this tip.
///
/// We want this tip to be large enough (delivery transactions with more messages = less
/// operational costs and a faster bridge), so this value should be significant.
const FEE_BOOST_PER_MESSAGE: Balance = 2 * TYR;
// see `FEE_BOOST_PER_MESSAGE` comment
const FEE_BOOST_PER_RELAY_HEADER: Balance = 2 * TYR;
// see `FEE_BOOST_PER_MESSAGE` comment
const FEE_BOOST_PER_TEYRCHAIN_HEADER: Balance = 2 * TYR;
#[test]
fn ensure_bridge_hub_pezkuwichain_message_lane_weights_are_correct() {
check_message_lane_weights::<
bp_bridge_hub_pezkuwichain::BridgeHubPezkuwichain,
Runtime,
WithBridgeHubZagrosMessagesInstance,
>(
bp_bridge_hub_zagros::EXTRA_STORAGE_PROOF_SIZE,
bp_bridge_hub_pezkuwichain::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX,
bp_bridge_hub_pezkuwichain::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
true,
);
}
#[test]
fn ensure_bridge_integrity() {
assert_complete_bridge_types!(
runtime: Runtime,
with_bridged_chain_messages_instance: WithBridgeHubZagrosMessagesInstance,
this_chain: bp_bridge_hub_pezkuwichain::BridgeHubPezkuwichain,
bridged_chain: bp_bridge_hub_zagros::BridgeHubZagros,
expected_payload_type: XcmAsPlainPayload,
);
assert_complete_with_teyrchain_bridge_constants::<
Runtime,
BridgeGrandpaZagrosInstance,
WithBridgeHubZagrosMessagesInstance,
>(AssertCompleteBridgeConstants {
this_chain_constants: AssertChainConstants {
block_length: bp_bridge_hub_pezkuwichain::BlockLength::get(),
block_weights: bp_bridge_hub_pezkuwichain::BlockWeightsForAsyncBacking::get(),
},
});
pezpallet_bridge_relayers::extension::per_relay_header::ensure_priority_boost_is_sane::<
Runtime,
BridgeGrandpaZagrosInstance,
PriorityBoostPerRelayHeader,
>(FEE_BOOST_PER_RELAY_HEADER);
pezpallet_bridge_relayers::extension::per_teyrchain_header::ensure_priority_boost_is_sane::<
Runtime,
WithBridgeHubZagrosMessagesInstance,
bp_bridge_hub_zagros::BridgeHubZagros,
PriorityBoostPerTeyrchainHeader,
>(FEE_BOOST_PER_TEYRCHAIN_HEADER);
pezpallet_bridge_relayers::extension::per_message::ensure_priority_boost_is_sane::<
Runtime,
WithBridgeHubZagrosMessagesInstance,
PriorityBoostPerMessage,
>(FEE_BOOST_PER_MESSAGE);
let expected: InteriorLocation = [PalletInstance(
bp_bridge_hub_pezkuwichain::WITH_BRIDGE_PEZKUWICHAIN_TO_ZAGROS_MESSAGES_PALLET_INDEX,
)]
.into();
assert_eq!(BridgePezkuwichainToZagrosMessagesPalletInstance::get(), expected,);
}
}
/// Contains the migration for the AssetHubPezkuwichain<>AssetHubZagros bridge.
pub mod migration {
use super::*;
use pezframe_support::traits::ConstBool;
parameter_types! {
pub AssetHubPezkuwichainToAssetHubZagrosMessagesLane: LegacyLaneId = LegacyLaneId([0, 0, 0, 2]);
pub AssetHubPezkuwichainLocation: Location = Location::new(1, [Teyrchain(bp_asset_hub_pezkuwichain::ASSET_HUB_PEZKUWICHAIN_TEYRCHAIN_ID)]);
pub AssetHubZagrosUniversalLocation: InteriorLocation = [GlobalConsensus(ZagrosGlobalConsensusNetwork::get()), Teyrchain(bp_asset_hub_zagros::ASSET_HUB_ZAGROS_TEYRCHAIN_ID)].into();
}
/// Ensure that the existing lanes for the AHR<>AHW bridge are correctly configured.
pub type StaticToDynamicLanes = pezpallet_xcm_bridge_hub::migration::OpenBridgeForLane<
Runtime,
XcmOverBridgeHubZagrosInstance,
AssetHubPezkuwichainToAssetHubZagrosMessagesLane,
// the lanes are already created for AHR<>AHW, but we need to link them to the bridge
// structs
ConstBool<false>,
AssetHubPezkuwichainLocation,
AssetHubZagrosUniversalLocation,
>;
mod v1_wrong {
use bp_messages::{LaneState, MessageNonce, UnrewardedRelayer};
use bp_runtime::AccountIdOf;
use codec::{Decode, Encode};
use pezpallet_bridge_messages::BridgedChainOf;
use pezsp_std::collections::vec_deque::VecDeque;
#[derive(Encode, Decode, Clone, PartialEq, Eq)]
pub(crate) struct StoredInboundLaneData<T: pezpallet_bridge_messages::Config<I>, I: 'static>(
pub(crate) InboundLaneData<AccountIdOf<BridgedChainOf<T, I>>>,
);
#[derive(Encode, Decode, Clone, PartialEq, Eq)]
pub(crate) struct InboundLaneData<RelayerId> {
pub state: LaneState,
pub(crate) relayers: VecDeque<UnrewardedRelayer<RelayerId>>,
pub(crate) last_confirmed_nonce: MessageNonce,
}
#[derive(Encode, Decode, Clone, PartialEq, Eq)]
pub(crate) struct OutboundLaneData {
pub state: LaneState,
pub(crate) oldest_unpruned_nonce: MessageNonce,
pub(crate) latest_received_nonce: MessageNonce,
pub(crate) latest_generated_nonce: MessageNonce,
}
}
mod v1 {
pub use bp_messages::{InboundLaneData, LaneState, OutboundLaneData};
pub use pezpallet_bridge_messages::{InboundLanes, OutboundLanes, StoredInboundLaneData};
}
/// Fix for v1 migration - corrects data for OutboundLaneData/InboundLaneData (it is needed only
/// for Pezkuwichain/Zagros).
pub struct FixMessagesV1Migration<T, I>(pezsp_std::marker::PhantomData<(T, I)>);
impl<T: pezpallet_bridge_messages::Config<I>, I: 'static> pezframe_support::traits::OnRuntimeUpgrade
for FixMessagesV1Migration<T, I>
{
fn on_runtime_upgrade() -> Weight {
use pezsp_core::Get;
let mut weight = T::DbWeight::get().reads(1);
// `InboundLanes` - add state to the old structs
let translate_inbound =
|pre: v1_wrong::StoredInboundLaneData<T, I>| -> Option<v1::StoredInboundLaneData<T, I>> {
weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 1));
Some(v1::StoredInboundLaneData(v1::InboundLaneData {
state: v1::LaneState::Opened,
relayers: pre.0.relayers,
last_confirmed_nonce: pre.0.last_confirmed_nonce,
}))
};
v1::InboundLanes::<T, I>::translate_values(translate_inbound);
// `OutboundLanes` - add state to the old structs
let translate_outbound =
|pre: v1_wrong::OutboundLaneData| -> Option<v1::OutboundLaneData> {
weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 1));
Some(v1::OutboundLaneData {
state: v1::LaneState::Opened,
oldest_unpruned_nonce: pre.oldest_unpruned_nonce,
latest_received_nonce: pre.latest_received_nonce,
latest_generated_nonce: pre.latest_generated_nonce,
})
};
v1::OutboundLanes::<T, I>::translate_values(translate_outbound);
weight
}
}
}
@@ -0,0 +1,127 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! # Bridge Hub Pezkuwichain Runtime genesis config presets
use crate::*;
use alloc::{vec, vec::Vec};
use cumulus_primitives_core::ParaId;
use pezframe_support::build_struct_json_patch;
use pezsp_genesis_builder::PresetId;
use pezsp_keyring::Sr25519Keyring;
use testnet_teyrchains_constants::pezkuwichain::xcm_version::SAFE_XCM_VERSION;
use teyrchains_common::{AccountId, AuraId};
use xcm::latest::ZAGROS_GENESIS_HASH;
const BRIDGE_HUB_PEZKUWICHAIN_ED: Balance = ExistentialDeposit::get();
fn bridge_hub_pezkuwichain_genesis(
invulnerables: Vec<(AccountId, AuraId)>,
endowed_accounts: Vec<AccountId>,
id: ParaId,
bridges_pallet_owner: Option<AccountId>,
asset_hub_para_id: ParaId,
opened_bridges: Vec<(Location, InteriorLocation, Option<bp_messages::LegacyLaneId>)>,
) -> serde_json::Value {
build_struct_json_patch!(RuntimeGenesisConfig {
balances: BalancesConfig {
balances: endowed_accounts
.iter()
.cloned()
.map(|k| (k, 1u128 << 60))
.collect::<Vec<_>>(),
},
teyrchain_info: TeyrchainInfoConfig { teyrchain_id: id },
collator_selection: CollatorSelectionConfig {
invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: BRIDGE_HUB_PEZKUWICHAIN_ED * 16,
},
session: SessionConfig {
keys: invulnerables
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc, // validator id
SessionKeys { aura }, // session keys
)
})
.collect(),
},
pezkuwi_xcm: PezkuwiXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION) },
bridge_pezkuwi_bulletin_grandpa: BridgePezkuwiBulletinGrandpaConfig {
owner: bridges_pallet_owner.clone(),
},
bridge_zagros_grandpa: BridgeZagrosGrandpaConfig { owner: bridges_pallet_owner.clone() },
bridge_zagros_messages: BridgeZagrosMessagesConfig { owner: bridges_pallet_owner.clone() },
xcm_over_pezkuwi_bulletin: XcmOverPezkuwiBulletinConfig {
opened_bridges: vec![(
Location::new(1, [Teyrchain(1004)]),
Junctions::from([GlobalConsensus(NetworkId::PezkuwiBulletin).into()]),
Some(bp_messages::LegacyLaneId([0, 0, 0, 0])),
)],
},
xcm_over_bridge_hub_zagros: XcmOverBridgeHubZagrosConfig { opened_bridges },
ethereum_system: EthereumSystemConfig { para_id: id, asset_hub_para_id },
})
}
/// Provides the JSON representation of predefined genesis config for given `id`.
pub fn get_preset(id: &pezsp_genesis_builder::PresetId) -> Option<pezsp_std::vec::Vec<u8>> {
let patch = match id.as_ref() {
pezsp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET => bridge_hub_pezkuwichain_genesis(
// initial collators.
vec![
(Sr25519Keyring::Alice.to_account_id(), Sr25519Keyring::Alice.public().into()),
(Sr25519Keyring::Bob.to_account_id(), Sr25519Keyring::Bob.public().into()),
],
Sr25519Keyring::well_known().map(|k| k.to_account_id()).collect(),
1002.into(), // BRIDGE_HUB_ID
Some(Sr25519Keyring::Bob.to_account_id()),
pezkuwichain_runtime_constants::system_teyrchain::ASSET_HUB_ID.into(),
vec![(
Location::new(1, [Teyrchain(1000)]),
Junctions::from([ByGenesis(ZAGROS_GENESIS_HASH).into(), Teyrchain(1000)]),
Some(bp_messages::LegacyLaneId([0, 0, 0, 2])),
)],
),
pezsp_genesis_builder::DEV_RUNTIME_PRESET => bridge_hub_pezkuwichain_genesis(
// initial collators.
vec![
(Sr25519Keyring::Alice.to_account_id(), Sr25519Keyring::Alice.public().into()),
(Sr25519Keyring::Bob.to_account_id(), Sr25519Keyring::Bob.public().into()),
],
Sr25519Keyring::well_known().map(|k| k.to_account_id()).collect(),
1002.into(), // BRIDGE_HUB_ID
Some(Sr25519Keyring::Bob.to_account_id()),
pezkuwichain_runtime_constants::system_teyrchain::ASSET_HUB_ID.into(),
vec![],
),
_ => return None,
};
Some(
serde_json::to_string(&patch)
.expect("serialization to json is expected to work. qed.")
.into_bytes(),
)
}
/// List of supported presets.
pub fn preset_names() -> Vec<PresetId> {
vec![
PresetId::from(pezsp_genesis_builder::DEV_RUNTIME_PRESET),
PresetId::from(pezsp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET),
]
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,53 @@
// This file is part of Pezcumulus.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub mod constants {
use pezframe_support::{
parameter_types,
weights::{constants, Weight},
};
parameter_types! {
/// Importing a block with 0 Extrinsics.
pub const BlockExecutionWeight: Weight =
Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(5_000_000), 0);
}
#[cfg(test)]
mod test_weights {
use pezframe_support::weights::constants;
/// Checks that the weight exists and is sane.
// NOTE: If this test fails but you are sure that the generated values are fine,
// you can delete it.
#[test]
fn sane() {
let w = super::constants::BlockExecutionWeight::get();
// At least 100 µs.
assert!(
w.ref_time() >= 100u64 * constants::WEIGHT_REF_TIME_PER_MICROS,
"Weight should be at least 100 µs."
);
// At most 50 ms.
assert!(
w.ref_time() <= 50u64 * constants::WEIGHT_REF_TIME_PER_MILLIS,
"Weight should be at most 50 ms."
);
}
}
}
@@ -0,0 +1,53 @@
// This file is part of Pezcumulus.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub mod constants {
use pezframe_support::{
parameter_types,
weights::{constants, Weight},
};
parameter_types! {
/// Executing a NO-OP `System::remarks` Extrinsic.
pub const ExtrinsicBaseWeight: Weight =
Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0);
}
#[cfg(test)]
mod test_weights {
use pezframe_support::weights::constants;
/// Checks that the weight exists and is sane.
// NOTE: If this test fails but you are sure that the generated values are fine,
// you can delete it.
#[test]
fn sane() {
let w = super::constants::ExtrinsicBaseWeight::get();
// At least 10 µs.
assert!(
w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS,
"Weight should be at least 10 µs."
);
// At most 1 ms.
assert!(
w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
"Weight should be at most 1 ms."
);
}
}
}
@@ -0,0 +1,187 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezframe_system`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=pezframe_system
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezframe_system`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezframe_system::WeightInfo for WeightInfo<T> {
/// The range of component `b` is `[0, 3932160]`.
fn remark(b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_076_000 picoseconds.
Weight::from_parts(2_132_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 120
.saturating_add(Weight::from_parts(10_694, 0).saturating_mul(b.into()))
}
/// The range of component `b` is `[0, 3932160]`.
fn remark_with_event(b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_860_000 picoseconds.
Weight::from_parts(5_983_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 121
.saturating_add(Weight::from_parts(12_015, 0).saturating_mul(b.into()))
}
/// Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1)
/// Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1)
fn set_heap_pages() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_654_000 picoseconds.
Weight::from_parts(3_874_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `TeyrchainSystem::ValidationData` (r:1 w:0)
/// Proof: `TeyrchainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::UpgradeRestrictionSignal` (r:1 w:0)
/// Proof: `TeyrchainSystem::UpgradeRestrictionSignal` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::PendingValidationCode` (r:1 w:1)
/// Proof: `TeyrchainSystem::PendingValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `TeyrchainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::NewValidationCode` (r:0 w:1)
/// Proof: `TeyrchainSystem::NewValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::DidSetValidationCode` (r:0 w:1)
/// Proof: `TeyrchainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn set_code() -> Weight {
// Proof Size summary in bytes:
// Measured: `127`
// Estimated: `1612`
// Minimum execution time: 162_233_434_000 picoseconds.
Weight::from_parts(164_165_161_000, 0)
.saturating_add(Weight::from_parts(0, 1612))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Skipped::Metadata` (r:0 w:0)
/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `i` is `[0, 1000]`.
fn set_storage(i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_035_000 picoseconds.
Weight::from_parts(2_152_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 2_229
.saturating_add(Weight::from_parts(731_717, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
}
/// Storage: `Skipped::Metadata` (r:0 w:0)
/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `i` is `[0, 1000]`.
fn kill_storage(i: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_020_000 picoseconds.
Weight::from_parts(2_123_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 936
.saturating_add(Weight::from_parts(556_079, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
}
/// Storage: `Skipped::Metadata` (r:0 w:0)
/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `p` is `[0, 1000]`.
fn kill_prefix(p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `62 + p * (69 ±0)`
// Estimated: `75 + p * (70 ±0)`
// Minimum execution time: 4_219_000 picoseconds.
Weight::from_parts(4_427_000, 0)
.saturating_add(Weight::from_parts(0, 75))
// Standard Error: 1_232
.saturating_add(Weight::from_parts(1_316_954, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
.saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into()))
}
/// Storage: `System::AuthorizedUpgrade` (r:0 w:1)
/// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
fn authorize_upgrade() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 9_882_000 picoseconds.
Weight::from_parts(10_329_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::AuthorizedUpgrade` (r:1 w:1)
/// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainSystem::ValidationData` (r:1 w:0)
/// Proof: `TeyrchainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::UpgradeRestrictionSignal` (r:1 w:0)
/// Proof: `TeyrchainSystem::UpgradeRestrictionSignal` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::PendingValidationCode` (r:1 w:1)
/// Proof: `TeyrchainSystem::PendingValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `TeyrchainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::NewValidationCode` (r:0 w:1)
/// Proof: `TeyrchainSystem::NewValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::DidSetValidationCode` (r:0 w:1)
/// Proof: `TeyrchainSystem::DidSetValidationCode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn apply_authorized_upgrade() -> Weight {
// Proof Size summary in bytes:
// Measured: `149`
// Estimated: `1634`
// Minimum execution time: 166_695_058_000 picoseconds.
Weight::from_parts(168_708_981_000, 0)
.saturating_add(Weight::from_parts(0, 1634))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(4))
}
}
@@ -0,0 +1,129 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezframe_system_extensions`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=pezframe_system_extensions
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezframe_system_extensions`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezframe_system::ExtensionsWeightInfo for WeightInfo<T> {
fn check_genesis() -> Weight {
// Proof Size summary in bytes:
// Measured: `30`
// Estimated: `0`
// Minimum execution time: 3_334_000 picoseconds.
Weight::from_parts(3_475_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn check_mortality_mortal_transaction() -> Weight {
// Proof Size summary in bytes:
// Measured: `68`
// Estimated: `0`
// Minimum execution time: 6_424_000 picoseconds.
Weight::from_parts(6_649_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn check_mortality_immortal_transaction() -> Weight {
// Proof Size summary in bytes:
// Measured: `68`
// Estimated: `0`
// Minimum execution time: 6_500_000 picoseconds.
Weight::from_parts(6_720_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn check_non_zero_sender() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 520_000 picoseconds.
Weight::from_parts(573_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn check_nonce() -> Weight {
// Proof Size summary in bytes:
// Measured: `101`
// Estimated: `3593`
// Minimum execution time: 7_010_000 picoseconds.
Weight::from_parts(7_337_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
fn check_spec_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 396_000 picoseconds.
Weight::from_parts(471_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn check_tx_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 418_000 picoseconds.
Weight::from_parts(475_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn check_weight() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_037_000 picoseconds.
Weight::from_parts(4_252_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn weight_reclaim() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_367_000 picoseconds.
Weight::from_parts(2_570_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}
@@ -0,0 +1,121 @@
// This file is part of Pezcumulus.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Expose the auto generated weight files.
use ::pezpallet_bridge_grandpa::WeightInfoExt as GrandpaWeightInfoExt;
use ::pezpallet_bridge_messages::WeightInfoExt as MessagesWeightInfoExt;
use ::pezpallet_bridge_relayers::WeightInfo as _;
use ::pezpallet_bridge_teyrchains::WeightInfoExt as TeyrchainsWeightInfoExt;
pub mod block_weights;
pub mod cumulus_pallet_teyrchain_system;
pub mod cumulus_pallet_weight_reclaim;
pub mod cumulus_pallet_xcmp_queue;
pub mod extrinsic_weights;
pub mod pezframe_system;
pub mod pezframe_system_extensions;
pub mod pezpallet_balances;
pub mod pezpallet_bridge_grandpa;
pub mod pezpallet_bridge_messages_pezkuwichain_to_pezkuwichain_bulletin;
pub mod pezpallet_bridge_messages_pezkuwichain_to_zagros;
pub mod pezpallet_bridge_relayers_legacy;
pub mod pezpallet_bridge_relayers_permissionless_lanes;
pub mod pezpallet_bridge_teyrchains;
pub mod pezpallet_collator_selection;
pub mod pezpallet_message_queue;
pub mod pezpallet_multisig;
pub mod pezpallet_session;
pub mod pezpallet_timestamp;
pub mod pezpallet_transaction_payment;
pub mod pezpallet_utility;
pub mod pezpallet_xcm;
pub mod paritydb_weights;
pub mod rocksdb_weights;
pub mod snowbridge_pallet_ethereum_client;
pub mod snowbridge_pallet_inbound_queue;
pub mod snowbridge_pallet_outbound_queue;
pub mod snowbridge_pallet_system;
pub mod xcm;
pub use block_weights::constants::BlockExecutionWeight;
pub use extrinsic_weights::constants::ExtrinsicBaseWeight;
pub use rocksdb_weights::constants::RocksDbWeight;
use crate::Runtime;
use pezframe_support::weights::Weight;
// import trait from dependency module
use ::pezpallet_bridge_relayers::WeightInfoExt as _;
impl GrandpaWeightInfoExt for pezpallet_bridge_grandpa::WeightInfo<crate::Runtime> {
fn submit_finality_proof_overhead_from_runtime() -> Weight {
// our signed extension:
// 1) checks whether relayer registration is active from validate/pre_dispatch;
// 2) may slash and deregister relayer from post_dispatch
// (2) includes (1), so (2) is the worst case
pezpallet_bridge_relayers_legacy::WeightInfo::<Runtime>::slash_and_deregister()
}
}
impl MessagesWeightInfoExt
for pezpallet_bridge_messages_pezkuwichain_to_pezkuwichain_bulletin::WeightInfo<crate::Runtime>
{
fn expected_extra_storage_proof_size() -> u32 {
bp_pezkuwi_bulletin::EXTRA_STORAGE_PROOF_SIZE
}
fn receive_messages_proof_overhead_from_runtime() -> Weight {
pezpallet_bridge_relayers_permissionless_lanes::WeightInfo::<Runtime>::receive_messages_proof_overhead_from_runtime(
)
}
fn receive_messages_delivery_proof_overhead_from_runtime() -> Weight {
pezpallet_bridge_relayers_permissionless_lanes::WeightInfo::<Runtime>::receive_messages_delivery_proof_overhead_from_runtime()
}
}
impl MessagesWeightInfoExt
for pezpallet_bridge_messages_pezkuwichain_to_zagros::WeightInfo<crate::Runtime>
{
fn expected_extra_storage_proof_size() -> u32 {
bp_bridge_hub_zagros::EXTRA_STORAGE_PROOF_SIZE
}
fn receive_messages_proof_overhead_from_runtime() -> Weight {
pezpallet_bridge_relayers_legacy::WeightInfo::<Runtime>::receive_messages_proof_overhead_from_runtime(
)
}
fn receive_messages_delivery_proof_overhead_from_runtime() -> Weight {
pezpallet_bridge_relayers_legacy::WeightInfo::<Runtime>::receive_messages_delivery_proof_overhead_from_runtime()
}
}
impl TeyrchainsWeightInfoExt for pezpallet_bridge_teyrchains::WeightInfo<crate::Runtime> {
fn expected_extra_storage_proof_size() -> u32 {
bp_bridge_hub_zagros::EXTRA_STORAGE_PROOF_SIZE
}
fn submit_teyrchain_heads_overhead_from_runtime() -> Weight {
// our signed extension:
// 1) checks whether relayer registration is active from validate/pre_dispatch;
// 2) may slash and deregister relayer from post_dispatch
// (2) includes (1), so (2) is the worst case
pezpallet_bridge_relayers_legacy::WeightInfo::<Runtime>::slash_and_deregister()
}
}
@@ -0,0 +1,177 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_balances`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=pezpallet_balances
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_balances`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_balances::WeightInfo for WeightInfo<T> {
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn transfer_allow_death() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 50_348_000 picoseconds.
Weight::from_parts(51_389_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn transfer_keep_alive() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 40_336_000 picoseconds.
Weight::from_parts(41_395_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn force_set_balance_creating() -> Weight {
// Proof Size summary in bytes:
// Measured: `174`
// Estimated: `3593`
// Minimum execution time: 15_769_000 picoseconds.
Weight::from_parts(16_290_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn force_set_balance_killing() -> Weight {
// Proof Size summary in bytes:
// Measured: `174`
// Estimated: `3593`
// Minimum execution time: 22_834_000 picoseconds.
Weight::from_parts(23_585_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn force_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `6196`
// Minimum execution time: 52_829_000 picoseconds.
Weight::from_parts(53_965_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn transfer_all() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 50_380_000 picoseconds.
Weight::from_parts(51_377_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn force_unreserve() -> Weight {
// Proof Size summary in bytes:
// Measured: `174`
// Estimated: `3593`
// Minimum execution time: 18_631_000 picoseconds.
Weight::from_parts(19_440_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:999 w:999)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `u` is `[1, 1000]`.
fn upgrade_accounts(u: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0 + u * (136 ±0)`
// Estimated: `990 + u * (2603 ±0)`
// Minimum execution time: 17_593_000 picoseconds.
Weight::from_parts(18_122_000, 0)
.saturating_add(Weight::from_parts(0, 990))
// Standard Error: 17_899
.saturating_add(Weight::from_parts(15_277_301, 0).saturating_mul(u.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into())))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into()))
}
fn force_adjust_total_issuance() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 6_536_000 picoseconds.
Weight::from_parts(6_803_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn burn_allow_death() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 31_706_000 picoseconds.
Weight::from_parts(32_463_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn burn_keep_alive() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 22_138_000 picoseconds.
Weight::from_parts(22_691_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}
@@ -0,0 +1,101 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_bridge_grandpa`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=pezpallet_bridge_grandpa
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_bridge_grandpa`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_bridge_grandpa::WeightInfo for WeightInfo<T> {
/// Storage: `BridgeZagrosGrandpa::CurrentAuthoritySet` (r:1 w:0)
/// Proof: `BridgeZagrosGrandpa::CurrentAuthoritySet` (`max_values`: Some(1), `max_size`: Some(50250), added: 50745, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosGrandpa::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeZagrosGrandpa::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosGrandpa::BestFinalized` (r:1 w:1)
/// Proof: `BridgeZagrosGrandpa::BestFinalized` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosGrandpa::ImportedHashesPointer` (r:1 w:1)
/// Proof: `BridgeZagrosGrandpa::ImportedHashesPointer` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosGrandpa::ImportedHashes` (r:1 w:1)
/// Proof: `BridgeZagrosGrandpa::ImportedHashes` (`max_values`: Some(1024), `max_size`: Some(36), added: 1521, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosGrandpa::ImportedHeaders` (r:0 w:2)
/// Proof: `BridgeZagrosGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 168]`.
/// The range of component `v` is `[50, 100]`.
fn submit_finality_proof(p: u32, v: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `31 + p * (60 ±0)`
// Estimated: `51735`
// Minimum execution time: 318_946_000 picoseconds.
Weight::from_parts(8_004_807, 0)
.saturating_add(Weight::from_parts(0, 51735))
// Standard Error: 14_041
.saturating_add(Weight::from_parts(41_327_030, 0).saturating_mul(p.into()))
// Standard Error: 46_855
.saturating_add(Weight::from_parts(2_869_089, 0).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `BridgeZagrosGrandpa::CurrentAuthoritySet` (r:1 w:1)
/// Proof: `BridgeZagrosGrandpa::CurrentAuthoritySet` (`max_values`: Some(1), `max_size`: Some(50250), added: 50745, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosGrandpa::ImportedHashesPointer` (r:1 w:1)
/// Proof: `BridgeZagrosGrandpa::ImportedHashesPointer` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosGrandpa::ImportedHashes` (r:1 w:1)
/// Proof: `BridgeZagrosGrandpa::ImportedHashes` (`max_values`: Some(1024), `max_size`: Some(36), added: 1521, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosGrandpa::BestFinalized` (r:0 w:1)
/// Proof: `BridgeZagrosGrandpa::BestFinalized` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosGrandpa::ImportedHeaders` (r:0 w:2)
/// Proof: `BridgeZagrosGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
fn force_set_pallet_state() -> Weight {
// Proof Size summary in bytes:
// Measured: `84`
// Estimated: `51735`
// Minimum execution time: 114_906_000 picoseconds.
Weight::from_parts(129_034_000, 0)
.saturating_add(Weight::from_parts(0, 51735))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(6))
}
}
@@ -0,0 +1,251 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_bridge_messages`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=pezpallet_bridge_messages
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_bridge_messages`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_bridge_messages::WeightInfo for WeightInfo<T> {
/// Storage: `BridgePezkuwiBulletinMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgePezkuwiBulletinMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgePezkuwiBulletinGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgePezkuwiBulletinGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgePezkuwiBulletinMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgePezkuwiBulletinMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `XcmOverPezkuwiBulletin::LaneToBridge` (r:1 w:0)
/// Proof: `XcmOverPezkuwiBulletin::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `XcmOverPezkuwiBulletin::Bridges` (r:1 w:0)
/// Proof: `XcmOverPezkuwiBulletin::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn receive_single_message_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `581`
// Estimated: `52645`
// Minimum execution time: 48_956_000 picoseconds.
Weight::from_parts(50_706_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgePezkuwiBulletinMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgePezkuwiBulletinMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgePezkuwiBulletinGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgePezkuwiBulletinGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgePezkuwiBulletinMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgePezkuwiBulletinMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `XcmOverPezkuwiBulletin::LaneToBridge` (r:1 w:0)
/// Proof: `XcmOverPezkuwiBulletin::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `XcmOverPezkuwiBulletin::Bridges` (r:1 w:0)
/// Proof: `XcmOverPezkuwiBulletin::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 4076]`.
/// The range of component `n` is `[1, 4076]`.
fn receive_n_messages_proof(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `581`
// Estimated: `52645`
// Minimum execution time: 49_150_000 picoseconds.
Weight::from_parts(50_060_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
// Standard Error: 10_047
.saturating_add(Weight::from_parts(10_087_182, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgePezkuwiBulletinMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgePezkuwiBulletinMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgePezkuwiBulletinGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgePezkuwiBulletinGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgePezkuwiBulletinMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgePezkuwiBulletinMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `XcmOverPezkuwiBulletin::LaneToBridge` (r:1 w:0)
/// Proof: `XcmOverPezkuwiBulletin::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `XcmOverPezkuwiBulletin::Bridges` (r:1 w:0)
/// Proof: `XcmOverPezkuwiBulletin::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`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: `581`
// Estimated: `52645`
// Minimum execution time: 54_027_000 picoseconds.
Weight::from_parts(55_948_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgePezkuwiBulletinMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgePezkuwiBulletinMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgePezkuwiBulletinGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgePezkuwiBulletinGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgePezkuwiBulletinMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgePezkuwiBulletinMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `XcmOverPezkuwiBulletin::LaneToBridge` (r:1 w:0)
/// Proof: `XcmOverPezkuwiBulletin::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `XcmOverPezkuwiBulletin::Bridges` (r:1 w:0)
/// Proof: `XcmOverPezkuwiBulletin::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 16384]`.
/// The range of component `n` is `[1, 16384]`.
fn receive_single_n_bytes_message_proof(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `581`
// Estimated: `52645`
// Minimum execution time: 47_288_000 picoseconds.
Weight::from_parts(50_465_963, 0)
.saturating_add(Weight::from_parts(0, 52645))
// Standard Error: 10
.saturating_add(Weight::from_parts(1_880, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgePezkuwiBulletinMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgePezkuwiBulletinMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgePezkuwiBulletinGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgePezkuwiBulletinGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgePezkuwiBulletinMessages::OutboundLanes` (r:1 w:1)
/// Proof: `BridgePezkuwiBulletinMessages::OutboundLanes` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: `XcmOverPezkuwiBulletin::LaneToBridge` (r:1 w:0)
/// Proof: `XcmOverPezkuwiBulletin::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `XcmOverPezkuwiBulletin::Bridges` (r:1 w:0)
/// Proof: `XcmOverPezkuwiBulletin::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
/// Storage: `BridgePezkuwiBulletinMessages::OutboundMessages` (r:0 w:1)
/// Proof: `BridgePezkuwiBulletinMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(65568), added: 68043, mode: `MaxEncodedLen`)
fn receive_delivery_proof_for_single_message() -> Weight {
// Proof Size summary in bytes:
// Measured: `548`
// Estimated: `5354`
// Minimum execution time: 41_029_000 picoseconds.
Weight::from_parts(42_595_000, 0)
.saturating_add(Weight::from_parts(0, 5354))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `BridgePezkuwiBulletinMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgePezkuwiBulletinMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgePezkuwiBulletinGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgePezkuwiBulletinGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgePezkuwiBulletinMessages::OutboundLanes` (r:1 w:1)
/// Proof: `BridgePezkuwiBulletinMessages::OutboundLanes` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: `XcmOverPezkuwiBulletin::LaneToBridge` (r:1 w:0)
/// Proof: `XcmOverPezkuwiBulletin::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `XcmOverPezkuwiBulletin::Bridges` (r:1 w:0)
/// Proof: `XcmOverPezkuwiBulletin::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
/// Storage: `BridgePezkuwiBulletinMessages::OutboundMessages` (r:0 w:2)
/// Proof: `BridgePezkuwiBulletinMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(65568), added: 68043, mode: `MaxEncodedLen`)
fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight {
// Proof Size summary in bytes:
// Measured: `548`
// Estimated: `5354`
// Minimum execution time: 42_745_000 picoseconds.
Weight::from_parts(44_562_000, 0)
.saturating_add(Weight::from_parts(0, 5354))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `BridgePezkuwiBulletinMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgePezkuwiBulletinMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgePezkuwiBulletinGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgePezkuwiBulletinGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgePezkuwiBulletinMessages::OutboundLanes` (r:1 w:1)
/// Proof: `BridgePezkuwiBulletinMessages::OutboundLanes` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: `XcmOverPezkuwiBulletin::LaneToBridge` (r:1 w:0)
/// Proof: `XcmOverPezkuwiBulletin::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `XcmOverPezkuwiBulletin::Bridges` (r:1 w:0)
/// Proof: `XcmOverPezkuwiBulletin::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
/// Storage: `BridgePezkuwiBulletinMessages::OutboundMessages` (r:0 w:2)
/// Proof: `BridgePezkuwiBulletinMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(65568), added: 68043, mode: `MaxEncodedLen`)
fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight {
// Proof Size summary in bytes:
// Measured: `548`
// Estimated: `5354`
// Minimum execution time: 42_717_000 picoseconds.
Weight::from_parts(44_144_000, 0)
.saturating_add(Weight::from_parts(0, 5354))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `BridgePezkuwiBulletinMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgePezkuwiBulletinMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgePezkuwiBulletinGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgePezkuwiBulletinGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgePezkuwiBulletinMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgePezkuwiBulletinMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `XcmOverPezkuwiBulletin::LaneToBridge` (r:1 w:0)
/// Proof: `XcmOverPezkuwiBulletin::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `XcmOverPezkuwiBulletin::Bridges` (r:1 w:0)
/// Proof: `XcmOverPezkuwiBulletin::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`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`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::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`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 16384]`.
/// The range of component `n` is `[1, 16384]`.
fn receive_single_n_bytes_message_proof_with_dispatch(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `708`
// Estimated: `52645`
// Minimum execution time: 78_507_000 picoseconds.
Weight::from_parts(84_359_182, 0)
.saturating_add(Weight::from_parts(0, 52645))
// Standard Error: 23
.saturating_add(Weight::from_parts(6_812, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(10))
.saturating_add(T::DbWeight::get().writes(3))
}
}
@@ -0,0 +1,271 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_bridge_messages`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=pezpallet_bridge_messages
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_bridge_messages`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_bridge_messages::WeightInfo for WeightInfo<T> {
/// Storage: `BridgeZagrosMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeZagrosMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosTeyrchains::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeZagrosTeyrchains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeZagrosMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `XcmOverBridgeHubZagros::LaneToBridge` (r:1 w:0)
/// Proof: `XcmOverBridgeHubZagros::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `XcmOverBridgeHubZagros::Bridges` (r:1 w:0)
/// Proof: `XcmOverBridgeHubZagros::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn receive_single_message_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `833`
// Estimated: `52645`
// Minimum execution time: 56_819_000 picoseconds.
Weight::from_parts(59_197_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeZagrosMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeZagrosMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosTeyrchains::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeZagrosTeyrchains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeZagrosMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `XcmOverBridgeHubZagros::LaneToBridge` (r:1 w:0)
/// Proof: `XcmOverBridgeHubZagros::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `XcmOverBridgeHubZagros::Bridges` (r:1 w:0)
/// Proof: `XcmOverBridgeHubZagros::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 4076]`.
/// The range of component `n` is `[1, 4076]`.
fn receive_n_messages_proof(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `833`
// Estimated: `52645`
// Minimum execution time: 57_512_000 picoseconds.
Weight::from_parts(58_661_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
// Standard Error: 11_280
.saturating_add(Weight::from_parts(10_169_511, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeZagrosMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeZagrosMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosTeyrchains::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeZagrosTeyrchains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeZagrosMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `XcmOverBridgeHubZagros::LaneToBridge` (r:1 w:0)
/// Proof: `XcmOverBridgeHubZagros::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `XcmOverBridgeHubZagros::Bridges` (r:1 w:0)
/// Proof: `XcmOverBridgeHubZagros::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`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: `833`
// Estimated: `52645`
// Minimum execution time: 61_203_000 picoseconds.
Weight::from_parts(63_782_000, 0)
.saturating_add(Weight::from_parts(0, 52645))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeZagrosMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeZagrosMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosTeyrchains::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeZagrosTeyrchains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeZagrosMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `XcmOverBridgeHubZagros::LaneToBridge` (r:1 w:0)
/// Proof: `XcmOverBridgeHubZagros::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `XcmOverBridgeHubZagros::Bridges` (r:1 w:0)
/// Proof: `XcmOverBridgeHubZagros::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 16384]`.
/// The range of component `n` is `[1, 16384]`.
fn receive_single_n_bytes_message_proof(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `833`
// Estimated: `52645`
// Minimum execution time: 54_450_000 picoseconds.
Weight::from_parts(56_927_605, 0)
.saturating_add(Weight::from_parts(0, 52645))
// Standard Error: 13
.saturating_add(Weight::from_parts(1_920, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `BridgeZagrosMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeZagrosMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosTeyrchains::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeZagrosTeyrchains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosMessages::OutboundLanes` (r:1 w:1)
/// Proof: `BridgeZagrosMessages::OutboundLanes` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1)
/// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `XcmOverBridgeHubZagros::LaneToBridge` (r:1 w:0)
/// Proof: `XcmOverBridgeHubZagros::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `XcmOverBridgeHubZagros::Bridges` (r:1 w:0)
/// Proof: `XcmOverBridgeHubZagros::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosMessages::OutboundMessages` (r:0 w:1)
/// Proof: `BridgeZagrosMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(65568), added: 68043, mode: `MaxEncodedLen`)
fn receive_delivery_proof_for_single_message() -> Weight {
// Proof Size summary in bytes:
// Measured: `776`
// Estimated: `5354`
// Minimum execution time: 53_281_000 picoseconds.
Weight::from_parts(55_202_000, 0)
.saturating_add(Weight::from_parts(0, 5354))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `BridgeZagrosMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeZagrosMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosTeyrchains::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeZagrosTeyrchains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosMessages::OutboundLanes` (r:1 w:1)
/// Proof: `BridgeZagrosMessages::OutboundLanes` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1)
/// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `XcmOverBridgeHubZagros::LaneToBridge` (r:1 w:0)
/// Proof: `XcmOverBridgeHubZagros::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `XcmOverBridgeHubZagros::Bridges` (r:1 w:0)
/// Proof: `XcmOverBridgeHubZagros::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosMessages::OutboundMessages` (r:0 w:2)
/// Proof: `BridgeZagrosMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(65568), added: 68043, mode: `MaxEncodedLen`)
fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight {
// Proof Size summary in bytes:
// Measured: `776`
// Estimated: `5354`
// Minimum execution time: 54_083_000 picoseconds.
Weight::from_parts(56_014_000, 0)
.saturating_add(Weight::from_parts(0, 5354))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `BridgeZagrosMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeZagrosMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosTeyrchains::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeZagrosTeyrchains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosMessages::OutboundLanes` (r:1 w:1)
/// Proof: `BridgeZagrosMessages::OutboundLanes` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
/// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0)
/// Storage: `BridgeRelayers::RelayerRewards` (r:2 w:2)
/// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `XcmOverBridgeHubZagros::LaneToBridge` (r:1 w:0)
/// Proof: `XcmOverBridgeHubZagros::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `XcmOverBridgeHubZagros::Bridges` (r:1 w:0)
/// Proof: `XcmOverBridgeHubZagros::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosMessages::OutboundMessages` (r:0 w:2)
/// Proof: `BridgeZagrosMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(65568), added: 68043, mode: `MaxEncodedLen`)
fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight {
// Proof Size summary in bytes:
// Measured: `776`
// Estimated: `6086`
// Minimum execution time: 58_493_000 picoseconds.
Weight::from_parts(60_640_000, 0)
.saturating_add(Weight::from_parts(0, 6086))
.saturating_add(T::DbWeight::get().reads(8))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `BridgeZagrosMessages::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeZagrosMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosTeyrchains::ImportedParaHeads` (r:1 w:0)
/// Proof: `BridgeZagrosTeyrchains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosMessages::InboundLanes` (r:1 w:1)
/// Proof: `BridgeZagrosMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
/// Storage: `XcmOverBridgeHubZagros::LaneToBridge` (r:1 w:0)
/// Proof: `XcmOverBridgeHubZagros::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `XcmOverBridgeHubZagros::Bridges` (r:1 w:0)
/// Proof: `XcmOverBridgeHubZagros::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`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`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
/// The range of component `n` is `[1, 16384]`.
/// The range of component `n` is `[1, 16384]`.
fn receive_single_n_bytes_message_proof_with_dispatch(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `932`
// Estimated: `52645`
// Minimum execution time: 83_343_000 picoseconds.
Weight::from_parts(88_704_494, 0)
.saturating_add(Weight::from_parts(0, 52645))
// Standard Error: 24
.saturating_add(Weight::from_parts(6_812, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(10))
.saturating_add(T::DbWeight::get().writes(3))
}
}
@@ -0,0 +1,133 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_bridge_relayers`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=pezpallet_bridge_relayers
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_bridge_relayers`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_bridge_relayers::WeightInfo for WeightInfo<T> {
/// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1)
/// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn claim_rewards() -> Weight {
// Proof Size summary in bytes:
// Measured: `278`
// Estimated: `3593`
// Minimum execution time: 51_960_000 picoseconds.
Weight::from_parts(53_358_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Benchmark::Override` (r:0 w:0)
/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn claim_rewards_to() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `BridgeRelayers::RegisteredRelayers` (r:1 w:1)
/// Proof: `BridgeRelayers::RegisteredRelayers` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: UNKNOWN KEY `0x1e8445dc201eeb8560e5579a5dd54655` (r:1 w:0)
/// Proof: UNKNOWN KEY `0x1e8445dc201eeb8560e5579a5dd54655` (r:1 w:0)
/// Storage: `Balances::Reserves` (r:1 w:1)
/// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`)
fn register() -> Weight {
// Proof Size summary in bytes:
// Measured: `131`
// Estimated: `4714`
// Minimum execution time: 28_388_000 picoseconds.
Weight::from_parts(29_250_000, 0)
.saturating_add(Weight::from_parts(0, 4714))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `BridgeRelayers::RegisteredRelayers` (r:1 w:1)
/// Proof: `BridgeRelayers::RegisteredRelayers` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Balances::Reserves` (r:1 w:1)
/// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`)
fn deregister() -> Weight {
// Proof Size summary in bytes:
// Measured: `231`
// Estimated: `4714`
// Minimum execution time: 33_079_000 picoseconds.
Weight::from_parts(33_896_000, 0)
.saturating_add(Weight::from_parts(0, 4714))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `BridgeRelayers::RegisteredRelayers` (r:1 w:1)
/// Proof: `BridgeRelayers::RegisteredRelayers` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Balances::Reserves` (r:1 w:1)
/// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`)
fn slash_and_deregister() -> Weight {
// Proof Size summary in bytes:
// Measured: `231`
// Estimated: `4714`
// Minimum execution time: 27_488_000 picoseconds.
Weight::from_parts(28_278_000, 0)
.saturating_add(Weight::from_parts(0, 4714))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1)
/// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
fn register_relayer_reward() -> Weight {
// Proof Size summary in bytes:
// Measured: `76`
// Estimated: `3538`
// Minimum execution time: 7_318_000 picoseconds.
Weight::from_parts(7_707_000, 0)
.saturating_add(Weight::from_parts(0, 3538))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}
@@ -0,0 +1,133 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_bridge_relayers`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=pezpallet_bridge_relayers
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_bridge_relayers`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_bridge_relayers::WeightInfo for WeightInfo<T> {
/// Storage: `BridgeRelayersForPermissionlessLanes::RelayerRewards` (r:1 w:1)
/// Proof: `BridgeRelayersForPermissionlessLanes::RelayerRewards` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn claim_rewards() -> Weight {
// Proof Size summary in bytes:
// Measured: `270`
// Estimated: `3593`
// Minimum execution time: 53_722_000 picoseconds.
Weight::from_parts(55_266_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Benchmark::Override` (r:0 w:0)
/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn claim_rewards_to() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `BridgeRelayersForPermissionlessLanes::RegisteredRelayers` (r:1 w:1)
/// Proof: `BridgeRelayersForPermissionlessLanes::RegisteredRelayers` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: UNKNOWN KEY `0x1e8445dc201eeb8560e5579a5dd54655` (r:1 w:0)
/// Proof: UNKNOWN KEY `0x1e8445dc201eeb8560e5579a5dd54655` (r:1 w:0)
/// Storage: `Balances::Reserves` (r:1 w:1)
/// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`)
fn register() -> Weight {
// Proof Size summary in bytes:
// Measured: `58`
// Estimated: `4714`
// Minimum execution time: 28_000_000 picoseconds.
Weight::from_parts(28_702_000, 0)
.saturating_add(Weight::from_parts(0, 4714))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `BridgeRelayersForPermissionlessLanes::RegisteredRelayers` (r:1 w:1)
/// Proof: `BridgeRelayersForPermissionlessLanes::RegisteredRelayers` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Balances::Reserves` (r:1 w:1)
/// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`)
fn deregister() -> Weight {
// Proof Size summary in bytes:
// Measured: `158`
// Estimated: `4714`
// Minimum execution time: 28_300_000 picoseconds.
Weight::from_parts(29_460_000, 0)
.saturating_add(Weight::from_parts(0, 4714))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `BridgeRelayersForPermissionlessLanes::RegisteredRelayers` (r:1 w:1)
/// Proof: `BridgeRelayersForPermissionlessLanes::RegisteredRelayers` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
/// Storage: `Balances::Reserves` (r:1 w:1)
/// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`)
fn slash_and_deregister() -> Weight {
// Proof Size summary in bytes:
// Measured: `158`
// Estimated: `4714`
// Minimum execution time: 23_121_000 picoseconds.
Weight::from_parts(23_631_000, 0)
.saturating_add(Weight::from_parts(0, 4714))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `BridgeRelayersForPermissionlessLanes::RelayerRewards` (r:1 w:1)
/// Proof: `BridgeRelayersForPermissionlessLanes::RelayerRewards` (`max_values`: None, `max_size`: Some(101), added: 2576, mode: `MaxEncodedLen`)
fn register_relayer_reward() -> Weight {
// Proof Size summary in bytes:
// Measured: `3`
// Estimated: `3566`
// Minimum execution time: 6_982_000 picoseconds.
Weight::from_parts(7_354_000, 0)
.saturating_add(Weight::from_parts(0, 3566))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}
@@ -0,0 +1,114 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_bridge_teyrchains`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=pezpallet_bridge_teyrchains
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_bridge_teyrchains`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_bridge_teyrchains::WeightInfo for WeightInfo<T> {
/// Storage: `BridgeZagrosTeyrchains::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeZagrosTeyrchains::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgeZagrosGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosTeyrchains::ParasInfo` (r:1 w:1)
/// Proof: `BridgeZagrosTeyrchains::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosTeyrchains::ImportedParaHashes` (r:1 w:1)
/// Proof: `BridgeZagrosTeyrchains::ImportedParaHashes` (`max_values`: Some(64), `max_size`: Some(64), added: 1054, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosTeyrchains::ImportedParaHeads` (r:0 w:1)
/// Proof: `BridgeZagrosTeyrchains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
/// The range of component `p` is `[1, 2]`.
fn submit_teyrchain_heads_with_n_teyrchains(_p: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `156`
// Estimated: `2543`
// Minimum execution time: 36_844_000 picoseconds.
Weight::from_parts(38_748_161, 0)
.saturating_add(Weight::from_parts(0, 2543))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `BridgeZagrosTeyrchains::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeZagrosTeyrchains::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgeZagrosGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosTeyrchains::ParasInfo` (r:1 w:1)
/// Proof: `BridgeZagrosTeyrchains::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosTeyrchains::ImportedParaHashes` (r:1 w:1)
/// Proof: `BridgeZagrosTeyrchains::ImportedParaHashes` (`max_values`: Some(64), `max_size`: Some(64), added: 1054, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosTeyrchains::ImportedParaHeads` (r:0 w:1)
/// Proof: `BridgeZagrosTeyrchains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
fn submit_teyrchain_heads_with_1kb_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `156`
// Estimated: `2543`
// Minimum execution time: 37_996_000 picoseconds.
Weight::from_parts(39_802_000, 0)
.saturating_add(Weight::from_parts(0, 2543))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `BridgeZagrosTeyrchains::PalletOperatingMode` (r:1 w:0)
/// Proof: `BridgeZagrosTeyrchains::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosGrandpa::ImportedHeaders` (r:1 w:0)
/// Proof: `BridgeZagrosGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosTeyrchains::ParasInfo` (r:1 w:1)
/// Proof: `BridgeZagrosTeyrchains::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosTeyrchains::ImportedParaHashes` (r:1 w:1)
/// Proof: `BridgeZagrosTeyrchains::ImportedParaHashes` (`max_values`: Some(64), `max_size`: Some(64), added: 1054, mode: `MaxEncodedLen`)
/// Storage: `BridgeZagrosTeyrchains::ImportedParaHeads` (r:0 w:1)
/// Proof: `BridgeZagrosTeyrchains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
fn submit_teyrchain_heads_with_16kb_proof() -> Weight {
// Proof Size summary in bytes:
// Measured: `156`
// Estimated: `2543`
// Minimum execution time: 64_499_000 picoseconds.
Weight::from_parts(66_377_000, 0)
.saturating_add(Weight::from_parts(0, 2543))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
}
@@ -0,0 +1,280 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_collator_selection`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=pezpallet_collator_selection
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_collator_selection`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_collator_selection::WeightInfo for WeightInfo<T> {
/// Storage: `Session::NextKeys` (r:20 w:0)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `CollatorSelection::Invulnerables` (r:0 w:1)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// The range of component `b` is `[1, 20]`.
fn set_invulnerables(b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `196 + b * (79 ±0)`
// Estimated: `1187 + b * (2555 ±0)`
// Minimum execution time: 13_338_000 picoseconds.
Weight::from_parts(11_986_525, 0)
.saturating_add(Weight::from_parts(0, 1187))
// Standard Error: 10_072
.saturating_add(Weight::from_parts(4_110_140, 0).saturating_mul(b.into()))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(Weight::from_parts(0, 2555).saturating_mul(b.into()))
}
/// Storage: `Session::NextKeys` (r:1 w:0)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:1)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `b` is `[1, 19]`.
/// The range of component `c` is `[1, 99]`.
fn add_invulnerable(b: u32, c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `757 + b * (32 ±0) + c * (53 ±0)`
// Estimated: `6287 + b * (37 ±0) + c * (53 ±0)`
// Minimum execution time: 50_026_000 picoseconds.
Weight::from_parts(46_794_223, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 16_127
.saturating_add(Weight::from_parts(268_509, 0).saturating_mul(b.into()))
// Standard Error: 3_056
.saturating_add(Weight::from_parts(159_092, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
.saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(0, 53).saturating_mul(c.into()))
}
/// Storage: `CollatorSelection::CandidateList` (r:1 w:0)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:1)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// The range of component `b` is `[5, 20]`.
fn remove_invulnerable(b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `82 + b * (32 ±0)`
// Estimated: `6287`
// Minimum execution time: 12_569_000 picoseconds.
Weight::from_parts(12_395_889, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 2_405
.saturating_add(Weight::from_parts(198_537, 0).saturating_mul(b.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CollatorSelection::DesiredCandidates` (r:0 w:1)
/// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
fn set_desired_candidates() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_392_000 picoseconds.
Weight::from_parts(5_704_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CollatorSelection::CandidacyBond` (r:1 w:1)
/// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:100 w:100)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:100)
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// The range of component `c` is `[0, 100]`.
/// The range of component `k` is `[0, 100]`.
fn set_candidacy_bond(c: u32, k: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0 + c * (182 ±0) + k * (115 ±0)`
// Estimated: `6287 + c * (901 ±29) + k * (901 ±29)`
// Minimum execution time: 10_728_000 picoseconds.
Weight::from_parts(11_051_000, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 178_671
.saturating_add(Weight::from_parts(6_119_294, 0).saturating_mul(c.into()))
// Standard Error: 178_671
.saturating_add(Weight::from_parts(5_697_217, 0).saturating_mul(k.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into())))
.saturating_add(Weight::from_parts(0, 901).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 901).saturating_mul(k.into()))
}
/// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0)
/// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// The range of component `c` is `[3, 100]`.
fn update_bond(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `282 + c * (49 ±0)`
// Estimated: `6287`
// Minimum execution time: 32_598_000 picoseconds.
Weight::from_parts(35_209_960, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 2_669
.saturating_add(Weight::from_parts(195_321, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// Storage: `Session::NextKeys` (r:1 w:0)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0)
/// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1)
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// The range of component `c` is `[1, 99]`.
fn register_as_candidate(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `727 + c * (52 ±0)`
// Estimated: `6287 + c * (54 ±0)`
// Minimum execution time: 43_069_000 picoseconds.
Weight::from_parts(46_532_260, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 2_354
.saturating_add(Weight::from_parts(232_318, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into()))
}
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0)
/// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
/// Storage: `Session::NextKeys` (r:1 w:0)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:2)
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// The range of component `c` is `[3, 100]`.
fn take_candidate_slot(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `867 + c * (53 ±0)`
// Estimated: `6287 + c * (54 ±0)`
// Minimum execution time: 60_755_000 picoseconds.
Weight::from_parts(66_976_829, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 3_178
.saturating_add(Weight::from_parts(168_913, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(4))
.saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into()))
}
/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1)
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// The range of component `c` is `[3, 100]`.
fn leave_intent(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `310 + c * (48 ±0)`
// Estimated: `6287`
// Minimum execution time: 35_003_000 picoseconds.
Weight::from_parts(37_953_436, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 3_452
.saturating_add(Weight::from_parts(198_637, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1)
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
fn note_author() -> Weight {
// Proof Size summary in bytes:
// Measured: `155`
// Estimated: `6196`
// Minimum execution time: 43_916_000 picoseconds.
Weight::from_parts(44_865_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `CollatorSelection::CandidateList` (r:1 w:0)
/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::LastAuthoredBlock` (r:100 w:0)
/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
/// Storage: `CollatorSelection::DesiredCandidates` (r:1 w:0)
/// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:97 w:97)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `r` is `[1, 100]`.
/// The range of component `c` is `[1, 100]`.
fn new_session(r: u32, c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `2265 + c * (97 ±0) + r * (114 ±0)`
// Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)`
// Minimum execution time: 22_586_000 picoseconds.
Weight::from_parts(23_013_000, 0)
.saturating_add(Weight::from_parts(0, 6287))
// Standard Error: 312_023
.saturating_add(Weight::from_parts(14_508_118, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
.saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into()))
.saturating_add(Weight::from_parts(0, 2603).saturating_mul(r.into()))
}
}
@@ -0,0 +1,200 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_message_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=pezpallet_message_queue
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_message_queue`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_message_queue::WeightInfo for WeightInfo<T> {
/// Storage: `MessageQueue::ServiceHead` (r:1 w:0)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
fn ready_ring_knit() -> Weight {
// Proof Size summary in bytes:
// Measured: `294`
// Estimated: `6212`
// Minimum execution time: 18_575_000 picoseconds.
Weight::from_parts(19_320_000, 0)
.saturating_add(Weight::from_parts(0, 6212))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
fn ready_ring_unknit() -> Weight {
// Proof Size summary in bytes:
// Measured: `289`
// Estimated: `6212`
// Minimum execution time: 17_221_000 picoseconds.
Weight::from_parts(17_660_000, 0)
.saturating_add(Weight::from_parts(0, 6212))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
fn service_queue_base() -> Weight {
// Proof Size summary in bytes:
// Measured: `76`
// Estimated: `3601`
// Minimum execution time: 5_006_000 picoseconds.
Weight::from_parts(5_256_000, 0)
.saturating_add(Weight::from_parts(0, 3601))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105549), added: 108024, mode: `MaxEncodedLen`)
fn service_page_base_completion() -> Weight {
// Proof Size summary in bytes:
// Measured: `143`
// Estimated: `109014`
// Minimum execution time: 7_255_000 picoseconds.
Weight::from_parts(7_624_000, 0)
.saturating_add(Weight::from_parts(0, 109014))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105549), added: 108024, mode: `MaxEncodedLen`)
fn service_page_base_no_completion() -> Weight {
// Proof Size summary in bytes:
// Measured: `143`
// Estimated: `109014`
// Minimum execution time: 7_362_000 picoseconds.
Weight::from_parts(7_869_000, 0)
.saturating_add(Weight::from_parts(0, 109014))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `MessageQueue::BookStateFor` (r:0 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105549), added: 108024, mode: `MaxEncodedLen`)
fn service_page_item() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 287_766_000 picoseconds.
Weight::from_parts(295_609_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
fn bump_service_head() -> Weight {
// Proof Size summary in bytes:
// Measured: `242`
// Estimated: `3601`
// Minimum execution time: 8_900_000 picoseconds.
Weight::from_parts(9_438_000, 0)
.saturating_add(Weight::from_parts(0, 3601))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:0 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
fn set_service_head() -> Weight {
// Proof Size summary in bytes:
// Measured: `232`
// Estimated: `3601`
// Minimum execution time: 7_429_000 picoseconds.
Weight::from_parts(7_773_000, 0)
.saturating_add(Weight::from_parts(0, 3601))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105549), added: 108024, mode: `MaxEncodedLen`)
fn reap_page() -> Weight {
// Proof Size summary in bytes:
// Measured: `105680`
// Estimated: `109014`
// Minimum execution time: 112_440_000 picoseconds.
Weight::from_parts(114_042_000, 0)
.saturating_add(Weight::from_parts(0, 109014))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105549), added: 108024, mode: `MaxEncodedLen`)
fn execute_overweight_page_removed() -> Weight {
// Proof Size summary in bytes:
// Measured: `105680`
// Estimated: `109014`
// Minimum execution time: 138_574_000 picoseconds.
Weight::from_parts(139_879_000, 0)
.saturating_add(Weight::from_parts(0, 109014))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105549), added: 108024, mode: `MaxEncodedLen`)
fn execute_overweight_page_updated() -> Weight {
// Proof Size summary in bytes:
// Measured: `105680`
// Estimated: `109014`
// Minimum execution time: 201_954_000 picoseconds.
Weight::from_parts(208_495_000, 0)
.saturating_add(Weight::from_parts(0, 109014))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
}
@@ -0,0 +1,180 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_multisig`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `c8c7296f7413`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=pezpallet_multisig
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_multisig`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_multisig::WeightInfo for WeightInfo<T> {
/// The range of component `z` is `[0, 10000]`.
fn as_multi_threshold_1(z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 16_528_000 picoseconds.
Weight::from_parts(17_737_513, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 10
.saturating_add(Weight::from_parts(343, 0).saturating_mul(z.into()))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_create(s: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `191 + s * (2 ±0)`
// Estimated: `6811`
// Minimum execution time: 46_334_000 picoseconds.
Weight::from_parts(32_518_569, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 2_036
.saturating_add(Weight::from_parts(159_802, 0).saturating_mul(s.into()))
// Standard Error: 19
.saturating_add(Weight::from_parts(1_974, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[3, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `210`
// Estimated: `6811`
// Minimum execution time: 30_787_000 picoseconds.
Weight::from_parts(20_678_818, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 3_051
.saturating_add(Weight::from_parts(126_496, 0).saturating_mul(s.into()))
// Standard Error: 29
.saturating_add(Weight::from_parts(1_831, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `316 + s * (33 ±0)`
// Estimated: `6811`
// Minimum execution time: 56_718_000 picoseconds.
Weight::from_parts(31_282_377, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 4_467
.saturating_add(Weight::from_parts(277_430, 0).saturating_mul(s.into()))
// Standard Error: 43
.saturating_add(Weight::from_parts(2_675, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_create(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `191 + s * (2 ±0)`
// Estimated: `6811`
// Minimum execution time: 30_946_000 picoseconds.
Weight::from_parts(35_834_019, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 5_715
.saturating_add(Weight::from_parts(195_084, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_approve(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `210`
// Estimated: `6811`
// Minimum execution time: 17_064_000 picoseconds.
Weight::from_parts(20_584_833, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 3_539
.saturating_add(Weight::from_parts(126_800, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn cancel_as_multi(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `382 + s * (1 ±0)`
// Estimated: `6811`
// Minimum execution time: 33_785_000 picoseconds.
Weight::from_parts(35_236_692, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 1_223
.saturating_add(Weight::from_parts(162_823, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn poke_deposit(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `382 + s * (1 ±0)`
// Estimated: `6811`
// Minimum execution time: 33_210_000 picoseconds.
Weight::from_parts(33_269_677, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 1_886
.saturating_add(Weight::from_parts(183_458, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}
@@ -0,0 +1,81 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_session`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=pezpallet_session
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_session`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_session::WeightInfo for WeightInfo<T> {
/// Storage: `Session::NextKeys` (r:1 w:1)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Session::KeyOwner` (r:1 w:1)
/// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn set_keys() -> Weight {
// Proof Size summary in bytes:
// Measured: `297`
// Estimated: `3762`
// Minimum execution time: 22_279_000 picoseconds.
Weight::from_parts(23_129_000, 0)
.saturating_add(Weight::from_parts(0, 3762))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `Session::NextKeys` (r:1 w:1)
/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Session::KeyOwner` (r:0 w:1)
/// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn purge_keys() -> Weight {
// Proof Size summary in bytes:
// Measured: `279`
// Estimated: `3744`
// Minimum execution time: 17_339_000 picoseconds.
Weight::from_parts(18_012_000, 0)
.saturating_add(Weight::from_parts(0, 3744))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(2))
}
}
@@ -0,0 +1,75 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_timestamp`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=pezpallet_timestamp
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_timestamp`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_timestamp::WeightInfo for WeightInfo<T> {
/// Storage: `Timestamp::Now` (r:1 w:1)
/// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
/// Storage: `Aura::CurrentSlot` (r:1 w:0)
/// Proof: `Aura::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
fn set() -> Weight {
// Proof Size summary in bytes:
// Measured: `85`
// Estimated: `1493`
// Minimum execution time: 8_121_000 picoseconds.
Weight::from_parts(8_743_000, 0)
.saturating_add(Weight::from_parts(0, 1493))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
fn on_finalize() -> Weight {
// Proof Size summary in bytes:
// Measured: `94`
// Estimated: `0`
// Minimum execution time: 4_518_000 picoseconds.
Weight::from_parts(4_820_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}
@@ -0,0 +1,65 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_transaction_payment`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=pezpallet_transaction_payment
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_transaction_payment`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_transaction_payment::WeightInfo for WeightInfo<T> {
/// Storage: `System::Account` (r:2 w:2)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn charge_transaction_payment() -> Weight {
// Proof Size summary in bytes:
// Measured: `101`
// Estimated: `6196`
// Minimum execution time: 45_327_000 picoseconds.
Weight::from_parts(45_906_000, 0)
.saturating_add(Weight::from_parts(0, 6196))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
}
@@ -0,0 +1,118 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_utility`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=pezpallet_utility
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_utility`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_utility::WeightInfo for WeightInfo<T> {
/// The range of component `c` is `[0, 1000]`.
fn batch(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_237_000 picoseconds.
Weight::from_parts(5_384_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 13_311
.saturating_add(Weight::from_parts(4_400_201, 0).saturating_mul(c.into()))
}
fn as_derivative() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_750_000 picoseconds.
Weight::from_parts(4_916_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// The range of component `c` is `[0, 1000]`.
fn batch_all(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_354_000 picoseconds.
Weight::from_parts(5_427_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 12_716
.saturating_add(Weight::from_parts(4_627_976, 0).saturating_mul(c.into()))
}
fn dispatch_as() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_287_000 picoseconds.
Weight::from_parts(7_592_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// The range of component `c` is `[0, 1000]`.
fn force_batch(c: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_313_000 picoseconds.
Weight::from_parts(5_449_000, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 12_377
.saturating_add(Weight::from_parts(4_398_022, 0).saturating_mul(c.into()))
}
fn dispatch_as_fallible() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_163_000 picoseconds.
Weight::from_parts(7_630_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
fn if_else() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 9_092_000 picoseconds.
Weight::from_parts(9_420_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}
@@ -0,0 +1,396 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_xcm`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-07-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `a49f76527979`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=pezpallet_xcm
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `pezpallet_xcm`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> pezpallet_xcm::WeightInfo for WeightInfo<T> {
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::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`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
fn send() -> Weight {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `3568`
// Minimum execution time: 29_956_000 picoseconds.
Weight::from_parts(31_455_000, 0)
.saturating_add(Weight::from_parts(0, 3568))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::ShouldRecordXcm` (r:1 w:0)
/// Proof: `PezkuwiXcm::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::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`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
fn teleport_assets() -> Weight {
// Proof Size summary in bytes:
// Measured: `135`
// Estimated: `3600`
// Minimum execution time: 120_900_000 picoseconds.
Weight::from_parts(124_848_000, 0)
.saturating_add(Weight::from_parts(0, 3600))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `Benchmark::Override` (r:0 w:0)
/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn reserve_transfer_assets() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::ShouldRecordXcm` (r:1 w:0)
/// Proof: `PezkuwiXcm::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::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`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
fn transfer_assets() -> Weight {
// Proof Size summary in bytes:
// Measured: `135`
// Estimated: `3600`
// Minimum execution time: 120_896_000 picoseconds.
Weight::from_parts(125_530_000, 0)
.saturating_add(Weight::from_parts(0, 3600))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `PezkuwiXcm::ShouldRecordXcm` (r:1 w:0)
/// Proof: `PezkuwiXcm::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn execute() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `1485`
// Minimum execution time: 10_196_000 picoseconds.
Weight::from_parts(10_787_000, 0)
.saturating_add(Weight::from_parts(0, 1485))
.saturating_add(T::DbWeight::get().reads(1))
}
/// Storage: `PezkuwiXcm::SupportedVersion` (r:0 w:1)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn force_xcm_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_246_000 picoseconds.
Weight::from_parts(8_554_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
fn force_default_xcm_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_463_000 picoseconds.
Weight::from_parts(2_631_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `PezkuwiXcm::VersionNotifiers` (r:1 w:1)
/// Proof: `PezkuwiXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::QueryCounter` (r:1 w:1)
/// Proof: `PezkuwiXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::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`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::Queries` (r:0 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn force_subscribe_version_notify() -> Weight {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `3568`
// Minimum execution time: 36_799_000 picoseconds.
Weight::from_parts(38_247_000, 0)
.saturating_add(Weight::from_parts(0, 3568))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: `PezkuwiXcm::VersionNotifiers` (r:1 w:1)
/// Proof: `PezkuwiXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::OutboundXcmpMessages` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::Queries` (r:0 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn force_unsubscribe_version_notify() -> Weight {
// Proof Size summary in bytes:
// Measured: `262`
// Estimated: `108971`
// Minimum execution time: 42_329_000 picoseconds.
Weight::from_parts(43_649_000, 0)
.saturating_add(Weight::from_parts(0, 108971))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `PezkuwiXcm::XcmExecutionSuspended` (r:0 w:1)
/// Proof: `PezkuwiXcm::XcmExecutionSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn force_suspension() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_412_000 picoseconds.
Weight::from_parts(2_511_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PezkuwiXcm::SupportedVersion` (r:6 w:2)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn migrate_supported_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `23`
// Estimated: `15863`
// Minimum execution time: 21_165_000 picoseconds.
Weight::from_parts(21_522_000, 0)
.saturating_add(Weight::from_parts(0, 15863))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PezkuwiXcm::VersionNotifiers` (r:6 w:2)
/// Proof: `PezkuwiXcm::VersionNotifiers` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn migrate_version_notifiers() -> Weight {
// Proof Size summary in bytes:
// Measured: `27`
// Estimated: `15867`
// Minimum execution time: 20_591_000 picoseconds.
Weight::from_parts(21_078_000, 0)
.saturating_add(Weight::from_parts(0, 15867))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PezkuwiXcm::VersionNotifyTargets` (r:7 w:0)
/// Proof: `PezkuwiXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn already_notified_target() -> Weight {
// Proof Size summary in bytes:
// Measured: `79`
// Estimated: `18394`
// Minimum execution time: 26_283_000 picoseconds.
Weight::from_parts(26_707_000, 0)
.saturating_add(Weight::from_parts(0, 18394))
.saturating_add(T::DbWeight::get().reads(7))
}
/// Storage: `PezkuwiXcm::VersionNotifyTargets` (r:2 w:1)
/// Proof: `PezkuwiXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn notify_current_targets() -> Weight {
// Proof Size summary in bytes:
// Measured: `47`
// Estimated: `5987`
// Minimum execution time: 34_495_000 picoseconds.
Weight::from_parts(36_648_000, 0)
.saturating_add(Weight::from_parts(0, 5987))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PezkuwiXcm::VersionNotifyTargets` (r:5 w:0)
/// Proof: `PezkuwiXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn notify_target_migration_fail() -> Weight {
// Proof Size summary in bytes:
// Measured: `79`
// Estimated: `13444`
// Minimum execution time: 18_378_000 picoseconds.
Weight::from_parts(18_889_000, 0)
.saturating_add(Weight::from_parts(0, 13444))
.saturating_add(T::DbWeight::get().reads(5))
}
/// Storage: `PezkuwiXcm::VersionNotifyTargets` (r:6 w:2)
/// Proof: `PezkuwiXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn migrate_version_notify_targets() -> Weight {
// Proof Size summary in bytes:
// Measured: `34`
// Estimated: `15874`
// Minimum execution time: 20_656_000 picoseconds.
Weight::from_parts(21_321_000, 0)
.saturating_add(Weight::from_parts(0, 15874))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PezkuwiXcm::VersionNotifyTargets` (r:6 w:1)
/// Proof: `PezkuwiXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
/// Proof: `TeyrchainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn migrate_and_notify_old_targets() -> Weight {
// Proof Size summary in bytes:
// Measured: `47`
// Estimated: `15887`
// Minimum execution time: 45_214_000 picoseconds.
Weight::from_parts(46_367_000, 0)
.saturating_add(Weight::from_parts(0, 15887))
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PezkuwiXcm::QueryCounter` (r:1 w:1)
/// Proof: `PezkuwiXcm::QueryCounter` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::Queries` (r:0 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn new_query() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `1485`
// Minimum execution time: 2_648_000 picoseconds.
Weight::from_parts(2_865_000, 0)
.saturating_add(Weight::from_parts(0, 1485))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PezkuwiXcm::Queries` (r:1 w:1)
/// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn take_response() -> Weight {
// Proof Size summary in bytes:
// Measured: `7576`
// Estimated: `11041`
// Minimum execution time: 27_980_000 picoseconds.
Weight::from_parts(28_563_000, 0)
.saturating_add(Weight::from_parts(0, 11041))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PezkuwiXcm::ShouldRecordXcm` (r:1 w:0)
/// Proof: `PezkuwiXcm::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PezkuwiXcm::AssetTraps` (r:1 w:1)
/// Proof: `PezkuwiXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn claim_assets() -> Weight {
// Proof Size summary in bytes:
// Measured: `24`
// Estimated: `3489`
// Minimum execution time: 40_317_000 picoseconds.
Weight::from_parts(41_335_000, 0)
.saturating_add(Weight::from_parts(0, 3489))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `PezkuwiXcm::AuthorizedAliases` (r:1 w:1)
/// Proof: `PezkuwiXcm::AuthorizedAliases` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`)
fn add_authorized_alias() -> Weight {
// Proof Size summary in bytes:
// Measured: `161`
// Estimated: `3626`
// Minimum execution time: 52_518_000 picoseconds.
Weight::from_parts(53_441_000, 0)
.saturating_add(Weight::from_parts(0, 3626))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `PezkuwiXcm::AuthorizedAliases` (r:1 w:1)
/// Proof: `PezkuwiXcm::AuthorizedAliases` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Balances::Holds` (r:1 w:1)
/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`)
fn remove_authorized_alias() -> Weight {
// Proof Size summary in bytes:
// Measured: `517`
// Estimated: `3982`
// Minimum execution time: 53_492_000 picoseconds.
Weight::from_parts(54_536_000, 0)
.saturating_add(Weight::from_parts(0, 3982))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
fn weigh_message() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_493_000 picoseconds.
Weight::from_parts(8_693_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}
@@ -0,0 +1,63 @@
// This file is part of Pezcumulus.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub mod constants {
use pezframe_support::{
parameter_types,
weights::{constants, RuntimeDbWeight},
};
parameter_types! {
/// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights
/// are available for brave runtime engineers who may want to try this out as default.
pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 8_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
write: 50_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
};
}
#[cfg(test)]
mod test_db_weights {
use super::constants::ParityDbWeight as W;
use pezframe_support::weights::constants;
/// Checks that all weights exist and have sane values.
// NOTE: If this test fails but you are sure that the generated values are fine,
// you can delete it.
#[test]
fn sane() {
// At least 1 µs.
assert!(
W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
"Read weight should be at least 1 µs."
);
assert!(
W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
"Write weight should be at least 1 µs."
);
// At most 1 ms.
assert!(
W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
"Read weight should be at most 1 ms."
);
assert!(
W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
"Write weight should be at most 1 ms."
);
}
}
}
@@ -0,0 +1,77 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `cumulus_pallet_teyrchain_system`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=cumulus_pallet_teyrchain_system
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `cumulus_pallet_teyrchain_system`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> cumulus_pallet_teyrchain_system::WeightInfo for WeightInfo<T> {
/// Storage: `TeyrchainSystem::LastDmqMqcHead` (r:1 w:1)
/// Proof: `TeyrchainSystem::LastDmqMqcHead` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
/// Storage: `TeyrchainSystem::ProcessedDownwardMessages` (r:0 w:1)
/// Proof: `TeyrchainSystem::ProcessedDownwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MessageQueue::Pages` (r:0 w:1000)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105549), added: 108024, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 1000]`.
fn enqueue_inbound_downward_messages(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `82`
// Estimated: `3601`
// Minimum execution time: 2_312_000 picoseconds.
Weight::from_parts(282_321_153, 0)
.saturating_add(Weight::from_parts(0, 3601))
// Standard Error: 151_164
.saturating_add(Weight::from_parts(333_773_743, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(4))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
}
}
@@ -0,0 +1,61 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `cumulus_pallet_weight_reclaim`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=cumulus_pallet_weight_reclaim
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `cumulus_pallet_weight_reclaim`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> cumulus_pallet_weight_reclaim::WeightInfo for WeightInfo<T> {
fn storage_weight_reclaim() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 4_003_000 picoseconds.
Weight::from_parts(4_199_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
}
@@ -0,0 +1,258 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `cumulus_pallet_xcmp_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-09-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `4e9548205c14`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=cumulus_pallet_xcmp_queue
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `cumulus_pallet_xcmp_queue`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo<T> {
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:1)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
fn set_config_with_u32() -> Weight {
// Proof Size summary in bytes:
// Measured: `4`
// Estimated: `1497`
// Minimum execution time: 4_512_000 picoseconds.
Weight::from_parts(4_765_000, 0)
.saturating_add(Weight::from_parts(0, 1497))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105549), added: 108024, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 105467]`.
fn enqueue_n_bytes_xcmp_message(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `80`
// Estimated: `5487`
// Minimum execution time: 14_700_000 picoseconds.
Weight::from_parts(10_409_861, 0)
.saturating_add(Weight::from_parts(0, 5487))
// Standard Error: 7
.saturating_add(Weight::from_parts(957, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105549), added: 108024, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 1000]`.
fn enqueue_n_empty_xcmp_messages(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `80`
// Estimated: `5487`
// Minimum execution time: 12_049_000 picoseconds.
Weight::from_parts(16_501_830, 0)
.saturating_add(Weight::from_parts(0, 5487))
// Standard Error: 286
.saturating_add(Weight::from_parts(143_661, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `Measured`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `Measured`)
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105549), added: 108024, mode: `Measured`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `Measured`)
/// The range of component `n` is `[0, 105457]`.
fn enqueue_empty_xcmp_message_at(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `263 + n * (1 ±0)`
// Estimated: `3726 + n * (1 ±0)`
// Minimum execution time: 23_682_000 picoseconds.
Weight::from_parts(15_809_305, 0)
.saturating_add(Weight::from_parts(0, 3726))
// Standard Error: 11
.saturating_add(Weight::from_parts(2_032, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
}
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:100)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105549), added: 108024, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 100]`.
fn enqueue_n_full_pages(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `115`
// Estimated: `5487`
// Minimum execution time: 13_463_000 picoseconds.
Weight::from_parts(13_905_000, 0)
.saturating_add(Weight::from_parts(0, 5487))
// Standard Error: 70_729
.saturating_add(Weight::from_parts(91_024_339, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
}
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `Measured`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `Measured`)
/// Storage: `MessageQueue::Pages` (r:1 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105549), added: 108024, mode: `Measured`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `Measured`)
fn enqueue_1000_small_xcmp_messages() -> Weight {
// Proof Size summary in bytes:
// Measured: `52996`
// Estimated: `56461`
// Minimum execution time: 268_839_000 picoseconds.
Weight::from_parts(273_942_000, 0)
.saturating_add(Weight::from_parts(0, 56461))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
fn suspend_channel() -> Weight {
// Proof Size summary in bytes:
// Measured: `4`
// Estimated: `2767`
// Minimum execution time: 2_729_000 picoseconds.
Weight::from_parts(2_879_000, 0)
.saturating_add(Weight::from_parts(0, 2767))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
fn resume_channel() -> Weight {
// Proof Size summary in bytes:
// Measured: `39`
// Estimated: `2767`
// Minimum execution time: 3_908_000 picoseconds.
Weight::from_parts(4_056_000, 0)
.saturating_add(Weight::from_parts(0, 2767))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// The range of component `n` is `[0, 92]`.
fn take_first_concatenated_xcm(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_010_000 picoseconds.
Weight::from_parts(2_371_341, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 216
.saturating_add(Weight::from_parts(18_290, 0).saturating_mul(n.into()))
}
/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105549), added: 108024, mode: `MaxEncodedLen`)
fn on_idle_good_msg() -> Weight {
// Proof Size summary in bytes:
// Measured: `105645`
// Estimated: `109110`
// Minimum execution time: 175_547_000 picoseconds.
Weight::from_parts(179_082_000, 0)
.saturating_add(Weight::from_parts(0, 109110))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(5))
}
/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105549), added: 108024, mode: `MaxEncodedLen`)
fn on_idle_large_msg() -> Weight {
// Proof Size summary in bytes:
// Measured: `65714`
// Estimated: `69179`
// Minimum execution time: 117_753_000 picoseconds.
Weight::from_parts(119_939_000, 0)
.saturating_add(Weight::from_parts(0, 69179))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(5))
}
}
@@ -0,0 +1,63 @@
// This file is part of Pezcumulus.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
pub mod constants {
use pezframe_support::{
parameter_types,
weights::{constants, RuntimeDbWeight},
};
parameter_types! {
/// By default, Bizinikiwi uses `RocksDB`, so this will be the weight used throughout
/// the runtime.
pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
};
}
#[cfg(test)]
mod test_db_weights {
use super::constants::RocksDbWeight as W;
use pezframe_support::weights::constants;
/// Checks that all weights exist and have sane values.
// NOTE: If this test fails but you are sure that the generated values are fine,
// you can delete it.
#[test]
fn sane() {
// At least 1 µs.
assert!(
W::get().reads(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
"Read weight should be at least 1 µs."
);
assert!(
W::get().writes(1).ref_time() >= constants::WEIGHT_REF_TIME_PER_MICROS,
"Write weight should be at least 1 µs."
);
// At most 1 ms.
assert!(
W::get().reads(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
"Read weight should be at most 1 ms."
);
assert!(
W::get().writes(1).ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
"Write weight should be at most 1 ms."
);
}
}
}
@@ -0,0 +1,126 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `snowbridge_pallet_ethereum_client`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=snowbridge_pallet_ethereum_client
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `snowbridge_pallet_ethereum_client`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> snowbridge_pallet_ethereum_client::WeightInfo for WeightInfo<T> {
/// Storage: `EthereumBeaconClient::FinalizedBeaconStateIndex` (r:1 w:1)
/// Proof: `EthereumBeaconClient::FinalizedBeaconStateIndex` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::FinalizedBeaconStateMapping` (r:1 w:1)
/// Proof: `EthereumBeaconClient::FinalizedBeaconStateMapping` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::NextSyncCommittee` (r:0 w:1)
/// Proof: `EthereumBeaconClient::NextSyncCommittee` (`max_values`: Some(1), `max_size`: Some(92372), added: 92867, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::InitialCheckpointRoot` (r:0 w:1)
/// Proof: `EthereumBeaconClient::InitialCheckpointRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::ValidatorsRoot` (r:0 w:1)
/// Proof: `EthereumBeaconClient::ValidatorsRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::LatestFinalizedBlockRoot` (r:0 w:1)
/// Proof: `EthereumBeaconClient::LatestFinalizedBlockRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::CurrentSyncCommittee` (r:0 w:1)
/// Proof: `EthereumBeaconClient::CurrentSyncCommittee` (`max_values`: Some(1), `max_size`: Some(92372), added: 92867, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::FinalizedBeaconState` (r:0 w:1)
/// Proof: `EthereumBeaconClient::FinalizedBeaconState` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
fn force_checkpoint() -> Weight {
// Proof Size summary in bytes:
// Measured: `76`
// Estimated: `3501`
// Minimum execution time: 100_740_313_000 picoseconds.
Weight::from_parts(100_821_746_000, 0)
.saturating_add(Weight::from_parts(0, 3501))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(8))
}
/// Storage: `EthereumBeaconClient::OperatingMode` (r:1 w:0)
/// Proof: `EthereumBeaconClient::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::LatestFinalizedBlockRoot` (r:1 w:0)
/// Proof: `EthereumBeaconClient::LatestFinalizedBlockRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::FinalizedBeaconState` (r:1 w:0)
/// Proof: `EthereumBeaconClient::FinalizedBeaconState` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::NextSyncCommittee` (r:1 w:0)
/// Proof: `EthereumBeaconClient::NextSyncCommittee` (`max_values`: Some(1), `max_size`: Some(92372), added: 92867, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::CurrentSyncCommittee` (r:1 w:0)
/// Proof: `EthereumBeaconClient::CurrentSyncCommittee` (`max_values`: Some(1), `max_size`: Some(92372), added: 92867, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::ValidatorsRoot` (r:1 w:0)
/// Proof: `EthereumBeaconClient::ValidatorsRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::LatestSyncCommitteeUpdatePeriod` (r:1 w:0)
/// Proof: `EthereumBeaconClient::LatestSyncCommitteeUpdatePeriod` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
fn submit() -> Weight {
// Proof Size summary in bytes:
// Measured: `92772`
// Estimated: `93857`
// Minimum execution time: 25_926_518_000 picoseconds.
Weight::from_parts(25_962_652_000, 0)
.saturating_add(Weight::from_parts(0, 93857))
.saturating_add(T::DbWeight::get().reads(7))
}
/// Storage: `EthereumBeaconClient::OperatingMode` (r:1 w:0)
/// Proof: `EthereumBeaconClient::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::LatestFinalizedBlockRoot` (r:1 w:0)
/// Proof: `EthereumBeaconClient::LatestFinalizedBlockRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::FinalizedBeaconState` (r:1 w:0)
/// Proof: `EthereumBeaconClient::FinalizedBeaconState` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::NextSyncCommittee` (r:1 w:1)
/// Proof: `EthereumBeaconClient::NextSyncCommittee` (`max_values`: Some(1), `max_size`: Some(92372), added: 92867, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::CurrentSyncCommittee` (r:1 w:0)
/// Proof: `EthereumBeaconClient::CurrentSyncCommittee` (`max_values`: Some(1), `max_size`: Some(92372), added: 92867, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::ValidatorsRoot` (r:1 w:0)
/// Proof: `EthereumBeaconClient::ValidatorsRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::LatestSyncCommitteeUpdatePeriod` (r:1 w:1)
/// Proof: `EthereumBeaconClient::LatestSyncCommitteeUpdatePeriod` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
fn submit_with_sync_committee() -> Weight {
// Proof Size summary in bytes:
// Measured: `92772`
// Estimated: `93857`
// Minimum execution time: 126_820_767_000 picoseconds.
Weight::from_parts(127_012_438_000, 0)
.saturating_add(Weight::from_parts(0, 93857))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(2))
}
}
@@ -0,0 +1,79 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `snowbridge_pallet_inbound_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=snowbridge_pallet_inbound_queue
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `snowbridge_pallet_inbound_queue`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> snowbridge_pallet_inbound_queue::WeightInfo for WeightInfo<T> {
/// Storage: `EthereumInboundQueue::OperatingMode` (r:1 w:0)
/// Proof: `EthereumInboundQueue::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::LatestFinalizedBlockRoot` (r:1 w:0)
/// Proof: `EthereumBeaconClient::LatestFinalizedBlockRoot` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::FinalizedBeaconState` (r:1 w:0)
/// Proof: `EthereumBeaconClient::FinalizedBeaconState` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
/// Storage: UNKNOWN KEY `0xaed97c7854d601808b98ae43079dafb3` (r:1 w:0)
/// Proof: UNKNOWN KEY `0xaed97c7854d601808b98ae43079dafb3` (r:1 w:0)
/// Storage: `EthereumSystem::Channels` (r:1 w:0)
/// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `EthereumInboundQueue::Nonce` (r:1 w:1)
/// Proof: `EthereumInboundQueue::Nonce` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `EthereumSystem::PricingParameters` (r:1 w:0)
/// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn submit() -> Weight {
// Proof Size summary in bytes:
// Measured: `586`
// Estimated: `4051`
// Minimum execution time: 165_953_000 picoseconds.
Weight::from_parts(171_518_000, 0)
.saturating_add(Weight::from_parts(0, 4051))
.saturating_add(T::DbWeight::get().reads(8))
.saturating_add(T::DbWeight::get().writes(2))
}
}
@@ -0,0 +1,93 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `snowbridge_pallet_outbound_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=snowbridge_pallet_outbound_queue
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `snowbridge_pallet_outbound_queue`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> snowbridge_pallet_outbound_queue::WeightInfo for WeightInfo<T> {
/// Storage: `EthereumOutboundQueue::MessageLeaves` (r:1 w:1)
/// Proof: `EthereumOutboundQueue::MessageLeaves` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `EthereumOutboundQueue::Nonce` (r:1 w:1)
/// Proof: `EthereumOutboundQueue::Nonce` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
/// Storage: `EthereumSystem::PricingParameters` (r:1 w:0)
/// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`)
/// Storage: `EthereumOutboundQueue::Messages` (r:1 w:1)
/// Proof: `EthereumOutboundQueue::Messages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn do_process_message() -> Weight {
// Proof Size summary in bytes:
// Measured: `80`
// Estimated: `3513`
// Minimum execution time: 33_257_000 picoseconds.
Weight::from_parts(33_909_000, 0)
.saturating_add(Weight::from_parts(0, 3513))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `EthereumOutboundQueue::MessageLeaves` (r:1 w:0)
/// Proof: `EthereumOutboundQueue::MessageLeaves` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn commit() -> Weight {
// Proof Size summary in bytes:
// Measured: `1057`
// Estimated: `2542`
// Minimum execution time: 29_196_000 picoseconds.
Weight::from_parts(29_668_000, 0)
.saturating_add(Weight::from_parts(0, 2542))
.saturating_add(T::DbWeight::get().reads(1))
}
/// Storage: `EthereumOutboundQueue::MessageLeaves` (r:1 w:0)
/// Proof: `EthereumOutboundQueue::MessageLeaves` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn commit_single() -> Weight {
// Proof Size summary in bytes:
// Measured: `64`
// Estimated: `1549`
// Minimum execution time: 9_364_000 picoseconds.
Weight::from_parts(9_651_000, 0)
.saturating_add(Weight::from_parts(0, 1549))
.saturating_add(T::DbWeight::get().reads(1))
}
}
@@ -0,0 +1,161 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `snowbridge_pallet_system`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `814af52b0d43`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=snowbridge_pallet_system
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weight functions for `snowbridge_pallet_system`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> snowbridge_pallet_system::WeightInfo for WeightInfo<T> {
/// Storage: `EthereumSystem::Channels` (r:1 w:0)
/// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `EthereumSystem::PricingParameters` (r:1 w:0)
/// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105549), added: 108024, mode: `MaxEncodedLen`)
fn upgrade() -> Weight {
// Proof Size summary in bytes:
// Measured: `288`
// Estimated: `3601`
// Minimum execution time: 42_090_000 picoseconds.
Weight::from_parts(43_493_000, 0)
.saturating_add(Weight::from_parts(0, 3601))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `EthereumSystem::Channels` (r:1 w:0)
/// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `EthereumSystem::PricingParameters` (r:1 w:0)
/// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105549), added: 108024, mode: `MaxEncodedLen`)
fn set_operating_mode() -> Weight {
// Proof Size summary in bytes:
// Measured: `288`
// Estimated: `3601`
// Minimum execution time: 34_271_000 picoseconds.
Weight::from_parts(35_339_000, 0)
.saturating_add(Weight::from_parts(0, 3601))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `EthereumSystem::Channels` (r:1 w:0)
/// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105549), added: 108024, mode: `MaxEncodedLen`)
/// Storage: `EthereumSystem::PricingParameters` (r:0 w:1)
/// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`)
fn set_pricing_parameters() -> Weight {
// Proof Size summary in bytes:
// Measured: `288`
// Estimated: `3601`
// Minimum execution time: 38_328_000 picoseconds.
Weight::from_parts(39_529_000, 0)
.saturating_add(Weight::from_parts(0, 3601))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(4))
}
/// Storage: `EthereumSystem::Channels` (r:1 w:0)
/// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `EthereumSystem::PricingParameters` (r:1 w:0)
/// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105549), added: 108024, mode: `MaxEncodedLen`)
fn set_token_transfer_fees() -> Weight {
// Proof Size summary in bytes:
// Measured: `288`
// Estimated: `3601`
// Minimum execution time: 36_562_000 picoseconds.
Weight::from_parts(37_687_000, 0)
.saturating_add(Weight::from_parts(0, 3601))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(3))
}
/// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
/// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `EthereumSystem::ForeignToNativeId` (r:1 w:1)
/// Proof: `EthereumSystem::ForeignToNativeId` (`max_values`: None, `max_size`: Some(650), added: 3125, mode: `MaxEncodedLen`)
/// Storage: `EthereumSystem::Channels` (r:1 w:0)
/// Proof: `EthereumSystem::Channels` (`max_values`: None, `max_size`: Some(76), added: 2551, mode: `MaxEncodedLen`)
/// Storage: `EthereumSystem::PricingParameters` (r:1 w:0)
/// Proof: `EthereumSystem::PricingParameters` (`max_values`: Some(1), `max_size`: Some(112), added: 607, mode: `MaxEncodedLen`)
/// Storage: `EthereumOutboundQueue::OperatingMode` (r:1 w:0)
/// Proof: `EthereumOutboundQueue::OperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105549), added: 108024, mode: `MaxEncodedLen`)
/// Storage: `EthereumSystem::NativeToForeignId` (r:0 w:1)
/// Proof: `EthereumSystem::NativeToForeignId` (`max_values`: None, `max_size`: Some(650), added: 3125, mode: `MaxEncodedLen`)
fn register_token() -> Weight {
// Proof Size summary in bytes:
// Measured: `326`
// Estimated: `4115`
// Minimum execution time: 56_257_000 picoseconds.
Weight::from_parts(57_664_000, 0)
.saturating_add(Weight::from_parts(0, 4115))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(5))
}
}
@@ -0,0 +1,275 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
mod pezpallet_xcm_benchmarks_fungible;
mod pezpallet_xcm_benchmarks_generic;
use crate::{xcm_config::MaxAssetsIntoHolding, Runtime};
use alloc::vec::Vec;
use codec::Encode;
use pezframe_support::weights::Weight;
use pezpallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight;
use pezpallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric;
use pezsp_runtime::BoundedVec;
use xcm::{
latest::{prelude::*, AssetTransferFilter},
DoubleEncoded,
};
trait WeighAssets {
fn weigh_assets(&self, weight: Weight) -> Weight;
}
const MAX_ASSETS: u64 = 100;
impl WeighAssets for AssetFilter {
fn weigh_assets(&self, weight: Weight) -> Weight {
match self {
Self::Definite(assets) => weight.saturating_mul(assets.inner().iter().count() as u64),
Self::Wild(asset) => match asset {
All => weight.saturating_mul(MAX_ASSETS),
AllOf { fun, .. } => match fun {
WildFungibility::Fungible => weight,
// Magic number 2 has to do with the fact that we could have up to 2 times
// MaxAssetsIntoHolding in the worst-case scenario.
WildFungibility::NonFungible =>
weight.saturating_mul((MaxAssetsIntoHolding::get() * 2) as u64),
},
AllCounted(count) => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
AllOfCounted { count, .. } => weight.saturating_mul(MAX_ASSETS.min(*count as u64)),
},
}
}
}
impl WeighAssets for Assets {
fn weigh_assets(&self, weight: Weight) -> Weight {
weight.saturating_mul(self.inner().iter().count() as u64)
}
}
pub struct BridgeHubPezkuwichainXcmWeight<Call>(core::marker::PhantomData<Call>);
impl<Call> XcmWeightInfo<Call> for BridgeHubPezkuwichainXcmWeight<Call> {
fn withdraw_asset(assets: &Assets) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::withdraw_asset())
}
fn reserve_asset_deposited(assets: &Assets) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::reserve_asset_deposited())
}
fn receive_teleported_asset(assets: &Assets) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::receive_teleported_asset())
}
fn query_response(
_query_id: &u64,
_response: &Response,
_max_weight: &Weight,
_querier: &Option<Location>,
) -> Weight {
XcmGeneric::<Runtime>::query_response()
}
fn transfer_asset(assets: &Assets, _dest: &Location) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::transfer_asset())
}
fn transfer_reserve_asset(assets: &Assets, _dest: &Location, _xcm: &Xcm<()>) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::transfer_reserve_asset())
}
fn transact(
_origin_type: &OriginKind,
_fallback_max_weight: &Option<Weight>,
_call: &DoubleEncoded<Call>,
) -> Weight {
XcmGeneric::<Runtime>::transact()
}
fn hrmp_new_channel_open_request(
_sender: &u32,
_max_message_size: &u32,
_max_capacity: &u32,
) -> Weight {
// XCM Executor does not currently support HRMP channel operations
Weight::MAX
}
fn hrmp_channel_accepted(_recipient: &u32) -> Weight {
// XCM Executor does not currently support HRMP channel operations
Weight::MAX
}
fn hrmp_channel_closing(_initiator: &u32, _sender: &u32, _recipient: &u32) -> Weight {
// XCM Executor does not currently support HRMP channel operations
Weight::MAX
}
fn clear_origin() -> Weight {
XcmGeneric::<Runtime>::clear_origin()
}
fn descend_origin(_who: &InteriorLocation) -> Weight {
XcmGeneric::<Runtime>::descend_origin()
}
fn report_error(_query_response_info: &QueryResponseInfo) -> Weight {
XcmGeneric::<Runtime>::report_error()
}
fn deposit_asset(assets: &AssetFilter, _dest: &Location) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::deposit_asset())
}
fn deposit_reserve_asset(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::deposit_reserve_asset())
}
fn exchange_asset(_give: &AssetFilter, _receive: &Assets, _maximal: &bool) -> Weight {
Weight::MAX
}
fn initiate_reserve_withdraw(
assets: &AssetFilter,
_reserve: &Location,
_xcm: &Xcm<()>,
) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::initiate_reserve_withdraw())
}
fn initiate_teleport(assets: &AssetFilter, _dest: &Location, _xcm: &Xcm<()>) -> Weight {
assets.weigh_assets(XcmFungibleWeight::<Runtime>::initiate_teleport())
}
fn initiate_transfer(
_dest: &Location,
remote_fees: &Option<AssetTransferFilter>,
_preserve_origin: &bool,
assets: &BoundedVec<AssetTransferFilter, MaxAssetTransferFilters>,
_xcm: &Xcm<()>,
) -> Weight {
let mut weight = if let Some(remote_fees) = remote_fees {
let fees = remote_fees.inner();
fees.weigh_assets(XcmFungibleWeight::<Runtime>::initiate_transfer())
} else {
Weight::zero()
};
for asset_filter in assets {
let assets = asset_filter.inner();
let extra = assets.weigh_assets(XcmFungibleWeight::<Runtime>::initiate_transfer());
weight = weight.saturating_add(extra);
}
weight
}
fn report_holding(_response_info: &QueryResponseInfo, _assets: &AssetFilter) -> Weight {
XcmGeneric::<Runtime>::report_holding()
}
fn buy_execution(_fees: &Asset, _weight_limit: &WeightLimit) -> Weight {
XcmGeneric::<Runtime>::buy_execution()
}
fn pay_fees(_asset: &Asset) -> Weight {
XcmGeneric::<Runtime>::pay_fees()
}
fn refund_surplus() -> Weight {
XcmGeneric::<Runtime>::refund_surplus()
}
fn set_error_handler(_xcm: &Xcm<Call>) -> Weight {
XcmGeneric::<Runtime>::set_error_handler()
}
fn set_appendix(_xcm: &Xcm<Call>) -> Weight {
XcmGeneric::<Runtime>::set_appendix()
}
fn clear_error() -> Weight {
XcmGeneric::<Runtime>::clear_error()
}
fn claim_asset(_assets: &Assets, _ticket: &Location) -> Weight {
XcmGeneric::<Runtime>::claim_asset()
}
fn trap(_code: &u64) -> Weight {
XcmGeneric::<Runtime>::trap()
}
fn subscribe_version(_query_id: &QueryId, _max_response_weight: &Weight) -> Weight {
XcmGeneric::<Runtime>::subscribe_version()
}
fn unsubscribe_version() -> Weight {
XcmGeneric::<Runtime>::unsubscribe_version()
}
fn burn_asset(assets: &Assets) -> Weight {
assets.weigh_assets(XcmGeneric::<Runtime>::burn_asset())
}
fn expect_asset(assets: &Assets) -> Weight {
assets.weigh_assets(XcmGeneric::<Runtime>::expect_asset())
}
fn expect_origin(_origin: &Option<Location>) -> Weight {
XcmGeneric::<Runtime>::expect_origin()
}
fn expect_error(_error: &Option<(u32, XcmError)>) -> Weight {
XcmGeneric::<Runtime>::expect_error()
}
fn expect_transact_status(_transact_status: &MaybeErrorCode) -> Weight {
XcmGeneric::<Runtime>::expect_transact_status()
}
fn query_pallet(_module_name: &Vec<u8>, _response_info: &QueryResponseInfo) -> Weight {
XcmGeneric::<Runtime>::query_pallet()
}
fn expect_pallet(
_index: &u32,
_name: &Vec<u8>,
_module_name: &Vec<u8>,
_crate_major: &u32,
_min_crate_minor: &u32,
) -> Weight {
XcmGeneric::<Runtime>::expect_pallet()
}
fn report_transact_status(_response_info: &QueryResponseInfo) -> Weight {
XcmGeneric::<Runtime>::report_transact_status()
}
fn clear_transact_status() -> Weight {
XcmGeneric::<Runtime>::clear_transact_status()
}
fn universal_origin(_: &Junction) -> Weight {
Weight::MAX
}
fn export_message(_: &NetworkId, _: &Junctions, inner: &Xcm<()>) -> Weight {
let inner_encoded_len = inner.encode().len() as u32;
XcmGeneric::<Runtime>::export_message(inner_encoded_len)
}
fn lock_asset(_: &Asset, _: &Location) -> Weight {
Weight::MAX
}
fn unlock_asset(_: &Asset, _: &Location) -> Weight {
Weight::MAX
}
fn note_unlockable(_: &Asset, _: &Location) -> Weight {
Weight::MAX
}
fn request_unlock(_: &Asset, _: &Location) -> Weight {
Weight::MAX
}
fn set_fees_mode(_: &bool) -> Weight {
XcmGeneric::<Runtime>::set_fees_mode()
}
fn set_topic(_topic: &[u8; 32]) -> Weight {
XcmGeneric::<Runtime>::set_topic()
}
fn clear_topic() -> Weight {
XcmGeneric::<Runtime>::clear_topic()
}
fn alias_origin(_: &Location) -> Weight {
// XCM Executor does not currently support alias origin operations
Weight::MAX
}
fn unpaid_execution(_: &WeightLimit, _: &Option<Location>) -> Weight {
XcmGeneric::<Runtime>::unpaid_execution()
}
fn set_hints(hints: &BoundedVec<Hint, HintNumVariants>) -> Weight {
let mut weight = Weight::zero();
for hint in hints {
match hint {
AssetClaimer { .. } => {
weight = weight.saturating_add(XcmGeneric::<Runtime>::asset_claimer());
},
}
}
weight
}
fn execute_with_origin(_: &Option<InteriorLocation>, _: &Xcm<Call>) -> Weight {
XcmGeneric::<Runtime>::execute_with_origin()
}
}
@@ -0,0 +1,215 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_xcm_benchmarks::fungible`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-07-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `a49f76527979`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=pezpallet_xcm_benchmarks::fungible
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights/xcm
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --template=pezcumulus/templates/xcm-bench-template.hbs
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weights for `pezpallet_xcm_benchmarks::fungible`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> WeightInfo<T> {
// Storage: `System::Account` (r:1 w:1)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
pub fn withdraw_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `101`
// Estimated: `3593`
// Minimum execution time: 31_195_000 picoseconds.
Weight::from_parts(31_942_000, 3593)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: `System::Account` (r:2 w:2)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
pub fn transfer_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `101`
// Estimated: `6196`
// Minimum execution time: 42_862_000 picoseconds.
Weight::from_parts(43_901_000, 6196)
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: `System::Account` (r:3 w:3)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
// Proof: `TeyrchainInfo::TeyrchainId` (`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`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::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`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn transfer_reserve_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `236`
// Estimated: `8799`
// Minimum execution time: 116_922_000 picoseconds.
Weight::from_parts(120_287_000, 8799)
.saturating_add(T::DbWeight::get().reads(8))
.saturating_add(T::DbWeight::get().writes(5))
}
// Storage: `Benchmark::Override` (r:0 w:0)
// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
pub fn reserve_asset_deposited() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
}
// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
// Proof: `TeyrchainInfo::TeyrchainId` (`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`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `System::Account` (r:2 w:2)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::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`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn initiate_reserve_withdraw() -> Weight {
// Proof Size summary in bytes:
// Measured: `236`
// Estimated: `6196`
// Minimum execution time: 84_299_000 picoseconds.
Weight::from_parts(87_257_000, 6196)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
}
pub fn receive_teleported_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_187_000 picoseconds.
Weight::from_parts(3_391_000, 0)
}
// Storage: `System::Account` (r:1 w:1)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
pub fn deposit_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 24_827_000 picoseconds.
Weight::from_parts(25_400_000, 3593)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
// Proof: `TeyrchainInfo::TeyrchainId` (`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`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `System::Account` (r:1 w:1)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::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`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn deposit_reserve_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `135`
// Estimated: `3600`
// Minimum execution time: 68_295_000 picoseconds.
Weight::from_parts(71_778_000, 3600)
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
// Proof: `TeyrchainInfo::TeyrchainId` (`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`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::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`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn initiate_teleport() -> Weight {
// Proof Size summary in bytes:
// Measured: `135`
// Estimated: `3600`
// Minimum execution time: 46_618_000 picoseconds.
Weight::from_parts(48_602_000, 3600)
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: `System::Account` (r:2 w:2)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
// Proof: `TeyrchainInfo::TeyrchainId` (`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`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::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`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn initiate_transfer() -> Weight {
// Proof Size summary in bytes:
// Measured: `135`
// Estimated: `6196`
// Minimum execution time: 96_639_000 picoseconds.
Weight::from_parts(99_446_000, 6196)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
}
}
@@ -0,0 +1,392 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Autogenerated weights for `pezpallet_xcm_benchmarks::generic`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-07-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `a49f76527979`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/bridge-hub-pezkuwichain-runtime/bridge_hub_pezkuwichain_runtime.wasm
// --pallet=pezpallet_xcm_benchmarks::generic
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights/xcm
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --template=pezcumulus/templates/xcm-bench-template.hbs
// --no-storage-info
// --no-min-squares
// --no-median-slopes
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
use pezframe_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;
/// Weights for `pezpallet_xcm_benchmarks::generic`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: pezframe_system::Config> WeightInfo<T> {
// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
// Proof: `TeyrchainInfo::TeyrchainId` (`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`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `System::Account` (r:2 w:2)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::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`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn report_holding() -> Weight {
// Proof Size summary in bytes:
// Measured: `236`
// Estimated: `6196`
// Minimum execution time: 82_427_000 picoseconds.
Weight::from_parts(84_639_000, 6196)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
}
// Storage: `System::Account` (r:1 w:1)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
pub fn buy_execution() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 4_303_000 picoseconds.
Weight::from_parts(4_578_000, 3593)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: `System::Account` (r:1 w:1)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
pub fn pay_fees() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 4_246_000 picoseconds.
Weight::from_parts(4_542_000, 3593)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
pub fn asset_claimer() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_164_000 picoseconds.
Weight::from_parts(1_228_000, 0)
}
// Storage: `PezkuwiXcm::Queries` (r:1 w:0)
// Proof: `PezkuwiXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`)
pub fn query_response() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3465`
// Minimum execution time: 6_126_000 picoseconds.
Weight::from_parts(6_517_000, 3465)
.saturating_add(T::DbWeight::get().reads(1))
}
pub fn transact() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 8_277_000 picoseconds.
Weight::from_parts(8_732_000, 0)
}
pub fn refund_surplus() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_597_000 picoseconds.
Weight::from_parts(1_711_000, 0)
}
pub fn set_error_handler() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_176_000 picoseconds.
Weight::from_parts(1_214_000, 0)
}
pub fn set_appendix() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_116_000 picoseconds.
Weight::from_parts(1_223_000, 0)
}
pub fn clear_error() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_086_000 picoseconds.
Weight::from_parts(1_165_000, 0)
}
pub fn descend_origin() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_173_000 picoseconds.
Weight::from_parts(1_194_000, 0)
}
// Storage: `Benchmark::Override` (r:0 w:0)
// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
pub fn execute_with_origin() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
}
pub fn clear_origin() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_113_000 picoseconds.
Weight::from_parts(1_163_000, 0)
}
// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
// Proof: `TeyrchainInfo::TeyrchainId` (`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`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `System::Account` (r:2 w:2)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::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`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn report_error() -> Weight {
// Proof Size summary in bytes:
// Measured: `236`
// Estimated: `6196`
// Minimum execution time: 78_312_000 picoseconds.
Weight::from_parts(80_573_000, 6196)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
}
// Storage: `PezkuwiXcm::AssetTraps` (r:1 w:1)
// Proof: `PezkuwiXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`)
pub fn claim_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `24`
// Estimated: `3489`
// Minimum execution time: 9_836_000 picoseconds.
Weight::from_parts(10_243_000, 3489)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
pub fn trap() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_944_000 picoseconds.
Weight::from_parts(4_138_000, 0)
}
// Storage: `PezkuwiXcm::VersionNotifyTargets` (r:1 w:1)
// Proof: `PezkuwiXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0)
// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::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`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn subscribe_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `3568`
// Minimum execution time: 31_602_000 picoseconds.
Weight::from_parts(32_924_000, 3568)
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(3))
}
// Storage: `PezkuwiXcm::VersionNotifyTargets` (r:0 w:1)
// Proof: `PezkuwiXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`)
pub fn unsubscribe_version() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_631_000 picoseconds.
Weight::from_parts(3_856_000, 0)
.saturating_add(T::DbWeight::get().writes(1))
}
pub fn burn_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_572_000 picoseconds.
Weight::from_parts(1_670_000, 0)
}
pub fn expect_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_245_000 picoseconds.
Weight::from_parts(1_312_000, 0)
}
pub fn expect_origin() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_995_000 picoseconds.
Weight::from_parts(4_092_000, 0)
}
pub fn expect_error() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_774_000 picoseconds.
Weight::from_parts(4_149_000, 0)
}
pub fn expect_transact_status() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_283_000 picoseconds.
Weight::from_parts(1_344_000, 0)
}
// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
// Proof: `TeyrchainInfo::TeyrchainId` (`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`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `System::Account` (r:2 w:2)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::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`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn query_pallet() -> Weight {
// Proof Size summary in bytes:
// Measured: `236`
// Estimated: `6196`
// Minimum execution time: 83_156_000 picoseconds.
Weight::from_parts(85_475_000, 6196)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
}
pub fn expect_pallet() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_215_000 picoseconds.
Weight::from_parts(5_435_000, 0)
}
// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
// Proof: `TeyrchainInfo::TeyrchainId` (`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`: Some(28), added: 2503, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:1 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `System::Account` (r:2 w:2)
// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
// Storage: `TeyrchainSystem::RelevantMessagingState` (r:1 w:0)
// Proof: `TeyrchainSystem::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`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1)
// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`)
pub fn report_transact_status() -> Weight {
// Proof Size summary in bytes:
// Measured: `236`
// Estimated: `6196`
// Minimum execution time: 79_039_000 picoseconds.
Weight::from_parts(82_087_000, 6196)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
}
pub fn clear_transact_status() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_164_000 picoseconds.
Weight::from_parts(1_207_000, 0)
}
pub fn set_topic() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_112_000 picoseconds.
Weight::from_parts(1_185_000, 0)
}
pub fn clear_topic() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_133_000 picoseconds.
Weight::from_parts(1_181_000, 0)
}
// Storage: `TeyrchainInfo::TeyrchainId` (r:1 w:0)
// Proof: `TeyrchainInfo::TeyrchainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
// Storage: `XcmOverBridgeHubZagros::Bridges` (r:1 w:0)
// Proof: `XcmOverBridgeHubZagros::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
// Storage: `PezkuwiXcm::SupportedVersion` (r:2 w:0)
// Proof: `PezkuwiXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
// Storage: `BridgeZagrosMessages::PalletOperatingMode` (r:1 w:0)
// Proof: `BridgeZagrosMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
// Storage: `BridgeZagrosMessages::OutboundLanes` (r:1 w:1)
// Proof: `BridgeZagrosMessages::OutboundLanes` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
// Storage: `BridgeZagrosMessages::OutboundMessages` (r:0 w:1)
// Proof: `BridgeZagrosMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(65568), added: 68043, mode: `MaxEncodedLen`)
/// The range of component `x` is `[1, 1000]`.
pub fn export_message(x: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `583`
// Estimated: `6523`
// Minimum execution time: 64_105_000 picoseconds.
Weight::from_parts(66_162_307, 6523)
// Standard Error: 344
.saturating_add(Weight::from_parts(76_211, 0).saturating_mul(x.into()))
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(2))
}
pub fn set_fees_mode() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_118_000 picoseconds.
Weight::from_parts(1_181_000, 0)
}
pub fn unpaid_execution() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_134_000 picoseconds.
Weight::from_parts(1_205_000, 0)
}
}
@@ -0,0 +1,330 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Pezcumulus.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use super::{
AccountId, AllPalletsWithSystem, Balance, Balances, BaseDeliveryFee, FeeAssetId, PezkuwiXcm,
Runtime, RuntimeCall, RuntimeEvent, RuntimeHoldReason, RuntimeOrigin, TeyrchainInfo,
TeyrchainSystem, TransactionByteFee, WeightToFee, XcmOverBridgeHubZagros,
XcmOverPezkuwichainBulletin, XcmpQueue,
};
use core::marker::PhantomData;
use pezframe_support::{
parameter_types,
traits::{
fungible::HoldConsideration, tokens::imbalance::ResolveTo, ConstU32, Contains, Equals,
Everything, LinearStoragePrice, Nothing,
},
};
use pezframe_system::EnsureRoot;
use pezpallet_collator_selection::StakingPotAccountId;
use pezpallet_xcm::{AuthorizedAliasers, XcmPassthrough};
use pezkuwi_runtime_common::xcm_sender::ExponentialPrice;
use pezkuwi_teyrchain_primitives::primitives::Sibling;
use pezsp_runtime::traits::AccountIdConversion;
use testnet_teyrchains_constants::pezkuwichain::snowbridge::EthereumNetwork;
use teyrchains_common::{
xcm_config::{
AllSiblingSystemTeyrchains, ConcreteAssetFromSystem, ParentRelayOrSiblingTeyrchains,
RelayOrOtherSystemTeyrchains,
},
TREASURY_PALLET_ID,
};
use xcm::latest::{prelude::*, PEZKUWICHAIN_GENESIS_HASH};
use xcm_builder::{
AccountId32Aliases, AliasChildLocation, AllowExplicitUnpaidExecutionFrom,
AllowHrmpNotificationsFromRelayChain, AllowKnownQueryResponses, AllowSubscriptionsFrom,
AllowTopLevelPaidExecutionFrom, DenyRecursively, DenyReserveTransferToRelayChain, DenyThenTry,
DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, ExternalConsensusLocationsConverterFor,
FrameTransactionalProcessor, FungibleAdapter, HandleFee, HashedDescription, IsConcrete,
ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SendXcmFeeToAccount,
SiblingTeyrchainAsNative, SiblingTeyrchainConvertsVia, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
XcmFeeManagerFromComponents,
};
use xcm_executor::{
traits::{FeeManager, FeeReason, FeeReason::Export},
XcmExecutor,
};
parameter_types! {
pub const RootLocation: Location = Location::here();
pub const TokenLocation: Location = Location::parent();
pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
pub RelayNetwork: NetworkId = NetworkId::ByGenesis(PEZKUWICHAIN_GENESIS_HASH);
pub UniversalLocation: InteriorLocation =
[GlobalConsensus(RelayNetwork::get()), Teyrchain(TeyrchainInfo::teyrchain_id().into())].into();
pub const MaxInstructions: u32 = 100;
pub const MaxAssetsIntoHolding: u32 = 64;
pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating();
pub RelayTreasuryLocation: Location = (Parent, PalletInstance(pezkuwichain_runtime_constants::TREASURY_PALLET_ID)).into();
pub SiblingPeople: Location = (Parent, Teyrchain(pezkuwichain_runtime_constants::system_teyrchain::PEOPLE_ID)).into();
pub AssetHubPezkuwichainLocation: Location = Location::new(1, [Teyrchain(bp_asset_hub_pezkuwichain::ASSET_HUB_PEZKUWICHAIN_TEYRCHAIN_ID)]);
}
/// Type for specifying how a `Location` can be converted into an `AccountId`. This is used
/// when determining ownership of accounts for asset transacting and when attempting to use XCM
/// `Transact` in order to determine the dispatch Origin.
pub type LocationToAccountId = (
// The parent (Relay-chain) origin converts to the parent `AccountId`.
ParentIsPreset<AccountId>,
// Sibling teyrchain origins convert to AccountId via the `ParaId::into`.
SiblingTeyrchainConvertsVia<Sibling, AccountId>,
// Straight up local `AccountId32` origins just alias directly to `AccountId`.
AccountId32Aliases<RelayNetwork, AccountId>,
// Foreign locations alias into accounts according to a hash of their standard description.
HashedDescription<AccountId, DescribeFamily<DescribeAllTerminal>>,
// Different global consensus locations sovereign accounts.
ExternalConsensusLocationsConverterFor<UniversalLocation, AccountId>,
);
/// Means for transacting the native currency on this chain.
pub type FungibleTransactor = FungibleAdapter<
// Use this currency:
Balances,
// Use this currency when it is a fungible asset matching the given location or name:
IsConcrete<TokenLocation>,
// Do a simple punn to convert an AccountId32 Location into a native chain account ID:
LocationToAccountId,
// Our chain's account ID type (we can't get away without mentioning it explicitly):
AccountId,
// We don't track any teleports of `Balances`.
(),
>;
/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance,
/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can
/// biases the kind of local `Origin` it will become.
pub type XcmOriginToTransactDispatchOrigin = (
// Sovereign account converter; this attempts to derive an `AccountId` from the origin location
// using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for
// foreign chains who want to have a local sovereign account on this chain which they control.
SovereignSignedViaLocation<LocationToAccountId, RuntimeOrigin>,
// Native converter for Relay-chain (Parent) location; will convert to a `Relay` origin when
// recognized.
RelayChainAsNative<RelayChainOrigin, RuntimeOrigin>,
// Native converter for sibling Teyrchains; will convert to a `SiblingPara` origin when
// recognized.
SiblingTeyrchainAsNative<cumulus_pallet_xcm::Origin, RuntimeOrigin>,
// Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a
// transaction from the Root origin.
ParentAsSuperuser<RuntimeOrigin>,
// Native signed account converter; this just converts an `AccountId32` origin into a normal
// `RuntimeOrigin::Signed` origin of the same 32-byte value.
SignedAccountId32AsNative<RelayNetwork, RuntimeOrigin>,
// Xcm origins can be represented natively under the Xcm pallet's Xcm origin.
XcmPassthrough<RuntimeOrigin>,
);
pub struct ParentOrParentsPlurality;
impl Contains<Location> for ParentOrParentsPlurality {
fn contains(location: &Location) -> bool {
matches!(location.unpack(), (1, []) | (1, [Plurality { .. }]))
}
}
pub type Barrier = TrailingSetTopicAsId<
DenyThenTry<
DenyRecursively<DenyReserveTransferToRelayChain>,
(
// Allow local users to buy weight credit.
TakeWeightCredit,
// Expected responses are OK.
AllowKnownQueryResponses<PezkuwiXcm>,
WithComputedOrigin<
(
// If the message is one that immediately attempts to pay for execution, then
// allow it.
AllowTopLevelPaidExecutionFrom<Everything>,
// Parent, its pluralities (i.e. governance bodies), relay treasury pallet
// and sibling People get free execution.
AllowExplicitUnpaidExecutionFrom<(
ParentOrParentsPlurality,
Equals<RelayTreasuryLocation>,
Equals<SiblingPeople>,
Equals<AssetHubPezkuwichainLocation>,
)>,
// Subscriptions for version tracking are OK.
AllowSubscriptionsFrom<ParentRelayOrSiblingTeyrchains>,
// HRMP notifications from the relay chain are OK.
AllowHrmpNotificationsFromRelayChain,
),
UniversalLocation,
ConstU32<8>,
>,
),
>,
>;
/// Locations that will not be charged fees in the executor,
/// either execution or delivery.
/// We only waive fees for system functions, which these locations represent.
pub type WaivedLocations = (
Equals<RootLocation>,
RelayOrOtherSystemTeyrchains<AllSiblingSystemTeyrchains, Runtime>,
Equals<RelayTreasuryLocation>,
);
/// Cases where a remote origin is accepted as trusted Teleporter for a given asset:
/// - NativeToken with the parent Relay Chain and sibling teyrchains.
pub type TrustedTeleporters = ConcreteAssetFromSystem<TokenLocation>;
/// Defines origin aliasing rules for this chain.
///
/// - Allow any origin to alias into a child sub-location (equivalent to DescendOrigin),
/// - Allow origins explicitly authorized by the alias target location.
pub type TrustedAliasers = (AliasChildLocation, AuthorizedAliasers<Runtime>);
pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
type RuntimeCall = RuntimeCall;
type XcmSender = XcmRouter;
type XcmEventEmitter = PezkuwiXcm;
type AssetTransactor = FungibleTransactor;
type OriginConverter = XcmOriginToTransactDispatchOrigin;
// BridgeHub does not recognize a reserve location for any asset. Users must teleport Native
// token where allowed (e.g. with the Relay Chain).
type IsReserve = ();
type IsTeleporter = TrustedTeleporters;
type UniversalLocation = UniversalLocation;
type Barrier = Barrier;
type Weigher = WeightInfoBounds<
crate::weights::xcm::BridgeHubPezkuwichainXcmWeight<RuntimeCall>,
RuntimeCall,
MaxInstructions,
>;
type Trader = UsingComponents<
WeightToFee,
TokenLocation,
AccountId,
Balances,
ResolveTo<StakingPotAccountId<Runtime>, Balances>,
>;
type ResponseHandler = PezkuwiXcm;
type AssetTrap = PezkuwiXcm;
type AssetLocker = ();
type AssetExchanger = ();
type AssetClaims = PezkuwiXcm;
type SubscriptionService = PezkuwiXcm;
type PalletInstancesInfo = AllPalletsWithSystem;
type MaxAssetsIntoHolding = MaxAssetsIntoHolding;
type FeeManager = XcmFeeManagerFromComponents<
WaivedLocations,
SendXcmFeeToAccount<Self::AssetTransactor, TreasuryAccount>,
>;
type MessageExporter = (
XcmOverBridgeHubZagros,
XcmOverPezkuwichainBulletin,
crate::bridge_to_ethereum_config::SnowbridgeExporter,
);
type UniversalAliases = Nothing;
type CallDispatcher = RuntimeCall;
type SafeCallFilter = Everything;
type Aliasers = TrustedAliasers;
type TransactionalProcessor = FrameTransactionalProcessor;
type HrmpNewChannelOpenRequestHandler = ();
type HrmpChannelAcceptedHandler = ();
type HrmpChannelClosingHandler = ();
type XcmRecorder = PezkuwiXcm;
}
pub type PriceForParentDelivery =
ExponentialPrice<FeeAssetId, BaseDeliveryFee, TransactionByteFee, TeyrchainSystem>;
/// Converts a local signed origin into an XCM location. Forms the basis for local origins
/// sending/executing XCMs.
pub type LocalOriginToLocation = SignedToAccountId32<RuntimeOrigin, AccountId, RelayNetwork>;
/// The means for routing XCM messages which are not for local execution into the right message
/// queues.
pub type XcmRouter = WithUniqueTopic<(
// Two routers - use UMP to communicate with the relay chain:
cumulus_primitives_utility::ParentAsUmp<TeyrchainSystem, PezkuwiXcm, PriceForParentDelivery>,
// ..and XCMP to communicate with the sibling chains.
XcmpQueue,
)>;
parameter_types! {
pub const DepositPerItem: Balance = crate::deposit(1, 0);
pub const DepositPerByte: Balance = crate::deposit(0, 1);
pub const AuthorizeAliasHoldReason: RuntimeHoldReason = RuntimeHoldReason::PezkuwiXcm(pezpallet_xcm::HoldReason::AuthorizeAlias);
}
impl pezpallet_xcm::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type XcmRouter = XcmRouter;
// We want to disallow users sending (arbitrary) XCMs from this chain.
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, ()>;
// We support local origins dispatching XCM executions.
type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
type XcmExecuteFilter = Everything;
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Nothing; // This teyrchain is not meant as a reserve location.
type Weigher = WeightInfoBounds<
crate::weights::xcm::BridgeHubPezkuwichainXcmWeight<RuntimeCall>,
RuntimeCall,
MaxInstructions,
>;
type UniversalLocation = UniversalLocation;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
type AdvertisedXcmVersion = pezpallet_xcm::CurrentXcmVersion;
type Currency = Balances;
type CurrencyMatcher = ();
type TrustedLockers = ();
type SovereignAccountOf = LocationToAccountId;
type MaxLockers = ConstU32<8>;
type WeightInfo = crate::weights::pezpallet_xcm::WeightInfo<Runtime>;
type AdminOrigin = EnsureRoot<AccountId>;
type MaxRemoteLockConsumers = ConstU32<0>;
type RemoteLockConsumerIdentifier = ();
// xcm_executor::Config::Aliasers also uses pezpallet_xcm::AuthorizedAliasers.
type AuthorizedAliasConsideration = HoldConsideration<
AccountId,
Balances,
AuthorizeAliasHoldReason,
LinearStoragePrice<DepositPerItem, DepositPerByte, Balance>,
>;
}
impl cumulus_pallet_xcm::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type XcmExecutor = XcmExecutor<XcmConfig>;
}
pub struct XcmFeeManagerFromComponentsBridgeHub<WaivedLocations, HandleFee>(
PhantomData<(WaivedLocations, HandleFee)>,
);
impl<WaivedLocations: Contains<Location>, FeeHandler: HandleFee> FeeManager
for XcmFeeManagerFromComponentsBridgeHub<WaivedLocations, FeeHandler>
{
fn is_waived(origin: Option<&Location>, fee_reason: FeeReason) -> bool {
let Some(loc) = origin else { return false };
if let Export { network, destination: Here } = fee_reason {
if network == EthereumNetwork::get().into() {
return false;
}
}
WaivedLocations::contains(loc)
}
fn handle_fee(fee: Assets, context: Option<&XcmContext>, reason: FeeReason) {
FeeHandler::handle_fee(fee, context, reason);
}
}
@@ -0,0 +1,188 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Pezcumulus.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#![cfg(test)]
use bp_pezkuwi_core::Signature;
use bridge_hub_pezkuwichain_runtime::{
bridge_to_zagros_config::OnBridgeHubPezkuwichainRefundBridgeHubZagrosMessages,
xcm_config::XcmConfig, AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages,
Executive, MessageQueueServiceWeight, Runtime, RuntimeCall, RuntimeEvent, SessionKeys,
TxExtension, UncheckedExtrinsic,
};
use codec::{Decode, Encode};
use cumulus_primitives_core::XcmError::FailedToTransactAsset;
use pezframe_support::parameter_types;
use snowbridge_pallet_ethereum_client::WeightInfo;
use pezsp_core::H160;
use pezsp_keyring::Sr25519Keyring::Alice;
use pezsp_runtime::{
generic::{Era, SignedPayload},
AccountId32,
};
use teyrchains_common::{AccountId, AuraId, Balance};
parameter_types! {
pub const DefaultBridgeHubEthereumBaseFee: Balance = 3_833_568_200_000;
}
fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys<Runtime> {
bridge_hub_test_utils::CollatorSessionKeys::new(
AccountId::from(Alice),
AccountId::from(Alice),
SessionKeys { aura: AuraId::from(Alice.public()) },
)
}
#[test]
pub fn transfer_token_to_ethereum_works() {
snowbridge_runtime_test_common::send_transfer_token_message_success::<Runtime, XcmConfig>(
11155111,
collator_session_keys(),
1002,
1000,
H160::random(),
H160::random(),
DefaultBridgeHubEthereumBaseFee::get(),
Box::new(|runtime_event_encoded: Vec<u8>| {
match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) {
Ok(RuntimeEvent::EthereumOutboundQueue(event)) => Some(event),
_ => None,
}
}),
)
}
#[test]
pub fn unpaid_transfer_token_to_ethereum_should_work() {
snowbridge_runtime_test_common::send_unpaid_transfer_token_message::<Runtime, XcmConfig>(
11155111,
collator_session_keys(),
1002,
1000,
H160::random(),
H160::random(),
)
}
#[test]
pub fn transfer_token_to_ethereum_insufficient_fund() {
snowbridge_runtime_test_common::send_transfer_token_message_failure::<Runtime, XcmConfig>(
11155111,
collator_session_keys(),
1002,
1000,
1_000_000_000,
H160::random(),
H160::random(),
DefaultBridgeHubEthereumBaseFee::get(),
FailedToTransactAsset("Funds are unavailable"),
)
}
#[test]
fn max_message_queue_service_weight_is_more_than_beacon_extrinsic_weights() {
let max_message_queue_weight = MessageQueueServiceWeight::get();
let force_checkpoint =
<Runtime as snowbridge_pallet_ethereum_client::Config>::WeightInfo::force_checkpoint();
let submit_checkpoint =
<Runtime as snowbridge_pallet_ethereum_client::Config>::WeightInfo::submit();
max_message_queue_weight.all_gt(force_checkpoint);
max_message_queue_weight.all_gt(submit_checkpoint);
}
#[test]
fn ethereum_client_consensus_extrinsics_work() {
snowbridge_runtime_test_common::ethereum_extrinsic(
collator_session_keys(),
1002,
construct_and_apply_extrinsic,
);
}
#[test]
fn ethereum_to_pezkuwi_message_extrinsics_work() {
snowbridge_runtime_test_common::ethereum_to_pezkuwi_message_extrinsics_work(
collator_session_keys(),
1002,
construct_and_apply_extrinsic,
);
}
/// Tests that the digest items are as expected when a Ethereum Outbound message is received.
/// If the MessageQueue pallet is configured before (i.e. the MessageQueue pallet is listed before
/// the EthereumOutboundQueue in the construct_runtime macro) the EthereumOutboundQueue, this test
/// will fail.
#[test]
pub fn ethereum_outbound_queue_processes_messages_before_message_queue_works() {
snowbridge_runtime_test_common::ethereum_outbound_queue_processes_messages_before_message_queue_works::<
Runtime,
XcmConfig,
AllPalletsWithoutSystem,
>(
11155111,
collator_session_keys(),
1002,
1000,
H160::random(),
H160::random(),
DefaultBridgeHubEthereumBaseFee::get(),
Box::new(|runtime_event_encoded: Vec<u8>| {
match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) {
Ok(RuntimeEvent::EthereumOutboundQueue(event)) => Some(event),
_ => None,
}
}),
)
}
fn construct_extrinsic(
sender: pezsp_keyring::Sr25519Keyring,
call: RuntimeCall,
) -> UncheckedExtrinsic {
let account_id = AccountId32::from(sender.public());
let tx_ext: TxExtension = (
(
pezframe_system::AuthorizeCall::<Runtime>::new(),
pezframe_system::CheckNonZeroSender::<Runtime>::new(),
pezframe_system::CheckSpecVersion::<Runtime>::new(),
pezframe_system::CheckTxVersion::<Runtime>::new(),
pezframe_system::CheckGenesis::<Runtime>::new(),
pezframe_system::CheckEra::<Runtime>::from(Era::immortal()),
pezframe_system::CheckNonce::<Runtime>::from(
pezframe_system::Pallet::<Runtime>::account(&account_id).nonce,
),
pezframe_system::CheckWeight::<Runtime>::new(),
),
pezpallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(0),
BridgeRejectObsoleteHeadersAndMessages::default(),
(OnBridgeHubPezkuwichainRefundBridgeHubZagrosMessages::default(),),
pezframe_metadata_hash_extension::CheckMetadataHash::<Runtime>::new(false),
)
.into();
let payload = SignedPayload::new(call.clone(), tx_ext.clone()).unwrap();
let signature = payload.using_encoded(|e| sender.sign(e));
UncheckedExtrinsic::new_signed(call, account_id.into(), Signature::Sr25519(signature), tx_ext)
}
fn construct_and_apply_extrinsic(
origin: pezsp_keyring::Sr25519Keyring,
call: RuntimeCall,
) -> pezsp_runtime::DispatchOutcome {
let xt = construct_extrinsic(origin, call);
let r = Executive::apply_extrinsic(xt);
r.unwrap()
}