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: 2026-02-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/moonbase-runtime/moonbase_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
// --disable-log-color
42
// --output=./runtime/moonbase/src/weights
43

            
44
#![cfg_attr(rustfmt, rustfmt_skip)]
45
#![allow(unused_parens)]
46
#![allow(unused_imports)]
47

            
48
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
49
use sp_std::marker::PhantomData;
50

            
51
/// Weights for `pallet_preimage`.
52
pub struct WeightInfo<T>(PhantomData<T>);
53
impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> {
54
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
55
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
56
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
57
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
58
	/// Storage: `Balances::Holds` (r:1 w:1)
59
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
60
	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
61
	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
62
	/// The range of component `s` is `[0, 4194304]`.
63
	fn note_preimage(s: u32, ) -> Weight {
64
		// Proof Size summary in bytes:
65
		//  Measured:  `42`
66
		//  Estimated: `3544`
67
		// Minimum execution time: 55_133_000 picoseconds.
68
		Weight::from_parts(55_575_000, 3544)
69
			// Standard Error: 4
70
			.saturating_add(Weight::from_parts(2_402, 0).saturating_mul(s.into()))
71
			.saturating_add(T::DbWeight::get().reads(3_u64))
72
			.saturating_add(T::DbWeight::get().writes(3_u64))
73
	}
74
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
75
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
76
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
77
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
78
	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
79
	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
80
	/// The range of component `s` is `[0, 4194304]`.
81
	fn note_requested_preimage(s: u32, ) -> Weight {
82
		// Proof Size summary in bytes:
83
		//  Measured:  `106`
84
		//  Estimated: `3544`
85
		// Minimum execution time: 16_582_000 picoseconds.
86
		Weight::from_parts(17_309_000, 3544)
87
			// Standard Error: 4
88
			.saturating_add(Weight::from_parts(2_401, 0).saturating_mul(s.into()))
89
			.saturating_add(T::DbWeight::get().reads(2_u64))
90
			.saturating_add(T::DbWeight::get().writes(2_u64))
91
	}
92
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
93
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
94
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
95
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
96
	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
97
	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
98
	/// The range of component `s` is `[0, 4194304]`.
99
	fn note_no_deposit_preimage(s: u32, ) -> Weight {
100
		// Proof Size summary in bytes:
101
		//  Measured:  `106`
102
		//  Estimated: `3544`
103
		// Minimum execution time: 16_250_000 picoseconds.
104
		Weight::from_parts(16_614_000, 3544)
105
			// Standard Error: 4
106
			.saturating_add(Weight::from_parts(2_410, 0).saturating_mul(s.into()))
107
			.saturating_add(T::DbWeight::get().reads(2_u64))
108
			.saturating_add(T::DbWeight::get().writes(2_u64))
109
	}
110
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
111
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
112
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
113
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
114
	/// Storage: `Balances::Holds` (r:1 w:1)
115
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
116
	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
117
	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
118
	fn unnote_preimage() -> Weight {
119
		// Proof Size summary in bytes:
120
		//  Measured:  `220`
121
		//  Estimated: `3544`
122
		// Minimum execution time: 55_400_000 picoseconds.
123
		Weight::from_parts(56_598_000, 3544)
124
			.saturating_add(T::DbWeight::get().reads(3_u64))
125
			.saturating_add(T::DbWeight::get().writes(3_u64))
126
	}
127
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
128
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
129
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
130
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
131
	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
132
	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
133
	fn unnote_no_deposit_preimage() -> Weight {
134
		// Proof Size summary in bytes:
135
		//  Measured:  `144`
136
		//  Estimated: `3544`
137
		// Minimum execution time: 23_082_000 picoseconds.
138
		Weight::from_parts(23_675_000, 3544)
139
			.saturating_add(T::DbWeight::get().reads(2_u64))
140
			.saturating_add(T::DbWeight::get().writes(2_u64))
141
	}
142
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
143
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
144
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
145
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
146
	fn request_preimage() -> Weight {
147
		// Proof Size summary in bytes:
148
		//  Measured:  `176`
149
		//  Estimated: `3544`
150
		// Minimum execution time: 19_387_000 picoseconds.
151
		Weight::from_parts(19_965_000, 3544)
152
			.saturating_add(T::DbWeight::get().reads(2_u64))
153
			.saturating_add(T::DbWeight::get().writes(1_u64))
154
	}
155
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
156
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
157
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
158
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
159
	fn request_no_deposit_preimage() -> Weight {
160
		// Proof Size summary in bytes:
161
		//  Measured:  `144`
162
		//  Estimated: `3544`
163
		// Minimum execution time: 13_847_000 picoseconds.
164
		Weight::from_parts(14_226_000, 3544)
165
			.saturating_add(T::DbWeight::get().reads(2_u64))
166
			.saturating_add(T::DbWeight::get().writes(1_u64))
167
	}
168
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
169
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
170
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
171
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
172
	fn request_unnoted_preimage() -> Weight {
173
		// Proof Size summary in bytes:
174
		//  Measured:  `42`
175
		//  Estimated: `3544`
176
		// Minimum execution time: 15_295_000 picoseconds.
177
		Weight::from_parts(15_758_000, 3544)
178
			.saturating_add(T::DbWeight::get().reads(2_u64))
179
			.saturating_add(T::DbWeight::get().writes(1_u64))
180
	}
181
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
182
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
183
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
184
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
185
	fn request_requested_preimage() -> Weight {
186
		// Proof Size summary in bytes:
187
		//  Measured:  `106`
188
		//  Estimated: `3544`
189
		// Minimum execution time: 11_076_000 picoseconds.
190
		Weight::from_parts(11_523_000, 3544)
191
			.saturating_add(T::DbWeight::get().reads(2_u64))
192
			.saturating_add(T::DbWeight::get().writes(1_u64))
193
	}
194
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
195
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
196
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
197
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
198
	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
199
	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
200
	fn unrequest_preimage() -> Weight {
201
		// Proof Size summary in bytes:
202
		//  Measured:  `144`
203
		//  Estimated: `3544`
204
		// Minimum execution time: 20_712_000 picoseconds.
205
		Weight::from_parts(21_294_000, 3544)
206
			.saturating_add(T::DbWeight::get().reads(2_u64))
207
			.saturating_add(T::DbWeight::get().writes(2_u64))
208
	}
209
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
210
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
211
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
212
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
213
	fn unrequest_unnoted_preimage() -> Weight {
214
		// Proof Size summary in bytes:
215
		//  Measured:  `106`
216
		//  Estimated: `3544`
217
		// Minimum execution time: 11_079_000 picoseconds.
218
		Weight::from_parts(11_532_000, 3544)
219
			.saturating_add(T::DbWeight::get().reads(2_u64))
220
			.saturating_add(T::DbWeight::get().writes(1_u64))
221
	}
222
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
223
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
224
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
225
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
226
	fn unrequest_multi_referenced_preimage() -> Weight {
227
		// Proof Size summary in bytes:
228
		//  Measured:  `106`
229
		//  Estimated: `3544`
230
		// Minimum execution time: 11_062_000 picoseconds.
231
		Weight::from_parts(11_284_000, 3544)
232
			.saturating_add(T::DbWeight::get().reads(2_u64))
233
			.saturating_add(T::DbWeight::get().writes(1_u64))
234
	}
235
	/// Storage: `Preimage::StatusFor` (r:1023 w:1023)
236
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
237
	/// Storage: `System::Account` (r:1023 w:1023)
238
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
239
	/// Storage: `Balances::Holds` (r:1023 w:1023)
240
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
241
	/// Storage: `Preimage::RequestStatusFor` (r:0 w:1023)
242
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`)
243
	/// The range of component `n` is `[1, 1024]`.
244
	fn ensure_updated(n: u32, ) -> Weight {
245
		// Proof Size summary in bytes:
246
		//  Measured:  `910 + n * (203 ±0)`
247
		//  Estimated: `990 + n * (2591 ±0)`
248
		// Minimum execution time: 64_340_000 picoseconds.
249
		Weight::from_parts(65_256_000, 990)
250
			// Standard Error: 30_255
251
			.saturating_add(Weight::from_parts(62_325_432, 0).saturating_mul(n.into()))
252
			.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into())))
253
			.saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into())))
254
			.saturating_add(Weight::from_parts(0, 2591).saturating_mul(n.into()))
255
	}
256
}