referrerpolicy=no-referrer-when-downgrade

bridge_hub_westend_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;
35pub mod pallet_bridge_parachains;
36pub mod pallet_bridge_relayers;
37pub mod pallet_collator_selection;
38pub mod pallet_message_queue;
39pub mod pallet_multisig;
40pub mod pallet_session;
41pub mod pallet_timestamp;
42pub mod pallet_transaction_payment;
43pub mod pallet_utility;
44pub mod pallet_xcm;
45pub mod paritydb_weights;
46pub mod rocksdb_weights;
47pub mod xcm;
48
49pub mod snowbridge_pallet_ethereum_client;
50pub mod snowbridge_pallet_inbound_queue;
51pub mod snowbridge_pallet_inbound_queue_v2;
52pub mod snowbridge_pallet_outbound_queue;
53pub mod snowbridge_pallet_outbound_queue_v2;
54pub mod snowbridge_pallet_system;
55pub mod snowbridge_pallet_system_v2;
56
57pub use block_weights::constants::BlockExecutionWeight;
58pub use extrinsic_weights::constants::ExtrinsicBaseWeight;
59pub use rocksdb_weights::constants::RocksDbWeight;
60
61use crate::Runtime;
62use frame_support::weights::Weight;
63
64// import trait from dependency module
65use ::pallet_bridge_relayers::WeightInfoExt as _;
66
67impl GrandpaWeightInfoExt for pallet_bridge_grandpa::WeightInfo<crate::Runtime> {
68	fn submit_finality_proof_overhead_from_runtime() -> Weight {
69		// our signed extension:
70		// 1) checks whether relayer registration is active from validate/pre_dispatch;
71		// 2) may slash and deregister relayer from post_dispatch
72		// (2) includes (1), so (2) is the worst case
73		pallet_bridge_relayers::WeightInfo::<Runtime>::slash_and_deregister()
74	}
75}
76
77impl MessagesWeightInfoExt for pallet_bridge_messages::WeightInfo<crate::Runtime> {
78	fn expected_extra_storage_proof_size() -> u32 {
79		bp_bridge_hub_rococo::EXTRA_STORAGE_PROOF_SIZE
80	}
81
82	fn receive_messages_proof_overhead_from_runtime() -> Weight {
83		pallet_bridge_relayers::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::WeightInfo::<Runtime>::receive_messages_delivery_proof_overhead_from_runtime()
89	}
90}
91
92impl ParachainsWeightInfoExt for pallet_bridge_parachains::WeightInfo<crate::Runtime> {
93	fn expected_extra_storage_proof_size() -> u32 {
94		bp_bridge_hub_rococo::EXTRA_STORAGE_PROOF_SIZE
95	}
96
97	fn submit_parachain_heads_overhead_from_runtime() -> Weight {
98		// our signed extension:
99		// 1) checks whether relayer registration is active from validate/pre_dispatch;
100		// 2) may slash and deregister relayer from post_dispatch
101		// (2) includes (1), so (2) is the worst case
102		pallet_bridge_relayers::WeightInfo::<Runtime>::slash_and_deregister()
103	}
104}