rococo_runtime/weights/pallet_bounties.rs
1// Copyright (C) Parity Technologies (UK) Ltd.
2// This file is part of Polkadot.
3
4// Polkadot 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// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
16
17//! Autogenerated weights for `pallet_bounties`
18//!
19//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
20//! DATE: 2025-07-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21//! WORST CASE MAP SIZE: `1000000`
22//! HOSTNAME: `ce7865b6eb9f`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
23//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
24
25// Executed Command:
26// frame-omni-bencher
27// v1
28// benchmark
29// pallet
30// --extrinsic=*
31// --runtime=target/production/wbuild/rococo-runtime/rococo_runtime.wasm
32// --pallet=pallet_bounties
33// --header=/__w/polkadot-sdk/polkadot-sdk/polkadot/file_header.txt
34// --output=./polkadot/runtime/rococo/src/weights
35// --wasm-execution=compiled
36// --steps=50
37// --repeat=20
38// --heap-pages=4096
39// --no-storage-info
40// --no-min-squares
41// --no-median-slopes
42
43#![cfg_attr(rustfmt, rustfmt_skip)]
44#![allow(unused_parens)]
45#![allow(unused_imports)]
46#![allow(missing_docs)]
47
48use frame_support::{traits::Get, weights::Weight};
49use core::marker::PhantomData;
50
51/// Weight functions for `pallet_bounties`.
52pub struct WeightInfo<T>(PhantomData<T>);
53impl<T: frame_system::Config> pallet_bounties::WeightInfo for WeightInfo<T> {
54 /// Storage: `Bounties::BountyCount` (r:1 w:1)
55 /// Proof: `Bounties::BountyCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
56 /// Storage: `System::Account` (r:1 w:1)
57 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
58 /// Storage: `Bounties::BountyDescriptions` (r:0 w:1)
59 /// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(16400), added: 18875, mode: `MaxEncodedLen`)
60 /// Storage: `Bounties::Bounties` (r:0 w:1)
61 /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
62 /// The range of component `d` is `[0, 16384]`.
63 fn propose_bounty(d: u32, ) -> Weight {
64 // Proof Size summary in bytes:
65 // Measured: `210`
66 // Estimated: `3593`
67 // Minimum execution time: 26_807_000 picoseconds.
68 Weight::from_parts(28_424_254, 0)
69 .saturating_add(Weight::from_parts(0, 3593))
70 // Standard Error: 6
71 .saturating_add(Weight::from_parts(596, 0).saturating_mul(d.into()))
72 .saturating_add(T::DbWeight::get().reads(2))
73 .saturating_add(T::DbWeight::get().writes(4))
74 }
75 /// Storage: `Bounties::Bounties` (r:1 w:1)
76 /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
77 /// Storage: `Bounties::BountyApprovals` (r:1 w:1)
78 /// Proof: `Bounties::BountyApprovals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
79 fn approve_bounty() -> Weight {
80 // Proof Size summary in bytes:
81 // Measured: `302`
82 // Estimated: `3642`
83 // Minimum execution time: 14_086_000 picoseconds.
84 Weight::from_parts(14_520_000, 0)
85 .saturating_add(Weight::from_parts(0, 3642))
86 .saturating_add(T::DbWeight::get().reads(2))
87 .saturating_add(T::DbWeight::get().writes(2))
88 }
89 /// Storage: `Bounties::Bounties` (r:1 w:1)
90 /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
91 fn propose_curator() -> Weight {
92 // Proof Size summary in bytes:
93 // Measured: `322`
94 // Estimated: `3642`
95 // Minimum execution time: 13_692_000 picoseconds.
96 Weight::from_parts(14_330_000, 0)
97 .saturating_add(Weight::from_parts(0, 3642))
98 .saturating_add(T::DbWeight::get().reads(1))
99 .saturating_add(T::DbWeight::get().writes(1))
100 }
101 /// Storage: `Bounties::Bounties` (r:1 w:1)
102 /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
103 /// Storage: `Bounties::BountyApprovals` (r:1 w:1)
104 /// Proof: `Bounties::BountyApprovals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
105 fn approve_bounty_with_curator() -> Weight {
106 // Proof Size summary in bytes:
107 // Measured: `302`
108 // Estimated: `3642`
109 // Minimum execution time: 16_893_000 picoseconds.
110 Weight::from_parts(17_406_000, 0)
111 .saturating_add(Weight::from_parts(0, 3642))
112 .saturating_add(T::DbWeight::get().reads(2))
113 .saturating_add(T::DbWeight::get().writes(2))
114 }
115 /// Storage: `Bounties::Bounties` (r:1 w:1)
116 /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
117 /// Storage: `System::Account` (r:1 w:1)
118 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
119 fn unassign_curator() -> Weight {
120 // Proof Size summary in bytes:
121 // Measured: `498`
122 // Estimated: `3642`
123 // Minimum execution time: 40_099_000 picoseconds.
124 Weight::from_parts(41_464_000, 0)
125 .saturating_add(Weight::from_parts(0, 3642))
126 .saturating_add(T::DbWeight::get().reads(2))
127 .saturating_add(T::DbWeight::get().writes(2))
128 }
129 /// Storage: `Bounties::Bounties` (r:1 w:1)
130 /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
131 /// Storage: `System::Account` (r:1 w:1)
132 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
133 fn accept_curator() -> Weight {
134 // Proof Size summary in bytes:
135 // Measured: `494`
136 // Estimated: `3642`
137 // Minimum execution time: 30_272_000 picoseconds.
138 Weight::from_parts(31_078_000, 0)
139 .saturating_add(Weight::from_parts(0, 3642))
140 .saturating_add(T::DbWeight::get().reads(2))
141 .saturating_add(T::DbWeight::get().writes(2))
142 }
143 /// Storage: `Bounties::Bounties` (r:1 w:1)
144 /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
145 /// Storage: `ChildBounties::ParentChildBounties` (r:1 w:0)
146 /// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
147 fn award_bounty() -> Weight {
148 // Proof Size summary in bytes:
149 // Measured: `400`
150 // Estimated: `3642`
151 // Minimum execution time: 17_670_000 picoseconds.
152 Weight::from_parts(18_536_000, 0)
153 .saturating_add(Weight::from_parts(0, 3642))
154 .saturating_add(T::DbWeight::get().reads(2))
155 .saturating_add(T::DbWeight::get().writes(1))
156 }
157 /// Storage: `Bounties::Bounties` (r:1 w:1)
158 /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
159 /// Storage: `System::Account` (r:3 w:3)
160 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
161 /// Storage: `ChildBounties::ChildrenCuratorFees` (r:1 w:1)
162 /// Proof: `ChildBounties::ChildrenCuratorFees` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
163 /// Storage: `Bounties::BountyDescriptions` (r:0 w:1)
164 /// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(16400), added: 18875, mode: `MaxEncodedLen`)
165 /// Storage: `ChildBounties::ParentTotalChildBounties` (r:0 w:1)
166 /// Proof: `ChildBounties::ParentTotalChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
167 /// Storage: `ChildBounties::ParentChildBounties` (r:0 w:1)
168 /// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
169 fn claim_bounty() -> Weight {
170 // Proof Size summary in bytes:
171 // Measured: `764`
172 // Estimated: `8799`
173 // Minimum execution time: 112_267_000 picoseconds.
174 Weight::from_parts(114_620_000, 0)
175 .saturating_add(Weight::from_parts(0, 8799))
176 .saturating_add(T::DbWeight::get().reads(5))
177 .saturating_add(T::DbWeight::get().writes(8))
178 }
179 /// Storage: `Bounties::Bounties` (r:1 w:1)
180 /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
181 /// Storage: `ChildBounties::ParentChildBounties` (r:1 w:0)
182 /// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
183 /// Storage: `System::Account` (r:1 w:1)
184 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
185 /// Storage: `Bounties::BountyDescriptions` (r:0 w:1)
186 /// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(16400), added: 18875, mode: `MaxEncodedLen`)
187 fn close_bounty_proposed() -> Weight {
188 // Proof Size summary in bytes:
189 // Measured: `444`
190 // Estimated: `3642`
191 // Minimum execution time: 42_052_000 picoseconds.
192 Weight::from_parts(43_860_000, 0)
193 .saturating_add(Weight::from_parts(0, 3642))
194 .saturating_add(T::DbWeight::get().reads(3))
195 .saturating_add(T::DbWeight::get().writes(3))
196 }
197 /// Storage: `Bounties::Bounties` (r:1 w:1)
198 /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
199 /// Storage: `ChildBounties::ParentChildBounties` (r:1 w:1)
200 /// Proof: `ChildBounties::ParentChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
201 /// Storage: `System::Account` (r:2 w:2)
202 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
203 /// Storage: `Bounties::BountyDescriptions` (r:0 w:1)
204 /// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(16400), added: 18875, mode: `MaxEncodedLen`)
205 /// Storage: `ChildBounties::ParentTotalChildBounties` (r:0 w:1)
206 /// Proof: `ChildBounties::ParentTotalChildBounties` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `MaxEncodedLen`)
207 fn close_bounty_active() -> Weight {
208 // Proof Size summary in bytes:
209 // Measured: `680`
210 // Estimated: `6196`
211 // Minimum execution time: 78_627_000 picoseconds.
212 Weight::from_parts(80_569_000, 0)
213 .saturating_add(Weight::from_parts(0, 6196))
214 .saturating_add(T::DbWeight::get().reads(4))
215 .saturating_add(T::DbWeight::get().writes(6))
216 }
217 /// Storage: `Bounties::Bounties` (r:1 w:1)
218 /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
219 fn extend_bounty_expiry() -> Weight {
220 // Proof Size summary in bytes:
221 // Measured: `358`
222 // Estimated: `3642`
223 // Minimum execution time: 14_425_000 picoseconds.
224 Weight::from_parts(15_190_000, 0)
225 .saturating_add(Weight::from_parts(0, 3642))
226 .saturating_add(T::DbWeight::get().reads(1))
227 .saturating_add(T::DbWeight::get().writes(1))
228 }
229 /// Storage: `Bounties::BountyApprovals` (r:1 w:1)
230 /// Proof: `Bounties::BountyApprovals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`)
231 /// Storage: `Bounties::Bounties` (r:100 w:100)
232 /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
233 /// Storage: `System::Account` (r:200 w:200)
234 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
235 /// The range of component `b` is `[0, 100]`.
236 fn spend_funds(b: u32, ) -> Weight {
237 // Proof Size summary in bytes:
238 // Measured: `0 + b * (297 ±0)`
239 // Estimated: `1887 + b * (5206 ±0)`
240 // Minimum execution time: 2_993_000 picoseconds.
241 Weight::from_parts(3_084_000, 0)
242 .saturating_add(Weight::from_parts(0, 1887))
243 // Standard Error: 11_577
244 .saturating_add(Weight::from_parts(36_601_136, 0).saturating_mul(b.into()))
245 .saturating_add(T::DbWeight::get().reads(1))
246 .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(b.into())))
247 .saturating_add(T::DbWeight::get().writes(1))
248 .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(b.into())))
249 .saturating_add(Weight::from_parts(0, 5206).saturating_mul(b.into()))
250 }
251 /// Storage: `Bounties::Bounties` (r:1 w:1)
252 /// Proof: `Bounties::Bounties` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
253 /// Storage: `Bounties::BountyDescriptions` (r:1 w:0)
254 /// Proof: `Bounties::BountyDescriptions` (`max_values`: None, `max_size`: Some(16400), added: 18875, mode: `MaxEncodedLen`)
255 /// Storage: `System::Account` (r:1 w:1)
256 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
257 fn poke_deposit() -> Weight {
258 // Proof Size summary in bytes:
259 // Measured: `16795`
260 // Estimated: `19865`
261 // Minimum execution time: 37_479_000 picoseconds.
262 Weight::from_parts(38_977_000, 0)
263 .saturating_add(Weight::from_parts(0, 19865))
264 .saturating_add(T::DbWeight::get().reads(3))
265 .saturating_add(T::DbWeight::get().writes(2))
266 }
267}