1
// Copyright (C) Moondance Labs Ltd.
2
// This file is part of Tanssi.
3

            
4
// Tanssi 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
// Tanssi 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 Tanssi.  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 32.0.0
21
//! DATE: 2025-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `benchmark-1`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
24
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("starlight-dev"), DB CACHE: 1024
25

            
26
// Executed Command:
27
// target/release/tanssi-relay
28
// benchmark
29
// pallet
30
// --execution=wasm
31
// --wasm-execution=compiled
32
// --pallet
33
// pallet_preimage
34
// --extrinsic
35
// *
36
// --chain=starlight-dev
37
// --steps
38
// 50
39
// --repeat
40
// 20
41
// --template=benchmarking/frame-weight-runtime-template.hbs
42
// --json-file
43
// raw.json
44
// --output
45
// tmp/starlight_weights/pallet_preimage.rs
46

            
47
#![cfg_attr(rustfmt, rustfmt_skip)]
48
#![allow(unused_parens)]
49
#![allow(unused_imports)]
50

            
51
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
52
use sp_std::marker::PhantomData;
53

            
54
/// Weights for pallet_preimage using the Substrate node and recommended hardware.
55
pub struct SubstrateWeight<T>(PhantomData<T>);
56
impl<T: frame_system::Config> pallet_preimage::WeightInfo for SubstrateWeight<T> {
57
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
58
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
59
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
60
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
61
	/// Storage: `Parameters::Parameters` (r:2 w:0)
62
	/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
63
	/// Storage: `Balances::Holds` (r:1 w:1)
64
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`)
65
	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
66
	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
67
	/// The range of component `s` is `[0, 4194304]`.
68
	fn note_preimage(s: u32, ) -> Weight {
69
		// Proof Size summary in bytes:
70
		//  Measured:  `46`
71
		//  Estimated: `6012`
72
		// Minimum execution time: 70_662_000 picoseconds.
73
		Weight::from_parts(71_512_000, 6012)
74
			// Standard Error: 5
75
			.saturating_add(Weight::from_parts(2_334, 0).saturating_mul(s.into()))
76
			.saturating_add(T::DbWeight::get().reads(5_u64))
77
			.saturating_add(T::DbWeight::get().writes(3_u64))
78
	}
79
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
80
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
81
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
82
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
83
	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
84
	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
85
	/// The range of component `s` is `[0, 4194304]`.
86
	fn note_requested_preimage(s: u32, ) -> Weight {
87
		// Proof Size summary in bytes:
88
		//  Measured:  `106`
89
		//  Estimated: `3556`
90
		// Minimum execution time: 22_628_000 picoseconds.
91
		Weight::from_parts(22_813_000, 3556)
92
			// Standard Error: 5
93
			.saturating_add(Weight::from_parts(2_335, 0).saturating_mul(s.into()))
94
			.saturating_add(T::DbWeight::get().reads(2_u64))
95
			.saturating_add(T::DbWeight::get().writes(2_u64))
96
	}
97
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
98
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
99
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
100
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
101
	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
102
	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
103
	/// The range of component `s` is `[0, 4194304]`.
104
	fn note_no_deposit_preimage(s: u32, ) -> Weight {
105
		// Proof Size summary in bytes:
106
		//  Measured:  `106`
107
		//  Estimated: `3556`
108
		// Minimum execution time: 25_104_000 picoseconds.
109
		Weight::from_parts(25_394_000, 3556)
110
			// Standard Error: 5
111
			.saturating_add(Weight::from_parts(2_340, 0).saturating_mul(s.into()))
112
			.saturating_add(T::DbWeight::get().reads(2_u64))
113
			.saturating_add(T::DbWeight::get().writes(2_u64))
114
	}
115
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
116
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
117
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
118
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
119
	/// Storage: `Balances::Holds` (r:1 w:1)
120
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`)
121
	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
122
	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
123
	fn unnote_preimage() -> Weight {
124
		// Proof Size summary in bytes:
125
		//  Measured:  `243`
126
		//  Estimated: `3622`
127
		// Minimum execution time: 67_308_000 picoseconds.
128
		Weight::from_parts(71_098_000, 3622)
129
			.saturating_add(T::DbWeight::get().reads(3_u64))
130
			.saturating_add(T::DbWeight::get().writes(3_u64))
131
	}
132
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
133
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
134
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
135
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
136
	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
137
	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
138
	fn unnote_no_deposit_preimage() -> Weight {
139
		// Proof Size summary in bytes:
140
		//  Measured:  `144`
141
		//  Estimated: `3556`
142
		// Minimum execution time: 35_870_000 picoseconds.
143
		Weight::from_parts(37_716_000, 3556)
144
			.saturating_add(T::DbWeight::get().reads(2_u64))
145
			.saturating_add(T::DbWeight::get().writes(2_u64))
146
	}
