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:
@@ -0,0 +1,203 @@
|
||||
- [Bridge-hub Teyrchains](#bridge-hub-teyrchains)
|
||||
- [Requirements for local run/testing](#requirements-for-local-runtesting)
|
||||
- [How to test local pezkuwichain <-> zagros bridge](#how-to-test-local-pezkuwichain---zagros-bridge)
|
||||
- [Run pezkuwichain/zagros chains with zombienet](#run-pezkuwichainzagros-chains-with-zombienet)
|
||||
- [Init bridge and run relayer between BridgeHubpezkuwichain and
|
||||
BridgeHubzagros](#init-bridge-and-run-relayer-between-bridgehubpezkuwichain-and-bridgehubzagros)
|
||||
- [Initialize configuration for transfer asset over bridge
|
||||
(TYRs/WNDs)](#initialize-configuration-for-transfer-asset-over-bridge-rocswnds)
|
||||
- [Send messages - transfer asset over bridge (TYRs/WNDs)](#send-messages---transfer-asset-over-bridge-rocswnds)
|
||||
- [Claim relayer's rewards on BridgeHubpezkuwichain and
|
||||
BridgeHubzagros](#claim-relayers-rewards-on-bridgehubpezkuwichain-and-bridgehubzagros)
|
||||
- [How to test local BridgeHubKusama/BridgeHubPezkuwiChain](#how-to-test-local-bridgehubkusamabridgehubpezkuwi)
|
||||
|
||||
# Bridge-hub Teyrchains
|
||||
|
||||
_BridgeHub(s)_ are **_system teyrchains_** that will house trustless bridges from the local ecosystem to others. The
|
||||
current trustless bridges planned for the BridgeHub(s) are:
|
||||
- `BridgeHubPezkuwiChain` system teyrchain:
|
||||
1. PezkuwiChain <-> Kusama bridge
|
||||
2. PezkuwiChain <-> Ethereum bridge (Snowbridge)
|
||||
- `BridgeHubKusama` system teyrchain:
|
||||
1. Kusama <-> PezkuwiChain bridge
|
||||
2. Kusama <-> Ethereum bridge The high-level
|
||||
responsibilities of each bridge living on BridgeHub:
|
||||
- sync finality proofs between relay chains (or equivalent)
|
||||
- sync finality proofs between BridgeHub teyrchains
|
||||
- pass (XCM) messages between different BridgeHub teyrchains
|
||||
|
||||

|
||||
|
||||
## Requirements for local run/testing
|
||||
|
||||
```
|
||||
# Prepare empty directory for testing
|
||||
mkdir -p ~/local_bridge_testing/bin
|
||||
mkdir -p ~/local_bridge_testing/logs
|
||||
|
||||
---
|
||||
# 1. Install zombienet
|
||||
Go to: https://github.com/paritytech/zombienet/releases
|
||||
Copy the appropriate binary (zombienet-linux) from the latest release to ~/local_bridge_testing/bin
|
||||
|
||||
|
||||
---
|
||||
# 2. Build pezkuwi binary
|
||||
|
||||
We need pezkuwi binary with "fast-runtime" feature:
|
||||
|
||||
cd <pezkuwi-sdk-git-repo-dir>
|
||||
cargo build --release --features fast-runtime --bin pezkuwi
|
||||
cp target/release/pezkuwi ~/local_bridge_testing/bin/pezkuwi
|
||||
|
||||
cargo build --release --features fast-runtime --bin pezkuwi-prepare-worker
|
||||
cp target/release/pezkuwi-prepare-worker ~/local_bridge_testing/bin/pezkuwi-prepare-worker
|
||||
|
||||
cargo build --release --features fast-runtime --bin pezkuwi-execute-worker
|
||||
cp target/release/pezkuwi-execute-worker ~/local_bridge_testing/bin/pezkuwi-execute-worker
|
||||
|
||||
|
||||
---
|
||||
# 3. Build bizinikiwi-relay binary
|
||||
git clone https://github.com/paritytech/parity-bridges-common.git
|
||||
cd parity-bridges-common
|
||||
|
||||
# checkout desired branch or use master:
|
||||
# git checkout -b master --track origin/master
|
||||
# `pezkuwi-staging` (recommended) is stabilized and compatible for Pezcumulus releases
|
||||
# `master` is latest development
|
||||
git checkout -b pezkuwi-staging --track origin/pezkuwi-staging
|
||||
|
||||
cargo build --release -p bizinikiwi-relay
|
||||
cp target/release/bizinikiwi-relay ~/local_bridge_testing/bin/bizinikiwi-relay
|
||||
|
||||
|
||||
---
|
||||
# 4. Build pezcumulus pezkuwi-teyrchain binary
|
||||
cd <pezkuwi-sdk-git-repo-dir>
|
||||
|
||||
cargo build --release -p pezkuwi-teyrchain-bin
|
||||
cp target/release/pezkuwi-teyrchain ~/local_bridge_testing/bin/pezkuwi-teyrchain
|
||||
cp target/release/pezkuwi-teyrchain ~/local_bridge_testing/bin/pezkuwi-teyrchain-asset-hub
|
||||
```
|
||||
|
||||
## How to test local pezkuwichain <-> zagros bridge
|
||||
|
||||
### Run pezkuwichain/zagros chains with zombienet
|
||||
|
||||
```
|
||||
cd <pezkuwi-sdk-git-repo-dir>
|
||||
|
||||
# pezkuwichain + BridgeHubpezkuwichain + AssetHub for pezkuwichain (mirroring Kusama)
|
||||
PEZKUWI_BINARY=~/local_bridge_testing/bin/pezkuwi \
|
||||
PEZKUWI_TEYRCHAIN_BINARY=~/local_bridge_testing/bin/pezkuwi-teyrchain \
|
||||
~/local_bridge_testing/bin/zombienet-linux --provider native spawn ./bridges/testing/environments/pezkuwichain-zagros/bridge_hub_pezkuwichain_local_network.toml
|
||||
```
|
||||
|
||||
```
|
||||
cd <pezkuwi-sdk-git-repo-dir>
|
||||
|
||||
# zagros + BridgeHubzagros + AssetHub for zagros (mirroring PezkuwiChain)
|
||||
PEZKUWI_BINARY=~/local_bridge_testing/bin/pezkuwi \
|
||||
PEZKUWI_TEYRCHAIN_BINARY=~/local_bridge_testing/bin/pezkuwi-teyrchain \
|
||||
~/local_bridge_testing/bin/zombienet-linux --provider native spawn ./bridges/testing/environments/pezkuwichain-zagros/bridge_hub_zagros_local_network.toml
|
||||
```
|
||||
|
||||
### Init bridge and run relayer between BridgeHubpezkuwichain and BridgeHubzagros
|
||||
|
||||
**Accounts of BridgeHub teyrchains:**
|
||||
- `Bob` is pallet owner of all bridge pallets
|
||||
|
||||
#### Run with script
|
||||
```
|
||||
cd <pezkuwi-sdk-git-repo-dir>
|
||||
|
||||
./bridges/testing/environments/pezkuwichain-zagros/bridges_pezkuwichain_zagros.sh run-finality-relay
|
||||
```
|
||||
|
||||
**Check relay-chain headers relaying:**
|
||||
- pezkuwichain teyrchain: - https://pezkuwichain.io/?rpc=ws%3A%2F%2F127.0.0.1%3A8943#/chainstate - Pallet:
|
||||
**bridgezagrosGrandpa** - Keys: **bestFinalized()**
|
||||
- zagros teyrchain: - https://pezkuwichain.io/?rpc=ws%3A%2F%2F127.0.0.1%3A8945#/chainstate - Pallet:
|
||||
**bridgepezkuwichainGrandpa** - Keys: **bestFinalized()**
|
||||
|
||||
**Check teyrchain headers relaying:**
|
||||
- pezkuwichain teyrchain: - https://pezkuwichain.io/?rpc=ws%3A%2F%2F127.0.0.1%3A8943#/chainstate - Pallet:
|
||||
**bridgezagrosTeyrchains** - Keys: **parasInfo(None)**
|
||||
- zagros teyrchain: - https://pezkuwichain.io/?rpc=ws%3A%2F%2F127.0.0.1%3A8945#/chainstate - Pallet:
|
||||
**bridgepezkuwichainTeyrchains** - Keys: **parasInfo(None)**
|
||||
|
||||
### Initialize configuration for transfer asset over bridge (TYRs/WNDs)
|
||||
|
||||
This initialization does several things:
|
||||
- creates `ForeignAssets` for wrappedTYRs/wrappedWNDs
|
||||
- drips SA for AssetHubpezkuwichain on AssetHubzagros (and vice versa) which holds reserved assets on source chains
|
||||
```
|
||||
cd <pezkuwi-sdk-git-repo-dir>
|
||||
|
||||
./bridges/testing/environments/pezkuwichain-zagros/bridges_pezkuwichain_zagros.sh init-asset-hub-pezkuwichain-local
|
||||
./bridges/testing/environments/pezkuwichain-zagros/bridges_pezkuwichain_zagros.sh init-bridge-hub-pezkuwichain-local
|
||||
./bridges/testing/environments/pezkuwichain-zagros/bridges_pezkuwichain_zagros.sh init-asset-hub-zagros-local
|
||||
./bridges/testing/environments/pezkuwichain-zagros/bridges_pezkuwichain_zagros.sh init-bridge-hub-zagros-local
|
||||
```
|
||||
|
||||
### Send messages - transfer asset over bridge (TYRs/WNDs)
|
||||
|
||||
Do reserve-backed transfers:
|
||||
```
|
||||
cd <pezkuwi-sdk-git-repo-dir>
|
||||
|
||||
# TYRs from pezkuwichain's Asset Hub to zagros's.
|
||||
./bridges/testing/environments/pezkuwichain-zagros/bridges_pezkuwichain_zagros.sh reserve-transfer-assets-from-asset-hub-pezkuwichain-local
|
||||
```
|
||||
```
|
||||
cd <pezkuwi-sdk-git-repo-dir>
|
||||
|
||||
# ZGRs from zagros's Asset Hub to pezkuwichain's.
|
||||
./bridges/testing/environments/pezkuwichain-zagros/bridges_pezkuwichain_zagros.sh reserve-transfer-assets-from-asset-hub-zagros-local
|
||||
```
|
||||
|
||||
- open explorers: (see zombienets)
|
||||
- AssetHubpezkuwichain (see events `xcmpQueue.XcmpMessageSent`, `pezkuwiXcm.Attempted`) https://pezkuwichain.io/?rpc=ws://127.0.0.1:9910#/explorer
|
||||
- BridgeHubpezkuwichain (see `bridgezagrosMessages.MessageAccepted`) https://pezkuwichain.io/?rpc=ws://127.0.0.1:8943#/explorer
|
||||
- BridgeHubzagros (see `bridgepezkuwichainMessages.MessagesReceived`, `xcmpQueue.XcmpMessageSent`) https://pezkuwichain.io/?rpc=ws://127.0.0.1:8945#/explorer
|
||||
- AssetHubzagros (see `foreignAssets.Issued`, `xcmpQueue.Success`) https://pezkuwichain.io/?rpc=ws://127.0.0.1:9010#/explorer
|
||||
- BridgeHubpezkuwichainc (see `bridgezagrosMessages.MessagesDelivered`) https://pezkuwichain.io/?rpc=ws://127.0.0.1:8943#/explorer
|
||||
|
||||
Do reserve withdraw transfers: (when previous is finished)
|
||||
```
|
||||
cd <pezkuwi-sdk-git-repo-dir>
|
||||
|
||||
# wrappedWNDs from pezkuwichain's Asset Hub to zagros's.
|
||||
./bridges/testing/environments/pezkuwichain-zagros/bridges_pezkuwichain_zagros.sh withdraw-reserve-assets-from-asset-hub-pezkuwichain-local
|
||||
```
|
||||
```
|
||||
cd <pezkuwi-sdk-git-repo-dir>
|
||||
|
||||
# wrappedTYRs from zagros's Asset Hub to pezkuwichain's.
|
||||
./bridges/testing/environments/pezkuwichain-zagros/bridges_pezkuwichain_zagros.sh withdraw-reserve-assets-from-asset-hub-zagros-local
|
||||
```
|
||||
|
||||
### Claim relayer's rewards on BridgeHubpezkuwichain and BridgeHubzagros
|
||||
|
||||
**Accounts of BridgeHub teyrchains:**
|
||||
- `//Charlie` is relayer account on BridgeHubpezkuwichain
|
||||
- `//Charlie` is relayer account on BridgeHubzagros
|
||||
|
||||
```
|
||||
cd <pezkuwi-sdk-git-repo-dir>
|
||||
|
||||
# Claim rewards on BridgeHubzagros:
|
||||
./bridges/testing/environments/pezkuwichain-zagros/bridges_pezkuwichain_zagros.sh claim-rewards-bridge-hub-pezkuwichain-local
|
||||
|
||||
# Claim rewards on BridgeHubzagros:
|
||||
./bridges/testing/environments/pezkuwichain-zagros/bridges_pezkuwichain_zagros.sh claim-rewards-bridge-hub-zagros-local
|
||||
```
|
||||
|
||||
- open explorers: (see zombienets)
|
||||
- BridgeHubpezkuwichain (see 2x `bridgeRelayers.RewardPaid`) https://pezkuwichain.io/?rpc=ws://127.0.0.1:8943#/explorer
|
||||
- BridgeHubzagros (see 2x `bridgeRelayers.RewardPaid`) https://pezkuwichain.io/?rpc=ws://127.0.0.1:8945#/explorer
|
||||
|
||||
## How to test local BridgeHubKusama/BridgeHubPezkuwiChain
|
||||
|
||||
TODO: see `# !!! READ HERE` above
|
||||
@@ -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 = []
|
||||
+52
@@ -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",
|
||||
]
|
||||
+125
@@ -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() {}
|
||||
+133
@@ -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>;
|
||||
}
|
||||
+284
@@ -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
|
||||
}
|
||||
+257
@@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
+434
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
+127
@@ -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
+53
@@ -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."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
+53
@@ -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."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
+187
@@ -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))
|
||||
}
|
||||
}
|
||||
+129
@@ -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))
|
||||
}
|
||||
}
|
||||
+121
@@ -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()
|
||||
}
|
||||
}
|
||||
+177
@@ -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))
|
||||
}
|
||||
}
|
||||
+101
@@ -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))
|
||||
}
|
||||
}
|
||||
+251
@@ -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))
|
||||
}
|
||||
}
|
||||
+271
@@ -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))
|
||||
}
|
||||
}
|
||||
+133
@@ -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))
|
||||
}
|
||||
}
|
||||
+133
@@ -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))
|
||||
}
|
||||
}
|
||||
+114
@@ -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))
|
||||
}
|
||||
}
|
||||
+280
@@ -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()))
|
||||
}
|
||||
}
|
||||
+200
@@ -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))
|
||||
}
|
||||
}
|
||||
+180
@@ -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))
|
||||
}
|
||||
}
|
||||
+81
@@ -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))
|
||||
}
|
||||
}
|
||||
+75
@@ -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))
|
||||
}
|
||||
}
|
||||
+65
@@ -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))
|
||||
}
|
||||
}
|
||||
+118
@@ -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))
|
||||
}
|
||||
}
|
||||
+396
@@ -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))
|
||||
}
|
||||
}
|
||||
+63
@@ -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."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
+77
@@ -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())))
|
||||
}
|
||||
}
|
||||
+61
@@ -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))
|
||||
}
|
||||
}
|
||||
+258
@@ -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))
|
||||
}
|
||||
}
|
||||
+63
@@ -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."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
+126
@@ -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))
|
||||
}
|
||||
}
|
||||
+79
@@ -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))
|
||||
}
|
||||
}
|
||||
+93
@@ -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))
|
||||
}
|
||||
}
|
||||
+161
@@ -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))
|
||||
}
|
||||
}
|
||||
+275
@@ -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()
|
||||
}
|
||||
}
|
||||
+215
@@ -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))
|
||||
}
|
||||
}
|
||||
+392
@@ -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);
|
||||
}
|
||||
}
|
||||
+188
@@ -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()
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,386 @@
|
||||
[package]
|
||||
name = "bridge-hub-zagros-runtime"
|
||||
version = "0.3.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
description = "Zagros's BridgeHub teyrchain runtime"
|
||||
license = "Apache-2.0"
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
|
||||
[lints]
|
||||
workspace = 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 }
|
||||
xcm = { workspace = true }
|
||||
xcm-builder = { workspace = true }
|
||||
xcm-executor = { workspace = true }
|
||||
xcm-runtime-apis = { workspace = true }
|
||||
zagros-runtime-constants = { 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 = ["zagros"], 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-core = { workspace = true }
|
||||
bp-pezkuwichain = { workspace = true }
|
||||
bp-relayers = { workspace = true }
|
||||
bp-runtime = { workspace = true }
|
||||
bp-teyrchains = { workspace = true }
|
||||
bp-xcm-bridge-hub-router = { workspace = true }
|
||||
bridge-hub-common = { 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-outbound-queue-v2-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-inbound-queue-v2 = { workspace = true }
|
||||
snowbridge-pezpallet-inbound-queue-v2-fixtures = { workspace = true }
|
||||
snowbridge-pezpallet-outbound-queue = { workspace = true }
|
||||
snowbridge-pezpallet-outbound-queue-v2 = { workspace = true }
|
||||
snowbridge-pezpallet-system = { workspace = true }
|
||||
snowbridge-pezpallet-system-v2 = { workspace = true }
|
||||
snowbridge-system-runtime-api = { workspace = true }
|
||||
snowbridge-system-v2-runtime-api = { 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 }
|
||||
|
||||
[build-dependencies]
|
||||
bizinikiwi-wasm-builder = { optional = true, workspace = true, default-features = true }
|
||||
|
||||
[features]
|
||||
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-core/std",
|
||||
"bp-pezkuwichain/std",
|
||||
"bp-relayers/std",
|
||||
"bp-runtime/std",
|
||||
"bp-teyrchains/std",
|
||||
"bp-xcm-bridge-hub-router/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",
|
||||
"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-outbound-queue-v2-runtime-api/std",
|
||||
"snowbridge-pezpallet-ethereum-client/std",
|
||||
"snowbridge-pezpallet-inbound-queue-fixtures/std",
|
||||
"snowbridge-pezpallet-inbound-queue-v2-fixtures/std",
|
||||
"snowbridge-pezpallet-inbound-queue-v2/std",
|
||||
"snowbridge-pezpallet-inbound-queue/std",
|
||||
"snowbridge-pezpallet-outbound-queue-v2/std",
|
||||
"snowbridge-pezpallet-outbound-queue/std",
|
||||
"snowbridge-pezpallet-system-v2/std",
|
||||
"snowbridge-pezpallet-system/std",
|
||||
"snowbridge-system-runtime-api/std",
|
||||
"snowbridge-system-v2-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",
|
||||
"zagros-runtime-constants/std",
|
||||
]
|
||||
default = ["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-core/runtime-benchmarks",
|
||||
"bp-pezkuwichain/runtime-benchmarks",
|
||||
"bp-relayers/runtime-benchmarks",
|
||||
"bp-runtime/runtime-benchmarks",
|
||||
"bp-teyrchains/runtime-benchmarks",
|
||||
"bp-xcm-bridge-hub-router/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",
|
||||
"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-outbound-queue-v2-runtime-api/runtime-benchmarks",
|
||||
"snowbridge-pezpallet-ethereum-client/runtime-benchmarks",
|
||||
"snowbridge-pezpallet-inbound-queue-fixtures/runtime-benchmarks",
|
||||
"snowbridge-pezpallet-inbound-queue-v2-fixtures/runtime-benchmarks",
|
||||
"snowbridge-pezpallet-inbound-queue-v2/runtime-benchmarks",
|
||||
"snowbridge-pezpallet-inbound-queue/runtime-benchmarks",
|
||||
"snowbridge-pezpallet-outbound-queue-v2/runtime-benchmarks",
|
||||
"snowbridge-pezpallet-outbound-queue/runtime-benchmarks",
|
||||
"snowbridge-pezpallet-system-v2/runtime-benchmarks",
|
||||
"snowbridge-pezpallet-system/runtime-benchmarks",
|
||||
"snowbridge-runtime-test-common/runtime-benchmarks",
|
||||
"snowbridge-system-runtime-api/runtime-benchmarks",
|
||||
"snowbridge-system-v2-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",
|
||||
"zagros-runtime-constants/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-v2/try-runtime",
|
||||
"snowbridge-pezpallet-inbound-queue/try-runtime",
|
||||
"snowbridge-pezpallet-outbound-queue-v2/try-runtime",
|
||||
"snowbridge-pezpallet-outbound-queue/try-runtime",
|
||||
"snowbridge-pezpallet-system-v2/try-runtime",
|
||||
"snowbridge-pezpallet-system/try-runtime",
|
||||
"pezsp-runtime/try-runtime",
|
||||
"teyrchain-info/try-runtime",
|
||||
"teyrchains-common/try-runtime",
|
||||
]
|
||||
|
||||
# Enable the metadata hash generation in the wasm builder.
|
||||
metadata-hash = ["bizinikiwi-wasm-builder/metadata-hash"]
|
||||
|
||||
# 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 = ["metadata-hash"]
|
||||
|
||||
fast-runtime = []
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
[package]
|
||||
name = "bp-bridge-hub-zagros"
|
||||
description = "Primitives of BridgeHubZagros teyrchain runtime."
|
||||
version = "0.3.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",
|
||||
]
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
// 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 BridgeHubZagros runtime setup
|
||||
//! (AccountId, Headers, Hashes...)
|
||||
|
||||
#![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;
|
||||
use pezsp_runtime::{RuntimeDebug, StateVersion};
|
||||
|
||||
/// BridgeHubZagros teyrchain.
|
||||
#[derive(RuntimeDebug)]
|
||||
pub struct BridgeHubZagros;
|
||||
|
||||
impl Chain for BridgeHubZagros {
|
||||
const ID: ChainId = *b"bhwd";
|
||||
|
||||
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 BridgeHubZagros {
|
||||
const TEYRCHAIN_ID: u32 = BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID;
|
||||
const MAX_HEADER_SIZE: u32 = MAX_BRIDGE_HUB_HEADER_SIZE;
|
||||
}
|
||||
|
||||
impl ChainWithMessages for BridgeHubZagros {
|
||||
const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str =
|
||||
WITH_BRIDGE_HUB_ZAGROS_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;
|
||||
}
|
||||
|
||||
/// Identifier of BridgeHubZagros in the Zagros relay chain.
|
||||
pub const BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID: u32 = 1002;
|
||||
|
||||
/// Name of the With-BridgeHubZagros messages pallet instance that is deployed at bridged chains.
|
||||
pub const WITH_BRIDGE_HUB_ZAGROS_MESSAGES_PALLET_NAME: &str = "BridgeZagrosMessages";
|
||||
|
||||
/// Name of the With-BridgeHubZagros bridge-relayers pallet instance that is deployed at bridged
|
||||
/// chains.
|
||||
pub const WITH_BRIDGE_HUB_ZAGROS_RELAYERS_PALLET_NAME: &str = "BridgeRelayers";
|
||||
|
||||
/// Pallet index of `BridgePezkuwichainMessages: pezpallet_bridge_messages::<Instance1>`.
|
||||
pub const WITH_BRIDGE_ZAGROS_TO_PEZKUWICHAIN_MESSAGES_PALLET_INDEX: u8 = 44;
|
||||
|
||||
decl_bridge_finality_runtime_apis!(bridge_hub_zagros);
|
||||
decl_bridge_messages_runtime_apis!(bridge_hub_zagros, LegacyLaneId);
|
||||
|
||||
pezframe_support::parameter_types! {
|
||||
/// The XCM fee that is paid for executing XCM program (with `ExportMessage` instruction) at the Zagros
|
||||
/// BridgeHub.
|
||||
/// (initially was calculated by test `BridgeHubZagros::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`)
|
||||
pub const BridgeHubZagrosBaseXcmFeeInWnds: u128 = 22_962_450_000;
|
||||
|
||||
/// Transaction fee that is paid at the Zagros BridgeHub for delivering single inbound message.
|
||||
/// (initially was calculated by test `BridgeHubZagros::can_calculate_fee_for_standalone_message_delivery_transaction` + `33%`)
|
||||
pub const BridgeHubZagrosBaseDeliveryFeeInWnds: u128 = 89_305_927_116;
|
||||
|
||||
/// Transaction fee that is paid at the Zagros BridgeHub for delivering single outbound message confirmation.
|
||||
/// (initially was calculated by test `BridgeHubZagros::can_calculate_fee_for_standalone_message_confirmation_transaction` + `33%`)
|
||||
pub const BridgeHubZagrosBaseConfirmationFeeInWnds: u128 = 17_034_677_116;
|
||||
}
|
||||
|
||||
/// Wrapper over `BridgeHubZagros`'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 `BridgeHubPezkuwichain`.
|
||||
#[codec(index = 45)]
|
||||
XcmOverBridgeHubPezkuwichain(bp_xcm_bridge_hub::XcmBridgeHubCall),
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// 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(all(not(feature = "metadata-hash"), feature = "std"))]
|
||||
fn main() {
|
||||
bizinikiwi_wasm_builder::WasmBuilder::build_using_defaults();
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "metadata-hash", feature = "std"))]
|
||||
fn main() {
|
||||
bizinikiwi_wasm_builder::WasmBuilder::init_with_defaults()
|
||||
.enable_metadata_hash("ZGR", 12)
|
||||
.build();
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
fn main() {}
|
||||
+161
@@ -0,0 +1,161 @@
|
||||
// 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 crate::{
|
||||
bridge_to_ethereum_config::InboundQueueV2Location, xcm_config::XcmConfig, RuntimeCall,
|
||||
XcmRouter,
|
||||
};
|
||||
use bp_messages::LegacyLaneId;
|
||||
use bp_relayers::RewardsAccountParams;
|
||||
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
|
||||
use pezframe_support::parameter_types;
|
||||
use scale_info::TypeInfo;
|
||||
use testnet_teyrchains_constants::zagros::{
|
||||
locations::AssetHubLocation, snowbridge::EthereumNetwork,
|
||||
};
|
||||
use xcm::{opaque::latest::Location, VersionedLocation};
|
||||
use xcm_executor::XcmExecutor;
|
||||
|
||||
parameter_types! {
|
||||
pub storage RequiredStakeForStakeAndSlash: Balance = 1_000_000;
|
||||
pub const RelayerStakeLease: u32 = 8;
|
||||
pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs";
|
||||
}
|
||||
|
||||
/// Showcasing that we can handle multiple different rewards with the same pallet.
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
Debug,
|
||||
Decode,
|
||||
DecodeWithMemTracking,
|
||||
Encode,
|
||||
Eq,
|
||||
MaxEncodedLen,
|
||||
PartialEq,
|
||||
TypeInfo,
|
||||
)]
|
||||
pub enum BridgeReward {
|
||||
/// Rewards for the R/W bridge—distinguished by the `RewardsAccountParams` key.
|
||||
PezkuwichainZagros(RewardsAccountParams<LegacyLaneId>),
|
||||
/// Rewards for Snowbridge.
|
||||
Snowbridge,
|
||||
}
|
||||
|
||||
impl From<RewardsAccountParams<LegacyLaneId>> for BridgeReward {
|
||||
fn from(value: RewardsAccountParams<LegacyLaneId>) -> Self {
|
||||
Self::PezkuwichainZagros(value)
|
||||
}
|
||||
}
|
||||
|
||||
/// An enum representing the different types of supported beneficiaries.
|
||||
#[derive(
|
||||
Clone, Debug, Decode, DecodeWithMemTracking, Encode, Eq, MaxEncodedLen, PartialEq, TypeInfo,
|
||||
)]
|
||||
pub enum BridgeRewardBeneficiaries {
|
||||
/// A local chain account.
|
||||
LocalAccount(AccountId),
|
||||
/// A beneficiary specified by a VersionedLocation.
|
||||
AssetHubLocation(VersionedLocation),
|
||||
}
|
||||
|
||||
impl From<pezsp_runtime::AccountId32> for BridgeRewardBeneficiaries {
|
||||
fn from(value: pezsp_runtime::AccountId32) -> Self {
|
||||
BridgeRewardBeneficiaries::LocalAccount(value)
|
||||
}
|
||||
}
|
||||
|
||||
/// Implementation of `bp_relayers::PaymentProcedure` as a pay/claim rewards scheme.
|
||||
pub struct BridgeRewardPayer;
|
||||
impl bp_relayers::PaymentProcedure<AccountId, BridgeReward, u128> for BridgeRewardPayer {
|
||||
type Error = pezsp_runtime::DispatchError;
|
||||
type Beneficiary = BridgeRewardBeneficiaries;
|
||||
|
||||
fn pay_reward(
|
||||
relayer: &AccountId,
|
||||
reward_kind: BridgeReward,
|
||||
reward: u128,
|
||||
beneficiary: BridgeRewardBeneficiaries,
|
||||
) -> Result<(), Self::Error> {
|
||||
match reward_kind {
|
||||
BridgeReward::PezkuwichainZagros(lane_params) => {
|
||||
match beneficiary {
|
||||
BridgeRewardBeneficiaries::LocalAccount(account) => {
|
||||
bp_relayers::PayRewardFromAccount::<
|
||||
Balances,
|
||||
AccountId,
|
||||
LegacyLaneId,
|
||||
u128,
|
||||
>::pay_reward(
|
||||
&relayer, lane_params, reward, account,
|
||||
)
|
||||
},
|
||||
BridgeRewardBeneficiaries::AssetHubLocation(_) => Err(Self::Error::Other("`AssetHubLocation` beneficiary is not supported for `PezkuwichainZagros` rewards!")),
|
||||
}
|
||||
},
|
||||
BridgeReward::Snowbridge => {
|
||||
match beneficiary {
|
||||
BridgeRewardBeneficiaries::LocalAccount(_) => Err(Self::Error::Other("`LocalAccount` beneficiary is not supported for `Snowbridge` rewards!")),
|
||||
BridgeRewardBeneficiaries::AssetHubLocation(account_location) => {
|
||||
let account_location = Location::try_from(account_location)
|
||||
.map_err(|_| Self::Error::Other("`AssetHubLocation` beneficiary location version is not supported for `Snowbridge` rewards!"))?;
|
||||
snowbridge_core::reward::PayAccountOnLocation::<
|
||||
AccountId,
|
||||
u128,
|
||||
EthereumNetwork,
|
||||
AssetHubLocation,
|
||||
InboundQueueV2Location,
|
||||
XcmRouter,
|
||||
XcmExecutor<XcmConfig>,
|
||||
RuntimeCall
|
||||
>::pay_reward(
|
||||
relayer, (), reward, account_location
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Allows collect and claim rewards for relayers
|
||||
pub type BridgeRelayersInstance = ();
|
||||
impl pezpallet_bridge_relayers::Config<BridgeRelayersInstance> for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
|
||||
type RewardBalance = u128;
|
||||
type Reward = BridgeReward;
|
||||
type PaymentProcedure = BridgeRewardPayer;
|
||||
|
||||
type StakeAndSlash = pezpallet_bridge_relayers::StakeAndSlashNamed<
|
||||
AccountId,
|
||||
BlockNumber,
|
||||
Balances,
|
||||
RelayerStakeReserveId,
|
||||
RequiredStakeForStakeAndSlash,
|
||||
RelayerStakeLease,
|
||||
>;
|
||||
type Balance = Balance;
|
||||
type WeightInfo = weights::pezpallet_bridge_relayers::WeightInfo<Runtime>;
|
||||
}
|
||||
+459
@@ -0,0 +1,459 @@
|
||||
// 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 crate::{
|
||||
bridge_common_config::BridgeReward,
|
||||
xcm_config,
|
||||
xcm_config::{RelayNetwork, RootLocation, TreasuryAccount, UniversalLocation, XcmConfig},
|
||||
Balances, BridgeRelayers, EthereumBeaconClient, EthereumInboundQueue, EthereumInboundQueueV2,
|
||||
EthereumOutboundQueue, EthereumOutboundQueueV2, EthereumSystem, EthereumSystemV2, MessageQueue,
|
||||
Runtime, RuntimeEvent, TransactionByteFee,
|
||||
};
|
||||
use bp_asset_hub_zagros::CreateForeignAssetDeposit;
|
||||
use bridge_hub_common::AggregateMessageOrigin;
|
||||
use pezframe_support::{parameter_types, traits::Contains, weights::ConstantMultiplier};
|
||||
use pezframe_system::EnsureRootWithSuccess;
|
||||
use hex_literal::hex;
|
||||
use pezpallet_xcm::EnsureXcm;
|
||||
use snowbridge_beacon_primitives::{Fork, ForkVersions};
|
||||
use snowbridge_core::{gwei, meth, AllowSiblingsOnly, PricingParameters, Rewards};
|
||||
use snowbridge_inbound_queue_primitives::v2::CreateAssetCallInfo;
|
||||
use snowbridge_outbound_queue_primitives::{
|
||||
v1::{ConstantGasMeter, EthereumBlobExporter},
|
||||
v2::{ConstantGasMeter as ConstantGasMeterV2, EthereumBlobExporter as EthereumBlobExporterV2},
|
||||
};
|
||||
use pezsp_core::H160;
|
||||
use pezsp_runtime::{
|
||||
traits::{ConstU32, ConstU8, Keccak256},
|
||||
FixedU128,
|
||||
};
|
||||
use testnet_teyrchains_constants::zagros::{
|
||||
currency::*,
|
||||
fee::WeightToFee,
|
||||
snowbridge::{
|
||||
AssetHubParaId, EthereumLocation, EthereumNetwork, FRONTEND_PALLET_INDEX,
|
||||
INBOUND_QUEUE_PALLET_INDEX_V1, INBOUND_QUEUE_PALLET_INDEX_V2,
|
||||
},
|
||||
};
|
||||
use teyrchains_common::{AccountId, Balance};
|
||||
use xcm::prelude::{GlobalConsensus, InteriorLocation, Location, PalletInstance, Teyrchain};
|
||||
use xcm_executor::XcmExecutor;
|
||||
use zagros_runtime_constants::system_teyrchain::ASSET_HUB_ID;
|
||||
|
||||
pub const SLOTS_PER_EPOCH: u32 = snowbridge_pallet_ethereum_client::config::SLOTS_PER_EPOCH as u32;
|
||||
|
||||
/// Exports message to the Ethereum Gateway contract.
|
||||
pub type SnowbridgeExporter = EthereumBlobExporter<
|
||||
UniversalLocation,
|
||||
EthereumNetwork,
|
||||
snowbridge_pallet_outbound_queue::Pallet<Runtime>,
|
||||
snowbridge_core::AgentIdOf,
|
||||
EthereumSystem,
|
||||
>;
|
||||
|
||||
pub type SnowbridgeExporterV2 = EthereumBlobExporterV2<
|
||||
UniversalLocation,
|
||||
EthereumNetwork,
|
||||
EthereumOutboundQueueV2,
|
||||
EthereumSystemV2,
|
||||
AssetHubParaId,
|
||||
>;
|
||||
|
||||
// Ethereum Bridge
|
||||
parameter_types! {
|
||||
pub storage EthereumGatewayAddress: H160 = H160(hex!("b1185ede04202fe62d38f5db72f71e38ff3e8305"));
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const CreateAssetCallIndex: [u8;2] = [53, 0];
|
||||
pub const SetReservesCallIndex: [u8;2] = [53, 33];
|
||||
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(ASSET_HUB_ID)]);
|
||||
pub EthereumUniversalLocation: InteriorLocation = [GlobalConsensus(EthereumNetwork::get())].into();
|
||||
pub AssetHubUniversalLocation: InteriorLocation = [GlobalConsensus(RelayNetwork::get()), Teyrchain(ASSET_HUB_ID)].into();
|
||||
pub InboundQueueV2Location: InteriorLocation = [PalletInstance(INBOUND_QUEUE_PALLET_INDEX_V2)].into();
|
||||
pub const SnowbridgeReward: BridgeReward = BridgeReward::Snowbridge;
|
||||
pub CreateAssetCall: CreateAssetCallInfo = CreateAssetCallInfo {
|
||||
create_call: CreateAssetCallIndex::get(),
|
||||
deposit: CreateForeignAssetDeposit::get(),
|
||||
min_balance:1,
|
||||
set_reserves_call: SetReservesCallIndex::get(),
|
||||
};
|
||||
pub SnowbridgeFrontendLocation: Location = Location::new(1, [Teyrchain(ASSET_HUB_ID), PalletInstance(FRONTEND_PALLET_INDEX)]);
|
||||
}
|
||||
|
||||
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 = crate::XcmRouter;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
type XcmSender = benchmark_helpers::DoNothingRouter;
|
||||
type ChannelLookup = EthereumSystem;
|
||||
type GatewayAddress = EthereumGatewayAddress;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
type Helper = Runtime;
|
||||
type MessageConverter = snowbridge_inbound_queue_primitives::v1::MessageToXcm<
|
||||
CreateAssetCallIndex,
|
||||
CreateForeignAssetDeposit,
|
||||
ConstU8<INBOUND_QUEUE_PALLET_INDEX_V1>,
|
||||
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_inbound_queue_v2::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Verifier = EthereumBeaconClient;
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
type XcmSender = crate::XcmRouter;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
type XcmSender = benchmark_helpers::DoNothingRouter;
|
||||
type GatewayAddress = EthereumGatewayAddress;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
type Helper = Runtime;
|
||||
type WeightInfo = crate::weights::snowbridge_pallet_inbound_queue_v2::WeightInfo<Runtime>;
|
||||
type AssetHubParaId = AssetHubParaId;
|
||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||
type MessageConverter = snowbridge_inbound_queue_primitives::v2::MessageToXcm<
|
||||
CreateAssetCall,
|
||||
EthereumNetwork,
|
||||
RelayNetwork,
|
||||
EthereumGatewayAddress,
|
||||
InboundQueueV2Location,
|
||||
AssetHubParaId,
|
||||
EthereumSystem,
|
||||
AccountId,
|
||||
>;
|
||||
type AccountToLocation = xcm_builder::AliasesIntoAccountId32<
|
||||
xcm_config::RelayNetwork,
|
||||
<Runtime as pezframe_system::Config>::AccountId,
|
||||
>;
|
||||
type RewardKind = BridgeReward;
|
||||
type DefaultRewardKind = SnowbridgeReward;
|
||||
type RewardPayment = BridgeRelayers;
|
||||
}
|
||||
|
||||
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 = ConstantGasMeter;
|
||||
type Balance = Balance;
|
||||
type WeightToFee = WeightToFee;
|
||||
type WeightInfo = crate::weights::snowbridge_pallet_outbound_queue::WeightInfo<Runtime>;
|
||||
type PricingParameters = EthereumSystem;
|
||||
type Channels = EthereumSystem;
|
||||
}
|
||||
|
||||
impl snowbridge_pallet_outbound_queue_v2::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Hashing = Keccak256;
|
||||
type MessageQueue = MessageQueue;
|
||||
// Maximum payload size for outbound messages.
|
||||
type MaxMessagePayloadSize = ConstU32<2048>;
|
||||
// Maximum number of outbound messages that can be committed per block.
|
||||
// It's benchmarked, including the entire process flow(initialize,submit,commit) in the
|
||||
// worst-case, Benchmark results in `../weights/snowbridge_pallet_outbound_queue_v2.
|
||||
// rs` show that the `process` function consumes less than 1% of the block capacity, which is
|
||||
// safe enough.
|
||||
type MaxMessagesPerBlock = ConstU32<32>;
|
||||
type GasMeter = ConstantGasMeterV2;
|
||||
type Balance = Balance;
|
||||
type WeightToFee = WeightToFee;
|
||||
type Verifier = EthereumBeaconClient;
|
||||
type GatewayAddress = EthereumGatewayAddress;
|
||||
type WeightInfo = crate::weights::snowbridge_pallet_outbound_queue_v2::WeightInfo<Runtime>;
|
||||
type EthereumNetwork = EthereumNetwork;
|
||||
type RewardKind = BridgeReward;
|
||||
type DefaultRewardKind = SnowbridgeReward;
|
||||
type RewardPayment = BridgeRelayers;
|
||||
type AggregateMessageOrigin = AggregateMessageOrigin;
|
||||
type OnNewCommitment = ();
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
type Helper = Runtime;
|
||||
}
|
||||
|
||||
#[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
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
#[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,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
impl snowbridge_pallet_ethereum_client::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type ForkVersions = ChainForkVersions;
|
||||
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;
|
||||
}
|
||||
|
||||
pub struct AllowFromEthereumFrontend;
|
||||
impl Contains<Location> for AllowFromEthereumFrontend {
|
||||
fn contains(location: &Location) -> bool {
|
||||
match location.unpack() {
|
||||
(1, [Teyrchain(para_id), PalletInstance(index)]) =>
|
||||
return *para_id == ASSET_HUB_ID && *index == FRONTEND_PALLET_INDEX,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl snowbridge_pallet_system_v2::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type OutboundQueue = EthereumOutboundQueueV2;
|
||||
type InboundQueue = EthereumInboundQueueV2;
|
||||
type FrontendOrigin = EnsureXcm<AllowFromEthereumFrontend>;
|
||||
type WeightInfo = crate::weights::snowbridge_pallet_system_v2::WeightInfo<Runtime>;
|
||||
type GovernanceOrigin = EnsureRootWithSuccess<crate::AccountId, RootLocation>;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
type Helper = ();
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
pub mod benchmark_helpers {
|
||||
use crate::{
|
||||
bridge_to_ethereum_config::EthereumGatewayAddress, vec, EthereumBeaconClient, Runtime,
|
||||
RuntimeOrigin, System,
|
||||
};
|
||||
use codec::Encode;
|
||||
use pezframe_support::assert_ok;
|
||||
use hex_literal::hex;
|
||||
use snowbridge_beacon_primitives::BeaconHeader;
|
||||
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 snowbridge_pallet_inbound_queue_v2::BenchmarkHelper as InboundQueueBenchmarkHelperV2;
|
||||
use snowbridge_pallet_inbound_queue_v2_fixtures::register_token::make_register_token_message as make_register_token_message_v2;
|
||||
use snowbridge_pallet_outbound_queue_v2::BenchmarkHelper as OutboundQueueBenchmarkHelperV2;
|
||||
use pezsp_core::H256;
|
||||
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();
|
||||
System::set_storage(
|
||||
RuntimeOrigin::root(),
|
||||
vec![(
|
||||
EthereumGatewayAddress::key().to_vec(),
|
||||
hex!("EDa338E4dC46038493b885327842fD3E301CaB39").to_vec(),
|
||||
)],
|
||||
)
|
||||
.unwrap();
|
||||
message
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: snowbridge_pallet_inbound_queue_v2::Config> InboundQueueBenchmarkHelperV2<T> for Runtime {
|
||||
fn initialize_storage() -> EventFixture {
|
||||
let message = make_register_token_message_v2();
|
||||
|
||||
assert_ok!(EthereumBeaconClient::store_finalized_header(
|
||||
message.finalized_header,
|
||||
message.block_roots_root,
|
||||
));
|
||||
|
||||
message
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: snowbridge_pallet_outbound_queue_v2::Config> OutboundQueueBenchmarkHelperV2<T> for Runtime {
|
||||
fn initialize_storage(beacon_header: BeaconHeader, block_roots_root: H256) {
|
||||
EthereumBeaconClient::store_finalized_header(beacon_header, block_roots_root).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
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))
|
||||
}
|
||||
}
|
||||
|
||||
impl snowbridge_pallet_system_v2::BenchmarkHelper<RuntimeOrigin> for () {
|
||||
fn make_xcm_origin(location: Location) -> RuntimeOrigin {
|
||||
RuntimeOrigin::from(pezpallet_xcm::Origin::Xcm(location))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn bridge_hub_inbound_queue_pallet_index_is_correct() {
|
||||
assert_eq!(
|
||||
INBOUND_QUEUE_PALLET_INDEX_V1,
|
||||
<EthereumInboundQueue as pezframe_support::traits::PalletInfoAccess>::index() as u8
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn bridge_hub_inbound_v2_queue_pallet_index_is_correct() {
|
||||
assert_eq!(
|
||||
INBOUND_QUEUE_PALLET_INDEX_V2,
|
||||
<EthereumInboundQueueV2 as pezframe_support::traits::PalletInfoAccess>::index() as u8
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) mod migrations {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use snowbridge_core::TokenId;
|
||||
|
||||
#[pezframe_support::storage_alias]
|
||||
pub type OldNativeToForeignId<T: snowbridge_pallet_system::Config> = StorageMap<
|
||||
snowbridge_pallet_system::Pallet<T>,
|
||||
Blake2_128Concat,
|
||||
xcm::v4::Location,
|
||||
TokenId,
|
||||
OptionQuery,
|
||||
>;
|
||||
|
||||
/// One shot migration for NetworkId::Zagros to NetworkId::ByGenesis(ZAGROS_GENESIS_HASH)
|
||||
pub struct MigrationForXcmV5<T: snowbridge_pallet_system::Config>(core::marker::PhantomData<T>);
|
||||
impl<T: snowbridge_pallet_system::Config> pezframe_support::traits::OnRuntimeUpgrade
|
||||
for MigrationForXcmV5<T>
|
||||
{
|
||||
fn on_runtime_upgrade() -> Weight {
|
||||
let mut weight = T::DbWeight::get().reads(1);
|
||||
|
||||
let translate_zagros = |pre: xcm::v4::Location| -> Option<xcm::v5::Location> {
|
||||
weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 1));
|
||||
Some(xcm::v5::Location::try_from(pre).expect("valid location"))
|
||||
};
|
||||
snowbridge_pallet_system::ForeignToNativeId::<T>::translate_values(translate_zagros);
|
||||
|
||||
weight
|
||||
}
|
||||
}
|
||||
}
|
||||
+452
@@ -0,0 +1,452 @@
|
||||
// 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 BridgeHub with the Zagros flavor.
|
||||
|
||||
use crate::{
|
||||
bridge_common_config::BridgeRelayersInstance, weights, xcm_config::UniversalLocation,
|
||||
AccountId, Balance, Balances, BridgePezkuwichainMessages, PezkuwiXcm, Runtime, RuntimeEvent,
|
||||
RuntimeHoldReason, XcmOverBridgeHubPezkuwichain, XcmRouter, XcmpQueue,
|
||||
};
|
||||
use bp_messages::{
|
||||
source_chain::FromBridgedChainMessagesDeliveryProof,
|
||||
target_chain::FromBridgedChainMessagesProof, LegacyLaneId,
|
||||
};
|
||||
use bp_teyrchains::SingleParaStoredHeaderDataBuilder;
|
||||
use bridge_hub_common::xcm_version::XcmVersionOfDestAndRemoteBridge;
|
||||
use pezpallet_xcm_bridge_hub::{BridgeId, XcmAsPlainPayload};
|
||||
|
||||
use pezframe_support::{
|
||||
parameter_types,
|
||||
traits::{ConstU32, 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::zagros::currency::UNITS as ZGR;
|
||||
use teyrchains_common::xcm_config::{AllSiblingSystemTeyrchains, RelayOrOtherSystemTeyrchains};
|
||||
use xcm::{
|
||||
latest::{prelude::*, PEZKUWICHAIN_GENESIS_HASH},
|
||||
prelude::{InteriorLocation, NetworkId},
|
||||
};
|
||||
use xcm_builder::{BridgeBlobDispatcher, ParentIsPreset, SiblingTeyrchainConvertsVia};
|
||||
|
||||
parameter_types! {
|
||||
pub const RelayChainHeadersToKeep: u32 = 1024;
|
||||
pub const TeyrchainHeadsToKeep: u32 = 64;
|
||||
|
||||
pub const PezkuwichainBridgeTeyrchainPalletName: &'static str = "Paras";
|
||||
pub const MaxPezkuwichainParaHeadDataSize: u32 = bp_pezkuwichain::MAX_NESTED_TEYRCHAIN_HEAD_DATA_SIZE;
|
||||
|
||||
pub BridgeZagrosToPezkuwichainMessagesPalletInstance: InteriorLocation = [PalletInstance(<BridgePezkuwichainMessages as PalletInfoAccess>::index() as u8)].into();
|
||||
pub PezkuwichainGlobalConsensusNetwork: NetworkId = NetworkId::ByGenesis(PEZKUWICHAIN_GENESIS_HASH);
|
||||
pub PezkuwichainGlobalConsensusNetworkLocation: Location = Location::new(
|
||||
2,
|
||||
[GlobalConsensus(PezkuwichainGlobalConsensusNetwork::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 BridgeHubPezkuwichainLocation: Location = Location::new(
|
||||
2,
|
||||
[
|
||||
GlobalConsensus(PezkuwichainGlobalConsensusNetwork::get()),
|
||||
Teyrchain(<bp_bridge_hub_pezkuwichain::BridgeHubPezkuwichain as bp_runtime::Teyrchain>::TEYRCHAIN_ID)
|
||||
]
|
||||
);
|
||||
|
||||
pub storage BridgeDeposit: Balance = 10 * ZGR;
|
||||
pub storage DeliveryRewardInBalance: u64 = 1_000_000;
|
||||
}
|
||||
|
||||
/// Proof of messages, coming from Pezkuwichain.
|
||||
pub type FromPezkuwichainBridgeHubMessagesProof<MI> =
|
||||
FromBridgedChainMessagesProof<bp_bridge_hub_pezkuwichain::Hash, LaneIdOf<Runtime, MI>>;
|
||||
/// Messages delivery proof for Pezkuwichain Bridge Hub -> Zagros Bridge Hub messages.
|
||||
pub type ToPezkuwichainBridgeHubMessagesDeliveryProof<MI> =
|
||||
FromBridgedChainMessagesDeliveryProof<bp_bridge_hub_pezkuwichain::Hash, LaneIdOf<Runtime, MI>>;
|
||||
|
||||
/// Dispatches received XCM messages from other bridge
|
||||
type FromPezkuwichainMessageBlobDispatcher = BridgeBlobDispatcher<
|
||||
XcmRouter,
|
||||
UniversalLocation,
|
||||
BridgeZagrosToPezkuwichainMessagesPalletInstance,
|
||||
>;
|
||||
|
||||
/// Transaction extension that refunds relayers that are delivering messages from the Pezkuwichain
|
||||
/// teyrchain.
|
||||
pub type OnBridgeHubZagrosRefundBridgeHubPezkuwichainMessages = BridgeRelayersTransactionExtension<
|
||||
Runtime,
|
||||
WithMessagesExtensionConfig<
|
||||
StrOnBridgeHubZagrosRefundBridgeHubPezkuwichainMessages,
|
||||
Runtime,
|
||||
WithBridgeHubPezkuwichainMessagesInstance,
|
||||
BridgeRelayersInstance,
|
||||
PriorityBoostPerMessage,
|
||||
>,
|
||||
>;
|
||||
bp_runtime::generate_static_str_provider!(OnBridgeHubZagrosRefundBridgeHubPezkuwichainMessages);
|
||||
|
||||
/// Add GRANDPA bridge pallet to track Pezkuwichain relay chain.
|
||||
pub type BridgeGrandpaPezkuwichainInstance = pezpallet_bridge_grandpa::Instance1;
|
||||
impl pezpallet_bridge_grandpa::Config<BridgeGrandpaPezkuwichainInstance> for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type BridgedChain = bp_pezkuwichain::Pezkuwichain;
|
||||
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 Pezkuwichain BridgeHub teyrchain
|
||||
pub type BridgeTeyrchainPezkuwichainInstance = pezpallet_bridge_teyrchains::Instance1;
|
||||
impl pezpallet_bridge_teyrchains::Config<BridgeTeyrchainPezkuwichainInstance> for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type WeightInfo = weights::pezpallet_bridge_teyrchains::WeightInfo<Runtime>;
|
||||
type BridgesGrandpaPalletInstance = BridgeGrandpaPezkuwichainInstance;
|
||||
type ParasPalletName = PezkuwichainBridgeTeyrchainPalletName;
|
||||
type ParaStoredHeaderDataBuilder =
|
||||
SingleParaStoredHeaderDataBuilder<bp_bridge_hub_pezkuwichain::BridgeHubPezkuwichain>;
|
||||
type HeadsToKeep = TeyrchainHeadsToKeep;
|
||||
type MaxParaHeadDataSize = MaxPezkuwichainParaHeadDataSize;
|
||||
type OnNewHead = ();
|
||||
}
|
||||
|
||||
/// Add XCM messages support for BridgeHubZagros to support Zagros->Pezkuwichain XCM messages
|
||||
pub type WithBridgeHubPezkuwichainMessagesInstance = pezpallet_bridge_messages::Instance1;
|
||||
impl pezpallet_bridge_messages::Config<WithBridgeHubPezkuwichainMessagesInstance> for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type WeightInfo = weights::pezpallet_bridge_messages::WeightInfo<Runtime>;
|
||||
|
||||
type ThisChain = bp_bridge_hub_zagros::BridgeHubZagros;
|
||||
type BridgedChain = bp_bridge_hub_pezkuwichain::BridgeHubPezkuwichain;
|
||||
type BridgedHeaderChain = pezpallet_bridge_teyrchains::TeyrchainHeaders<
|
||||
Runtime,
|
||||
BridgeTeyrchainPezkuwichainInstance,
|
||||
bp_bridge_hub_pezkuwichain::BridgeHubPezkuwichain,
|
||||
>;
|
||||
|
||||
type OutboundPayload = XcmAsPlainPayload;
|
||||
type InboundPayload = XcmAsPlainPayload;
|
||||
type LaneId = LegacyLaneId;
|
||||
|
||||
type DeliveryPayments = ();
|
||||
type DeliveryConfirmationPayments = pezpallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
|
||||
Runtime,
|
||||
WithBridgeHubPezkuwichainMessagesInstance,
|
||||
BridgeRelayersInstance,
|
||||
DeliveryRewardInBalance,
|
||||
>;
|
||||
|
||||
type MessageDispatch = XcmOverBridgeHubPezkuwichain;
|
||||
type OnMessagesDelivered = XcmOverBridgeHubPezkuwichain;
|
||||
}
|
||||
|
||||
/// Add support for the export and dispatch of XCM programs.
|
||||
pub type XcmOverBridgeHubPezkuwichainInstance = pezpallet_xcm_bridge_hub::Instance1;
|
||||
impl pezpallet_xcm_bridge_hub::Config<XcmOverBridgeHubPezkuwichainInstance> for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
|
||||
type UniversalLocation = UniversalLocation;
|
||||
type BridgedNetwork = PezkuwichainGlobalConsensusNetworkLocation;
|
||||
type BridgeMessagesPalletInstance = WithBridgeHubPezkuwichainMessagesInstance;
|
||||
|
||||
type MessageExportPrice = ();
|
||||
type DestinationVersion =
|
||||
XcmVersionOfDestAndRemoteBridge<PezkuwiXcm, BridgeHubPezkuwichainLocation>;
|
||||
|
||||
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 = FromPezkuwichainMessageBlobDispatcher;
|
||||
}
|
||||
|
||||
/// 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_zagros::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_zagros::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::ZAGROS_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(ZAGROS_GENESIS_HASH)), Teyrchain(sibling_para_id)].into();
|
||||
let universal_destination =
|
||||
[GlobalConsensus(ByGenesis(PEZKUWICHAIN_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 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 * ZGR;
|
||||
|
||||
// see `FEE_BOOST_PER_MESSAGE` comment
|
||||
const FEE_BOOST_PER_RELAY_HEADER: Balance = 2 * ZGR;
|
||||
// see `FEE_BOOST_PER_MESSAGE` comment
|
||||
const FEE_BOOST_PER_TEYRCHAIN_HEADER: Balance = 2 * ZGR;
|
||||
|
||||
#[test]
|
||||
fn ensure_bridge_hub_zagros_message_lane_weights_are_correct() {
|
||||
check_message_lane_weights::<
|
||||
bp_bridge_hub_zagros::BridgeHubZagros,
|
||||
Runtime,
|
||||
WithBridgeHubPezkuwichainMessagesInstance,
|
||||
>(
|
||||
bp_bridge_hub_pezkuwichain::EXTRA_STORAGE_PROOF_SIZE,
|
||||
bp_bridge_hub_zagros::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX,
|
||||
bp_bridge_hub_zagros::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
|
||||
true,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ensure_bridge_integrity() {
|
||||
assert_complete_bridge_types!(
|
||||
runtime: Runtime,
|
||||
with_bridged_chain_messages_instance: WithBridgeHubPezkuwichainMessagesInstance,
|
||||
this_chain: bp_bridge_hub_zagros::BridgeHubZagros,
|
||||
bridged_chain: bp_bridge_hub_pezkuwichain::BridgeHubPezkuwichain,
|
||||
expected_payload_type: XcmAsPlainPayload,
|
||||
);
|
||||
|
||||
assert_complete_with_teyrchain_bridge_constants::<
|
||||
Runtime,
|
||||
BridgeGrandpaPezkuwichainInstance,
|
||||
WithBridgeHubPezkuwichainMessagesInstance,
|
||||
>(AssertCompleteBridgeConstants {
|
||||
this_chain_constants: AssertChainConstants {
|
||||
block_length: bp_bridge_hub_zagros::BlockLength::get(),
|
||||
block_weights: bp_bridge_hub_zagros::BlockWeightsForAsyncBacking::get(),
|
||||
},
|
||||
});
|
||||
|
||||
pezpallet_bridge_relayers::extension::per_relay_header::ensure_priority_boost_is_sane::<
|
||||
Runtime,
|
||||
BridgeGrandpaPezkuwichainInstance,
|
||||
PriorityBoostPerRelayHeader,
|
||||
>(FEE_BOOST_PER_RELAY_HEADER);
|
||||
|
||||
pezpallet_bridge_relayers::extension::per_teyrchain_header::ensure_priority_boost_is_sane::<
|
||||
Runtime,
|
||||
WithBridgeHubPezkuwichainMessagesInstance,
|
||||
bp_bridge_hub_pezkuwichain::BridgeHubPezkuwichain,
|
||||
PriorityBoostPerTeyrchainHeader,
|
||||
>(FEE_BOOST_PER_TEYRCHAIN_HEADER);
|
||||
|
||||
pezpallet_bridge_relayers::extension::per_message::ensure_priority_boost_is_sane::<
|
||||
Runtime,
|
||||
WithBridgeHubPezkuwichainMessagesInstance,
|
||||
PriorityBoostPerMessage,
|
||||
>(FEE_BOOST_PER_MESSAGE);
|
||||
|
||||
assert_eq!(
|
||||
BridgeZagrosToPezkuwichainMessagesPalletInstance::get(),
|
||||
[PalletInstance(
|
||||
bp_bridge_hub_zagros::WITH_BRIDGE_ZAGROS_TO_PEZKUWICHAIN_MESSAGES_PALLET_INDEX
|
||||
)]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Contains the migration for the AssetHubZagros<>AssetHubPezkuwichain bridge.
|
||||
pub mod migration {
|
||||
use super::*;
|
||||
use bp_messages::LegacyLaneId;
|
||||
|
||||
parameter_types! {
|
||||
pub AssetHubZagrosToAssetHubPezkuwichainMessagesLane: LegacyLaneId = LegacyLaneId([0, 0, 0, 2]);
|
||||
pub AssetHubZagrosLocation: Location = Location::new(1, [Teyrchain(bp_asset_hub_zagros::ASSET_HUB_ZAGROS_TEYRCHAIN_ID)]);
|
||||
pub AssetHubPezkuwichainUniversalLocation: InteriorLocation = [GlobalConsensus(PezkuwichainGlobalConsensusNetwork::get()), Teyrchain(bp_asset_hub_pezkuwichain::ASSET_HUB_PEZKUWICHAIN_TEYRCHAIN_ID)].into();
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
// 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 Zagros 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::zagros::xcm_version::SAFE_XCM_VERSION;
|
||||
use teyrchains_common::{AccountId, AuraId};
|
||||
use xcm::latest::PEZKUWICHAIN_GENESIS_HASH;
|
||||
|
||||
const BRIDGE_HUB_ZAGROS_ED: Balance = ExistentialDeposit::get();
|
||||
|
||||
fn bridge_hub_zagros_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_ZAGROS_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_pezkuwichain_grandpa: BridgePezkuwichainGrandpaConfig {
|
||||
owner: bridges_pallet_owner.clone()
|
||||
},
|
||||
bridge_pezkuwichain_messages: BridgePezkuwichainMessagesConfig {
|
||||
owner: bridges_pallet_owner.clone()
|
||||
},
|
||||
xcm_over_bridge_hub_pezkuwichain: XcmOverBridgeHubPezkuwichainConfig { 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_zagros_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(),
|
||||
Some(Sr25519Keyring::Bob.to_account_id()),
|
||||
zagros_runtime_constants::system_teyrchain::ASSET_HUB_ID.into(),
|
||||
vec![(
|
||||
Location::new(1, [Teyrchain(1000)]),
|
||||
Junctions::from([
|
||||
NetworkId::ByGenesis(PEZKUWICHAIN_GENESIS_HASH).into(),
|
||||
Teyrchain(1000),
|
||||
]),
|
||||
Some(bp_messages::LegacyLaneId([0, 0, 0, 2])),
|
||||
)],
|
||||
),
|
||||
pezsp_genesis_builder::DEV_RUNTIME_PRESET => bridge_hub_zagros_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(),
|
||||
Some(Sr25519Keyring::Bob.to_account_id()),
|
||||
zagros_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
+53
@@ -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."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
+53
@@ -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."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
+187
@@ -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: `d3b41be4aae8`, 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-zagros-runtime/bridge_hub_zagros_runtime.wasm
|
||||
// --pallet=pezframe_system
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
|
||||
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-zagros/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_178_000 picoseconds.
|
||||
Weight::from_parts(2_244_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 160
|
||||
.saturating_add(Weight::from_parts(14_306, 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: 6_036_000 picoseconds.
|
||||
Weight::from_parts(6_222_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 158
|
||||
.saturating_add(Weight::from_parts(15_685, 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_397_000 picoseconds.
|
||||
Weight::from_parts(3_773_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: 187_095_101_000 picoseconds.
|
||||
Weight::from_parts(188_881_403_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_242_000 picoseconds.
|
||||
Weight::from_parts(2_315_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 2_401
|
||||
.saturating_add(Weight::from_parts(742_265, 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_245_000 picoseconds.
|
||||
Weight::from_parts(2_332_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 1_328
|
||||
.saturating_add(Weight::from_parts(584_338, 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: `57 + p * (69 ±0)`
|
||||
// Estimated: `72 + p * (70 ±0)`
|
||||
// Minimum execution time: 4_350_000 picoseconds.
|
||||
Weight::from_parts(4_523_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 72))
|
||||
// Standard Error: 2_019
|
||||
.saturating_add(Weight::from_parts(1_365_289, 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: 16_101_000 picoseconds.
|
||||
Weight::from_parts(18_749_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: 193_693_012_000 picoseconds.
|
||||
Weight::from_parts(196_177_183_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1634))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
}
|
||||
+129
@@ -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: `d3b41be4aae8`, 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-zagros-runtime/bridge_hub_zagros_runtime.wasm
|
||||
// --pallet=pezframe_system_extensions
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
|
||||
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-zagros/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_352_000 picoseconds.
|
||||
Weight::from_parts(3_764_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_294_000 picoseconds.
|
||||
Weight::from_parts(6_780_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_335_000 picoseconds.
|
||||
Weight::from_parts(6_549_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: 513_000 picoseconds.
|
||||
Weight::from_parts(580_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: 6_889_000 picoseconds.
|
||||
Weight::from_parts(7_219_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: 400_000 picoseconds.
|
||||
Weight::from_parts(475_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: 393_000 picoseconds.
|
||||
Weight::from_parts(466_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: 3_879_000 picoseconds.
|
||||
Weight::from_parts(4_043_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_306_000 picoseconds.
|
||||
Weight::from_parts(2_402_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
// 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;
|
||||
pub mod pezpallet_bridge_relayers;
|
||||
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 xcm;
|
||||
|
||||
pub mod snowbridge_pallet_ethereum_client;
|
||||
pub mod snowbridge_pallet_inbound_queue;
|
||||
pub mod snowbridge_pallet_inbound_queue_v2;
|
||||
pub mod snowbridge_pallet_outbound_queue;
|
||||
pub mod snowbridge_pallet_outbound_queue_v2;
|
||||
pub mod snowbridge_pallet_system;
|
||||
pub mod snowbridge_pallet_system_v2;
|
||||
|
||||
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::WeightInfo::<Runtime>::slash_and_deregister()
|
||||
}
|
||||
}
|
||||
|
||||
impl MessagesWeightInfoExt for pezpallet_bridge_messages::WeightInfo<crate::Runtime> {
|
||||
fn expected_extra_storage_proof_size() -> u32 {
|
||||
bp_bridge_hub_pezkuwichain::EXTRA_STORAGE_PROOF_SIZE
|
||||
}
|
||||
|
||||
fn receive_messages_proof_overhead_from_runtime() -> Weight {
|
||||
pezpallet_bridge_relayers::WeightInfo::<Runtime>::receive_messages_proof_overhead_from_runtime(
|
||||
)
|
||||
}
|
||||
|
||||
fn receive_messages_delivery_proof_overhead_from_runtime() -> Weight {
|
||||
pezpallet_bridge_relayers::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_pezkuwichain::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::WeightInfo::<Runtime>::slash_and_deregister()
|
||||
}
|
||||
}
|
||||
+177
@@ -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: `d3b41be4aae8`, 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-zagros-runtime/bridge_hub_zagros_runtime.wasm
|
||||
// --pallet=pezpallet_balances
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
|
||||
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-zagros/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: 48_912_000 picoseconds.
|
||||
Weight::from_parts(50_405_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: 38_980_000 picoseconds.
|
||||
Weight::from_parts(40_805_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_204_000 picoseconds.
|
||||
Weight::from_parts(15_865_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_344_000 picoseconds.
|
||||
Weight::from_parts(23_028_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: 51_743_000 picoseconds.
|
||||
Weight::from_parts(53_248_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: 48_699_000 picoseconds.
|
||||
Weight::from_parts(50_185_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_501_000 picoseconds.
|
||||
Weight::from_parts(19_019_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_043_000 picoseconds.
|
||||
Weight::from_parts(17_394_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 990))
|
||||
// Standard Error: 13_625
|
||||
.saturating_add(Weight::from_parts(15_065_627, 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_266_000 picoseconds.
|
||||
Weight::from_parts(6_642_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: 30_706_000 picoseconds.
|
||||
Weight::from_parts(31_328_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: 21_073_000 picoseconds.
|
||||
Weight::from_parts(21_785_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
}
|
||||
+101
@@ -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: `d3b41be4aae8`, 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-zagros-runtime/bridge_hub_zagros_runtime.wasm
|
||||
// --pallet=pezpallet_bridge_grandpa
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
|
||||
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-zagros/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: `BridgePezkuwichainGrandpa::CurrentAuthoritySet` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainGrandpa::CurrentAuthoritySet` (`max_values`: Some(1), `max_size`: Some(50250), added: 50745, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainGrandpa::PalletOperatingMode` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainGrandpa::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainGrandpa::BestFinalized` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainGrandpa::BestFinalized` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainGrandpa::ImportedHashesPointer` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainGrandpa::ImportedHashesPointer` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainGrandpa::ImportedHashes` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainGrandpa::ImportedHashes` (`max_values`: Some(1024), `max_size`: Some(36), added: 1521, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainGrandpa::ImportedHeaders` (r:0 w:2)
|
||||
/// Proof: `BridgePezkuwichainGrandpa::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: 311_096_000 picoseconds.
|
||||
Weight::from_parts(331_488_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 51735))
|
||||
// Standard Error: 106_059
|
||||
.saturating_add(Weight::from_parts(47_243_244, 0).saturating_mul(p.into()))
|
||||
// Standard Error: 164_027
|
||||
.saturating_add(Weight::from_parts(3_116, 0).saturating_mul(v.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(5))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: `BridgePezkuwichainGrandpa::CurrentAuthoritySet` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainGrandpa::CurrentAuthoritySet` (`max_values`: Some(1), `max_size`: Some(50250), added: 50745, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainGrandpa::ImportedHashesPointer` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainGrandpa::ImportedHashesPointer` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainGrandpa::ImportedHashes` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainGrandpa::ImportedHashes` (`max_values`: Some(1024), `max_size`: Some(36), added: 1521, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainGrandpa::BestFinalized` (r:0 w:1)
|
||||
/// Proof: `BridgePezkuwichainGrandpa::BestFinalized` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainGrandpa::ImportedHeaders` (r:0 w:2)
|
||||
/// Proof: `BridgePezkuwichainGrandpa::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: 124_271_000 picoseconds.
|
||||
Weight::from_parts(138_136_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 51735))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(6))
|
||||
}
|
||||
}
|
||||
+268
@@ -0,0 +1,268 @@
|
||||
// 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: `d3b41be4aae8`, 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-zagros-runtime/bridge_hub_zagros_runtime.wasm
|
||||
// --pallet=pezpallet_bridge_messages
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
|
||||
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-zagros/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: `BridgePezkuwichainMessages::PalletOperatingMode` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainTeyrchains::ImportedParaHeads` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainMessages::InboundLanes` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmOverBridgeHubPezkuwichain::LaneToBridge` (r:1 w:0)
|
||||
/// Proof: `XcmOverBridgeHubPezkuwichain::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmOverBridgeHubPezkuwichain::Bridges` (r:1 w:0)
|
||||
/// Proof: `XcmOverBridgeHubPezkuwichain::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: `811`
|
||||
// Estimated: `52645`
|
||||
// Minimum execution time: 55_700_000 picoseconds.
|
||||
Weight::from_parts(56_364_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 52645))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `BridgePezkuwichainMessages::PalletOperatingMode` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainTeyrchains::ImportedParaHeads` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainMessages::InboundLanes` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmOverBridgeHubPezkuwichain::LaneToBridge` (r:1 w:0)
|
||||
/// Proof: `XcmOverBridgeHubPezkuwichain::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmOverBridgeHubPezkuwichain::Bridges` (r:1 w:0)
|
||||
/// Proof: `XcmOverBridgeHubPezkuwichain::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]`.
|
||||
fn receive_n_messages_proof(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `811`
|
||||
// Estimated: `52645`
|
||||
// Minimum execution time: 54_696_000 picoseconds.
|
||||
Weight::from_parts(55_372_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 52645))
|
||||
// Standard Error: 17_727
|
||||
.saturating_add(Weight::from_parts(10_564_530, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `BridgePezkuwichainMessages::PalletOperatingMode` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainTeyrchains::ImportedParaHeads` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainMessages::InboundLanes` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmOverBridgeHubPezkuwichain::LaneToBridge` (r:1 w:0)
|
||||
/// Proof: `XcmOverBridgeHubPezkuwichain::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmOverBridgeHubPezkuwichain::Bridges` (r:1 w:0)
|
||||
/// Proof: `XcmOverBridgeHubPezkuwichain::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: `811`
|
||||
// Estimated: `52645`
|
||||
// Minimum execution time: 61_046_000 picoseconds.
|
||||
Weight::from_parts(62_731_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 52645))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `BridgePezkuwichainMessages::PalletOperatingMode` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainTeyrchains::ImportedParaHeads` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainMessages::InboundLanes` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmOverBridgeHubPezkuwichain::LaneToBridge` (r:1 w:0)
|
||||
/// Proof: `XcmOverBridgeHubPezkuwichain::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmOverBridgeHubPezkuwichain::Bridges` (r:1 w:0)
|
||||
/// Proof: `XcmOverBridgeHubPezkuwichain::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]`.
|
||||
fn receive_single_n_bytes_message_proof(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `811`
|
||||
// Estimated: `52645`
|
||||
// Minimum execution time: 55_582_000 picoseconds.
|
||||
Weight::from_parts(56_404_952, 0)
|
||||
.saturating_add(Weight::from_parts(0, 52645))
|
||||
// Standard Error: 26
|
||||
.saturating_add(Weight::from_parts(2_259, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `BridgePezkuwichainMessages::PalletOperatingMode` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainTeyrchains::ImportedParaHeads` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainMessages::OutboundLanes` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainMessages::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(74), added: 2549, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmOverBridgeHubPezkuwichain::LaneToBridge` (r:1 w:0)
|
||||
/// Proof: `XcmOverBridgeHubPezkuwichain::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmOverBridgeHubPezkuwichain::Bridges` (r:1 w:0)
|
||||
/// Proof: `XcmOverBridgeHubPezkuwichain::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainMessages::OutboundMessages` (r:0 w:1)
|
||||
/// Proof: `BridgePezkuwichainMessages::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: `688`
|
||||
// Estimated: `5354`
|
||||
// Minimum execution time: 53_723_000 picoseconds.
|
||||
Weight::from_parts(58_193_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5354))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `BridgePezkuwichainMessages::PalletOperatingMode` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainTeyrchains::ImportedParaHeads` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainMessages::OutboundLanes` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainMessages::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(74), added: 2549, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmOverBridgeHubPezkuwichain::LaneToBridge` (r:1 w:0)
|
||||
/// Proof: `XcmOverBridgeHubPezkuwichain::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmOverBridgeHubPezkuwichain::Bridges` (r:1 w:0)
|
||||
/// Proof: `XcmOverBridgeHubPezkuwichain::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainMessages::OutboundMessages` (r:0 w:2)
|
||||
/// Proof: `BridgePezkuwichainMessages::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: `688`
|
||||
// Estimated: `5354`
|
||||
// Minimum execution time: 55_946_000 picoseconds.
|
||||
Weight::from_parts(60_222_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5354))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `BridgePezkuwichainMessages::PalletOperatingMode` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainTeyrchains::ImportedParaHeads` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainMessages::OutboundLanes` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainMessages::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(74), added: 2549, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmOverBridgeHubPezkuwichain::LaneToBridge` (r:1 w:0)
|
||||
/// Proof: `XcmOverBridgeHubPezkuwichain::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmOverBridgeHubPezkuwichain::Bridges` (r:1 w:0)
|
||||
/// Proof: `XcmOverBridgeHubPezkuwichain::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainMessages::OutboundMessages` (r:0 w:2)
|
||||
/// Proof: `BridgePezkuwichainMessages::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: `688`
|
||||
// Estimated: `6088`
|
||||
// Minimum execution time: 57_637_000 picoseconds.
|
||||
Weight::from_parts(60_138_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6088))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
/// Storage: `BridgePezkuwichainMessages::PalletOperatingMode` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainTeyrchains::ImportedParaHeads` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainMessages::InboundLanes` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmOverBridgeHubPezkuwichain::LaneToBridge` (r:1 w:0)
|
||||
/// Proof: `XcmOverBridgeHubPezkuwichain::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmOverBridgeHubPezkuwichain::Bridges` (r:1 w:0)
|
||||
/// Proof: `XcmOverBridgeHubPezkuwichain::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]`.
|
||||
fn receive_single_n_bytes_message_proof_with_dispatch(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `910`
|
||||
// Estimated: `52645`
|
||||
// Minimum execution time: 82_547_000 picoseconds.
|
||||
Weight::from_parts(86_333_123, 0)
|
||||
.saturating_add(Weight::from_parts(0, 52645))
|
||||
// Standard Error: 37
|
||||
.saturating_add(Weight::from_parts(7_417, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(10))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
}
|
||||
+133
@@ -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: `d3b41be4aae8`, 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-zagros-runtime/bridge_hub_zagros_runtime.wasm
|
||||
// --pallet=pezpallet_bridge_relayers
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
|
||||
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-zagros/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(74), added: 2549, 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: `245`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 53_074_000 picoseconds.
|
||||
Weight::from_parts(54_759_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: `97`
|
||||
// Estimated: `4714`
|
||||
// Minimum execution time: 28_995_000 picoseconds.
|
||||
Weight::from_parts(29_546_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: `197`
|
||||
// Estimated: `4714`
|
||||
// Minimum execution time: 29_628_000 picoseconds.
|
||||
Weight::from_parts(30_523_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: `197`
|
||||
// Estimated: `4714`
|
||||
// Minimum execution time: 23_510_000 picoseconds.
|
||||
Weight::from_parts(24_095_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(74), added: 2549, mode: `MaxEncodedLen`)
|
||||
fn register_relayer_reward() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `42`
|
||||
// Estimated: `3539`
|
||||
// Minimum execution time: 7_212_000 picoseconds.
|
||||
Weight::from_parts(7_552_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3539))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
// 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: `d3b41be4aae8`, 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-zagros-runtime/bridge_hub_zagros_runtime.wasm
|
||||
// --pallet=pezpallet_bridge_teyrchains
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
|
||||
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-zagros/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: `BridgePezkuwichainTeyrchains::PalletOperatingMode` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainGrandpa::ImportedHeaders` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainTeyrchains::ParasInfo` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainTeyrchains::ImportedParaHashes` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::ImportedParaHashes` (`max_values`: Some(64), `max_size`: Some(64), added: 1054, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainTeyrchains::ImportedParaHeads` (r:0 w:1)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::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: `83`
|
||||
// Estimated: `2543`
|
||||
// Minimum execution time: 35_560_000 picoseconds.
|
||||
Weight::from_parts(37_182_961, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2543))
|
||||
// Standard Error: 100_736
|
||||
.saturating_add(Weight::from_parts(42_669, 0).saturating_mul(p.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `BridgePezkuwichainTeyrchains::PalletOperatingMode` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainGrandpa::ImportedHeaders` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainTeyrchains::ParasInfo` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainTeyrchains::ImportedParaHashes` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::ImportedParaHashes` (`max_values`: Some(64), `max_size`: Some(64), added: 1054, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainTeyrchains::ImportedParaHeads` (r:0 w:1)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::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: `83`
|
||||
// Estimated: `2543`
|
||||
// Minimum execution time: 37_572_000 picoseconds.
|
||||
Weight::from_parts(38_392_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2543))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `BridgePezkuwichainTeyrchains::PalletOperatingMode` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainGrandpa::ImportedHeaders` (r:1 w:0)
|
||||
/// Proof: `BridgePezkuwichainGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainTeyrchains::ParasInfo` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::ParasInfo` (`max_values`: Some(1), `max_size`: Some(60), added: 555, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainTeyrchains::ImportedParaHashes` (r:1 w:1)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::ImportedParaHashes` (`max_values`: Some(64), `max_size`: Some(64), added: 1054, mode: `MaxEncodedLen`)
|
||||
/// Storage: `BridgePezkuwichainTeyrchains::ImportedParaHeads` (r:0 w:1)
|
||||
/// Proof: `BridgePezkuwichainTeyrchains::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: `83`
|
||||
// Estimated: `2543`
|
||||
// Minimum execution time: 66_029_000 picoseconds.
|
||||
Weight::from_parts(67_174_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2543))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
}
|
||||
+280
@@ -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: `d3b41be4aae8`, 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-zagros-runtime/bridge_hub_zagros_runtime.wasm
|
||||
// --pallet=pezpallet_collator_selection
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
|
||||
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-zagros/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_345_000 picoseconds.
|
||||
Weight::from_parts(11_862_735, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1187))
|
||||
// Standard Error: 12_319
|
||||
.saturating_add(Weight::from_parts(4_230_781, 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_294_000 picoseconds.
|
||||
Weight::from_parts(49_235_945, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6287))
|
||||
// Standard Error: 12_790
|
||||
.saturating_add(Weight::from_parts(104_675, 0).saturating_mul(b.into()))
|
||||
// Standard Error: 2_424
|
||||
.saturating_add(Weight::from_parts(234_273, 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_924_000 picoseconds.
|
||||
Weight::from_parts(12_933_696, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6287))
|
||||
// Standard Error: 3_794
|
||||
.saturating_add(Weight::from_parts(170_090, 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_275_000 picoseconds.
|
||||
Weight::from_parts(5_640_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_770_000 picoseconds.
|
||||
Weight::from_parts(11_110_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6287))
|
||||
// Standard Error: 181_568
|
||||
.saturating_add(Weight::from_parts(6_266_827, 0).saturating_mul(c.into()))
|
||||
// Standard Error: 181_568
|
||||
.saturating_add(Weight::from_parts(5_805_345, 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_285_000 picoseconds.
|
||||
Weight::from_parts(34_677_299, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6287))
|
||||
// Standard Error: 2_808
|
||||
.saturating_add(Weight::from_parts(194_680, 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_050_000 picoseconds.
|
||||
Weight::from_parts(48_181_698, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6287))
|
||||
// Standard Error: 2_929
|
||||
.saturating_add(Weight::from_parts(200_960, 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: 61_108_000 picoseconds.
|
||||
Weight::from_parts(67_081_844, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6287))
|
||||
// Standard Error: 3_575
|
||||
.saturating_add(Weight::from_parts(217_391, 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_384_000 picoseconds.
|
||||
Weight::from_parts(39_159_276, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6287))
|
||||
// Standard Error: 2_767
|
||||
.saturating_add(Weight::from_parts(182_385, 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: 44_929_000 picoseconds.
|
||||
Weight::from_parts(45_850_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_690_000 picoseconds.
|
||||
Weight::from_parts(23_056_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6287))
|
||||
// Standard Error: 318_663
|
||||
.saturating_add(Weight::from_parts(14_796_648, 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()))
|
||||
}
|
||||
}
|
||||
+200
@@ -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: `d3b41be4aae8`, 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-zagros-runtime/bridge_hub_zagros_runtime.wasm
|
||||
// --pallet=pezpallet_message_queue
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
|
||||
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-zagros/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: `223`
|
||||
// Estimated: `6212`
|
||||
// Minimum execution time: 13_830_000 picoseconds.
|
||||
Weight::from_parts(14_328_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: `218`
|
||||
// Estimated: `6212`
|
||||
// Minimum execution time: 12_871_000 picoseconds.
|
||||
Weight::from_parts(13_260_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: `6`
|
||||
// Estimated: `3601`
|
||||
// Minimum execution time: 4_292_000 picoseconds.
|
||||
Weight::from_parts(4_458_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: `72`
|
||||
// Estimated: `109014`
|
||||
// Minimum execution time: 6_548_000 picoseconds.
|
||||
Weight::from_parts(6_798_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: `72`
|
||||
// Estimated: `109014`
|
||||
// Minimum execution time: 6_556_000 picoseconds.
|
||||
Weight::from_parts(6_950_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: 308_810_000 picoseconds.
|
||||
Weight::from_parts(319_251_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: `171`
|
||||
// Estimated: `3601`
|
||||
// Minimum execution time: 7_977_000 picoseconds.
|
||||
Weight::from_parts(8_354_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: `161`
|
||||
// Estimated: `3601`
|
||||
// Minimum execution time: 6_540_000 picoseconds.
|
||||
Weight::from_parts(6_815_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: `105609`
|
||||
// Estimated: `109014`
|
||||
// Minimum execution time: 125_917_000 picoseconds.
|
||||
Weight::from_parts(128_071_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: `105609`
|
||||
// Estimated: `109014`
|
||||
// Minimum execution time: 153_980_000 picoseconds.
|
||||
Weight::from_parts(155_827_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: `105609`
|
||||
// Estimated: `109014`
|
||||
// Minimum execution time: 218_015_000 picoseconds.
|
||||
Weight::from_parts(221_619_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 109014))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
}
|
||||
+180
@@ -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-zagros-runtime/bridge_hub_zagros_runtime.wasm
|
||||
// --pallet=pezpallet_multisig
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
|
||||
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-zagros/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_093_000 picoseconds.
|
||||
Weight::from_parts(17_921_144, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 13
|
||||
.saturating_add(Weight::from_parts(351, 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: `296 + s * (2 ±0)`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 47_085_000 picoseconds.
|
||||
Weight::from_parts(34_986_291, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 1_770
|
||||
.saturating_add(Weight::from_parts(152_332, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 17
|
||||
.saturating_add(Weight::from_parts(1_863, 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: `315`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 32_003_000 picoseconds.
|
||||
Weight::from_parts(20_190_464, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 1_882
|
||||
.saturating_add(Weight::from_parts(135_952, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 18
|
||||
.saturating_add(Weight::from_parts(1_938, 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: `421 + s * (33 ±0)`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 55_297_000 picoseconds.
|
||||
Weight::from_parts(38_187_046, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 2_679
|
||||
.saturating_add(Weight::from_parts(239_841, 0).saturating_mul(s.into()))
|
||||
// Standard Error: 26
|
||||
.saturating_add(Weight::from_parts(2_089, 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: `296 + s * (2 ±0)`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 31_531_000 picoseconds.
|
||||
Weight::from_parts(33_472_349, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 1_885
|
||||
.saturating_add(Weight::from_parts(149_888, 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: `315`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 17_099_000 picoseconds.
|
||||
Weight::from_parts(17_601_456, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 1_042
|
||||
.saturating_add(Weight::from_parts(146_267, 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: `487 + s * (1 ±0)`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 31_776_000 picoseconds.
|
||||
Weight::from_parts(33_572_763, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 2_457
|
||||
.saturating_add(Weight::from_parts(202_712, 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: `487 + s * (1 ±0)`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 30_123_000 picoseconds.
|
||||
Weight::from_parts(32_415_361, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 2_652
|
||||
.saturating_add(Weight::from_parts(190_453, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
+81
@@ -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: `d3b41be4aae8`, 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-zagros-runtime/bridge_hub_zagros_runtime.wasm
|
||||
// --pallet=pezpallet_session
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
|
||||
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-zagros/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: 19_241_000 picoseconds.
|
||||
Weight::from_parts(19_640_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: 13_802_000 picoseconds.
|
||||
Weight::from_parts(14_291_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3744))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
}
|
||||
+75
@@ -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: `d3b41be4aae8`, 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-zagros-runtime/bridge_hub_zagros_runtime.wasm
|
||||
// --pallet=pezpallet_timestamp
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
|
||||
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-zagros/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_054_000 picoseconds.
|
||||
Weight::from_parts(8_430_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_662_000 picoseconds.
|
||||
Weight::from_parts(4_807_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
}
|
||||
+65
@@ -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: `d3b41be4aae8`, 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-zagros-runtime/bridge_hub_zagros_runtime.wasm
|
||||
// --pallet=pezpallet_transaction_payment
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
|
||||
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-zagros/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_010_000 picoseconds.
|
||||
Weight::from_parts(45_784_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
.saturating_add(T::DbWeight::get().reads(2))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
}
|
||||
+118
@@ -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: `d3b41be4aae8`, 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-zagros-runtime/bridge_hub_zagros_runtime.wasm
|
||||
// --pallet=pezpallet_utility
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
|
||||
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-zagros/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_267_000 picoseconds.
|
||||
Weight::from_parts(5_327_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 18_312
|
||||
.saturating_add(Weight::from_parts(5_340_880, 0).saturating_mul(c.into()))
|
||||
}
|
||||
fn as_derivative() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 4_914_000 picoseconds.
|
||||
Weight::from_parts(5_213_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_307_000 picoseconds.
|
||||
Weight::from_parts(5_596_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 18_745
|
||||
.saturating_add(Weight::from_parts(5_576_310, 0).saturating_mul(c.into()))
|
||||
}
|
||||
fn dispatch_as() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_289_000 picoseconds.
|
||||
Weight::from_parts(7_586_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_111_000 picoseconds.
|
||||
Weight::from_parts(5_330_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 18_524
|
||||
.saturating_add(Weight::from_parts(5_336_933, 0).saturating_mul(c.into()))
|
||||
}
|
||||
fn dispatch_as_fallible() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 7_184_000 picoseconds.
|
||||
Weight::from_parts(7_510_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: 8_979_000 picoseconds.
|
||||
Weight::from_parts(9_481_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
}
|
||||
+396
@@ -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-zagros-runtime/bridge_hub_zagros_runtime.wasm
|
||||
// --pallet=pezpallet_xcm
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
|
||||
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-zagros/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: `278`
|
||||
// Estimated: `3743`
|
||||
// Minimum execution time: 30_703_000 picoseconds.
|
||||
Weight::from_parts(32_412_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3743))
|
||||
.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: `347`
|
||||
// Estimated: `3812`
|
||||
// Minimum execution time: 122_307_000 picoseconds.
|
||||
Weight::from_parts(127_200_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3812))
|
||||
.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: `347`
|
||||
// Estimated: `3812`
|
||||
// Minimum execution time: 124_672_000 picoseconds.
|
||||
Weight::from_parts(128_089_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3812))
|
||||
.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_262_000 picoseconds.
|
||||
Weight::from_parts(10_680_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_220_000 picoseconds.
|
||||
Weight::from_parts(8_488_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_362_000 picoseconds.
|
||||
Weight::from_parts(2_581_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: `278`
|
||||
// Estimated: `3743`
|
||||
// Minimum execution time: 38_605_000 picoseconds.
|
||||
Weight::from_parts(39_672_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3743))
|
||||
.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: `437`
|
||||
// Estimated: `108971`
|
||||
// Minimum execution time: 42_845_000 picoseconds.
|
||||
Weight::from_parts(44_557_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_291_000 picoseconds.
|
||||
Weight::from_parts(2_502_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: 20_737_000 picoseconds.
|
||||
Weight::from_parts(21_126_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_628_000 picoseconds.
|
||||
Weight::from_parts(21_031_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: 25_598_000 picoseconds.
|
||||
Weight::from_parts(26_332_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: `221`
|
||||
// Estimated: `6161`
|
||||
// Minimum execution time: 35_870_000 picoseconds.
|
||||
Weight::from_parts(37_326_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6161))
|
||||
.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_228_000 picoseconds.
|
||||
Weight::from_parts(18_620_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_177_000 picoseconds.
|
||||
Weight::from_parts(20_853_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: `221`
|
||||
// Estimated: `16061`
|
||||
// Minimum execution time: 45_807_000 picoseconds.
|
||||
Weight::from_parts(47_096_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 16061))
|
||||
.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_652_000 picoseconds.
|
||||
Weight::from_parts(2_840_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_403_000 picoseconds.
|
||||
Weight::from_parts(27_979_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: 41_150_000 picoseconds.
|
||||
Weight::from_parts(41_900_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(121), added: 2596, mode: `MaxEncodedLen`)
|
||||
fn add_authorized_alias() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `161`
|
||||
// Estimated: `3626`
|
||||
// Minimum execution time: 51_582_000 picoseconds.
|
||||
Weight::from_parts(52_732_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(121), added: 2596, mode: `MaxEncodedLen`)
|
||||
fn remove_authorized_alias() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `517`
|
||||
// Estimated: `3982`
|
||||
// Minimum execution time: 51_921_000 picoseconds.
|
||||
Weight::from_parts(53_310_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_173_000 picoseconds.
|
||||
Weight::from_parts(8_364_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
}
|
||||
+63
@@ -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."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
+77
@@ -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: `d3b41be4aae8`, 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-zagros-runtime/bridge_hub_zagros_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-zagros/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: `12`
|
||||
// Estimated: `3601`
|
||||
// Minimum execution time: 2_335_000 picoseconds.
|
||||
Weight::from_parts(2_390_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3601))
|
||||
// Standard Error: 44_053
|
||||
.saturating_add(Weight::from_parts(353_908_674, 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())))
|
||||
}
|
||||
}
|
||||
+61
@@ -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: `d3b41be4aae8`, 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-zagros-runtime/bridge_hub_zagros_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-zagros/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: 3_944_000 picoseconds.
|
||||
Weight::from_parts(4_190_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
}
|
||||
+258
@@ -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-zagros-runtime/bridge_hub_zagros_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-zagros/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: `142`
|
||||
// Estimated: `1497`
|
||||
// Minimum execution time: 5_323_000 picoseconds.
|
||||
Weight::from_parts(5_553_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: `148`
|
||||
// Estimated: `5487`
|
||||
// Minimum execution time: 14_253_000 picoseconds.
|
||||
Weight::from_parts(9_710_247, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5487))
|
||||
// Standard Error: 7
|
||||
.saturating_add(Weight::from_parts(977, 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: `148`
|
||||
// Estimated: `5487`
|
||||
// Minimum execution time: 12_057_000 picoseconds.
|
||||
Weight::from_parts(16_879_007, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5487))
|
||||
// Standard Error: 186
|
||||
.saturating_add(Weight::from_parts(148_560, 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: `330 + n * (1 ±0)`
|
||||
// Estimated: `3793 + n * (1 ±0)`
|
||||
// Minimum execution time: 21_701_000 picoseconds.
|
||||
Weight::from_parts(13_042_218, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3793))
|
||||
// Standard Error: 11
|
||||
.saturating_add(Weight::from_parts(2_049, 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: `183`
|
||||
// Estimated: `5487`
|
||||
// Minimum execution time: 13_587_000 picoseconds.
|
||||
Weight::from_parts(13_780_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5487))
|
||||
// Standard Error: 76_544
|
||||
.saturating_add(Weight::from_parts(91_330_251, 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: `53063`
|
||||
// Estimated: `56528`
|
||||
// Minimum execution time: 274_744_000 picoseconds.
|
||||
Weight::from_parts(283_085_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 56528))
|
||||
.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: `142`
|
||||
// Estimated: `2767`
|
||||
// Minimum execution time: 3_318_000 picoseconds.
|
||||
Weight::from_parts(3_560_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: `177`
|
||||
// Estimated: `2767`
|
||||
// Minimum execution time: 4_724_000 picoseconds.
|
||||
Weight::from_parts(4_920_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_067_000 picoseconds.
|
||||
Weight::from_parts(2_441_904, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
// Standard Error: 126
|
||||
.saturating_add(Weight::from_parts(17_623, 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: `105713`
|
||||
// Estimated: `109178`
|
||||
// Minimum execution time: 179_516_000 picoseconds.
|
||||
Weight::from_parts(184_410_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 109178))
|
||||
.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: `65782`
|
||||
// Estimated: `69247`
|
||||
// Minimum execution time: 118_325_000 picoseconds.
|
||||
Weight::from_parts(121_904_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 69247))
|
||||
.saturating_add(T::DbWeight::get().reads(6))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
}
|
||||
+63
@@ -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."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
+126
@@ -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: `d3b41be4aae8`, 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-zagros-runtime/bridge_hub_zagros_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-zagros/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: `42`
|
||||
// Estimated: `3501`
|
||||
// Minimum execution time: 105_684_862_000 picoseconds.
|
||||
Weight::from_parts(105_818_568_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: `92738`
|
||||
// Estimated: `93857`
|
||||
// Minimum execution time: 27_295_666_000 picoseconds.
|
||||
Weight::from_parts(27_351_060_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: `92738`
|
||||
// Estimated: `93857`
|
||||
// Minimum execution time: 133_134_525_000 picoseconds.
|
||||
Weight::from_parts(133_396_722_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 93857))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
}
|
||||
+79
@@ -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: `d3b41be4aae8`, 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-zagros-runtime/bridge_hub_zagros_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-zagros/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: `657`
|
||||
// Estimated: `4122`
|
||||
// Minimum execution time: 167_375_000 picoseconds.
|
||||
Weight::from_parts(171_989_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4122))
|
||||
.saturating_add(T::DbWeight::get().reads(8))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
// 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_v2`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-03-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `Mac`, CPU: `<UNKNOWN>`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-zagros-dev")`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// ./target/release/pezkuwi-teyrchain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain
|
||||
// bridge-hub-zagros-dev
|
||||
// --pallet=snowbridge-pezpallet-inbound-queue-v2
|
||||
// --extrinsic=*
|
||||
// --wasm-execution=compiled
|
||||
// --output
|
||||
// pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-zagros/src/weights/snowbridge_pallet_inbound_queue_v2.rs
|
||||
|
||||
#![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_v2`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> snowbridge_pallet_inbound_queue_v2::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `EthereumInboundQueueV2::OperatingMode` (r:1 w:0)
|
||||
/// Proof: `EthereumInboundQueueV2::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: `EthereumInboundQueueV2::NonceBitmap` (r:1 w:1)
|
||||
/// Proof: `EthereumInboundQueueV2::NonceBitmap` (`max_values`: None, `max_size`: Some(40), added: 2515, 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: `BridgeRelayers::RelayerRewards` (r:1 w:1)
|
||||
/// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(74), added: 2549, mode: `MaxEncodedLen`)
|
||||
fn submit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `309`
|
||||
// Estimated: `3774`
|
||||
// Minimum execution time: 59_000_000 picoseconds.
|
||||
Weight::from_parts(60_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3774))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
}
|
||||
+93
@@ -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: `d3b41be4aae8`, 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-zagros-runtime/bridge_hub_zagros_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-zagros/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: 34_948_000 picoseconds.
|
||||
Weight::from_parts(35_561_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_045_000 picoseconds.
|
||||
Weight::from_parts(29_579_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_471_000 picoseconds.
|
||||
Weight::from_parts(9_940_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1549))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
}
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
// 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_v2`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
||||
//! DATE: 2025-03-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `yangdebijibendiannao.local`, CPU: `<UNKNOWN>`
|
||||
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// target/release/frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --runtime
|
||||
// target/release/wbuild/bridge-hub-zagros-runtime/bridge_hub_zagros_runtime.wasm
|
||||
// --pallet=snowbridge_pallet_outbound_queue_v2
|
||||
// --extrinsic
|
||||
// *
|
||||
// --header=./pezcumulus/file_header.txt
|
||||
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-zagros/src/weights
|
||||
// --wasm-execution=compiled
|
||||
// --extra
|
||||
|
||||
#![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_v2`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> snowbridge_pallet_outbound_queue_v2::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `EthereumOutboundQueueV2::MessageLeaves` (r:1 w:1)
|
||||
/// Proof: `EthereumOutboundQueueV2::MessageLeaves` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `EthereumOutboundQueueV2::Nonce` (r:1 w:1)
|
||||
/// Proof: `EthereumOutboundQueueV2::Nonce` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
|
||||
/// Storage: `EthereumOutboundQueueV2::Messages` (r:1 w:1)
|
||||
/// Proof: `EthereumOutboundQueueV2::Messages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `EthereumOutboundQueueV2::PendingOrders` (r:0 w:1)
|
||||
/// Proof: `EthereumOutboundQueueV2::PendingOrders` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
|
||||
fn do_process_message() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `42`
|
||||
// Estimated: `1527`
|
||||
// Minimum execution time: 18_000_000 picoseconds.
|
||||
Weight::from_parts(19_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1527))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
/// Storage: `EthereumOutboundQueueV2::MessageLeaves` (r:1 w:0)
|
||||
/// Proof: `EthereumOutboundQueueV2::MessageLeaves` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn commit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `1128`
|
||||
// Estimated: `2613`
|
||||
// Minimum execution time: 25_000_000 picoseconds.
|
||||
Weight::from_parts(26_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 2613))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
/// Storage: `EthereumOutboundQueueV2::MessageLeaves` (r:1 w:0)
|
||||
/// Proof: `EthereumOutboundQueueV2::MessageLeaves` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn commit_single() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `135`
|
||||
// Estimated: `1620`
|
||||
// Minimum execution time: 9_000_000 picoseconds.
|
||||
Weight::from_parts(10_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1620))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
}
|
||||
/// Storage: `EthereumOutboundQueueV2::MessageLeaves` (r:0 w:1)
|
||||
/// Proof: `EthereumOutboundQueueV2::MessageLeaves` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `EthereumOutboundQueueV2::Messages` (r:0 w:1)
|
||||
/// Proof: `EthereumOutboundQueueV2::Messages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn on_initialize() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 0_000 picoseconds.
|
||||
Weight::from_parts(1_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `EthereumOutboundQueueV2::Nonce` (r:1 w:1)
|
||||
/// Proof: `EthereumOutboundQueueV2::Nonce` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
|
||||
/// Storage: `EthereumOutboundQueueV2::PendingOrders` (r:0 w:32)
|
||||
/// Proof: `EthereumOutboundQueueV2::PendingOrders` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
|
||||
/// Storage: `EthereumOutboundQueueV2::MessageLeaves` (r:0 w:1)
|
||||
/// Proof: `EthereumOutboundQueueV2::MessageLeaves` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `EthereumOutboundQueueV2::Messages` (r:0 w:1)
|
||||
/// Proof: `EthereumOutboundQueueV2::Messages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn process() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `113`
|
||||
// Estimated: `1493`
|
||||
// Minimum execution time: 502_000_000 picoseconds.
|
||||
Weight::from_parts(521_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1493))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(35))
|
||||
}
|
||||
/// 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: `EthereumOutboundQueueV2::PendingOrders` (r:1 w:1)
|
||||
/// Proof: `EthereumOutboundQueueV2::PendingOrders` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
|
||||
fn submit_delivery_receipt() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `320`
|
||||
// Estimated: `3785`
|
||||
// Minimum execution time: 67_000_000 picoseconds.
|
||||
Weight::from_parts(68_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3785))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
+161
@@ -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: `d3b41be4aae8`, 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-zagros-runtime/bridge_hub_zagros_runtime.wasm
|
||||
// --pallet=snowbridge_pallet_system
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/pezcumulus/file_header.txt
|
||||
// --output=./pezcumulus/teyrchains/runtimes/bridge-hubs/bridge-hub-zagros/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: `218`
|
||||
// Estimated: `3601`
|
||||
// Minimum execution time: 38_129_000 picoseconds.
|
||||
Weight::from_parts(39_195_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: `218`
|
||||
// Estimated: `3601`
|
||||
// Minimum execution time: 29_658_000 picoseconds.
|
||||
Weight::from_parts(30_447_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: `218`
|
||||
// Estimated: `3601`
|
||||
// Minimum execution time: 34_149_000 picoseconds.
|
||||
Weight::from_parts(35_016_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: `218`
|
||||
// Estimated: `3601`
|
||||
// Minimum execution time: 31_403_000 picoseconds.
|
||||
Weight::from_parts(32_813_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: `293`
|
||||
// Estimated: `4115`
|
||||
// Minimum execution time: 55_903_000 picoseconds.
|
||||
Weight::from_parts(58_248_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 4115))
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(5))
|
||||
}
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
// 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_system`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2023-10-09, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! WORST CASE MAP SIZE: `1000000`
|
||||
//! HOSTNAME: `crake.local`, CPU: `<UNKNOWN>`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-pezkuwichain-dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
// target/release/pezkuwi-teyrchain
|
||||
// benchmark
|
||||
// pallet
|
||||
// --chain
|
||||
// bridge-hub-pezkuwichain-dev
|
||||
// --pallet=snowbridge_pallet_system
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --output
|
||||
// teyrchains/runtimes/bridge-hubs/bridge-hub-pezkuwichain/src/weights/snowbridge_pallet_system.rs
|
||||
|
||||
#![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_system`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: pezframe_system::Config> snowbridge_pallet_system_v2::WeightInfo for WeightInfo<T> {
|
||||
fn register_token() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `256`
|
||||
// Estimated: `6044`
|
||||
// Minimum execution time: 45_000_000 picoseconds.
|
||||
Weight::from_parts(45_000_000, 6044)
|
||||
.saturating_add(T::DbWeight::get().reads(5_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||
}
|
||||
|
||||
/// Storage: TeyrchainInfo TeyrchainId (r:1 w:0)
|
||||
/// Proof: TeyrchainInfo TeyrchainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
|
||||
/// Storage: EthereumOutboundQueue PalletOperatingMode (r:1 w:0)
|
||||
/// Proof: EthereumOutboundQueue PalletOperatingMode (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(52), added: 2527, mode: MaxEncodedLen)
|
||||
/// Storage: MessageQueue ServiceHead (r:1 w:1)
|
||||
/// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen)
|
||||
/// Storage: MessageQueue Pages (r:0 w:1)
|
||||
/// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen)
|
||||
fn upgrade() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `80`
|
||||
// Estimated: `3517`
|
||||
// Minimum execution time: 47_000_000 picoseconds.
|
||||
Weight::from_parts(47_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3517))
|
||||
.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: EthereumOutboundQueue PalletOperatingMode (r:1 w:0)
|
||||
/// Proof: EthereumOutboundQueue PalletOperatingMode (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(52), added: 2527, mode: MaxEncodedLen)
|
||||
/// Storage: MessageQueue ServiceHead (r:1 w:1)
|
||||
/// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen)
|
||||
/// Storage: MessageQueue Pages (r:0 w:1)
|
||||
/// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen)
|
||||
fn set_operating_mode() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `80`
|
||||
// Estimated: `3517`
|
||||
// Minimum execution time: 30_000_000 picoseconds.
|
||||
Weight::from_parts(30_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3517))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
|
||||
fn add_tip() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `80`
|
||||
// Estimated: `3517`
|
||||
// Minimum execution time: 30_000_000 picoseconds.
|
||||
Weight::from_parts(30_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3517))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,275 @@
|
||||
// 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.
|
||||
|
||||
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 BridgeHubZagrosXcmWeight<Call>(core::marker::PhantomData<Call>);
|
||||
impl<Call> XcmWeightInfo<Call> for BridgeHubZagrosXcmWeight<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 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 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 {
|
||||
XcmGeneric::<Runtime>::alias_origin()
|
||||
}
|
||||
fn unpaid_execution(_: &WeightLimit, _: &Option<Location>) -> Weight {
|
||||
XcmGeneric::<Runtime>::unpaid_execution()
|
||||
}
|
||||
fn execute_with_origin(_: &Option<InteriorLocation>, _: &Xcm<Call>) -> Weight {
|
||||
XcmGeneric::<Runtime>::execute_with_origin()
|
||||
}
|
||||
}
|
||||
+215
@@ -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-zagros-runtime/bridge_hub_zagros_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-zagros/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_500_000 picoseconds.
|
||||
Weight::from_parts(32_397_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: 43_635_000 picoseconds.
|
||||
Weight::from_parts(44_379_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: `448`
|
||||
// Estimated: `8799`
|
||||
// Minimum execution time: 120_562_000 picoseconds.
|
||||
Weight::from_parts(122_997_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: `448`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 84_735_000 picoseconds.
|
||||
Weight::from_parts(87_652_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_070_000 picoseconds.
|
||||
Weight::from_parts(3_223_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: 25_024_000 picoseconds.
|
||||
Weight::from_parts(25_685_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: `347`
|
||||
// Estimated: `3812`
|
||||
// Minimum execution time: 73_267_000 picoseconds.
|
||||
Weight::from_parts(75_053_000, 3812)
|
||||
.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: `347`
|
||||
// Estimated: `3812`
|
||||
// Minimum execution time: 51_130_000 picoseconds.
|
||||
Weight::from_parts(53_304_000, 3812)
|
||||
.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: `347`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 100_166_000 picoseconds.
|
||||
Weight::from_parts(103_298_000, 6196)
|
||||
.saturating_add(T::DbWeight::get().reads(7))
|
||||
.saturating_add(T::DbWeight::get().writes(4))
|
||||
}
|
||||
}
|
||||
+399
@@ -0,0 +1,399 @@
|
||||
// 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-zagros-runtime/bridge_hub_zagros_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-zagros/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: `448`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 84_814_000 picoseconds.
|
||||
Weight::from_parts(87_025_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_202_000 picoseconds.
|
||||
Weight::from_parts(4_408_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_150_000 picoseconds.
|
||||
Weight::from_parts(4_423_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_105_000 picoseconds.
|
||||
Weight::from_parts(1_152_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_078_000 picoseconds.
|
||||
Weight::from_parts(6_297_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_586_000 picoseconds.
|
||||
Weight::from_parts(8_908_000, 0)
|
||||
}
|
||||
pub fn refund_surplus() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 1_581_000 picoseconds.
|
||||
Weight::from_parts(1_705_000, 0)
|
||||
}
|
||||
pub fn set_error_handler() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 1_118_000 picoseconds.
|
||||
Weight::from_parts(1_166_000, 0)
|
||||
}
|
||||
pub fn set_appendix() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 1_096_000 picoseconds.
|
||||
Weight::from_parts(1_142_000, 0)
|
||||
}
|
||||
pub fn clear_error() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 1_049_000 picoseconds.
|
||||
Weight::from_parts(1_130_000, 0)
|
||||
}
|
||||
pub fn descend_origin() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 1_077_000 picoseconds.
|
||||
Weight::from_parts(1_140_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_097_000 picoseconds.
|
||||
Weight::from_parts(1_147_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: `448`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 79_156_000 picoseconds.
|
||||
Weight::from_parts(82_289_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_923_000 picoseconds.
|
||||
Weight::from_parts(10_220_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_814_000 picoseconds.
|
||||
Weight::from_parts(4_024_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: `278`
|
||||
// Estimated: `3743`
|
||||
// Minimum execution time: 33_105_000 picoseconds.
|
||||
Weight::from_parts(34_887_000, 3743)
|
||||
.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_587_000 picoseconds.
|
||||
Weight::from_parts(3_898_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_515_000 picoseconds.
|
||||
Weight::from_parts(1_600_000, 0)
|
||||
}
|
||||
pub fn expect_asset() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 1_156_000 picoseconds.
|
||||
Weight::from_parts(1_234_000, 0)
|
||||
}
|
||||
pub fn expect_origin() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_753_000 picoseconds.
|
||||
Weight::from_parts(3_974_000, 0)
|
||||
}
|
||||
pub fn expect_error() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 3_737_000 picoseconds.
|
||||
Weight::from_parts(3_893_000, 0)
|
||||
}
|
||||
pub fn expect_transact_status() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 1_178_000 picoseconds.
|
||||
Weight::from_parts(1_272_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: `448`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 86_480_000 picoseconds.
|
||||
Weight::from_parts(88_562_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_175_000 picoseconds.
|
||||
Weight::from_parts(5_346_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: `448`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 79_699_000 picoseconds.
|
||||
Weight::from_parts(82_168_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_119_000 picoseconds.
|
||||
Weight::from_parts(1_177_000, 0)
|
||||
}
|
||||
pub fn set_topic() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 1_104_000 picoseconds.
|
||||
Weight::from_parts(1_154_000, 0)
|
||||
}
|
||||
pub fn clear_topic() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 1_032_000 picoseconds.
|
||||
Weight::from_parts(1_105_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: `XcmOverBridgeHubPezkuwichain::Bridges` (r:1 w:0)
|
||||
// Proof: `XcmOverBridgeHubPezkuwichain::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: `BridgePezkuwichainMessages::PalletOperatingMode` (r:1 w:0)
|
||||
// Proof: `BridgePezkuwichainMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`)
|
||||
// Storage: `BridgePezkuwichainMessages::OutboundLanes` (r:1 w:1)
|
||||
// Proof: `BridgePezkuwichainMessages::OutboundLanes` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
|
||||
// Storage: `BridgePezkuwichainMessages::OutboundMessages` (r:0 w:1)
|
||||
// Proof: `BridgePezkuwichainMessages::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: `546`
|
||||
// Estimated: `6486`
|
||||
// Minimum execution time: 64_386_000 picoseconds.
|
||||
Weight::from_parts(66_478_537, 6486)
|
||||
// Standard Error: 399
|
||||
.saturating_add(Weight::from_parts(74_645, 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_044_000 picoseconds.
|
||||
Weight::from_parts(1_120_000, 0)
|
||||
}
|
||||
pub fn unpaid_execution() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 1_062_000 picoseconds.
|
||||
Weight::from_parts(1_106_000, 0)
|
||||
}
|
||||
pub fn alias_origin() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 1_078_000 picoseconds.
|
||||
Weight::from_parts(1_152_000, 0)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,320 @@
|
||||
// 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, XcmOverBridgeHubPezkuwichain, XcmpQueue,
|
||||
};
|
||||
use crate::bridge_to_ethereum_config::SnowbridgeFrontendLocation;
|
||||
use bridge_hub_common::DenyExportMessageFrom;
|
||||
use pezframe_support::{
|
||||
parameter_types,
|
||||
traits::{
|
||||
fungible::HoldConsideration, tokens::imbalance::ResolveTo, ConstU32, Contains, Equals,
|
||||
Everything, EverythingBut, 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::zagros::{
|
||||
locations::AssetHubLocation, snowbridge::EthereumNetwork,
|
||||
};
|
||||
use teyrchains_common::{
|
||||
xcm_config::{
|
||||
AllSiblingSystemTeyrchains, ConcreteAssetFromSystem, ParentRelayOrSiblingTeyrchains,
|
||||
RelayOrOtherSystemTeyrchains,
|
||||
},
|
||||
TREASURY_PALLET_ID,
|
||||
};
|
||||
use xcm::latest::{prelude::*, ZAGROS_GENESIS_HASH};
|
||||
use xcm_builder::{
|
||||
AccountId32Aliases, AliasChildLocation, AllowExplicitUnpaidExecutionFrom,
|
||||
AllowHrmpNotificationsFromRelayChain, AllowKnownQueryResponses, AllowSubscriptionsFrom,
|
||||
AllowTopLevelPaidExecutionFrom, DenyRecursively, DenyReserveTransferToRelayChain, DenyThenTry,
|
||||
DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, ExternalConsensusLocationsConverterFor,
|
||||
FrameTransactionalProcessor, FungibleAdapter, HashedDescription, IsConcrete,
|
||||
LocationAsSuperuser, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
|
||||
SendXcmFeeToAccount, SiblingTeyrchainAsNative, SiblingTeyrchainConvertsVia,
|
||||
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
|
||||
TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
|
||||
XcmFeeManagerFromComponents,
|
||||
};
|
||||
use xcm_executor::XcmExecutor;
|
||||
|
||||
// Re-export
|
||||
pub use testnet_teyrchains_constants::zagros::locations::GovernanceLocation;
|
||||
|
||||
parameter_types! {
|
||||
pub const RootLocation: Location = Location::here();
|
||||
pub const ZagrosLocation: Location = Location::parent();
|
||||
pub const RelayNetwork: NetworkId = NetworkId::ByGenesis(ZAGROS_GENESIS_HASH);
|
||||
pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
|
||||
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(zagros_runtime_constants::TREASURY_PALLET_ID)).into();
|
||||
}
|
||||
|
||||
/// 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<ZagrosLocation>,
|
||||
// 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 = (
|
||||
// Governance location can gain root.
|
||||
LocationAsSuperuser<Equals<GovernanceLocation>, RuntimeOrigin>,
|
||||
// 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 {
|
||||
let result = matches!(location.unpack(), (1, []) | (1, [Plurality { .. }]));
|
||||
tracing::trace!(target: "xcm::contains", ?location, ?result, "ParentOrParentsPlurality matches");
|
||||
result
|
||||
}
|
||||
}
|
||||
|
||||
pub type Barrier = TrailingSetTopicAsId<
|
||||
DenyThenTry<
|
||||
(
|
||||
DenyRecursively<DenyReserveTransferToRelayChain>,
|
||||
DenyRecursively<
|
||||
DenyExportMessageFrom<
|
||||
EverythingBut<Equals<AssetHubLocation>>,
|
||||
Equals<EthereumNetwork>,
|
||||
>,
|
||||
>,
|
||||
),
|
||||
(
|
||||
// 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) and relay treasury pallet
|
||||
// get free execution.
|
||||
AllowExplicitUnpaidExecutionFrom<(
|
||||
ParentOrParentsPlurality,
|
||||
Equals<RelayTreasuryLocation>,
|
||||
Equals<SnowbridgeFrontendLocation>,
|
||||
Equals<GovernanceLocation>,
|
||||
)>,
|
||||
// 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<ZagrosLocation>;
|
||||
|
||||
/// 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::BridgeHubZagrosXcmWeight<RuntimeCall>,
|
||||
RuntimeCall,
|
||||
MaxInstructions,
|
||||
>;
|
||||
type Trader = UsingComponents<
|
||||
WeightToFee,
|
||||
ZagrosLocation,
|
||||
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 = (
|
||||
XcmOverBridgeHubPezkuwichain,
|
||||
crate::bridge_to_ethereum_config::SnowbridgeExporterV2,
|
||||
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::BridgeHubZagrosXcmWeight<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>;
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
// 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_asset_hub_zagros::ASSET_HUB_ZAGROS_TEYRCHAIN_ID;
|
||||
use bp_bridge_hub_zagros::BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID;
|
||||
use bp_pezkuwi_core::Signature;
|
||||
use bridge_hub_zagros_runtime::{
|
||||
bridge_to_pezkuwichain_config, 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_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> {
|
||||
use pezsp_keyring::Sr25519Keyring::Alice;
|
||||
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(),
|
||||
BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
ASSET_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
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(),
|
||||
BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
ASSET_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
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(),
|
||||
BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
ASSET_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
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(),
|
||||
BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
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(),
|
||||
BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
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(),
|
||||
BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
ASSET_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
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 extra: 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(),
|
||||
(bridge_to_pezkuwichain_config::OnBridgeHubZagrosRefundBridgeHubPezkuwichainMessages::default(),),
|
||||
pezframe_metadata_hash_extension::CheckMetadataHash::<Runtime>::new(false),
|
||||
)
|
||||
.into();
|
||||
let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap();
|
||||
let signature = payload.using_encoded(|e| sender.sign(e));
|
||||
UncheckedExtrinsic::new_signed(call, account_id.into(), Signature::Sr25519(signature), extra)
|
||||
}
|
||||
|
||||
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()
|
||||
}
|
||||
@@ -0,0 +1,848 @@
|
||||
// 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 crate::bridge_common_config::BridgeRewardBeneficiaries;
|
||||
use bp_messages::LegacyLaneId;
|
||||
use bp_pezkuwi_core::Signature;
|
||||
use bp_relayers::{PayRewardFromAccount, RewardsAccountOwner, RewardsAccountParams};
|
||||
use bridge_common_config::{BridgeRelayersInstance, BridgeReward, RequiredStakeForStakeAndSlash};
|
||||
use bridge_hub_test_utils::{
|
||||
test_cases::{from_teyrchain, run_test},
|
||||
GovernanceOrigin, SlotDurations,
|
||||
};
|
||||
use bridge_hub_zagros_runtime::{
|
||||
bridge_common_config, bridge_to_pezkuwichain_config,
|
||||
bridge_to_pezkuwichain_config::PezkuwichainGlobalConsensusNetwork,
|
||||
xcm_config::{
|
||||
GovernanceLocation, LocationToAccountId, RelayNetwork, XcmConfig, ZagrosLocation,
|
||||
},
|
||||
AllPalletsWithoutSystem, Balances, Block, BridgeRejectObsoleteHeadersAndMessages,
|
||||
BridgeRelayers, Executive, ExistentialDeposit, PezkuwiXcm, Runtime, RuntimeCall, RuntimeEvent,
|
||||
RuntimeOrigin, SessionKeys, TeyrchainSystem, TransactionPayment, TxExtension,
|
||||
UncheckedExtrinsic,
|
||||
};
|
||||
use bridge_to_pezkuwichain_config::{
|
||||
BridgeGrandpaPezkuwichainInstance, BridgeHubPezkuwichainLocation,
|
||||
BridgeTeyrchainPezkuwichainInstance, DeliveryRewardInBalance,
|
||||
WithBridgeHubPezkuwichainMessagesInstance, XcmOverBridgeHubPezkuwichainInstance,
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use cumulus_primitives_core::UpwardMessageSender;
|
||||
use pezframe_support::{
|
||||
assert_err, assert_ok,
|
||||
dispatch::GetDispatchInfo,
|
||||
parameter_types,
|
||||
traits::{
|
||||
fungible::{Inspect, Mutate},
|
||||
ConstU8,
|
||||
},
|
||||
};
|
||||
use hex_literal::hex;
|
||||
use pezsp_consensus_aura::SlotDuration;
|
||||
use pezsp_core::crypto::Ss58Codec;
|
||||
use pezsp_keyring::Sr25519Keyring::{Alice, Bob};
|
||||
use pezsp_runtime::{
|
||||
generic::{Era, SignedPayload},
|
||||
AccountId32, Either, Perbill,
|
||||
};
|
||||
use testnet_teyrchains_constants::zagros::{consensus::*, fee::WeightToFee};
|
||||
use teyrchains_common::{AccountId, AuraId, Balance};
|
||||
use teyrchains_runtimes_test_utils::ExtBuilder;
|
||||
use xcm::{
|
||||
latest::{prelude::*, PEZKUWICHAIN_GENESIS_HASH, ZAGROS_GENESIS_HASH},
|
||||
VersionedLocation,
|
||||
};
|
||||
use xcm_runtime_apis::conversions::LocationToAccountHelper;
|
||||
|
||||
// Random para id of sibling chain used in tests.
|
||||
pub const SIBLING_TEYRCHAIN_ID: u32 = 2053;
|
||||
// Random para id of sibling chain used in tests.
|
||||
pub const SIBLING_SYSTEM_TEYRCHAIN_ID: u32 = 1008;
|
||||
// Random para id of bridged chain from different global consensus used in tests.
|
||||
pub const BRIDGED_LOCATION_TEYRCHAIN_ID: u32 = 1075;
|
||||
|
||||
parameter_types! {
|
||||
pub SiblingTeyrchainLocation: Location = Location::new(1, [Teyrchain(SIBLING_TEYRCHAIN_ID)]);
|
||||
pub SiblingSystemTeyrchainLocation: Location = Location::new(1, [Teyrchain(SIBLING_SYSTEM_TEYRCHAIN_ID)]);
|
||||
pub BridgedUniversalLocation: InteriorLocation = [GlobalConsensus(PezkuwichainGlobalConsensusNetwork::get()), Teyrchain(BRIDGED_LOCATION_TEYRCHAIN_ID)].into();
|
||||
pub Governance: GovernanceOrigin<RuntimeOrigin> = GovernanceOrigin::Location(GovernanceLocation::get());
|
||||
}
|
||||
|
||||
// Runtime from tests PoV
|
||||
type RuntimeTestsAdapter = from_teyrchain::WithRemoteTeyrchainHelperAdapter<
|
||||
Runtime,
|
||||
AllPalletsWithoutSystem,
|
||||
BridgeGrandpaPezkuwichainInstance,
|
||||
BridgeTeyrchainPezkuwichainInstance,
|
||||
WithBridgeHubPezkuwichainMessagesInstance,
|
||||
BridgeRelayersInstance,
|
||||
>;
|
||||
|
||||
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(),
|
||||
(bridge_to_pezkuwichain_config::OnBridgeHubZagrosRefundBridgeHubPezkuwichainMessages::default(),),
|
||||
pezframe_metadata_hash_extension::CheckMetadataHash::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(
|
||||
relayer_at_target: pezsp_keyring::Sr25519Keyring,
|
||||
call: RuntimeCall,
|
||||
) -> pezsp_runtime::DispatchOutcome {
|
||||
let xt = construct_extrinsic(relayer_at_target, call);
|
||||
let r = Executive::apply_extrinsic(xt);
|
||||
r.unwrap()
|
||||
}
|
||||
|
||||
fn construct_and_estimate_extrinsic_fee(call: RuntimeCall) -> Balance {
|
||||
let info = call.get_dispatch_info();
|
||||
let xt = construct_extrinsic(Alice, call);
|
||||
TransactionPayment::compute_fee(xt.encoded_size() as _, &info, 0)
|
||||
}
|
||||
|
||||
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()) },
|
||||
)
|
||||
}
|
||||
|
||||
fn slot_durations() -> SlotDurations {
|
||||
SlotDurations {
|
||||
relay: SlotDuration::from_millis(RELAY_CHAIN_SLOT_DURATION_MILLIS.into()),
|
||||
para: SlotDuration::from_millis(SLOT_DURATION),
|
||||
}
|
||||
}
|
||||
|
||||
bridge_hub_test_utils::test_cases::include_teleports_for_native_asset_works!(
|
||||
Runtime,
|
||||
AllPalletsWithoutSystem,
|
||||
XcmConfig,
|
||||
(),
|
||||
WeightToFee,
|
||||
TeyrchainSystem,
|
||||
collator_session_keys(),
|
||||
slot_durations(),
|
||||
ExistentialDeposit::get(),
|
||||
Box::new(|runtime_event_encoded: Vec<u8>| {
|
||||
match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) {
|
||||
Ok(RuntimeEvent::PezkuwiXcm(event)) => Some(event),
|
||||
_ => None,
|
||||
}
|
||||
}),
|
||||
bp_bridge_hub_zagros::BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID
|
||||
);
|
||||
|
||||
#[test]
|
||||
fn initialize_bridge_by_governance_works() {
|
||||
bridge_hub_test_utils::test_cases::initialize_bridge_by_governance_works::<
|
||||
Runtime,
|
||||
BridgeGrandpaPezkuwichainInstance,
|
||||
>(
|
||||
collator_session_keys(),
|
||||
bp_bridge_hub_zagros::BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
Governance::get(),
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn change_bridge_grandpa_pallet_mode_by_governance_works() {
|
||||
bridge_hub_test_utils::test_cases::change_bridge_grandpa_pallet_mode_by_governance_works::<
|
||||
Runtime,
|
||||
BridgeGrandpaPezkuwichainInstance,
|
||||
>(
|
||||
collator_session_keys(),
|
||||
bp_bridge_hub_zagros::BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
Governance::get(),
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn change_bridge_teyrchains_pallet_mode_by_governance_works() {
|
||||
bridge_hub_test_utils::test_cases::change_bridge_teyrchains_pallet_mode_by_governance_works::<
|
||||
Runtime,
|
||||
BridgeTeyrchainPezkuwichainInstance,
|
||||
>(
|
||||
collator_session_keys(),
|
||||
bp_bridge_hub_zagros::BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
Governance::get(),
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn change_bridge_messages_pallet_mode_by_governance_works() {
|
||||
bridge_hub_test_utils::test_cases::change_bridge_messages_pallet_mode_by_governance_works::<
|
||||
Runtime,
|
||||
WithBridgeHubPezkuwichainMessagesInstance,
|
||||
>(
|
||||
collator_session_keys(),
|
||||
bp_bridge_hub_zagros::BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
Governance::get(),
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn change_delivery_reward_by_governance_works() {
|
||||
bridge_hub_test_utils::test_cases::change_storage_constant_by_governance_works::<
|
||||
Runtime,
|
||||
DeliveryRewardInBalance,
|
||||
u64,
|
||||
>(
|
||||
collator_session_keys(),
|
||||
bp_bridge_hub_zagros::BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
Governance::get(),
|
||||
|| (DeliveryRewardInBalance::key().to_vec(), DeliveryRewardInBalance::get()),
|
||||
|old_value| old_value.checked_mul(2).unwrap(),
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn change_required_stake_by_governance_works() {
|
||||
bridge_hub_test_utils::test_cases::change_storage_constant_by_governance_works::<
|
||||
Runtime,
|
||||
RequiredStakeForStakeAndSlash,
|
||||
Balance,
|
||||
>(
|
||||
collator_session_keys(),
|
||||
bp_bridge_hub_zagros::BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
Governance::get(),
|
||||
|| (RequiredStakeForStakeAndSlash::key().to_vec(), RequiredStakeForStakeAndSlash::get()),
|
||||
|old_value| old_value.checked_mul(2).unwrap(),
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn handle_export_message_from_system_teyrchain_add_to_outbound_queue_works() {
|
||||
bridge_hub_test_utils::test_cases::handle_export_message_from_system_teyrchain_to_outbound_queue_works::<
|
||||
Runtime,
|
||||
XcmConfig,
|
||||
WithBridgeHubPezkuwichainMessagesInstance,
|
||||
>(
|
||||
collator_session_keys(),
|
||||
bp_bridge_hub_zagros::BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
SIBLING_TEYRCHAIN_ID,
|
||||
Box::new(|runtime_event_encoded: Vec<u8>| {
|
||||
match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) {
|
||||
Ok(RuntimeEvent::BridgePezkuwichainMessages(event)) => Some(event),
|
||||
_ => None,
|
||||
}
|
||||
}),
|
||||
|| ExportMessage { network: PezkuwichainGlobalConsensusNetwork::get(), destination: [Teyrchain(BRIDGED_LOCATION_TEYRCHAIN_ID)].into(), xcm: Xcm(vec![]) },
|
||||
Some((ZagrosLocation::get(), ExistentialDeposit::get()).into()),
|
||||
// value should be >= than value generated by `can_calculate_weight_for_paid_export_message_with_reserve_transfer`
|
||||
Some((ZagrosLocation::get(), bp_bridge_hub_zagros::BridgeHubZagrosBaseXcmFeeInWnds::get()).into()),
|
||||
|| {
|
||||
PezkuwiXcm::force_xcm_version(RuntimeOrigin::root(), Box::new(BridgeHubPezkuwichainLocation::get()), XCM_VERSION).expect("version saved!");
|
||||
|
||||
// we need to create lane between sibling teyrchain and remote destination
|
||||
bridge_hub_test_utils::ensure_opened_bridge::<
|
||||
Runtime,
|
||||
XcmOverBridgeHubPezkuwichainInstance,
|
||||
LocationToAccountId,
|
||||
ZagrosLocation,
|
||||
>(
|
||||
SiblingTeyrchainLocation::get(),
|
||||
BridgedUniversalLocation::get(),
|
||||
false,
|
||||
|locations, _fee| {
|
||||
bridge_hub_test_utils::open_bridge_with_storage::<
|
||||
Runtime, XcmOverBridgeHubPezkuwichainInstance
|
||||
>(locations, LegacyLaneId([0, 0, 0, 1]))
|
||||
}
|
||||
).1
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn message_dispatch_routing_works() {
|
||||
bridge_hub_test_utils::test_cases::message_dispatch_routing_works::<
|
||||
Runtime,
|
||||
AllPalletsWithoutSystem,
|
||||
XcmConfig,
|
||||
TeyrchainSystem,
|
||||
WithBridgeHubPezkuwichainMessagesInstance,
|
||||
RelayNetwork,
|
||||
bridge_to_pezkuwichain_config::PezkuwichainGlobalConsensusNetwork,
|
||||
ConstU8<2>,
|
||||
>(
|
||||
collator_session_keys(),
|
||||
slot_durations(),
|
||||
bp_bridge_hub_zagros::BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
SIBLING_TEYRCHAIN_ID,
|
||||
Box::new(|runtime_event_encoded: Vec<u8>| {
|
||||
match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) {
|
||||
Ok(RuntimeEvent::TeyrchainSystem(event)) => Some(event),
|
||||
_ => None,
|
||||
}
|
||||
}),
|
||||
Box::new(|runtime_event_encoded: Vec<u8>| {
|
||||
match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) {
|
||||
Ok(RuntimeEvent::XcmpQueue(event)) => Some(event),
|
||||
_ => None,
|
||||
}
|
||||
}),
|
||||
|| <TeyrchainSystem as UpwardMessageSender>::ensure_successful_delivery(),
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn relayed_incoming_message_works() {
|
||||
from_teyrchain::relayed_incoming_message_works::<RuntimeTestsAdapter>(
|
||||
collator_session_keys(),
|
||||
slot_durations(),
|
||||
bp_bridge_hub_zagros::BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
bp_bridge_hub_pezkuwichain::BRIDGE_HUB_PEZKUWICHAIN_TEYRCHAIN_ID,
|
||||
SIBLING_TEYRCHAIN_ID,
|
||||
ByGenesis(ZAGROS_GENESIS_HASH),
|
||||
|| {
|
||||
// we need to create lane between sibling teyrchain and remote destination
|
||||
bridge_hub_test_utils::ensure_opened_bridge::<
|
||||
Runtime,
|
||||
XcmOverBridgeHubPezkuwichainInstance,
|
||||
LocationToAccountId,
|
||||
ZagrosLocation,
|
||||
>(
|
||||
SiblingTeyrchainLocation::get(),
|
||||
BridgedUniversalLocation::get(),
|
||||
false,
|
||||
|locations, _fee| {
|
||||
bridge_hub_test_utils::open_bridge_with_storage::<
|
||||
Runtime,
|
||||
XcmOverBridgeHubPezkuwichainInstance,
|
||||
>(locations, LegacyLaneId([0, 0, 0, 1]))
|
||||
},
|
||||
)
|
||||
.1
|
||||
},
|
||||
construct_and_apply_extrinsic,
|
||||
true,
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn free_relay_extrinsic_works() {
|
||||
// from Pezkuwichain
|
||||
from_teyrchain::free_relay_extrinsic_works::<RuntimeTestsAdapter>(
|
||||
collator_session_keys(),
|
||||
slot_durations(),
|
||||
bp_bridge_hub_zagros::BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
bp_bridge_hub_pezkuwichain::BRIDGE_HUB_PEZKUWICHAIN_TEYRCHAIN_ID,
|
||||
SIBLING_TEYRCHAIN_ID,
|
||||
ByGenesis(ZAGROS_GENESIS_HASH),
|
||||
|| {
|
||||
// we need to create lane between sibling teyrchain and remote destination
|
||||
bridge_hub_test_utils::ensure_opened_bridge::<
|
||||
Runtime,
|
||||
XcmOverBridgeHubPezkuwichainInstance,
|
||||
LocationToAccountId,
|
||||
ZagrosLocation,
|
||||
>(
|
||||
SiblingTeyrchainLocation::get(),
|
||||
BridgedUniversalLocation::get(),
|
||||
false,
|
||||
|locations, _fee| {
|
||||
bridge_hub_test_utils::open_bridge_with_storage::<
|
||||
Runtime,
|
||||
XcmOverBridgeHubPezkuwichainInstance,
|
||||
>(locations, LegacyLaneId([0, 0, 0, 1]))
|
||||
},
|
||||
)
|
||||
.1
|
||||
},
|
||||
construct_and_apply_extrinsic,
|
||||
true,
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn can_calculate_weight_for_paid_export_message_with_reserve_transfer() {
|
||||
bridge_hub_test_utils::check_sane_fees_values(
|
||||
"bp_bridge_hub_zagros::BridgeHubZagrosBaseXcmFeeInWnds",
|
||||
bp_bridge_hub_zagros::BridgeHubZagrosBaseXcmFeeInWnds::get(),
|
||||
|| {
|
||||
bridge_hub_test_utils::test_cases::can_calculate_weight_for_paid_export_message_with_reserve_transfer::<
|
||||
Runtime,
|
||||
XcmConfig,
|
||||
WeightToFee,
|
||||
>()
|
||||
},
|
||||
Perbill::from_percent(33),
|
||||
Some(-33),
|
||||
&format!(
|
||||
"Estimate fee for `ExportMessage` for runtime: {:?}",
|
||||
<Runtime as pezframe_system::Config>::Version::get()
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn can_calculate_fee_for_standalone_message_delivery_transaction() {
|
||||
bridge_hub_test_utils::check_sane_fees_values(
|
||||
"bp_bridge_hub_zagros::BridgeHubZagrosBaseDeliveryFeeInWnds",
|
||||
bp_bridge_hub_zagros::BridgeHubZagrosBaseDeliveryFeeInWnds::get(),
|
||||
|| {
|
||||
from_teyrchain::can_calculate_fee_for_standalone_message_delivery_transaction::<
|
||||
RuntimeTestsAdapter,
|
||||
>(collator_session_keys(), construct_and_estimate_extrinsic_fee)
|
||||
},
|
||||
Perbill::from_percent(25),
|
||||
Some(-25),
|
||||
&format!(
|
||||
"Estimate fee for `single message delivery` for runtime: {:?}",
|
||||
<Runtime as pezframe_system::Config>::Version::get()
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn can_calculate_fee_for_standalone_message_confirmation_transaction() {
|
||||
bridge_hub_test_utils::check_sane_fees_values(
|
||||
"bp_bridge_hub_zagros::BridgeHubZagrosBaseConfirmationFeeInWnds",
|
||||
bp_bridge_hub_zagros::BridgeHubZagrosBaseConfirmationFeeInWnds::get(),
|
||||
|| {
|
||||
from_teyrchain::can_calculate_fee_for_standalone_message_confirmation_transaction::<
|
||||
RuntimeTestsAdapter,
|
||||
>(collator_session_keys(), construct_and_estimate_extrinsic_fee)
|
||||
},
|
||||
Perbill::from_percent(25),
|
||||
Some(-25),
|
||||
&format!(
|
||||
"Estimate fee for `single message confirmation` for runtime: {:?}",
|
||||
<Runtime as pezframe_system::Config>::Version::get()
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn location_conversion_works() {
|
||||
// the purpose of hardcoded values is to catch an unintended location conversion logic change.
|
||||
struct TestCase {
|
||||
description: &'static str,
|
||||
location: Location,
|
||||
expected_account_id_str: &'static str,
|
||||
}
|
||||
|
||||
let test_cases = vec![
|
||||
// DescribeTerminus
|
||||
TestCase {
|
||||
description: "DescribeTerminus Parent",
|
||||
location: Location::new(1, Here),
|
||||
expected_account_id_str: "5Dt6dpkWPwLaH4BBCKJwjiWrFVAGyYk3tLUabvyn4v7KtESG",
|
||||
},
|
||||
TestCase {
|
||||
description: "DescribeTerminus Sibling",
|
||||
location: Location::new(1, [Teyrchain(1111)]),
|
||||
expected_account_id_str: "5Eg2fnssmmJnF3z1iZ1NouAuzciDaaDQH7qURAy3w15jULDk",
|
||||
},
|
||||
// DescribePalletTerminal
|
||||
TestCase {
|
||||
description: "DescribePalletTerminal Parent",
|
||||
location: Location::new(1, [PalletInstance(50)]),
|
||||
expected_account_id_str: "5CnwemvaAXkWFVwibiCvf2EjqwiqBi29S5cLLydZLEaEw6jZ",
|
||||
},
|
||||
TestCase {
|
||||
description: "DescribePalletTerminal Sibling",
|
||||
location: Location::new(1, [Teyrchain(1111), PalletInstance(50)]),
|
||||
expected_account_id_str: "5GFBgPjpEQPdaxEnFirUoa51u5erVx84twYxJVuBRAT2UP2g",
|
||||
},
|
||||
// DescribeAccountId32Terminal
|
||||
TestCase {
|
||||
description: "DescribeAccountId32Terminal Parent",
|
||||
location: Location::new(
|
||||
1,
|
||||
[Junction::AccountId32 { network: None, id: AccountId::from(Alice).into() }],
|
||||
),
|
||||
expected_account_id_str: "5EueAXd4h8u75nSbFdDJbC29cmi4Uo1YJssqEL9idvindxFL",
|
||||
},
|
||||
TestCase {
|
||||
description: "DescribeAccountId32Terminal Sibling",
|
||||
location: Location::new(
|
||||
1,
|
||||
[
|
||||
Teyrchain(1111),
|
||||
Junction::AccountId32 { network: None, id: AccountId::from(Alice).into() },
|
||||
],
|
||||
),
|
||||
expected_account_id_str: "5Dmbuiq48fU4iW58FKYqoGbbfxFHjbAeGLMtjFg6NNCw3ssr",
|
||||
},
|
||||
// DescribeAccountKey20Terminal
|
||||
TestCase {
|
||||
description: "DescribeAccountKey20Terminal Parent",
|
||||
location: Location::new(1, [AccountKey20 { network: None, key: [0u8; 20] }]),
|
||||
expected_account_id_str: "5F5Ec11567pa919wJkX6VHtv2ZXS5W698YCW35EdEbrg14cg",
|
||||
},
|
||||
TestCase {
|
||||
description: "DescribeAccountKey20Terminal Sibling",
|
||||
location: Location::new(
|
||||
1,
|
||||
[Teyrchain(1111), AccountKey20 { network: None, key: [0u8; 20] }],
|
||||
),
|
||||
expected_account_id_str: "5CB2FbUds2qvcJNhDiTbRZwiS3trAy6ydFGMSVutmYijpPAg",
|
||||
},
|
||||
// DescribeTreasuryVoiceTerminal
|
||||
TestCase {
|
||||
description: "DescribeTreasuryVoiceTerminal Parent",
|
||||
location: Location::new(1, [Plurality { id: BodyId::Treasury, part: BodyPart::Voice }]),
|
||||
expected_account_id_str: "5CUjnE2vgcUCuhxPwFoQ5r7p1DkhujgvMNDHaF2bLqRp4D5F",
|
||||
},
|
||||
TestCase {
|
||||
description: "DescribeTreasuryVoiceTerminal Sibling",
|
||||
location: Location::new(
|
||||
1,
|
||||
[Teyrchain(1111), Plurality { id: BodyId::Treasury, part: BodyPart::Voice }],
|
||||
),
|
||||
expected_account_id_str: "5G6TDwaVgbWmhqRUKjBhRRnH4ry9L9cjRymUEmiRsLbSE4gB",
|
||||
},
|
||||
// DescribeBodyTerminal
|
||||
TestCase {
|
||||
description: "DescribeBodyTerminal Parent",
|
||||
location: Location::new(1, [Plurality { id: BodyId::Unit, part: BodyPart::Voice }]),
|
||||
expected_account_id_str: "5EBRMTBkDisEXsaN283SRbzx9Xf2PXwUxxFCJohSGo4jYe6B",
|
||||
},
|
||||
TestCase {
|
||||
description: "DescribeBodyTerminal Sibling",
|
||||
location: Location::new(
|
||||
1,
|
||||
[Teyrchain(1111), Plurality { id: BodyId::Unit, part: BodyPart::Voice }],
|
||||
),
|
||||
expected_account_id_str: "5DBoExvojy8tYnHgLL97phNH975CyT45PWTZEeGoBZfAyRMH",
|
||||
},
|
||||
// ExternalConsensusLocationsConverterFor
|
||||
TestCase {
|
||||
description: "Describe Ethereum Location",
|
||||
location: Location::new(2, [GlobalConsensus(Ethereum { chain_id: 11155111 })]),
|
||||
expected_account_id_str: "5GjRnmh5o3usSYzVmsxBWzHEpvJyHK4tKNPhjpUR3ASrruBy",
|
||||
},
|
||||
TestCase {
|
||||
description: "Describe Ethereum AccountKey",
|
||||
location: Location::new(
|
||||
2,
|
||||
[
|
||||
GlobalConsensus(Ethereum { chain_id: 11155111 }),
|
||||
AccountKey20 {
|
||||
network: None,
|
||||
key: hex!("87d1f7fdfEe7f651FaBc8bFCB6E086C278b77A7d"),
|
||||
},
|
||||
],
|
||||
),
|
||||
expected_account_id_str: "5HV4j4AsqT349oLRZmTjhGKDofPBWmWaPUfWGaRkuvzkjW9i",
|
||||
},
|
||||
TestCase {
|
||||
description: "Describe Pezkuwichain Location",
|
||||
location: Location::new(2, [GlobalConsensus(ByGenesis(PEZKUWICHAIN_GENESIS_HASH))]),
|
||||
expected_account_id_str: "5FfpYGrFybJXFsQk7dabr1vEbQ5ycBBu85vrDjPJsF3q4A8P",
|
||||
},
|
||||
TestCase {
|
||||
description: "Describe Pezkuwichain AccountID",
|
||||
location: Location::new(
|
||||
2,
|
||||
[
|
||||
GlobalConsensus(ByGenesis(PEZKUWICHAIN_GENESIS_HASH)),
|
||||
xcm::prelude::AccountId32 { network: None, id: AccountId::from(Alice).into() },
|
||||
],
|
||||
),
|
||||
expected_account_id_str: "5CYn32qPAc8FpQP55Br6AS2ZKhfCHD8Tt3v4CnCZo1rhDPd4",
|
||||
},
|
||||
TestCase {
|
||||
description: "Describe Pezkuwichain AccountKey",
|
||||
location: Location::new(
|
||||
2,
|
||||
[
|
||||
GlobalConsensus(ByGenesis(PEZKUWICHAIN_GENESIS_HASH)),
|
||||
AccountKey20 { network: None, key: [0u8; 20] },
|
||||
],
|
||||
),
|
||||
expected_account_id_str: "5GbRhbJWb2hZY7TCeNvTqZXaP3x3UY5xt4ccxpV1ZtJS1gFL",
|
||||
},
|
||||
TestCase {
|
||||
description: "Describe Pezkuwichain Treasury Plurality",
|
||||
location: Location::new(
|
||||
2,
|
||||
[
|
||||
GlobalConsensus(ByGenesis(PEZKUWICHAIN_GENESIS_HASH)),
|
||||
Plurality { id: BodyId::Treasury, part: BodyPart::Voice },
|
||||
],
|
||||
),
|
||||
expected_account_id_str: "5EGi9NgJNGoMawY8ubnCDLmbdEW6nt2W2U2G3j9E3jXmspT7",
|
||||
},
|
||||
TestCase {
|
||||
description: "Describe Pezkuwichain Teyrchain Location",
|
||||
location: Location::new(
|
||||
2,
|
||||
[GlobalConsensus(ByGenesis(PEZKUWICHAIN_GENESIS_HASH)), Teyrchain(1000)],
|
||||
),
|
||||
expected_account_id_str: "5CQeLKM7XC1xNBiQLp26Wa948cudjYRD5VzvaTG3BjnmUvLL",
|
||||
},
|
||||
TestCase {
|
||||
description: "Describe Pezkuwichain Teyrchain AccountID",
|
||||
location: Location::new(
|
||||
2,
|
||||
[
|
||||
GlobalConsensus(ByGenesis(PEZKUWICHAIN_GENESIS_HASH)),
|
||||
Teyrchain(1000),
|
||||
xcm::prelude::AccountId32 { network: None, id: AccountId::from(Alice).into() },
|
||||
],
|
||||
),
|
||||
expected_account_id_str: "5CWnqmyXccGPg27BTxGmycvdEs5HvQq2FQY61xsS8H7uAvmW",
|
||||
},
|
||||
TestCase {
|
||||
description: "Describe Pezkuwichain Teyrchain AccountKey",
|
||||
location: Location::new(
|
||||
2,
|
||||
[
|
||||
GlobalConsensus(ByGenesis(PEZKUWICHAIN_GENESIS_HASH)),
|
||||
Teyrchain(1000),
|
||||
AccountKey20 { network: None, key: [0u8; 20] },
|
||||
],
|
||||
),
|
||||
expected_account_id_str: "5G121Rtddxn6zwMD2rZZGXxFHZ2xAgzFUgM9ki4A8wMGo4e2",
|
||||
},
|
||||
TestCase {
|
||||
description: "Describe Pezkuwichain Teyrchain Treasury Plurality",
|
||||
location: Location::new(
|
||||
2,
|
||||
[
|
||||
GlobalConsensus(ByGenesis(PEZKUWICHAIN_GENESIS_HASH)),
|
||||
Teyrchain(1000),
|
||||
Plurality { id: BodyId::Treasury, part: BodyPart::Voice },
|
||||
],
|
||||
),
|
||||
expected_account_id_str: "5FNk7za2pQ71NHnN1jA63hJxJwdQywiVGnK6RL3nYjCdkWDF",
|
||||
},
|
||||
TestCase {
|
||||
description: "Describe Pezkuwichain USDT Location",
|
||||
location: Location::new(
|
||||
2,
|
||||
[
|
||||
GlobalConsensus(ByGenesis(PEZKUWICHAIN_GENESIS_HASH)),
|
||||
Teyrchain(1000),
|
||||
PalletInstance(50),
|
||||
GeneralIndex(1984),
|
||||
],
|
||||
),
|
||||
expected_account_id_str: "5HNfT779KHeAL7PaVBTQDVxrT6dfJZJoQMTScxLSahBc9kxF",
|
||||
},
|
||||
];
|
||||
|
||||
ExtBuilder::<Runtime>::default()
|
||||
.with_collators(collator_session_keys().collators())
|
||||
.with_session_keys(collator_session_keys().session_keys())
|
||||
.with_para_id(1000.into())
|
||||
.build()
|
||||
.execute_with(|| {
|
||||
for tc in test_cases {
|
||||
let expected = AccountId::from_string(tc.expected_account_id_str)
|
||||
.expect("Invalid AccountId string");
|
||||
|
||||
let got =
|
||||
LocationToAccountHelper::<AccountId, LocationToAccountId>::convert_location(
|
||||
tc.location.into(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(got, expected, "{}", tc.description);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn xcm_payment_api_works() {
|
||||
teyrchains_runtimes_test_utils::test_cases::xcm_payment_api_with_native_token_works::<
|
||||
Runtime,
|
||||
RuntimeCall,
|
||||
RuntimeOrigin,
|
||||
Block,
|
||||
WeightToFee,
|
||||
>();
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn bridge_rewards_works() {
|
||||
run_test::<Runtime, _>(
|
||||
collator_session_keys(),
|
||||
bp_bridge_hub_zagros::BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID,
|
||||
vec![],
|
||||
|| {
|
||||
// reward in WNDs
|
||||
let reward1: u128 = 2_000_000_000;
|
||||
// reward in WETH
|
||||
let reward2: u128 = 3_000_000_000;
|
||||
|
||||
// prepare accounts
|
||||
let account1 = AccountId32::from(Alice);
|
||||
let account2 = AccountId32::from(Bob);
|
||||
let reward1_for = RewardsAccountParams::new(
|
||||
LegacyLaneId([1; 4]),
|
||||
*b"test",
|
||||
RewardsAccountOwner::ThisChain,
|
||||
);
|
||||
let expected_reward1_account =
|
||||
PayRewardFromAccount::<(), AccountId, LegacyLaneId, ()>::rewards_account(
|
||||
reward1_for,
|
||||
);
|
||||
assert_ok!(Balances::mint_into(&expected_reward1_account, ExistentialDeposit::get()));
|
||||
assert_ok!(Balances::mint_into(&expected_reward1_account, reward1.into()));
|
||||
assert_ok!(Balances::mint_into(&account1, ExistentialDeposit::get()));
|
||||
// To pay for delivery to AH when claiming the reward on BH
|
||||
assert_ok!(Balances::mint_into(&account2, ExistentialDeposit::get() * 10000));
|
||||
|
||||
// register rewards
|
||||
use bp_relayers::RewardLedger;
|
||||
BridgeRelayers::register_reward(&account1, BridgeReward::from(reward1_for), reward1);
|
||||
BridgeRelayers::register_reward(&account2, BridgeReward::Snowbridge, reward2);
|
||||
|
||||
// check stored rewards
|
||||
assert_eq!(
|
||||
BridgeRelayers::relayer_reward(&account1, BridgeReward::from(reward1_for)),
|
||||
Some(reward1)
|
||||
);
|
||||
assert_eq!(BridgeRelayers::relayer_reward(&account1, BridgeReward::Snowbridge), None,);
|
||||
assert_eq!(
|
||||
BridgeRelayers::relayer_reward(&account2, BridgeReward::Snowbridge),
|
||||
Some(reward2),
|
||||
);
|
||||
assert_eq!(
|
||||
BridgeRelayers::relayer_reward(&account2, BridgeReward::from(reward1_for)),
|
||||
None,
|
||||
);
|
||||
|
||||
// claim rewards
|
||||
assert_ok!(BridgeRelayers::claim_rewards(
|
||||
RuntimeOrigin::signed(account1.clone()),
|
||||
reward1_for.into()
|
||||
));
|
||||
assert_eq!(Balances::total_balance(&account1), ExistentialDeposit::get() + reward1);
|
||||
assert_eq!(
|
||||
BridgeRelayers::relayer_reward(&account1, BridgeReward::from(reward1_for)),
|
||||
None,
|
||||
);
|
||||
|
||||
// already claimed
|
||||
assert_err!(
|
||||
BridgeRelayers::claim_rewards(
|
||||
RuntimeOrigin::signed(account1.clone()),
|
||||
reward1_for.into()
|
||||
),
|
||||
pezpallet_bridge_relayers::Error::<Runtime, BridgeRelayersInstance>::NoRewardForRelayer
|
||||
);
|
||||
|
||||
// Local account claiming is not supported for Snowbridge
|
||||
assert_err!(
|
||||
BridgeRelayers::claim_rewards(
|
||||
RuntimeOrigin::signed(account2.clone()),
|
||||
BridgeReward::Snowbridge
|
||||
),
|
||||
pezpallet_bridge_relayers::Error::<Runtime, BridgeRelayersInstance>::FailedToPayReward
|
||||
);
|
||||
|
||||
let claim_location = VersionedLocation::V5(Location::new(
|
||||
1,
|
||||
[
|
||||
Teyrchain(1000),
|
||||
xcm::latest::Junction::AccountId32 {
|
||||
id: account2.clone().into(),
|
||||
network: None,
|
||||
},
|
||||
],
|
||||
));
|
||||
// In unit tests without proper HRMP channel setup, the claim will fail at XCM sending.
|
||||
assert_err!(
|
||||
BridgeRelayers::claim_rewards_to(
|
||||
RuntimeOrigin::signed(account2.clone()),
|
||||
BridgeReward::Snowbridge,
|
||||
BridgeRewardBeneficiaries::AssetHubLocation(claim_location)
|
||||
),
|
||||
pezpallet_bridge_relayers::Error::<Runtime, BridgeRelayersInstance>::FailedToPayReward
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn governance_authorize_upgrade_works() {
|
||||
use zagros_runtime_constants::system_teyrchain::{ASSET_HUB_ID, COLLECTIVES_ID};
|
||||
|
||||
// no - random para
|
||||
assert_err!(
|
||||
teyrchains_runtimes_test_utils::test_cases::can_governance_authorize_upgrade::<
|
||||
Runtime,
|
||||
RuntimeOrigin,
|
||||
>(GovernanceOrigin::Location(Location::new(1, Teyrchain(12334)))),
|
||||
Either::Right(InstructionError { index: 0, error: XcmError::Barrier })
|
||||
);
|
||||
// ok - AssetHub
|
||||
assert_ok!(teyrchains_runtimes_test_utils::test_cases::can_governance_authorize_upgrade::<
|
||||
Runtime,
|
||||
RuntimeOrigin,
|
||||
>(GovernanceOrigin::Location(Location::new(1, Teyrchain(ASSET_HUB_ID)))));
|
||||
// no - Collectives
|
||||
assert_err!(
|
||||
teyrchains_runtimes_test_utils::test_cases::can_governance_authorize_upgrade::<
|
||||
Runtime,
|
||||
RuntimeOrigin,
|
||||
>(GovernanceOrigin::Location(Location::new(1, Teyrchain(COLLECTIVES_ID)))),
|
||||
Either::Right(InstructionError { index: 0, error: XcmError::Barrier })
|
||||
);
|
||||
// no - Collectives Voice of Fellows plurality
|
||||
assert_err!(
|
||||
teyrchains_runtimes_test_utils::test_cases::can_governance_authorize_upgrade::<
|
||||
Runtime,
|
||||
RuntimeOrigin,
|
||||
>(GovernanceOrigin::LocationAndDescendOrigin(
|
||||
Location::new(1, Teyrchain(COLLECTIVES_ID)),
|
||||
Plurality { id: BodyId::Technical, part: BodyPart::Voice }.into()
|
||||
)),
|
||||
Either::Right(InstructionError { index: 0, error: XcmError::Barrier })
|
||||
);
|
||||
|
||||
// ok - relaychain
|
||||
assert_ok!(teyrchains_runtimes_test_utils::test_cases::can_governance_authorize_upgrade::<
|
||||
Runtime,
|
||||
RuntimeOrigin,
|
||||
>(GovernanceOrigin::Location(Location::parent())));
|
||||
|
||||
// ok - governance location
|
||||
assert_ok!(teyrchains_runtimes_test_utils::test_cases::can_governance_authorize_upgrade::<
|
||||
Runtime,
|
||||
RuntimeOrigin,
|
||||
>(Governance::get()));
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
[package]
|
||||
name = "bridge-hub-common"
|
||||
version = "0.1.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
description = "Bridge hub common utilities"
|
||||
license = "Apache-2.0"
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
codec = { features = ["derive"], workspace = true }
|
||||
pezcumulus-primitives-core = { workspace = true }
|
||||
pezframe-support = { workspace = true }
|
||||
pezpallet-message-queue = { workspace = true }
|
||||
scale-info = { features = ["derive"], workspace = true }
|
||||
snowbridge-core = { workspace = true }
|
||||
pezsp-core = { workspace = true }
|
||||
pezsp-runtime = { workspace = true }
|
||||
pezsp-std = { workspace = true }
|
||||
xcm = { workspace = true }
|
||||
xcm-builder = { workspace = true }
|
||||
xcm-executor = { workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"pezcumulus-primitives-core/std",
|
||||
"pezframe-support/std",
|
||||
"pezpallet-message-queue/std",
|
||||
"scale-info/std",
|
||||
"snowbridge-core/std",
|
||||
"pezsp-core/std",
|
||||
"pezsp-runtime/std",
|
||||
"pezsp-std/std",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
"xcm/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"pezcumulus-primitives-core/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezpallet-message-queue/runtime-benchmarks",
|
||||
"snowbridge-core/runtime-benchmarks",
|
||||
"pezsp-runtime/runtime-benchmarks",
|
||||
"xcm-builder/runtime-benchmarks",
|
||||
"xcm-executor/runtime-benchmarks",
|
||||
"xcm/runtime-benchmarks",
|
||||
]
|
||||
@@ -0,0 +1,57 @@
|
||||
// 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.
|
||||
|
||||
use core::{marker::PhantomData, ops::ControlFlow};
|
||||
use cumulus_primitives_core::Weight;
|
||||
use pezframe_support::traits::{Contains, ProcessMessageError};
|
||||
use xcm::prelude::{ExportMessage, Instruction, Location, NetworkId};
|
||||
|
||||
use xcm_builder::{CreateMatcher, MatchXcm};
|
||||
use xcm_executor::traits::{DenyExecution, Properties};
|
||||
|
||||
/// Deny execution if the message contains instruction `ExportMessage` with
|
||||
/// a. origin is contained in `FromOrigin` (i.e.`FromOrigin::Contains(origin)`)
|
||||
/// b. network is contained in `ToGlobalConsensus`, (i.e. `ToGlobalConsensus::contains(network)`)
|
||||
pub struct DenyExportMessageFrom<FromOrigin, ToGlobalConsensus>(
|
||||
PhantomData<(FromOrigin, ToGlobalConsensus)>,
|
||||
);
|
||||
|
||||
impl<FromOrigin, ToGlobalConsensus> DenyExecution
|
||||
for DenyExportMessageFrom<FromOrigin, ToGlobalConsensus>
|
||||
where
|
||||
FromOrigin: Contains<Location>,
|
||||
ToGlobalConsensus: Contains<NetworkId>,
|
||||
{
|
||||
fn deny_execution<RuntimeCall>(
|
||||
origin: &Location,
|
||||
message: &mut [Instruction<RuntimeCall>],
|
||||
_max_weight: Weight,
|
||||
_properties: &mut Properties,
|
||||
) -> Result<(), ProcessMessageError> {
|
||||
// This barrier only cares about messages with `origin` matching `FromOrigin`.
|
||||
if !FromOrigin::contains(origin) {
|
||||
return Ok(());
|
||||
}
|
||||
message.matcher().match_next_inst_while(
|
||||
|_| true,
|
||||
|inst| match inst {
|
||||
ExportMessage { network, .. } if ToGlobalConsensus::contains(network) =>
|
||||
Err(ProcessMessageError::Unsupported),
|
||||
_ => Ok(ControlFlow::Continue(())),
|
||||
},
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// 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_attr(not(feature = "std"), no_std)]
|
||||
|
||||
pub mod barriers;
|
||||
pub mod message_queue;
|
||||
pub mod xcm_version;
|
||||
|
||||
pub use barriers::DenyExportMessageFrom;
|
||||
pub use message_queue::{
|
||||
AggregateMessageOrigin, BridgeHubDualMessageRouter, BridgeHubMessageRouter,
|
||||
};
|
||||
@@ -0,0 +1,197 @@
|
||||
// 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.
|
||||
//! Runtime configuration for MessageQueue pallet
|
||||
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
|
||||
use core::marker::PhantomData;
|
||||
use cumulus_primitives_core::{AggregateMessageOrigin as CumulusAggregateMessageOrigin, ParaId};
|
||||
use pezframe_support::{
|
||||
traits::{ProcessMessage, ProcessMessageError, QueueFootprint, QueuePausedQuery},
|
||||
weights::WeightMeter,
|
||||
};
|
||||
use pezpallet_message_queue::OnQueueChanged;
|
||||
use scale_info::TypeInfo;
|
||||
use snowbridge_core::ChannelId;
|
||||
use pezsp_core::H256;
|
||||
use xcm::latest::prelude::{Junction, Location};
|
||||
|
||||
/// The aggregate origin of an inbound message.
|
||||
/// This is specialized for BridgeHub, as the snowbridge-outbound-queue-pallet is also using
|
||||
/// the shared MessageQueue pallet.
|
||||
#[derive(
|
||||
Encode,
|
||||
Decode,
|
||||
DecodeWithMemTracking,
|
||||
Copy,
|
||||
MaxEncodedLen,
|
||||
Clone,
|
||||
Eq,
|
||||
PartialEq,
|
||||
TypeInfo,
|
||||
Debug,
|
||||
)]
|
||||
pub enum AggregateMessageOrigin {
|
||||
/// The message came from the para-chain itself.
|
||||
Here,
|
||||
/// The message came from the relay-chain.
|
||||
///
|
||||
/// This is used by the DMP queue.
|
||||
Parent,
|
||||
/// The message came from a sibling para-chain.
|
||||
///
|
||||
/// This is used by the HRMP queue.
|
||||
Sibling(ParaId),
|
||||
/// The message came from a snowbridge channel.
|
||||
///
|
||||
/// This is used by Snowbridge inbound queue.
|
||||
Snowbridge(ChannelId),
|
||||
SnowbridgeV2(H256),
|
||||
}
|
||||
|
||||
impl From<AggregateMessageOrigin> for Location {
|
||||
fn from(origin: AggregateMessageOrigin) -> Self {
|
||||
use AggregateMessageOrigin::*;
|
||||
match origin {
|
||||
Here => Location::here(),
|
||||
Parent => Location::parent(),
|
||||
Sibling(id) => Location::new(1, Junction::Teyrchain(id.into())),
|
||||
// NOTE: We don't need this conversion for Snowbridge. However, we have to
|
||||
// implement it anyway as xcm_builder::ProcessXcmMessage requires it.
|
||||
_ => Location::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<CumulusAggregateMessageOrigin> for AggregateMessageOrigin {
|
||||
fn from(origin: CumulusAggregateMessageOrigin) -> Self {
|
||||
match origin {
|
||||
CumulusAggregateMessageOrigin::Here => Self::Here,
|
||||
CumulusAggregateMessageOrigin::Parent => Self::Parent,
|
||||
CumulusAggregateMessageOrigin::Sibling(id) => Self::Sibling(id),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<H256> for AggregateMessageOrigin {
|
||||
fn from(hash: H256) -> Self {
|
||||
Self::SnowbridgeV2(hash)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
impl From<u32> for AggregateMessageOrigin {
|
||||
fn from(x: u32) -> Self {
|
||||
match x {
|
||||
0 => Self::Here,
|
||||
1 => Self::Parent,
|
||||
p => Self::Sibling(ParaId::from(p)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Routes messages to either the XCMP or Snowbridge processor.
|
||||
pub struct BridgeHubMessageRouter<XcmpProcessor, SnowbridgeProcessor>(
|
||||
PhantomData<(XcmpProcessor, SnowbridgeProcessor)>,
|
||||
)
|
||||
where
|
||||
XcmpProcessor: ProcessMessage<Origin = AggregateMessageOrigin>,
|
||||
SnowbridgeProcessor: ProcessMessage<Origin = AggregateMessageOrigin>;
|
||||
impl<XcmpProcessor, SnowbridgeProcessor> ProcessMessage
|
||||
for BridgeHubMessageRouter<XcmpProcessor, SnowbridgeProcessor>
|
||||
where
|
||||
XcmpProcessor: ProcessMessage<Origin = AggregateMessageOrigin>,
|
||||
SnowbridgeProcessor: ProcessMessage<Origin = AggregateMessageOrigin>,
|
||||
{
|
||||
type Origin = AggregateMessageOrigin;
|
||||
fn process_message(
|
||||
message: &[u8],
|
||||
origin: Self::Origin,
|
||||
meter: &mut WeightMeter,
|
||||
id: &mut [u8; 32],
|
||||
) -> Result<bool, ProcessMessageError> {
|
||||
use AggregateMessageOrigin::*;
|
||||
match origin {
|
||||
Here | Parent | Sibling(_) =>
|
||||
XcmpProcessor::process_message(message, origin, meter, id),
|
||||
Snowbridge(_) => SnowbridgeProcessor::process_message(message, origin, meter, id),
|
||||
SnowbridgeV2(_) => Err(ProcessMessageError::Unsupported),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Routes messages to either the XCMP|Snowbridge V1 processor|Snowbridge V2 processor
|
||||
pub struct BridgeHubDualMessageRouter<XcmpProcessor, SnowbridgeProcessor, SnowbridgeProcessorV2>(
|
||||
PhantomData<(XcmpProcessor, SnowbridgeProcessor, SnowbridgeProcessorV2)>,
|
||||
)
|
||||
where
|
||||
XcmpProcessor: ProcessMessage<Origin = AggregateMessageOrigin>,
|
||||
SnowbridgeProcessor: ProcessMessage<Origin = AggregateMessageOrigin>;
|
||||
|
||||
impl<XcmpProcessor, SnowbridgeProcessor, SnowbridgeProcessorV2> ProcessMessage
|
||||
for BridgeHubDualMessageRouter<XcmpProcessor, SnowbridgeProcessor, SnowbridgeProcessorV2>
|
||||
where
|
||||
XcmpProcessor: ProcessMessage<Origin = AggregateMessageOrigin>,
|
||||
SnowbridgeProcessor: ProcessMessage<Origin = AggregateMessageOrigin>,
|
||||
SnowbridgeProcessorV2: ProcessMessage<Origin = AggregateMessageOrigin>,
|
||||
{
|
||||
type Origin = AggregateMessageOrigin;
|
||||
|
||||
fn process_message(
|
||||
message: &[u8],
|
||||
origin: Self::Origin,
|
||||
meter: &mut WeightMeter,
|
||||
id: &mut [u8; 32],
|
||||
) -> Result<bool, ProcessMessageError> {
|
||||
use AggregateMessageOrigin::*;
|
||||
match origin {
|
||||
Here | Parent | Sibling(_) =>
|
||||
XcmpProcessor::process_message(message, origin, meter, id),
|
||||
Snowbridge(_) => SnowbridgeProcessor::process_message(message, origin, meter, id),
|
||||
SnowbridgeV2(_) => SnowbridgeProcessorV2::process_message(message, origin, meter, id),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Narrow the scope of the `Inner` query from `AggregateMessageOrigin` to `ParaId`.
|
||||
///
|
||||
/// All non-`Sibling` variants will be ignored.
|
||||
pub struct NarrowOriginToSibling<Inner>(PhantomData<Inner>);
|
||||
impl<Inner: QueuePausedQuery<ParaId>> QueuePausedQuery<AggregateMessageOrigin>
|
||||
for NarrowOriginToSibling<Inner>
|
||||
{
|
||||
fn is_paused(origin: &AggregateMessageOrigin) -> bool {
|
||||
match origin {
|
||||
AggregateMessageOrigin::Sibling(id) => Inner::is_paused(id),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<Inner: OnQueueChanged<ParaId>> OnQueueChanged<AggregateMessageOrigin>
|
||||
for NarrowOriginToSibling<Inner>
|
||||
{
|
||||
fn on_queue_changed(origin: AggregateMessageOrigin, fp: QueueFootprint) {
|
||||
if let AggregateMessageOrigin::Sibling(id) = origin {
|
||||
Inner::on_queue_changed(id, fp)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Convert a sibling `ParaId` to an `AggregateMessageOrigin`.
|
||||
pub struct ParaIdToSibling;
|
||||
impl pezsp_runtime::traits::Convert<ParaId, AggregateMessageOrigin> for ParaIdToSibling {
|
||||
fn convert(para_id: ParaId) -> AggregateMessageOrigin {
|
||||
AggregateMessageOrigin::Sibling(para_id)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// 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.
|
||||
|
||||
//! Custom XCM implementation.
|
||||
|
||||
use pezframe_support::traits::Get;
|
||||
use xcm::{
|
||||
latest::prelude::*,
|
||||
prelude::{GetVersion, XcmVersion},
|
||||
};
|
||||
|
||||
/// Adapter for the implementation of `GetVersion`, which attempts to find the minimal
|
||||
/// configured XCM version between the destination `dest` and the bridge hub location provided as
|
||||
/// `Get<Location>`.
|
||||
pub struct XcmVersionOfDestAndRemoteBridge<Version, RemoteBridge>(
|
||||
pezsp_std::marker::PhantomData<(Version, RemoteBridge)>,
|
||||
);
|
||||
impl<Version: GetVersion, RemoteBridge: Get<Location>> GetVersion
|
||||
for XcmVersionOfDestAndRemoteBridge<Version, RemoteBridge>
|
||||
{
|
||||
fn get_version_for(dest: &Location) -> Option<XcmVersion> {
|
||||
let dest_version = Version::get_version_for(dest);
|
||||
let bridge_hub_version = Version::get_version_for(&RemoteBridge::get());
|
||||
|
||||
match (dest_version, bridge_hub_version) {
|
||||
(Some(dv), Some(bhv)) => Some(pezsp_std::cmp::min(dv, bhv)),
|
||||
(Some(dv), None) => Some(dv),
|
||||
(None, Some(bhv)) => Some(bhv),
|
||||
(None, None) => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
// 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 bridge_hub_common::DenyExportMessageFrom;
|
||||
use pezframe_support::{
|
||||
parameter_types,
|
||||
traits::{Equals, EverythingBut, ProcessMessageError::Unsupported},
|
||||
};
|
||||
use xcm::prelude::{
|
||||
AliasOrigin, ByGenesis, ExportMessage, Here, Instruction, Location, NetworkId, Teyrchain,
|
||||
Weight,
|
||||
};
|
||||
use xcm_executor::traits::{DenyExecution, Properties};
|
||||
|
||||
#[test]
|
||||
fn test_deny_export_message_from() {
|
||||
parameter_types! {
|
||||
pub Source1: Location = Location::new(1, Teyrchain(1));
|
||||
pub Source2: Location = Location::new(1, Teyrchain(2));
|
||||
pub Remote1: NetworkId = ByGenesis([1;32]);
|
||||
pub Remote2: NetworkId = ByGenesis([2;32]);
|
||||
}
|
||||
|
||||
// Deny ExportMessage when both of the conditions met:
|
||||
// 1: source != Source1
|
||||
// 2: network == Remote1
|
||||
pub type Denied = DenyExportMessageFrom<EverythingBut<Equals<Source1>>, Equals<Remote1>>;
|
||||
|
||||
let assert_deny_execution = |mut xcm: Vec<Instruction<()>>, origin, expected_result| {
|
||||
assert_eq!(
|
||||
Denied::deny_execution(
|
||||
&origin,
|
||||
&mut xcm,
|
||||
Weight::zero(),
|
||||
&mut Properties { weight_credit: Weight::zero(), message_id: None }
|
||||
),
|
||||
expected_result
|
||||
);
|
||||
};
|
||||
|
||||
// A message without an `ExportMessage` should pass
|
||||
assert_deny_execution(vec![AliasOrigin(Here.into())], Source1::get(), Ok(()));
|
||||
|
||||
// `ExportMessage` from source1 and remote1 should pass
|
||||
assert_deny_execution(
|
||||
vec![ExportMessage { network: Remote1::get(), destination: Here, xcm: Default::default() }],
|
||||
Source1::get(),
|
||||
Ok(()),
|
||||
);
|
||||
|
||||
// `ExportMessage` from source1 and remote2 should pass
|
||||
assert_deny_execution(
|
||||
vec![ExportMessage { network: Remote2::get(), destination: Here, xcm: Default::default() }],
|
||||
Source1::get(),
|
||||
Ok(()),
|
||||
);
|
||||
|
||||
// `ExportMessage` from source2 and remote2 should pass
|
||||
assert_deny_execution(
|
||||
vec![ExportMessage { network: Remote2::get(), destination: Here, xcm: Default::default() }],
|
||||
Source2::get(),
|
||||
Ok(()),
|
||||
);
|
||||
|
||||
// `ExportMessage` from source2 and remote1 should be banned
|
||||
assert_deny_execution(
|
||||
vec![ExportMessage { network: Remote1::get(), destination: Here, xcm: Default::default() }],
|
||||
Source2::get(),
|
||||
Err(Unsupported),
|
||||
);
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 86 KiB |
@@ -0,0 +1,125 @@
|
||||
[package]
|
||||
name = "bridge-hub-test-utils"
|
||||
version = "0.7.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
description = "Utils for BridgeHub testing"
|
||||
license = "Apache-2.0"
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
codec = { features = ["derive", "max-encoded-len"], workspace = true }
|
||||
impl-trait-for-tuples = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
|
||||
# Bizinikiwi
|
||||
pezframe-support = { workspace = true }
|
||||
pezframe-system = { workspace = true }
|
||||
pezpallet-balances = { workspace = true }
|
||||
pezpallet-timestamp = { workspace = true }
|
||||
pezpallet-utility = { workspace = true }
|
||||
pezsp-core = { workspace = true }
|
||||
pezsp-io = { workspace = true }
|
||||
pezsp-keyring = { workspace = true, default-features = true }
|
||||
pezsp-runtime = { workspace = true }
|
||||
pezsp-std = { workspace = true }
|
||||
pezsp-tracing = { workspace = true, default-features = true }
|
||||
|
||||
# Pezcumulus
|
||||
asset-test-utils = { workspace = true, default-features = true }
|
||||
pezcumulus-pezpallet-teyrchain-system = { workspace = true }
|
||||
pezcumulus-pezpallet-xcmp-queue = { workspace = true }
|
||||
teyrchains-common = { workspace = true }
|
||||
teyrchains-runtimes-test-utils = { workspace = true }
|
||||
|
||||
# Pezkuwi
|
||||
pezpallet-xcm = { workspace = true }
|
||||
xcm = { workspace = true }
|
||||
xcm-builder = { workspace = true }
|
||||
xcm-executor = { workspace = true }
|
||||
|
||||
# Bridges
|
||||
bp-header-chain = { workspace = true }
|
||||
bp-messages = { workspace = true }
|
||||
bp-pezkuwi-core = { workspace = true }
|
||||
bp-relayers = { workspace = true }
|
||||
bp-runtime = { workspace = true }
|
||||
bp-test-utils = { workspace = true }
|
||||
bp-teyrchains = { workspace = true }
|
||||
pezpallet-bridge-grandpa = { workspace = true }
|
||||
pezpallet-bridge-messages = { features = ["test-helpers"], workspace = true }
|
||||
pezpallet-bridge-relayers = { workspace = true }
|
||||
pezpallet-bridge-teyrchains = { workspace = true }
|
||||
pezpallet-xcm-bridge-hub = { workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"asset-test-utils/std",
|
||||
"bp-header-chain/std",
|
||||
"bp-messages/std",
|
||||
"bp-pezkuwi-core/std",
|
||||
"bp-relayers/std",
|
||||
"bp-runtime/std",
|
||||
"bp-test-utils/std",
|
||||
"bp-teyrchains/std",
|
||||
"codec/std",
|
||||
"pezcumulus-pezpallet-teyrchain-system/std",
|
||||
"pezcumulus-pezpallet-xcmp-queue/std",
|
||||
"pezframe-support/std",
|
||||
"pezframe-system/std",
|
||||
"pezpallet-balances/std",
|
||||
"pezpallet-bridge-grandpa/std",
|
||||
"pezpallet-bridge-messages/std",
|
||||
"pezpallet-bridge-relayers/std",
|
||||
"pezpallet-bridge-teyrchains/std",
|
||||
"pezpallet-timestamp/std",
|
||||
"pezpallet-utility/std",
|
||||
"pezpallet-xcm-bridge-hub/std",
|
||||
"pezpallet-xcm/std",
|
||||
"pezsp-core/std",
|
||||
"pezsp-io/std",
|
||||
"pezsp-runtime/std",
|
||||
"pezsp-std/std",
|
||||
"teyrchains-common/std",
|
||||
"teyrchains-runtimes-test-utils/std",
|
||||
"tracing/std",
|
||||
"xcm-builder/std",
|
||||
"xcm-executor/std",
|
||||
"xcm/std",
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"asset-test-utils/runtime-benchmarks",
|
||||
"bp-header-chain/runtime-benchmarks",
|
||||
"bp-messages/runtime-benchmarks",
|
||||
"bp-pezkuwi-core/runtime-benchmarks",
|
||||
"bp-relayers/runtime-benchmarks",
|
||||
"bp-runtime/runtime-benchmarks",
|
||||
"bp-test-utils/runtime-benchmarks",
|
||||
"bp-teyrchains/runtime-benchmarks",
|
||||
"pezcumulus-pezpallet-teyrchain-system/runtime-benchmarks",
|
||||
"pezcumulus-pezpallet-xcmp-queue/runtime-benchmarks",
|
||||
"pezframe-support/runtime-benchmarks",
|
||||
"pezframe-system/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-timestamp/runtime-benchmarks",
|
||||
"pezpallet-utility/runtime-benchmarks",
|
||||
"pezpallet-xcm-bridge-hub/runtime-benchmarks",
|
||||
"pezpallet-xcm/runtime-benchmarks",
|
||||
"pezsp-io/runtime-benchmarks",
|
||||
"pezsp-keyring/runtime-benchmarks",
|
||||
"pezsp-runtime/runtime-benchmarks",
|
||||
"teyrchains-common/runtime-benchmarks",
|
||||
"teyrchains-runtimes-test-utils/runtime-benchmarks",
|
||||
"xcm-builder/runtime-benchmarks",
|
||||
"xcm-executor/runtime-benchmarks",
|
||||
"xcm/runtime-benchmarks",
|
||||
]
|
||||
@@ -0,0 +1,86 @@
|
||||
// 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.
|
||||
|
||||
//! Module contains predefined test-case scenarios for "BridgeHub" `Runtime`s.
|
||||
|
||||
pub mod test_cases;
|
||||
pub mod test_data;
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
pub use bp_test_utils::test_header;
|
||||
use pezsp_runtime::Perbill;
|
||||
pub use test_cases::helpers::for_pallet_xcm_bridge_hub::{
|
||||
ensure_opened_bridge, open_bridge_with_extrinsic, open_bridge_with_storage,
|
||||
};
|
||||
pub use teyrchains_runtimes_test_utils::*;
|
||||
|
||||
/// A helper function for comparing the actual value of a fee constant with its estimated value. The
|
||||
/// estimated value can be overestimated (`overestimate_in_percent`), and if the difference to the
|
||||
/// actual value is below `margin_overestimate_diff_in_percent_for_lowering`, we should lower the
|
||||
/// actual value.
|
||||
pub fn check_sane_fees_values(
|
||||
const_name: &str,
|
||||
actual: u128,
|
||||
calculate_estimated_fee: fn() -> u128,
|
||||
overestimate_in_percent: Perbill,
|
||||
margin_overestimate_diff_in_percent_for_lowering: Option<i16>,
|
||||
label: &str,
|
||||
) {
|
||||
let estimated = calculate_estimated_fee();
|
||||
let estimated_plus_overestimate = estimated + (overestimate_in_percent * estimated);
|
||||
let diff_to_estimated = diff_as_percent(actual, estimated);
|
||||
let diff_to_estimated_plus_overestimate = diff_as_percent(actual, estimated_plus_overestimate);
|
||||
|
||||
pezsp_tracing::try_init_simple();
|
||||
tracing::error!(
|
||||
target: "bridges::estimate",
|
||||
%label, constant=%const_name, %actual, %estimated,
|
||||
"{diff_to_estimated:.2?})\n[+] estimated(+33%): {estimated_plus_overestimate} ({diff_to_estimated_plus_overestimate:.2?}"
|
||||
);
|
||||
|
||||
// check if estimated value is sane
|
||||
assert!(
|
||||
estimated <= actual,
|
||||
"estimated: {estimated}, actual: {actual}, please adjust `{const_name}` to the value: {estimated_plus_overestimate}",
|
||||
);
|
||||
assert!(
|
||||
estimated_plus_overestimate <= actual,
|
||||
"estimated_plus_overestimate: {estimated_plus_overestimate}, actual: {actual}, please adjust `{const_name}` to the value: {estimated_plus_overestimate}",
|
||||
);
|
||||
|
||||
if let Some(margin_overestimate_diff_in_percent_for_lowering) =
|
||||
margin_overestimate_diff_in_percent_for_lowering
|
||||
{
|
||||
assert!(
|
||||
diff_to_estimated_plus_overestimate > margin_overestimate_diff_in_percent_for_lowering as f64,
|
||||
"diff_to_estimated_plus_overestimate: {diff_to_estimated_plus_overestimate:.2}, overestimate_diff_in_percent_for_lowering: {margin_overestimate_diff_in_percent_for_lowering}, please adjust `{const_name}` to the value: {estimated_plus_overestimate}",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn diff_as_percent(left: u128, right: u128) -> f64 {
|
||||
let left = left as f64;
|
||||
let right = right as f64;
|
||||
((left - right).abs() / left) * 100f64 * (if left >= right { -1 } else { 1 }) as f64
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn diff_as_percent_works() {
|
||||
assert_eq!(-20_f64, diff_as_percent(100, 80));
|
||||
assert_eq!(25_f64, diff_as_percent(80, 100));
|
||||
assert_eq!(33_f64, diff_as_percent(13351000000, 17756830000));
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user