pallet_stateful_storage/
weights.rs

1
2//! MODIFIED by 'benchmark_transform' tool to replace child trie storage access with their specific DB weights
3//!
4//! Autogenerated weights for `pallet_stateful_storage`
5//!
6//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0
7//! DATE: 2025-12-10, STEPS: `20`, REPEAT: `10`, LOW RANGE: `[]`, HIGH RANGE: `[]`
8//! WORST CASE MAP SIZE: `1000000`
9//! HOSTNAME: `ip-10-173-5-194`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
10//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
11
12// Executed Command:
13// ./scripts/../target/release/frequency
14// benchmark
15// pallet
16// --pallet=pallet_stateful-storage
17// --extrinsic
18// *
19// --heap-pages=4096
20// --steps=20
21// --repeat=10
22// --output=./scripts/../pallets/stateful-storage/src/weights.rs
23// --template=./scripts/../.maintain/frame-weight-template.hbs
24// --additional-trie-layers=6
25// --runtime=./scripts/../target/release/wbuild/frequency-runtime/frequency_runtime.wasm
26// --genesis-builder=runtime
27
28#![cfg_attr(rustfmt, rustfmt_skip)]
29#![allow(unused_parens)]
30#![allow(unused_imports)]
31#![allow(missing_docs)]
32
33use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
34use core::marker::PhantomData;
35use common_runtime::weights::rocksdb_child_trie_weights::constants::RocksDbWeightChild;
36
37/// Weight functions needed for `pallet_stateful_storage`.
38pub trait WeightInfo {
39	fn apply_item_actions_add(s: u32, ) -> Weight;
40	fn apply_item_actions_delete(n: u32, ) -> Weight;
41	fn upsert_page(s: u32, ) -> Weight;
42	fn delete_page() -> Weight;
43	fn apply_item_actions_with_signature_v2_add(s: u32, ) -> Weight;
44	fn apply_item_actions_with_signature_v2_delete(n: u32, ) -> Weight;
45	fn upsert_page_with_signature_v2(s: u32, ) -> Weight;
46	fn delete_page_with_signature_v2() -> Weight;
47	fn paginated_v1_to_v2_miss() -> Weight;
48	fn paginated_v1_to_v2_hit() -> Weight;
49	fn itemized_v1_to_v2_miss() -> Weight;
50	fn itemized_v1_to_v2_hit() -> Weight;
51}
52
53/// Weights for `pallet_stateful_storage` using the Substrate node and recommended hardware.
54pub struct SubstrateWeight<T>(PhantomData<T>);
55impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
56	/// Storage: `Schemas::SchemaInfos` (r:1 w:0)
57	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
58	/// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
59	/// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
60	/// Storage: `Msa::DelegatorAndProviderToDelegation` (r:1 w:0)
61	/// Proof: `Msa::DelegatorAndProviderToDelegation` (`max_values`: None, `max_size`: Some(217), added: 2692, mode: `MaxEncodedLen`)
62	/// Storage: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
63	/// Proof: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
64	/// The range of component `s` is `[1024, 5120]`.
65	fn apply_item_actions_add(s: u32, ) -> Weight {
66		// Proof Size summary in bytes:
67		//  Measured:  `562`
68		//  Estimated: `6007`
69		// Minimum execution time: 40_168_000 picoseconds.
70		Weight::from_parts(40_132_414, 6007)
71			// Standard Error: 104
72			.saturating_add(Weight::from_parts(1_749, 0).saturating_mul(s.into()))
73			.saturating_add(T::DbWeight::get().reads(3_u64))
74			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
75			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
76	}
77	/// Storage: `Schemas::SchemaInfos` (r:1 w:0)
78	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
79	/// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
80	/// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
81	/// Storage: `Msa::DelegatorAndProviderToDelegation` (r:1 w:0)
82	/// Proof: `Msa::DelegatorAndProviderToDelegation` (`max_values`: None, `max_size`: Some(217), added: 2692, mode: `MaxEncodedLen`)
83	/// Storage: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
84	/// Proof: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
85	/// The range of component `n` is `[1, 5]`.
86	fn apply_item_actions_delete(_n: u32, ) -> Weight {
87		// Proof Size summary in bytes:
88		//  Measured:  `10972`
89		//  Estimated: `16417`
90		// Minimum execution time: 59_448_000 picoseconds.
91		Weight::from_parts(66_426_545, 16417)
92			.saturating_add(T::DbWeight::get().reads(3_u64))
93			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
94			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
95	}
96	/// Storage: `Schemas::SchemaInfos` (r:1 w:0)
97	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
98	/// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
99	/// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
100	/// Storage: `Msa::DelegatorAndProviderToDelegation` (r:1 w:0)
101	/// Proof: `Msa::DelegatorAndProviderToDelegation` (`max_values`: None, `max_size`: Some(217), added: 2692, mode: `MaxEncodedLen`)
102	/// Storage: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
103	/// Proof: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
104	/// The range of component `s` is `[1, 1024]`.
105	fn upsert_page(s: u32, ) -> Weight {
106		// Proof Size summary in bytes:
107		//  Measured:  `1722`
108		//  Estimated: `7167`
109		// Minimum execution time: 43_907_000 picoseconds.
110		Weight::from_parts(45_791_879, 7167)
111			// Standard Error: 268
112			.saturating_add(Weight::from_parts(593, 0).saturating_mul(s.into()))
113			.saturating_add(T::DbWeight::get().reads(3_u64))
114			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
115			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
116	}
117	/// Storage: `Schemas::SchemaInfos` (r:1 w:0)
118	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
119	/// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
120	/// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
121	/// Storage: `Msa::DelegatorAndProviderToDelegation` (r:1 w:0)
122	/// Proof: `Msa::DelegatorAndProviderToDelegation` (`max_values`: None, `max_size`: Some(217), added: 2692, mode: `MaxEncodedLen`)
123	/// Storage: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
124	/// Proof: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
125	fn delete_page() -> Weight {
126		// Proof Size summary in bytes:
127		//  Measured:  `1724`
128		//  Estimated: `7169`
129		// Minimum execution time: 42_674_000 picoseconds.
130		Weight::from_parts(44_654_000, 7169)
131			.saturating_add(T::DbWeight::get().reads(3_u64))
132			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
133			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
134	}
135	/// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
136	/// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
137	/// Storage: `Schemas::SchemaInfos` (r:1 w:0)
138	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
139	/// Storage: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
140	/// Proof: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
141	/// The range of component `s` is `[1024, 5120]`.
142	fn apply_item_actions_with_signature_v2_add(s: u32, ) -> Weight {
143		// Proof Size summary in bytes:
144		//  Measured:  `569`
145		//  Estimated: `6014`
146		// Minimum execution time: 129_396_000 picoseconds.
147		Weight::from_parts(119_899_421, 6014)
148			// Standard Error: 400
149			.saturating_add(Weight::from_parts(11_041, 0).saturating_mul(s.into()))
150			.saturating_add(T::DbWeight::get().reads(2_u64))
151			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
152			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
153	}
154	/// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
155	/// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
156	/// Storage: `Schemas::SchemaInfos` (r:1 w:0)
157	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
158	/// Storage: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
159	/// Proof: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
160	/// The range of component `n` is `[1, 5]`.
161	fn apply_item_actions_with_signature_v2_delete(_n: u32, ) -> Weight {
162		// Proof Size summary in bytes:
163		//  Measured:  `10979`
164		//  Estimated: `16424`
165		// Minimum execution time: 140_531_000 picoseconds.
166		Weight::from_parts(148_982_707, 16424)
167			.saturating_add(T::DbWeight::get().reads(2_u64))
168			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
169			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
170	}
171	/// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
172	/// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
173	/// Storage: `Schemas::SchemaInfos` (r:1 w:0)
174	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
175	/// Storage: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
176	/// Proof: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
177	/// The range of component `s` is `[1, 1024]`.
178	fn upsert_page_with_signature_v2(s: u32, ) -> Weight {
179		// Proof Size summary in bytes:
180		//  Measured:  `1655`
181		//  Estimated: `7100`
182		// Minimum execution time: 121_340_000 picoseconds.
183		Weight::from_parts(125_187_435, 7100)
184			// Standard Error: 950
185			.saturating_add(Weight::from_parts(10_446, 0).saturating_mul(s.into()))
186			.saturating_add(T::DbWeight::get().reads(2_u64))
187			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
188			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
189	}
190	/// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
191	/// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
192	/// Storage: `Schemas::SchemaInfos` (r:1 w:0)
193	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
194	/// Storage: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
195	/// Proof: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
196	fn delete_page_with_signature_v2() -> Weight {
197		// Proof Size summary in bytes:
198		//  Measured:  `1657`
199		//  Estimated: `7102`
200		// Minimum execution time: 120_927_000 picoseconds.
201		Weight::from_parts(123_376_000, 7102)
202			.saturating_add(T::DbWeight::get().reads(2_u64))
203			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
204			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
205	}
206	/// Storage: UNKNOWN KEY `0x` (r:1 w:0)
207	/// Proof: UNKNOWN KEY `0x` (r:1 w:0)
208	fn paginated_v1_to_v2_miss() -> Weight {
209		// Proof Size summary in bytes:
210		//  Measured:  `11`
211		//  Estimated: `5456`
212		// Minimum execution time: 2_667_000 picoseconds.
213		Weight::from_parts(3_026_000, 5456)
214			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
215	}
216	/// Storage: UNKNOWN KEY `0x` (r:1 w:0)
217	/// Proof: UNKNOWN KEY `0x` (r:1 w:0)
218	/// Storage: UNKNOWN KEY `0xf1577fbf1d628fdddb4ebfc6e8d95fb1f1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
219	/// Proof: UNKNOWN KEY `0xf1577fbf1d628fdddb4ebfc6e8d95fb1f1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
220	fn paginated_v1_to_v2_hit() -> Weight {
221		// Proof Size summary in bytes:
222		//  Measured:  `1172`
223		//  Estimated: `6617`
224		// Minimum execution time: 11_580_000 picoseconds.
225		Weight::from_parts(12_006_000, 6617)
226			.saturating_add(RocksDbWeightChild::get().reads(2_u64))
227			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
228	}
229	/// Storage: UNKNOWN KEY `0x` (r:1 w:0)
230	/// Proof: UNKNOWN KEY `0x` (r:1 w:0)
231	fn itemized_v1_to_v2_miss() -> Weight {
232		// Proof Size summary in bytes:
233		//  Measured:  `11`
234		//  Estimated: `5456`
235		// Minimum execution time: 2_680_000 picoseconds.
236		Weight::from_parts(2_919_000, 5456)
237			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
238	}
239	/// Storage: UNKNOWN KEY `0x` (r:1 w:0)
240	/// Proof: UNKNOWN KEY `0x` (r:1 w:0)
241	/// Storage: UNKNOWN KEY `0xf1577fbf1d628fdddb4ebfc6e8d95fb10100` (r:1 w:1)
242	/// Proof: UNKNOWN KEY `0xf1577fbf1d628fdddb4ebfc6e8d95fb10100` (r:1 w:1)
243	fn itemized_v1_to_v2_hit() -> Weight {
244		// Proof Size summary in bytes:
245		//  Measured:  `329`
246		//  Estimated: `5774`
247		// Minimum execution time: 15_843_000 picoseconds.
248		Weight::from_parts(16_333_000, 5774)
249			.saturating_add(RocksDbWeightChild::get().reads(2_u64))
250			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
251	}
252}
253
254// For backwards compatibility and tests.
255impl WeightInfo for () {
256	/// Storage: `Schemas::SchemaInfos` (r:1 w:0)
257	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
258	/// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
259	/// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
260	/// Storage: `Msa::DelegatorAndProviderToDelegation` (r:1 w:0)
261	/// Proof: `Msa::DelegatorAndProviderToDelegation` (`max_values`: None, `max_size`: Some(217), added: 2692, mode: `MaxEncodedLen`)
262	/// Storage: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
263	/// Proof: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
264	/// The range of component `s` is `[1024, 5120]`.
265	fn apply_item_actions_add(s: u32, ) -> Weight {
266		// Proof Size summary in bytes:
267		//  Measured:  `562`
268		//  Estimated: `6007`
269		// Minimum execution time: 40_168_000 picoseconds.
270		Weight::from_parts(40_132_414, 6007)
271			// Standard Error: 104
272			.saturating_add(Weight::from_parts(1_749, 0).saturating_mul(s.into()))
273			.saturating_add(RocksDbWeight::get().reads(3_u64))
274			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
275			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
276	}
277	/// Storage: `Schemas::SchemaInfos` (r:1 w:0)
278	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
279	/// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
280	/// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
281	/// Storage: `Msa::DelegatorAndProviderToDelegation` (r:1 w:0)
282	/// Proof: `Msa::DelegatorAndProviderToDelegation` (`max_values`: None, `max_size`: Some(217), added: 2692, mode: `MaxEncodedLen`)
283	/// Storage: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
284	/// Proof: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
285	/// The range of component `n` is `[1, 5]`.
286	fn apply_item_actions_delete(_n: u32, ) -> Weight {
287		// Proof Size summary in bytes:
288		//  Measured:  `10972`
289		//  Estimated: `16417`
290		// Minimum execution time: 59_448_000 picoseconds.
291		Weight::from_parts(66_426_545, 16417)
292			.saturating_add(RocksDbWeight::get().reads(3_u64))
293			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
294			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
295	}
296	/// Storage: `Schemas::SchemaInfos` (r:1 w:0)
297	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
298	/// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
299	/// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
300	/// Storage: `Msa::DelegatorAndProviderToDelegation` (r:1 w:0)
301	/// Proof: `Msa::DelegatorAndProviderToDelegation` (`max_values`: None, `max_size`: Some(217), added: 2692, mode: `MaxEncodedLen`)
302	/// Storage: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
303	/// Proof: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
304	/// The range of component `s` is `[1, 1024]`.
305	fn upsert_page(s: u32, ) -> Weight {
306		// Proof Size summary in bytes:
307		//  Measured:  `1722`
308		//  Estimated: `7167`
309		// Minimum execution time: 43_907_000 picoseconds.
310		Weight::from_parts(45_791_879, 7167)
311			// Standard Error: 268
312			.saturating_add(Weight::from_parts(593, 0).saturating_mul(s.into()))
313			.saturating_add(RocksDbWeight::get().reads(3_u64))
314			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
315			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
316	}
317	/// Storage: `Schemas::SchemaInfos` (r:1 w:0)
318	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
319	/// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
320	/// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
321	/// Storage: `Msa::DelegatorAndProviderToDelegation` (r:1 w:0)
322	/// Proof: `Msa::DelegatorAndProviderToDelegation` (`max_values`: None, `max_size`: Some(217), added: 2692, mode: `MaxEncodedLen`)
323	/// Storage: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
324	/// Proof: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
325	fn delete_page() -> Weight {
326		// Proof Size summary in bytes:
327		//  Measured:  `1724`
328		//  Estimated: `7169`
329		// Minimum execution time: 42_674_000 picoseconds.
330		Weight::from_parts(44_654_000, 7169)
331			.saturating_add(RocksDbWeight::get().reads(3_u64))
332			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
333			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
334	}
335	/// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
336	/// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
337	/// Storage: `Schemas::SchemaInfos` (r:1 w:0)
338	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
339	/// Storage: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
340	/// Proof: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
341	/// The range of component `s` is `[1024, 5120]`.
342	fn apply_item_actions_with_signature_v2_add(s: u32, ) -> Weight {
343		// Proof Size summary in bytes:
344		//  Measured:  `569`
345		//  Estimated: `6014`
346		// Minimum execution time: 129_396_000 picoseconds.
347		Weight::from_parts(119_899_421, 6014)
348			// Standard Error: 400
349			.saturating_add(Weight::from_parts(11_041, 0).saturating_mul(s.into()))
350			.saturating_add(RocksDbWeight::get().reads(2_u64))
351			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
352			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
353	}
354	/// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
355	/// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
356	/// Storage: `Schemas::SchemaInfos` (r:1 w:0)
357	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
358	/// Storage: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
359	/// Proof: UNKNOWN KEY `0xbd1557c8db6bd8599a811a7175fbc2fc6400` (r:1 w:1)
360	/// The range of component `n` is `[1, 5]`.
361	fn apply_item_actions_with_signature_v2_delete(_n: u32, ) -> Weight {
362		// Proof Size summary in bytes:
363		//  Measured:  `10979`
364		//  Estimated: `16424`
365		// Minimum execution time: 140_531_000 picoseconds.
366		Weight::from_parts(148_982_707, 16424)
367			.saturating_add(RocksDbWeight::get().reads(2_u64))
368			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
369			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
370	}
371	/// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
372	/// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
373	/// Storage: `Schemas::SchemaInfos` (r:1 w:0)
374	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
375	/// Storage: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
376	/// Proof: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
377	/// The range of component `s` is `[1, 1024]`.
378	fn upsert_page_with_signature_v2(s: u32, ) -> Weight {
379		// Proof Size summary in bytes:
380		//  Measured:  `1655`
381		//  Estimated: `7100`
382		// Minimum execution time: 121_340_000 picoseconds.
383		Weight::from_parts(125_187_435, 7100)
384			// Standard Error: 950
385			.saturating_add(Weight::from_parts(10_446, 0).saturating_mul(s.into()))
386			.saturating_add(RocksDbWeight::get().reads(2_u64))
387			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
388			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
389	}
390	/// Storage: `Msa::PublicKeyToMsaId` (r:1 w:0)
391	/// Proof: `Msa::PublicKeyToMsaId` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
392	/// Storage: `Schemas::SchemaInfos` (r:1 w:0)
393	/// Proof: `Schemas::SchemaInfos` (`max_values`: None, `max_size`: Some(17), added: 2492, mode: `MaxEncodedLen`)
394	/// Storage: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
395	/// Proof: UNKNOWN KEY `0x0763c98381dc89abe38627fe2f98cb7af1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
396	fn delete_page_with_signature_v2() -> Weight {
397		// Proof Size summary in bytes:
398		//  Measured:  `1657`
399		//  Estimated: `7102`
400		// Minimum execution time: 120_927_000 picoseconds.
401		Weight::from_parts(123_376_000, 7102)
402			.saturating_add(RocksDbWeight::get().reads(2_u64))
403			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
404			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
405	}
406	/// Storage: UNKNOWN KEY `0x` (r:1 w:0)
407	/// Proof: UNKNOWN KEY `0x` (r:1 w:0)
408	fn paginated_v1_to_v2_miss() -> Weight {
409		// Proof Size summary in bytes:
410		//  Measured:  `11`
411		//  Estimated: `5456`
412		// Minimum execution time: 2_667_000 picoseconds.
413		Weight::from_parts(3_026_000, 5456)
414			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
415	}
416	/// Storage: UNKNOWN KEY `0x` (r:1 w:0)
417	/// Proof: UNKNOWN KEY `0x` (r:1 w:0)
418	/// Storage: UNKNOWN KEY `0xf1577fbf1d628fdddb4ebfc6e8d95fb1f1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
419	/// Proof: UNKNOWN KEY `0xf1577fbf1d628fdddb4ebfc6e8d95fb1f1577fbf1d628fdddb4ebfc6e8d95fb1` (r:1 w:1)
420	fn paginated_v1_to_v2_hit() -> Weight {
421		// Proof Size summary in bytes:
422		//  Measured:  `1172`
423		//  Estimated: `6617`
424		// Minimum execution time: 11_580_000 picoseconds.
425		Weight::from_parts(12_006_000, 6617)
426			.saturating_add(RocksDbWeightChild::get().reads(2_u64))
427			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
428	}
429	/// Storage: UNKNOWN KEY `0x` (r:1 w:0)
430	/// Proof: UNKNOWN KEY `0x` (r:1 w:0)
431	fn itemized_v1_to_v2_miss() -> Weight {
432		// Proof Size summary in bytes:
433		//  Measured:  `11`
434		//  Estimated: `5456`
435		// Minimum execution time: 2_680_000 picoseconds.
436		Weight::from_parts(2_919_000, 5456)
437			.saturating_add(RocksDbWeightChild::get().reads(1_u64))
438	}
439	/// Storage: UNKNOWN KEY `0x` (r:1 w:0)
440	/// Proof: UNKNOWN KEY `0x` (r:1 w:0)
441	/// Storage: UNKNOWN KEY `0xf1577fbf1d628fdddb4ebfc6e8d95fb10100` (r:1 w:1)
442	/// Proof: UNKNOWN KEY `0xf1577fbf1d628fdddb4ebfc6e8d95fb10100` (r:1 w:1)
443	fn itemized_v1_to_v2_hit() -> Weight {
444		// Proof Size summary in bytes:
445		//  Measured:  `329`
446		//  Estimated: `5774`
447		// Minimum execution time: 15_843_000 picoseconds.
448		Weight::from_parts(16_333_000, 5774)
449			.saturating_add(RocksDbWeightChild::get().reads(2_u64))
450			.saturating_add(RocksDbWeightChild::get().writes(1_u64))
451	}
452}
453
454
455#[cfg(test)]
456mod tests {
457  use frame_support::{traits::Get, weights::Weight, dispatch::DispatchClass};
458  use common_runtime::constants::{MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO};
459  use common_runtime::weights::extrinsic_weights::ExtrinsicBaseWeight;
460
461  #[allow(dead_code)]
462  struct BlockWeights;
463  impl Get<frame_system::limits::BlockWeights> for BlockWeights {
464  	fn get() -> frame_system::limits::BlockWeights {
465  		frame_system::limits::BlockWeights::builder()
466  			.base_block(Weight::zero())
467  			.for_class(DispatchClass::all(), |weights| {
468  				weights.base_extrinsic = ExtrinsicBaseWeight::get();
469  			})
470  			.for_class(DispatchClass::non_mandatory(), |weights| {
471  				weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT);
472  			})
473  			.build_or_panic()
474  	}
475  }
476
477	#[test]
478	fn test_apply_item_actions_add() {
479		assert!(
480			BlockWeights::get()
481				.per_class
482				.get(frame_support::dispatch::DispatchClass::Normal)
483				.max_extrinsic
484				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
485				.proof_size()
486				> 6007
487		);
488	}
489	#[test]
490	fn test_apply_item_actions_delete() {
491		assert!(
492			BlockWeights::get()
493				.per_class
494				.get(frame_support::dispatch::DispatchClass::Normal)
495				.max_extrinsic
496				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
497				.proof_size()
498				> 16417
499		);
500	}
501	#[test]
502	fn test_upsert_page() {
503		assert!(
504			BlockWeights::get()
505				.per_class
506				.get(frame_support::dispatch::DispatchClass::Normal)
507				.max_extrinsic
508				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
509				.proof_size()
510				> 7167
511		);
512	}
513	#[test]
514	fn test_delete_page() {
515		assert!(
516			BlockWeights::get()
517				.per_class
518				.get(frame_support::dispatch::DispatchClass::Normal)
519				.max_extrinsic
520				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
521				.proof_size()
522				> 7169
523		);
524	}
525	#[test]
526	fn test_apply_item_actions_with_signature_v2_add() {
527		assert!(
528			BlockWeights::get()
529				.per_class
530				.get(frame_support::dispatch::DispatchClass::Normal)
531				.max_extrinsic
532				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
533				.proof_size()
534				> 6014
535		);
536	}
537	#[test]
538	fn test_apply_item_actions_with_signature_v2_delete() {
539		assert!(
540			BlockWeights::get()
541				.per_class
542				.get(frame_support::dispatch::DispatchClass::Normal)
543				.max_extrinsic
544				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
545				.proof_size()
546				> 16424
547		);
548	}
549	#[test]
550	fn test_upsert_page_with_signature_v2() {
551		assert!(
552			BlockWeights::get()
553				.per_class
554				.get(frame_support::dispatch::DispatchClass::Normal)
555				.max_extrinsic
556				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
557				.proof_size()
558				> 7100
559		);
560	}
561	#[test]
562	fn test_delete_page_with_signature_v2() {
563		assert!(
564			BlockWeights::get()
565				.per_class
566				.get(frame_support::dispatch::DispatchClass::Normal)
567				.max_extrinsic
568				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
569				.proof_size()
570				> 7102
571		);
572	}
573	#[test]
574	fn test_paginated_v1_to_v2_miss() {
575		assert!(
576			BlockWeights::get()
577				.per_class
578				.get(frame_support::dispatch::DispatchClass::Normal)
579				.max_extrinsic
580				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
581				.proof_size()
582				> 5456
583		);
584	}
585	#[test]
586	fn test_paginated_v1_to_v2_hit() {
587		assert!(
588			BlockWeights::get()
589				.per_class
590				.get(frame_support::dispatch::DispatchClass::Normal)
591				.max_extrinsic
592				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
593				.proof_size()
594				> 6617
595		);
596	}
597	#[test]
598	fn test_itemized_v1_to_v2_miss() {
599		assert!(
600			BlockWeights::get()
601				.per_class
602				.get(frame_support::dispatch::DispatchClass::Normal)
603				.max_extrinsic
604				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
605				.proof_size()
606				> 5456
607		);
608	}
609	#[test]
610	fn test_itemized_v1_to_v2_hit() {
611		assert!(
612			BlockWeights::get()
613				.per_class
614				.get(frame_support::dispatch::DispatchClass::Normal)
615				.max_extrinsic
616				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
617				.proof_size()
618				> 5774
619		);
620	}
621}