referrerpolicy=no-referrer-when-downgrade

bridge_hub_rococo_runtime/weights/
mod.rs

1// This file is part of Cumulus.
2
3// Copyright (C) Parity Technologies (UK) Ltd.
4// SPDX-License-Identifier: Apache-2.0
5
6// Licensed under the Apache License, Version 2.0 (the "License");
7// you may not use this file except in compliance with the License.
8// You may obtain a copy of the License at
9//
10// http://www.apache.org/licenses/LICENSE-2.0
11//
12// Unless required by applicable law or agreed to in writing, software
13// distributed under the License is distributed on an "AS IS" BASIS,
14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15// See the License for the specific language governing permissions and
16// limitations under the License.
17
18//! Expose the auto generated weight files.
19
20use ::pallet_bridge_grandpa::WeightInfoExt as GrandpaWeightInfoExt;
21use ::pallet_bridge_messages::WeightInfoExt as MessagesWeightInfoExt;
22use ::pallet_bridge_parachains::WeightInfoExt as ParachainsWeightInfoExt;
23use ::pallet_bridge_relayers::WeightInfo as _;
24
25pub mod block_weights;
26pub mod cumulus_pallet_parachain_system;
27pub mod cumulus_pallet_weight_reclaim;
28pub mod cumulus_pallet_xcmp_queue;
29pub mod extrinsic_weights;
30pub mod frame_system;
31pub mod frame_system_extensions;
32pub mod pallet_balances;
33pub mod pallet_bridge_grandpa;
34pub mod pallet_bridge_messages_rococo_to_rococo_bulletin;
35pub mod pallet_bridge_messages_rococo_to_westend;
36pub mod pallet_bridge_parachains;
37pub mod pallet_bridge_relayers_legacy;
38pub mod pallet_bridge_relayers_permissionless_lanes;
39pub mod pallet_collator_selection;
40pub mod pallet_message_queue;
41pub mod pallet_multisig;
42pub mod pallet_session;
43pub mod pallet_timestamp;
44pub mod pallet_transaction_payment;
45pub mod pallet_utility;
46pub mod pallet_xcm;
47pub mod paritydb_weights;
48pub mod rocksdb_weights;
49pub mod snowbridge_pallet_ethereum_client;
50pub mod snowbridge_pallet_inbound_queue;
51pub mod snowbridge_pallet_outbound_queue;
52pub mod snowbridge_pallet_system;
53pub mod xcm;
54
55pub use block_weights::constants::BlockExecutionWeight;
56pub use extrinsic_weights::constants::ExtrinsicBaseWeight;
57pub use rocksdb_weights::constants::RocksDbWeight;
58
59use crate::Runtime;
60use frame_support::weights::Weight;
61
62// import trait from dependency module
63use ::pallet_bridge_relayers::WeightInfoExt as _;
64
65impl GrandpaWeightInfoExt for pallet_bridge_grandpa::WeightInfo<crate::Runtime> {
66	fn submit_finality_proof_overhead_from_runtime() -> Weight {
67		// our signed extension:
68		// 1) checks whether relayer registration is active from validate/pre_dispatch;
69		// 2) may slash and deregister relayer from post_dispatch
70		// (2) includes (1), so (2) is the worst case
71		pallet_bridge_relayers_legacy::WeightInfo::<Runtime>::slash_and_deregister()
72	}
73}
74
75impl MessagesWeightInfoExt
76	for pallet_bridge_messages_rococo_to_rococo_bulletin::WeightInfo<crate::Runtime>
77{
78	fn expected_extra_storage_proof_size() -> u32 {
79		bp_polkadot_bulletin::EXTRA_STORAGE_PROOF_SIZE
80	}
81
82	fn receive_messages_proof_overhead_from_runtime() -> Weight {
83		pallet_bridge_relayers_permissionless_lanes::WeightInfo::<Runtime>::receive_messages_proof_overhead_from_runtime(
84		)
85	}
86
87	fn receive_messages_delivery_proof_overhead_from_runtime() -> Weight {
88		pallet_bridge_relayers_permissionless_lanes::WeightInfo::<Runtime>::receive_messages_delivery_proof_overhead_from_runtime()
89	}
90}
91
92impl MessagesWeightInfoExt
93	for pallet_bridge_messages_rococo_to_westend::WeightInfo<crate::Runtime>
94{
95	fn expected_extra_storage_proof_size() -> u32 {
96		bp_bridge_hub_westend::EXTRA_STORAGE_PROOF_SIZE
97	}
98
99	fn receive_messages_proof_overhead_from_runtime() -> Weight {
100		pallet_bridge_relayers_legacy::WeightInfo::<Runtime>::receive_messages_proof_overhead_from_runtime(
101		)
102	}
103
104	fn receive_messages_delivery_proof_overhead_from_runtime() -> Weight {
105		pallet_bridge_relayers_legacy::WeightInfo::<Runtime>::receive_messages_delivery_proof_overhead_from_runtime()
106	}
107}
108
109impl ParachainsWeightInfoExt for pallet_bridge_parachains::WeightInfo<crate::Runtime> {
110	fn expected_extra_storage_proof_size() -> u32 {
111		bp_bridge_hub_westend::EXTRA_STORAGE_PROOF_SIZE
112	}
113
114	fn submit_parachain_heads_overhead_from_runtime() -> Weight {
115		// our signed extension:
116		// 1) checks whether relayer registration is active from validate/pre_dispatch;
117		// 2) may slash and deregister relayer from post_dispatch
118		// (2) includes (1), so (2) is the worst case
119		pallet_bridge_relayers_legacy::WeightInfo::<Runtime>::slash_and_deregister()
120	}
121}