moonbeam_runtime/weights/pallet_preimage.rs
1// Copyright 2025 Moonbeam foundation
2// This file is part of Moonbeam.
3
4// Moonbeam is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8
9// Moonbeam is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License
15// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.
16
17
18//! Autogenerated weights for `pallet_preimage`
19//!
20//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
21//! DATE: 2025-12-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22//! WORST CASE MAP SIZE: `1000000`
23//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
24//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
25
26// Executed Command:
27// ./frame-omni-bencher
28// v1
29// benchmark
30// pallet
31// --runtime=./target/production/wbuild/moonbeam-runtime/moonbeam_runtime.wasm
32// --genesis-builder=runtime
33// --genesis-builder-preset=development
34// --steps=50
35// --repeat=20
36// --pallet=pallet_preimage
37// --extrinsic=*
38// --wasm-execution=compiled
39// --header=./file_header.txt
40// --template=./benchmarking/frame-weight-template.hbs
41// --output=./runtime/moonbeam/src/weights
42
43#![cfg_attr(rustfmt, rustfmt_skip)]
44#![allow(unused_parens)]
45#![allow(unused_imports)]
46
47use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
48use sp_std::marker::PhantomData;
49
50/// Weights for `pallet_preimage`.
51pub struct WeightInfo<T>(PhantomData<T>);
52impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> {
53 /// Storage: `Preimage::StatusFor` (r:1 w:0)
54 /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
55 /// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
56 /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
57 /// Storage: `Balances::Holds` (r:1 w:1)
58 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
59 /// Storage: `Preimage::PreimageFor` (r:0 w:1)
60 /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
61 /// The range of component `s` is `[0, 4194304]`.
62 fn note_preimage(s: u32, ) -> Weight {
63 // Proof Size summary in bytes:
64 // Measured: `42`
65 // Estimated: `3556`
66 // Minimum execution time: 53_909_000 picoseconds.
67 Weight::from_parts(54_490_000, 3556)
68 // Standard Error: 7
69 .saturating_add(Weight::from_parts(2_551, 0).saturating_mul(s.into()))
70 .saturating_add(T::DbWeight::get().reads(3_u64))
71 .saturating_add(T::DbWeight::get().writes(3_u64))
72 }
73 /// Storage: `Preimage::StatusFor` (r:1 w:0)
74 /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
75 /// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
76 /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
77 /// Storage: `Preimage::PreimageFor` (r:0 w:1)
78 /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
79 /// The range of component `s` is `[0, 4194304]`.
80 fn note_requested_preimage(s: u32, ) -> Weight {
81 // Proof Size summary in bytes:
82 // Measured: `106`
83 // Estimated: `3544`
84 // Minimum execution time: 16_630_000 picoseconds.
85 Weight::from_parts(16_770_000, 3544)
86 // Standard Error: 6
87 .saturating_add(Weight::from_parts(2_536, 0).saturating_mul(s.into()))
88 .saturating_add(T::DbWeight::get().reads(2_u64))
89 .saturating_add(T::DbWeight::get().writes(2_u64))
90 }
91 /// Storage: `Preimage::StatusFor` (r:1 w:0)
92 /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
93 /// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
94 /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
95 /// Storage: `Preimage::PreimageFor` (r:0 w:1)
96 /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
97 /// The range of component `s` is `[0, 4194304]`.
98 fn note_no_deposit_preimage(s: u32, ) -> Weight {
99 // Proof Size summary in bytes:
100 // Measured: `106`
101 // Estimated: `3544`
102 // Minimum execution time: 16_106_000 picoseconds.
103 Weight::from_parts(16_295_000, 3544)
104 // Standard Error: 6
105 .saturating_add(Weight::from_parts(2_527, 0).saturating_mul(s.into()))
106 .saturating_add(T::DbWeight::get().reads(2_u64))
107 .saturating_add(T::DbWeight::get().writes(2_u64))
108 }
109 /// Storage: `Preimage::StatusFor` (r:1 w:0)
110 /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
111 /// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
112 /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
113 /// Storage: `Balances::Holds` (r:1 w:1)
114 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
115 /// Storage: `Preimage::PreimageFor` (r:0 w:1)
116 /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
117 fn unnote_preimage() -> Weight {
118 // Proof Size summary in bytes:
119 // Measured: `220`
120 // Estimated: `3556`
121 // Minimum execution time: 57_663_000 picoseconds.
122 Weight::from_parts(70_729_000, 3556)
123 .saturating_add(T::DbWeight::get().reads(3_u64))
124 .saturating_add(T::DbWeight::get().writes(3_u64))
125 }
126 /// Storage: `Preimage::StatusFor` (r:1 w:0)
127 /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
128 /// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
129 /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
130 /// Storage: `Preimage::PreimageFor` (r:0 w:1)
131 /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
132 fn unnote_no_deposit_preimage() -> Weight {
133 // Proof Size summary in bytes:
134 // Measured: `144`
135 // Estimated: `3544`
136 // Minimum execution time: 22_641_000 picoseconds.
137 Weight::from_parts(25_496_000, 3544)
138 .saturating_add(T::DbWeight::get().reads(2_u64))
139 .saturating_add(T::DbWeight::get().writes(2_u64))
140 }
141 /// Storage: `Preimage::StatusFor` (r:1 w:0)
142 /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
143 /// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
144 /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
145 fn request_preimage() -> Weight {
146 // Proof Size summary in bytes:
147 // Measured: `176`
148 // Estimated: `3544`
149 // Minimum execution time: 19_600_000 picoseconds.
150 Weight::from_parts(30_803_000, 3544)
151 .saturating_add(T::DbWeight::get().reads(2_u64))
152 .saturating_add(T::DbWeight::get().writes(1_u64))
153 }
154 /// Storage: `Preimage::StatusFor` (r:1 w:0)
155 /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
156 /// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
157 /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
158 fn request_no_deposit_preimage() -> Weight {
159 // Proof Size summary in bytes:
160 // Measured: `144`
161 // Estimated: `3544`
162 // Minimum execution time: 13_302_000 picoseconds.
163 Weight::from_parts(15_444_000, 3544)
164 .saturating_add(T::DbWeight::get().reads(2_u64))
165 .saturating_add(T::DbWeight::get().writes(1_u64))
166 }
167 /// Storage: `Preimage::StatusFor` (r:1 w:0)
168 /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
169 /// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
170 /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
171 fn request_unnoted_preimage() -> Weight {
172 // Proof Size summary in bytes:
173 // Measured: `42`
174 // Estimated: `3544`
175 // Minimum execution time: 15_283_000 picoseconds.
176 Weight::from_parts(16_734_000, 3544)
177 .saturating_add(T::DbWeight::get().reads(2_u64))
178 .saturating_add(T::DbWeight::get().writes(1_u64))
179 }
180 /// Storage: `Preimage::StatusFor` (r:1 w:0)
181 /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
182 /// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
183 /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
184 fn request_requested_preimage() -> Weight {
185 // Proof Size summary in bytes:
186 // Measured: `106`
187 // Estimated: `3544`
188 // Minimum execution time: 10_989_000 picoseconds.
189 Weight::from_parts(11_757_000, 3544)
190 .saturating_add(T::DbWeight::get().reads(2_u64))
191 .saturating_add(T::DbWeight::get().writes(1_u64))
192 }
193 /// Storage: `Preimage::StatusFor` (r:1 w:0)
194 /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
195 /// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
196 /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
197 /// Storage: `Preimage::PreimageFor` (r:0 w:1)
198 /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
199 fn unrequest_preimage() -> Weight {
200 // Proof Size summary in bytes:
201 // Measured: `144`
202 // Estimated: `3544`
203 // Minimum execution time: 19_779_000 picoseconds.
204 Weight::from_parts(20_397_000, 3544)
205 .saturating_add(T::DbWeight::get().reads(2_u64))
206 .saturating_add(T::DbWeight::get().writes(2_u64))
207 }
208 /// Storage: `Preimage::StatusFor` (r:1 w:0)
209 /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
210 /// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
211 /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
212 fn unrequest_unnoted_preimage() -> Weight {
213 // Proof Size summary in bytes:
214 // Measured: `106`
215 // Estimated: `3544`
216 // Minimum execution time: 11_043_000 picoseconds.
217 Weight::from_parts(11_550_000, 3544)
218 .saturating_add(T::DbWeight::get().reads(2_u64))
219 .saturating_add(T::DbWeight::get().writes(1_u64))
220 }
221 /// Storage: `Preimage::StatusFor` (r:1 w:0)
222 /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
223 /// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
224 /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
225 fn unrequest_multi_referenced_preimage() -> Weight {
226 // Proof Size summary in bytes:
227 // Measured: `106`
228 // Estimated: `3544`
229 // Minimum execution time: 12_976_000 picoseconds.
230 Weight::from_parts(15_228_000, 3544)
231 .saturating_add(T::DbWeight::get().reads(2_u64))
232 .saturating_add(T::DbWeight::get().writes(1_u64))
233 }
234 /// Storage: `Preimage::StatusFor` (r:1023 w:1023)
235 /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
236 /// Storage: `System::Account` (r:1023 w:1023)
237 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
238 /// Storage: `Balances::Holds` (r:1023 w:1023)
239 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
240 /// Storage: `Preimage::RequestStatusFor` (r:0 w:1023)
241 /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
242 /// The range of component `n` is `[1, 1024]`.
243 fn ensure_updated(n: u32, ) -> Weight {
244 // Proof Size summary in bytes:
245 // Measured: `963 + n * (203 ±0)`
246 // Estimated: `990 + n * (2591 ±0)`
247 // Minimum execution time: 63_627_000 picoseconds.
248 Weight::from_parts(64_272_000, 990)
249 // Standard Error: 61_901
250 .saturating_add(Weight::from_parts(61_536_229, 0).saturating_mul(n.into()))
251 .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into())))
252 .saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into())))
253 .saturating_add(Weight::from_parts(0, 2591).saturating_mul(n.into()))
254 }
255}