bridge_hub_westend_runtime/weights/pallet_bridge_grandpa.rs
1// Copyright (C) Parity Technologies (UK) Ltd.
2// SPDX-License-Identifier: Apache-2.0
3
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16//! Autogenerated weights for `pallet_bridge_grandpa`
17//!
18//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
19//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
20//! WORST CASE MAP SIZE: `1000000`
21//! HOSTNAME: `d3b41be4aae8`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
22//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
23
24// Executed Command:
25// frame-omni-bencher
26// v1
27// benchmark
28// pallet
29// --extrinsic=*
30// --runtime=target/production/wbuild/bridge-hub-westend-runtime/bridge_hub_westend_runtime.wasm
31// --pallet=pallet_bridge_grandpa
32// --header=/__w/polkadot-sdk/polkadot-sdk/cumulus/file_header.txt
33// --output=./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights
34// --wasm-execution=compiled
35// --steps=50
36// --repeat=20
37// --heap-pages=4096
38// --no-storage-info
39// --no-min-squares
40// --no-median-slopes
41
42#![cfg_attr(rustfmt, rustfmt_skip)]
43#![allow(unused_parens)]
44#![allow(unused_imports)]
45#![allow(missing_docs)]
46
47use frame_support::{traits::Get, weights::Weight};
48use core::marker::PhantomData;
49
50/// Weight functions for `pallet_bridge_grandpa`.
51pub struct WeightInfo<T>(PhantomData<T>);
52impl<T: frame_system::Config> pallet_bridge_grandpa::WeightInfo for WeightInfo<T> {
53 /// Storage: `BridgeRococoGrandpa::CurrentAuthoritySet` (r:1 w:0)
54 /// Proof: `BridgeRococoGrandpa::CurrentAuthoritySet` (`max_values`: Some(1), `max_size`: Some(50250), added: 50745, mode: `MaxEncodedLen`)
55 /// Storage: `BridgeRococoGrandpa::PalletOperatingMode` (r:1 w:0)
56 /// Proof: `BridgeRococoGrandpa::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
57 /// Storage: `BridgeRococoGrandpa::BestFinalized` (r:1 w:1)
58 /// Proof: `BridgeRococoGrandpa::BestFinalized` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)
59 /// Storage: `BridgeRococoGrandpa::ImportedHashesPointer` (r:1 w:1)
60 /// Proof: `BridgeRococoGrandpa::ImportedHashesPointer` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
61 /// Storage: `BridgeRococoGrandpa::ImportedHashes` (r:1 w:1)
62 /// Proof: `BridgeRococoGrandpa::ImportedHashes` (`max_values`: Some(1024), `max_size`: Some(36), added: 1521, mode: `MaxEncodedLen`)
63 /// Storage: `BridgeRococoGrandpa::ImportedHeaders` (r:0 w:2)
64 /// Proof: `BridgeRococoGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
65 /// The range of component `p` is `[1, 168]`.
66 /// The range of component `v` is `[50, 100]`.
67 fn submit_finality_proof(p: u32, v: u32, ) -> Weight {
68 // Proof Size summary in bytes:
69 // Measured: `31 + p * (60 ±0)`
70 // Estimated: `51735`
71 // Minimum execution time: 311_096_000 picoseconds.
72 Weight::from_parts(331_488_000, 0)
73 .saturating_add(Weight::from_parts(0, 51735))
74 // Standard Error: 106_059
75 .saturating_add(Weight::from_parts(47_243_244, 0).saturating_mul(p.into()))
76 // Standard Error: 164_027
77 .saturating_add(Weight::from_parts(3_116, 0).saturating_mul(v.into()))
78 .saturating_add(T::DbWeight::get().reads(5))
79 .saturating_add(T::DbWeight::get().writes(5))
80 }
81 /// Storage: `BridgeRococoGrandpa::CurrentAuthoritySet` (r:1 w:1)
82 /// Proof: `BridgeRococoGrandpa::CurrentAuthoritySet` (`max_values`: Some(1), `max_size`: Some(50250), added: 50745, mode: `MaxEncodedLen`)
83 /// Storage: `BridgeRococoGrandpa::ImportedHashesPointer` (r:1 w:1)
84 /// Proof: `BridgeRococoGrandpa::ImportedHashesPointer` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
85 /// Storage: `BridgeRococoGrandpa::ImportedHashes` (r:1 w:1)
86 /// Proof: `BridgeRococoGrandpa::ImportedHashes` (`max_values`: Some(1024), `max_size`: Some(36), added: 1521, mode: `MaxEncodedLen`)
87 /// Storage: `BridgeRococoGrandpa::BestFinalized` (r:0 w:1)
88 /// Proof: `BridgeRococoGrandpa::BestFinalized` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)
89 /// Storage: `BridgeRococoGrandpa::ImportedHeaders` (r:0 w:2)
90 /// Proof: `BridgeRococoGrandpa::ImportedHeaders` (`max_values`: Some(1024), `max_size`: Some(68), added: 1553, mode: `MaxEncodedLen`)
91 fn force_set_pallet_state() -> Weight {
92 // Proof Size summary in bytes:
93 // Measured: `84`
94 // Estimated: `51735`
95 // Minimum execution time: 124_271_000 picoseconds.
96 Weight::from_parts(138_136_000, 0)
97 .saturating_add(Weight::from_parts(0, 51735))
98 .saturating_add(T::DbWeight::get().reads(3))
99 .saturating_add(T::DbWeight::get().writes(6))
100 }
101}