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 42.0.0
20
//! DATE: 2024-10-10, 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: Some("moonbase-dev"), DB CACHE: 1024
24

            
25
// Executed Command:
26
// ./target/production/moonbeam
27
// benchmark
28
// pallet
29
// --chain=moonbase-dev
30
// --steps=50
31
// --repeat=20
32
// --pallet=pallet_preimage
33
// --extrinsic=*
34
// --wasm-execution=compiled
35
// --header=./file_header.txt
36
// --template=./benchmarking/frame-weight-template.hbs
37
// --output=./runtime/common/src/weights/
38

            
39
#![cfg_attr(rustfmt, rustfmt_skip)]
40
#![allow(unused_parens)]
41
#![allow(unused_imports)]
42

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

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