pallet_subspace/weights.rs
1
2//! Autogenerated weights for pallet_subspace
3//!
4//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0
5//! DATE: 2024-09-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
6//! WORST CASE MAP SIZE: `1000000`
7//! HOSTNAME: `Ubuntu-2404-noble-amd64-base`, CPU: `Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz`
8//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
9
10// Executed Command:
11// ./target/release/subspace-node
12// benchmark
13// pallet
14// --runtime=./target/release/wbuild/subspace-runtime/subspace_runtime.compact.compressed.wasm
15// --genesis-builder=runtime
16// --steps=50
17// --repeat=20
18// --pallet=pallet_subspace
19// --extrinsic=*
20// --wasm-execution=compiled
21// --heap-pages=4096
22// --output=./weights/pallet-subspace.rs
23// --template=./frame-weight-template.hbs
24
25#![cfg_attr(rustfmt, rustfmt_skip)]
26#![allow(unused_parens)]
27#![allow(unused_imports)]
28
29use frame_support::{traits::Get, weights::{Weight, constants::ParityDbWeight}};
30use core::marker::PhantomData;
31
32/// Weight functions needed for pallet_subspace.
33pub trait WeightInfo {
34 fn store_segment_headers(x: u32, ) -> Weight;
35 fn enable_solution_range_adjustment() -> Weight;
36 fn vote() -> Weight;
37 fn enable_rewards_at() -> Weight;
38 fn enable_authoring_by_anyone() -> Weight;
39 fn set_pot_slot_iterations() -> Weight;
40}
41
42/// Weights for pallet_subspace using the Substrate node and recommended hardware.
43pub struct SubstrateWeight<T>(PhantomData<T>);
44impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
45 /// Storage: `Subspace::DidProcessSegmentHeaders` (r:1 w:1)
46 /// Proof: `Subspace::DidProcessSegmentHeaders` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
47 /// Storage: `Subspace::SegmentCommitment` (r:20 w:20)
48 /// Proof: `Subspace::SegmentCommitment` (`max_values`: None, `max_size`: None, mode: `Measured`)
49 /// Storage: `Subspace::CounterForSegmentCommitment` (r:1 w:1)
50 /// Proof: `Subspace::CounterForSegmentCommitment` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
51 /// Storage: `System::Digest` (r:1 w:1)
52 /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
53 /// The range of component `x` is `[1, 20]`.
54 fn store_segment_headers(x: u32, ) -> Weight {
55 // Proof Size summary in bytes:
56 // Measured: `0`
57 // Estimated: `1489 + x * (2475 ±0)`
58 // Minimum execution time: 14_713_000 picoseconds.
59 Weight::from_parts(8_393_097, 1489)
60 // Standard Error: 5_367
61 .saturating_add(Weight::from_parts(6_664_776, 0).saturating_mul(x.into()))
62 .saturating_add(T::DbWeight::get().reads(3_u64))
63 .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(x.into())))
64 .saturating_add(T::DbWeight::get().writes(3_u64))
65 .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(x.into())))
66 .saturating_add(Weight::from_parts(0, 2475).saturating_mul(x.into()))
67 }
68 /// Storage: `Subspace::ShouldAdjustSolutionRange` (r:1 w:1)
69 /// Proof: `Subspace::ShouldAdjustSolutionRange` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
70 /// Storage: `Subspace::SolutionRanges` (r:1 w:1)
71 /// Proof: `Subspace::SolutionRanges` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
72 /// Storage: `System::Digest` (r:1 w:1)
73 /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
74 /// Storage: `Subspace::NextSolutionRangeOverride` (r:0 w:1)
75 /// Proof: `Subspace::NextSolutionRangeOverride` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
76 fn enable_solution_range_adjustment() -> Weight {
77 // Proof Size summary in bytes:
78 // Measured: `0`
79 // Estimated: `1485`
80 // Minimum execution time: 8_505_000 picoseconds.
81 Weight::from_parts(8_696_000, 1485)
82 .saturating_add(T::DbWeight::get().reads(3_u64))
83 .saturating_add(T::DbWeight::get().writes(4_u64))
84 }
85 /// Storage: `Subspace::BlockList` (r:1 w:0)
86 /// Proof: `Subspace::BlockList` (`max_values`: None, `max_size`: None, mode: `Measured`)
87 fn vote() -> Weight {
88 // Proof Size summary in bytes:
89 // Measured: `0`
90 // Estimated: `3465`
91 // Minimum execution time: 10_116_000 picoseconds.
92 Weight::from_parts(10_442_000, 3465)
93 .saturating_add(T::DbWeight::get().reads(1_u64))
94 }
95 /// Storage: `Subspace::EnableRewards` (r:1 w:1)
96 /// Proof: `Subspace::EnableRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
97 fn enable_rewards_at() -> Weight {
98 // Proof Size summary in bytes:
99 // Measured: `0`
100 // Estimated: `1485`
101 // Minimum execution time: 4_200_000 picoseconds.
102 Weight::from_parts(4_344_000, 1485)
103 .saturating_add(T::DbWeight::get().reads(1_u64))
104 .saturating_add(T::DbWeight::get().writes(1_u64))
105 }
106 /// Storage: `Subspace::RootPlotPublicKey` (r:1 w:0)
107 /// Proof: `Subspace::RootPlotPublicKey` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
108 /// Storage: `System::Digest` (r:1 w:1)
109 /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
110 /// Storage: `Subspace::AllowAuthoringByAnyone` (r:0 w:1)
111 /// Proof: `Subspace::AllowAuthoringByAnyone` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
112 fn enable_authoring_by_anyone() -> Weight {
113 // Proof Size summary in bytes:
114 // Measured: `0`
115 // Estimated: `1485`
116 // Minimum execution time: 5_316_000 picoseconds.
117 Weight::from_parts(5_589_000, 1485)
118 .saturating_add(T::DbWeight::get().reads(2_u64))
119 .saturating_add(T::DbWeight::get().writes(2_u64))
120 }
121 /// Storage: `Subspace::PotSlotIterations` (r:1 w:0)
122 /// Proof: `Subspace::PotSlotIterations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
123 /// Storage: `Subspace::PotSlotIterationsUpdate` (r:1 w:1)
124 /// Proof: `Subspace::PotSlotIterationsUpdate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
125 fn set_pot_slot_iterations() -> Weight {
126 // Proof Size summary in bytes:
127 // Measured: `0`
128 // Estimated: `1485`
129 // Minimum execution time: 5_132_000 picoseconds.
130 Weight::from_parts(5_251_000, 1485)
131 .saturating_add(T::DbWeight::get().reads(2_u64))
132 .saturating_add(T::DbWeight::get().writes(1_u64))
133 }
134}
135
136// For backwards compatibility and tests
137impl WeightInfo for () {
138 /// Storage: `Subspace::DidProcessSegmentHeaders` (r:1 w:1)
139 /// Proof: `Subspace::DidProcessSegmentHeaders` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
140 /// Storage: `Subspace::SegmentCommitment` (r:20 w:20)
141 /// Proof: `Subspace::SegmentCommitment` (`max_values`: None, `max_size`: None, mode: `Measured`)
142 /// Storage: `Subspace::CounterForSegmentCommitment` (r:1 w:1)
143 /// Proof: `Subspace::CounterForSegmentCommitment` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
144 /// Storage: `System::Digest` (r:1 w:1)
145 /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
146 /// The range of component `x` is `[1, 20]`.
147 fn store_segment_headers(x: u32, ) -> Weight {
148 // Proof Size summary in bytes:
149 // Measured: `0`
150 // Estimated: `1489 + x * (2475 ±0)`
151 // Minimum execution time: 14_713_000 picoseconds.
152 Weight::from_parts(8_393_097, 1489)
153 // Standard Error: 5_367
154 .saturating_add(Weight::from_parts(6_664_776, 0).saturating_mul(x.into()))
155 .saturating_add(ParityDbWeight::get().reads(3_u64))
156 .saturating_add(ParityDbWeight::get().reads((1_u64).saturating_mul(x.into())))
157 .saturating_add(ParityDbWeight::get().writes(3_u64))
158 .saturating_add(ParityDbWeight::get().writes((1_u64).saturating_mul(x.into())))
159 .saturating_add(Weight::from_parts(0, 2475).saturating_mul(x.into()))
160 }
161 /// Storage: `Subspace::ShouldAdjustSolutionRange` (r:1 w:1)
162 /// Proof: `Subspace::ShouldAdjustSolutionRange` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
163 /// Storage: `Subspace::SolutionRanges` (r:1 w:1)
164 /// Proof: `Subspace::SolutionRanges` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
165 /// Storage: `System::Digest` (r:1 w:1)
166 /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
167 /// Storage: `Subspace::NextSolutionRangeOverride` (r:0 w:1)
168 /// Proof: `Subspace::NextSolutionRangeOverride` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
169 fn enable_solution_range_adjustment() -> Weight {
170 // Proof Size summary in bytes:
171 // Measured: `0`
172 // Estimated: `1485`
173 // Minimum execution time: 8_505_000 picoseconds.
174 Weight::from_parts(8_696_000, 1485)
175 .saturating_add(ParityDbWeight::get().reads(3_u64))
176 .saturating_add(ParityDbWeight::get().writes(4_u64))
177 }
178 /// Storage: `Subspace::BlockList` (r:1 w:0)
179 /// Proof: `Subspace::BlockList` (`max_values`: None, `max_size`: None, mode: `Measured`)
180 fn vote() -> Weight {
181 // Proof Size summary in bytes:
182 // Measured: `0`
183 // Estimated: `3465`
184 // Minimum execution time: 10_116_000 picoseconds.
185 Weight::from_parts(10_442_000, 3465)
186 .saturating_add(ParityDbWeight::get().reads(1_u64))
187 }
188 /// Storage: `Subspace::EnableRewards` (r:1 w:1)
189 /// Proof: `Subspace::EnableRewards` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
190 fn enable_rewards_at() -> Weight {
191 // Proof Size summary in bytes:
192 // Measured: `0`
193 // Estimated: `1485`
194 // Minimum execution time: 4_200_000 picoseconds.
195 Weight::from_parts(4_344_000, 1485)
196 .saturating_add(ParityDbWeight::get().reads(1_u64))
197 .saturating_add(ParityDbWeight::get().writes(1_u64))
198 }
199 /// Storage: `Subspace::RootPlotPublicKey` (r:1 w:0)
200 /// Proof: `Subspace::RootPlotPublicKey` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
201 /// Storage: `System::Digest` (r:1 w:1)
202 /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
203 /// Storage: `Subspace::AllowAuthoringByAnyone` (r:0 w:1)
204 /// Proof: `Subspace::AllowAuthoringByAnyone` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
205 fn enable_authoring_by_anyone() -> Weight {
206 // Proof Size summary in bytes:
207 // Measured: `0`
208 // Estimated: `1485`
209 // Minimum execution time: 5_316_000 picoseconds.
210 Weight::from_parts(5_589_000, 1485)
211 .saturating_add(ParityDbWeight::get().reads(2_u64))
212 .saturating_add(ParityDbWeight::get().writes(2_u64))
213 }
214 /// Storage: `Subspace::PotSlotIterations` (r:1 w:0)
215 /// Proof: `Subspace::PotSlotIterations` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
216 /// Storage: `Subspace::PotSlotIterationsUpdate` (r:1 w:1)
217 /// Proof: `Subspace::PotSlotIterationsUpdate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
218 fn set_pot_slot_iterations() -> Weight {
219 // Proof Size summary in bytes:
220 // Measured: `0`
221 // Estimated: `1485`
222 // Minimum execution time: 5_132_000 picoseconds.
223 Weight::from_parts(5_251_000, 1485)
224 .saturating_add(ParityDbWeight::get().reads(2_u64))
225 .saturating_add(ParityDbWeight::get().writes(1_u64))
226 }
227}