pallet_balances/weights.rs
1// This file is part of Substrate.
2
3// Copyright (C) Parity Technologies (UK) Ltd.
4// SPDX-License-Identifier: Apache-2.0
5
6// Licensed under the Apache License, Version 2.0 (the "License");
7// you may not use this file except in compliance with the License.
8// You may obtain a copy of the License at
9//
10// http://www.apache.org/licenses/LICENSE-2.0
11//
12// Unless required by applicable law or agreed to in writing, software
13// distributed under the License is distributed on an "AS IS" BASIS,
14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15// See the License for the specific language governing permissions and
16// limitations under the License.
17
18// This file is part of Substrate.
19
20// Copyright (C) Parity Technologies (UK) Ltd.
21// SPDX-License-Identifier: Apache-2.0
22
23// Licensed under the Apache License, Version 2.0 (the "License");
24// you may not use this file except in compliance with the License.
25// You may obtain a copy of the License at
26//
27// http://www.apache.org/licenses/LICENSE-2.0
28//
29// Unless required by applicable law or agreed to in writing, software
30// distributed under the License is distributed on an "AS IS" BASIS,
31// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32// See the License for the specific language governing permissions and
33// limitations under the License.
34
35//! Autogenerated weights for `pallet_balances`
36//!
37//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
38//! DATE: 2026-11-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
39//! WORST CASE MAP SIZE: `1000000`
40//! HOSTNAME: `6b84b7663ded`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
41//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
42
43// Executed Command:
44// frame-omni-bencher
45// v1
46// benchmark
47// pallet
48// --extrinsic=*
49// --runtime=target/production/wbuild/kitchensink-runtime/kitchensink_runtime.wasm
50// --pallet=pallet_balances
51// --header=/__w/polkadot-sdk/polkadot-sdk/substrate/HEADER-APACHE2
52// --output=/__w/polkadot-sdk/polkadot-sdk/substrate/frame/balances/src/weights.rs
53// --wasm-execution=compiled
54// --steps=50
55// --repeat=20
56// --heap-pages=4096
57// --template=substrate/.maintain/frame-weight-template.hbs
58// --no-storage-info
59// --no-min-squares
60// --no-median-slopes
61// --exclude-pallets=pallet_xcm,pallet_xcm_benchmarks::fungible,pallet_xcm_benchmarks::generic,pallet_nomination_pools,pallet_remark,pallet_transaction_storage
62
63#![cfg_attr(rustfmt, rustfmt_skip)]
64#![allow(unused_parens)]
65#![allow(unused_imports)]
66#![allow(missing_docs)]
67#![allow(dead_code)]
68
69use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
70use core::marker::PhantomData;
71
72/// Weight functions needed for `pallet_balances`.
73pub trait WeightInfo {
74 fn transfer_allow_death() -> Weight;
75 fn transfer_keep_alive() -> Weight;
76 fn force_set_balance_creating() -> Weight;
77 fn force_set_balance_killing() -> Weight;
78 fn force_transfer() -> Weight;
79 fn transfer_all() -> Weight;
80 fn force_unreserve() -> Weight;
81 fn upgrade_accounts(u: u32, ) -> Weight;
82 fn force_adjust_total_issuance() -> Weight;
83 fn burn_allow_death() -> Weight;
84 fn burn_keep_alive() -> Weight;
85}
86
87/// Weights for `pallet_balances` using the Substrate node and recommended hardware.
88pub struct SubstrateWeight<T>(PhantomData<T>);
89impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
90 /// Storage: `System::Account` (r:1 w:1)
91 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
92 fn transfer_allow_death() -> Weight {
93 // Proof Size summary in bytes:
94 // Measured: `52`
95 // Estimated: `3593`
96 // Minimum execution time: 53_859_000 picoseconds.
97 Weight::from_parts(56_695_000, 3593)
98 .saturating_add(T::DbWeight::get().reads(1_u64))
99 .saturating_add(T::DbWeight::get().writes(1_u64))
100 }
101 /// Storage: `System::Account` (r:1 w:1)
102 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
103 fn transfer_keep_alive() -> Weight {
104 // Proof Size summary in bytes:
105 // Measured: `52`
106 // Estimated: `3593`
107 // Minimum execution time: 42_455_000 picoseconds.
108 Weight::from_parts(44_635_000, 3593)
109 .saturating_add(T::DbWeight::get().reads(1_u64))
110 .saturating_add(T::DbWeight::get().writes(1_u64))
111 }
112 /// Storage: `System::Account` (r:1 w:1)
113 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
114 fn force_set_balance_creating() -> Weight {
115 // Proof Size summary in bytes:
116 // Measured: `39`
117 // Estimated: `3593`
118 // Minimum execution time: 21_315_000 picoseconds.
119 Weight::from_parts(22_630_000, 3593)
120 .saturating_add(T::DbWeight::get().reads(1_u64))
121 .saturating_add(T::DbWeight::get().writes(1_u64))
122 }
123 /// Storage: `System::Account` (r:1 w:1)
124 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
125 fn force_set_balance_killing() -> Weight {
126 // Proof Size summary in bytes:
127 // Measured: `174`
128 // Estimated: `3593`
129 // Minimum execution time: 21_834_000 picoseconds.
130 Weight::from_parts(23_279_000, 3593)
131 .saturating_add(T::DbWeight::get().reads(1_u64))
132 .saturating_add(T::DbWeight::get().writes(1_u64))
133 }
134 /// Storage: `System::Account` (r:2 w:2)
135 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
136 fn force_transfer() -> Weight {
137 // Proof Size summary in bytes:
138 // Measured: `155`
139 // Estimated: `6196`
140 // Minimum execution time: 55_784_000 picoseconds.
141 Weight::from_parts(58_441_000, 6196)
142 .saturating_add(T::DbWeight::get().reads(2_u64))
143 .saturating_add(T::DbWeight::get().writes(2_u64))
144 }
145 /// Storage: `System::Account` (r:1 w:1)
146 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
147 fn transfer_all() -> Weight {
148 // Proof Size summary in bytes:
149 // Measured: `52`
150 // Estimated: `3593`
151 // Minimum execution time: 51_928_000 picoseconds.
152 Weight::from_parts(54_674_000, 3593)
153 .saturating_add(T::DbWeight::get().reads(1_u64))
154 .saturating_add(T::DbWeight::get().writes(1_u64))
155 }
156 /// Storage: `System::Account` (r:1 w:1)
157 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
158 /// Storage: `Balances::Holds` (r:1 w:0)
159 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(589), added: 3064, mode: `MaxEncodedLen`)
160 /// Storage: `Balances::Reserves` (r:1 w:0)
161 /// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`)
162 fn force_unreserve() -> Weight {
163 // Proof Size summary in bytes:
164 // Measured: `229`
165 // Estimated: `4714`
166 // Minimum execution time: 27_157_000 picoseconds.
167 Weight::from_parts(28_843_000, 4714)
168 .saturating_add(T::DbWeight::get().reads(3_u64))
169 .saturating_add(T::DbWeight::get().writes(1_u64))
170 }
171 /// Storage: `System::Account` (r:999 w:999)
172 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
173 /// The range of component `u` is `[1, 1000]`.
174 fn upgrade_accounts(u: u32, ) -> Weight {
175 // Proof Size summary in bytes:
176 // Measured: `0 + u * (84 ±0)`
177 // Estimated: `990 + u * (2603 ±0)`
178 // Minimum execution time: 17_740_000 picoseconds.
179 Weight::from_parts(18_087_000, 990)
180 // Standard Error: 12_174
181 .saturating_add(Weight::from_parts(15_518_690, 0).saturating_mul(u.into()))
182 .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into())))
183 .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into())))
184 .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into()))
185 }
186 fn force_adjust_total_issuance() -> Weight {
187 // Proof Size summary in bytes:
188 // Measured: `0`
189 // Estimated: `0`
190 // Minimum execution time: 6_062_000 picoseconds.
191 Weight::from_parts(6_643_000, 0)
192 }
193 fn burn_allow_death() -> Weight {
194 // Proof Size summary in bytes:
195 // Measured: `0`
196 // Estimated: `0`
197 // Minimum execution time: 32_478_000 picoseconds.
198 Weight::from_parts(34_000_000, 0)
199 }
200 fn burn_keep_alive() -> Weight {
201 // Proof Size summary in bytes:
202 // Measured: `0`
203 // Estimated: `0`
204 // Minimum execution time: 21_490_000 picoseconds.
205 Weight::from_parts(22_702_000, 0)
206 }
207}
208
209// For backwards compatibility and tests.
210impl WeightInfo for () {
211 /// Storage: `System::Account` (r:1 w:1)
212 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
213 fn transfer_allow_death() -> Weight {
214 // Proof Size summary in bytes:
215 // Measured: `52`
216 // Estimated: `3593`
217 // Minimum execution time: 53_859_000 picoseconds.
218 Weight::from_parts(56_695_000, 3593)
219 .saturating_add(RocksDbWeight::get().reads(1_u64))
220 .saturating_add(RocksDbWeight::get().writes(1_u64))
221 }
222 /// Storage: `System::Account` (r:1 w:1)
223 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
224 fn transfer_keep_alive() -> Weight {
225 // Proof Size summary in bytes:
226 // Measured: `52`
227 // Estimated: `3593`
228 // Minimum execution time: 42_455_000 picoseconds.
229 Weight::from_parts(44_635_000, 3593)
230 .saturating_add(RocksDbWeight::get().reads(1_u64))
231 .saturating_add(RocksDbWeight::get().writes(1_u64))
232 }
233 /// Storage: `System::Account` (r:1 w:1)
234 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
235 fn force_set_balance_creating() -> Weight {
236 // Proof Size summary in bytes:
237 // Measured: `39`
238 // Estimated: `3593`
239 // Minimum execution time: 21_315_000 picoseconds.
240 Weight::from_parts(22_630_000, 3593)
241 .saturating_add(RocksDbWeight::get().reads(1_u64))
242 .saturating_add(RocksDbWeight::get().writes(1_u64))
243 }
244 /// Storage: `System::Account` (r:1 w:1)
245 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
246 fn force_set_balance_killing() -> Weight {
247 // Proof Size summary in bytes:
248 // Measured: `174`
249 // Estimated: `3593`
250 // Minimum execution time: 21_834_000 picoseconds.
251 Weight::from_parts(23_279_000, 3593)
252 .saturating_add(RocksDbWeight::get().reads(1_u64))
253 .saturating_add(RocksDbWeight::get().writes(1_u64))
254 }
255 /// Storage: `System::Account` (r:2 w:2)
256 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
257 fn force_transfer() -> Weight {
258 // Proof Size summary in bytes:
259 // Measured: `155`
260 // Estimated: `6196`
261 // Minimum execution time: 55_784_000 picoseconds.
262 Weight::from_parts(58_441_000, 6196)
263 .saturating_add(RocksDbWeight::get().reads(2_u64))
264 .saturating_add(RocksDbWeight::get().writes(2_u64))
265 }
266 /// Storage: `System::Account` (r:1 w:1)
267 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
268 fn transfer_all() -> Weight {
269 // Proof Size summary in bytes:
270 // Measured: `52`
271 // Estimated: `3593`
272 // Minimum execution time: 51_928_000 picoseconds.
273 Weight::from_parts(54_674_000, 3593)
274 .saturating_add(RocksDbWeight::get().reads(1_u64))
275 .saturating_add(RocksDbWeight::get().writes(1_u64))
276 }
277 /// Storage: `System::Account` (r:1 w:1)
278 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
279 /// Storage: `Balances::Holds` (r:1 w:0)
280 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(589), added: 3064, mode: `MaxEncodedLen`)
281 /// Storage: `Balances::Reserves` (r:1 w:0)
282 /// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`)
283 fn force_unreserve() -> Weight {
284 // Proof Size summary in bytes:
285 // Measured: `229`
286 // Estimated: `4714`
287 // Minimum execution time: 27_157_000 picoseconds.
288 Weight::from_parts(28_843_000, 4714)
289 .saturating_add(RocksDbWeight::get().reads(3_u64))
290 .saturating_add(RocksDbWeight::get().writes(1_u64))
291 }
292 /// Storage: `System::Account` (r:999 w:999)
293 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
294 /// The range of component `u` is `[1, 1000]`.
295 fn upgrade_accounts(u: u32, ) -> Weight {
296 // Proof Size summary in bytes:
297 // Measured: `0 + u * (84 ±0)`
298 // Estimated: `990 + u * (2603 ±0)`
299 // Minimum execution time: 17_740_000 picoseconds.
300 Weight::from_parts(18_087_000, 990)
301 // Standard Error: 12_174
302 .saturating_add(Weight::from_parts(15_518_690, 0).saturating_mul(u.into()))
303 .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(u.into())))
304 .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(u.into())))
305 .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into()))
306 }
307 fn force_adjust_total_issuance() -> Weight {
308 // Proof Size summary in bytes:
309 // Measured: `0`
310 // Estimated: `0`
311 // Minimum execution time: 6_062_000 picoseconds.
312 Weight::from_parts(6_643_000, 0)
313 }
314 fn burn_allow_death() -> Weight {
315 // Proof Size summary in bytes:
316 // Measured: `0`
317 // Estimated: `0`
318 // Minimum execution time: 32_478_000 picoseconds.
319 Weight::from_parts(34_000_000, 0)
320 }
321 fn burn_keep_alive() -> Weight {
322 // Proof Size summary in bytes:
323 // Measured: `0`
324 // Estimated: `0`
325 // Minimum execution time: 21_490_000 picoseconds.
326 Weight::from_parts(22_702_000, 0)
327 }
328}