147
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
148
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
149
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
150
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
151
	fn request_preimage() -> Weight {
152
		// Proof Size summary in bytes:
153
		//  Measured:  `188`
154
		//  Estimated: `3556`
155
		// Minimum execution time: 25_615_000 picoseconds.
156
		Weight::from_parts(27_305_000, 3556)
157
			.saturating_add(T::DbWeight::get().reads(2_u64))
158
			.saturating_add(T::DbWeight::get().writes(1_u64))
159
	}
160
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
161
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
162
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
163
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
164
	fn request_no_deposit_preimage() -> Weight {
165
		// Proof Size summary in bytes:
166
		//  Measured:  `144`
167
		//  Estimated: `3556`
168
		// Minimum execution time: 24_420_000 picoseconds.
169
		Weight::from_parts(26_633_000, 3556)
170
			.saturating_add(T::DbWeight::get().reads(2_u64))
171
			.saturating_add(T::DbWeight::get().writes(1_u64))
172
	}
173
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
174
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
175
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
176
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
177
	fn request_unnoted_preimage() -> Weight {
178
		// Proof Size summary in bytes:
179
		//  Measured:  `42`
180
		//  Estimated: `3556`
181
		// Minimum execution time: 25_067_000 picoseconds.
182
		Weight::from_parts(25_408_000, 3556)
183
			.saturating_add(T::DbWeight::get().reads(2_u64))
184
			.saturating_add(T::DbWeight::get().writes(1_u64))
185
	}
186
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
187
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
188
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
189
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
190
	fn request_requested_preimage() -> Weight {
191
		// Proof Size summary in bytes:
192
		//  Measured:  `106`
193
		//  Estimated: `3556`
194
		// Minimum execution time: 19_567_000 picoseconds.
195
		Weight::from_parts(19_931_000, 3556)
196
			.saturating_add(T::DbWeight::get().reads(2_u64))
197
			.saturating_add(T::DbWeight::get().writes(1_u64))
198
	}
199
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
200
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
201
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
202
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
203
	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
204
	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
205
	fn unrequest_preimage() -> Weight {
206
		// Proof Size summary in bytes:
207
		//  Measured:  `144`
208
		//  Estimated: `3556`
209
		// Minimum execution time: 32_047_000 picoseconds.
210
		Weight::from_parts(35_807_000, 3556)
211
			.saturating_add(T::DbWeight::get().reads(2_u64))
212
			.saturating_add(T::DbWeight::get().writes(2_u64))
213
	}
214
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
215
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
216
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
217
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
218
	fn unrequest_unnoted_preimage() -> Weight {
219
		// Proof Size summary in bytes:
220
		//  Measured:  `106`
221
		//  Estimated: `3556`
222
		// Minimum execution time: 19_278_000 picoseconds.
223
		Weight::from_parts(19_907_000, 3556)
224
			.saturating_add(T::DbWeight::get().reads(2_u64))
225
			.saturating_add(T::DbWeight::get().writes(1_u64))
226
	}
227
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
228
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
229
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
230
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
231
	fn unrequest_multi_referenced_preimage() -> Weight {
232
		// Proof Size summary in bytes:
233
		//  Measured:  `106`
234
		//  Estimated: `3556`
235
		// Minimum execution time: 19_452_000 picoseconds.
236
		Weight::from_parts(19_785_000, 3556)
237
			.saturating_add(T::DbWeight::get().reads(2_u64))
238
			.saturating_add(T::DbWeight::get().writes(1_u64))
239
	}
240
	/// Storage: `Preimage::StatusFor` (r:1023 w:1023)
241
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
242
	/// Storage: `System::Account` (r:1023 w:1023)
243
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
244
	/// Storage: `Parameters::Parameters` (r:2 w:0)
245
	/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
246
	/// Storage: `Balances::Holds` (r:1023 w:1023)
247
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`)
248
	/// Storage: `Preimage::RequestStatusFor` (r:0 w:1023)
249
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
250
	/// The range of component `n` is `[1, 1024]`.
251
	fn ensure_updated(n: u32, ) -> Weight {
252
		// Proof Size summary in bytes:
253
		//  Measured:  `0 + n * (227 ±0)`
254
		//  Estimated: `6012 + n * (2632 ±0)`
255
		// Minimum execution time: 78_189_000 picoseconds.
256
		Weight::from_parts(79_130_000, 6012)
257
			// Standard Error: 47_779
258
			.saturating_add(Weight::from_parts(71_512_220, 0).saturating_mul(n.into()))
259
			.saturating_add(T::DbWeight::get().reads(2_u64))
260
			.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into())))
261
			.saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into())))
262
			.saturating_add(Weight::from_parts(0, 2632).saturating_mul(n.into()))
263
	}
264
}