1
// Copyright 2024 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
//! Autogenerated weights for `pallet_preimage`
18
//!
19
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0
20
//! DATE: 2025-02-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21
//! WORST CASE MAP SIZE: `1000000`
22
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
23
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
24

            
25
// Executed Command:
26
// ./target/production/moonbeam
27
// benchmark
28
// pallet
29
// --runtime=./target/production/wbuild/moonriver-runtime/moonriver_runtime.wasm
30
// --genesis-builder=runtime
31
// --genesis-builder-preset=development
32
// --steps=50
33
// --repeat=20
34
// --pallet=pallet_preimage
35
// --extrinsic=*
36
// --wasm-execution=compiled
37
// --header=./file_header.txt
38
// --template=./benchmarking/frame-weight-template.hbs
39
// --output=./runtime/moonriver/src/weights/
40

            
41
#![cfg_attr(rustfmt, rustfmt_skip)]
42
#![allow(unused_parens)]
43
#![allow(unused_imports)]
44

            
45
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
46
use sp_std::marker::PhantomData;
47

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