Skip to content

Commit 568231a

Browse files
ggwpezbkchr
andauthored
[core-fellowship] Add permissionless import_member (#7030)
Changes: - Add call `import_member` to the core-fellowship pallet. - Move common logic between `import` and `import_member` into `do_import`. ## `import_member` Can be used to induct an arbitrary collective member and is callable by any signed origin. Pays no fees upon success. This is useful in the case that members did not induct themselves and are idling on their rank. --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: command-bot <>
1 parent 1dcff3d commit 568231a

File tree

8 files changed

+448
-175
lines changed

8 files changed

+448
-175
lines changed

cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/pallet_core_fellowship_ambassador_core.rs

+99-61
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright Parity Technologies (UK) Ltd.
1+
// Copyright (C) Parity Technologies (UK) Ltd.
22
// This file is part of Cumulus.
33

44
// Cumulus is free software: you can redistribute it and/or modify
@@ -16,25 +16,29 @@
1616

1717
//! Autogenerated weights for `pallet_core_fellowship`
1818
//!
19-
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
20-
//! DATE: 2023-08-11, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
19+
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
20+
//! DATE: 2025-01-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
2121
//! WORST CASE MAP SIZE: `1000000`
22-
//! HOSTNAME: `cob`, CPU: `<UNKNOWN>`
23-
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("collectives-polkadot-dev")`, DB CACHE: 1024
22+
//! HOSTNAME: `623e9e4b814e`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
23+
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
2424
2525
// Executed Command:
26-
// target/release/polkadot-parachain
26+
// frame-omni-bencher
27+
// v1
2728
// benchmark
2829
// pallet
29-
// --chain=collectives-polkadot-dev
30-
// --wasm-execution=compiled
31-
// --pallet=pallet_core_fellowship
3230
// --extrinsic=*
33-
// --steps=2
34-
// --repeat=2
35-
// --json
36-
// --header=./file_header.txt
37-
// --output=./parachains/runtimes/collectives/collectives-polkadot/src/weights/
31+
// --runtime=target/production/wbuild/collectives-westend-runtime/collectives_westend_runtime.wasm
32+
// --pallet=pallet_core_fellowship
33+
// --header=/__w/polkadot-sdk/polkadot-sdk/cumulus/file_header.txt
34+
// --output=./cumulus/parachains/runtimes/collectives/collectives-westend/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
3842

3943
#![cfg_attr(rustfmt, rustfmt_skip)]
4044
#![allow(unused_parens)]
@@ -48,70 +52,75 @@ use core::marker::PhantomData;
4852
pub struct WeightInfo<T>(PhantomData<T>);
4953
impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<T> {
5054
/// Storage: `AmbassadorCore::Params` (r:0 w:1)
51-
/// Proof: `AmbassadorCore::Params` (`max_values`: Some(1), `max_size`: Some(364), added: 859, mode: `MaxEncodedLen`)
55+
/// Proof: `AmbassadorCore::Params` (`max_values`: Some(1), `max_size`: Some(368), added: 863, mode: `MaxEncodedLen`)
5256
fn set_params() -> Weight {
5357
// Proof Size summary in bytes:
5458
// Measured: `0`
5559
// Estimated: `0`
56-
// Minimum execution time: 11_000_000 picoseconds.
57-
Weight::from_parts(11_000_000, 0)
60+
// Minimum execution time: 9_131_000 picoseconds.
61+
Weight::from_parts(9_371_000, 0)
5862
.saturating_add(Weight::from_parts(0, 0))
5963
.saturating_add(T::DbWeight::get().writes(1))
6064
}
61-
/// Storage: `AmbassadorCore::Params` (r:0 w:1)
62-
/// Proof: `AmbassadorCore::Params` (`max_values`: Some(1), `max_size`: Some(364), added: 859, mode: `MaxEncodedLen`)
65+
/// Storage: `AmbassadorCore::Params` (r:1 w:1)
66+
/// Proof: `AmbassadorCore::Params` (`max_values`: Some(1), `max_size`: Some(368), added: 863, mode: `MaxEncodedLen`)
6367
fn set_partial_params() -> Weight {
6468
// Proof Size summary in bytes:
65-
// Measured: `0`
66-
// Estimated: `0`
67-
// Minimum execution time: 11_000_000 picoseconds.
68-
Weight::from_parts(11_000_000, 0)
69-
.saturating_add(Weight::from_parts(0, 0))
69+
// Measured: `471`
70+
// Estimated: `1853`
71+
// Minimum execution time: 18_375_000 picoseconds.
72+
Weight::from_parts(18_872_000, 0)
73+
.saturating_add(Weight::from_parts(0, 1853))
74+
.saturating_add(T::DbWeight::get().reads(1))
7075
.saturating_add(T::DbWeight::get().writes(1))
7176
}
7277
/// Storage: `AmbassadorCore::Member` (r:1 w:1)
7378
/// Proof: `AmbassadorCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
7479
/// Storage: `AmbassadorCollective::Members` (r:1 w:1)
7580
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
7681
/// Storage: `AmbassadorCore::Params` (r:1 w:0)
77-
/// Proof: `AmbassadorCore::Params` (`max_values`: Some(1), `max_size`: Some(364), added: 859, mode: `MaxEncodedLen`)
82+
/// Proof: `AmbassadorCore::Params` (`max_values`: Some(1), `max_size`: Some(368), added: 863, mode: `MaxEncodedLen`)
7883
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:1)
7984
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
80-
/// Storage: `AmbassadorCollective::IdToIndex` (r:1 w:0)
85+
/// Storage: `AmbassadorCollective::IdToIndex` (r:1 w:1)
8186
/// Proof: `AmbassadorCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
8287
/// Storage: `AmbassadorCore::MemberEvidence` (r:1 w:1)
8388
/// Proof: `AmbassadorCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
89+
/// Storage: `AmbassadorCollective::IndexToId` (r:0 w:1)
90+
/// Proof: `AmbassadorCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
8491
fn bump_offboard() -> Weight {
8592
// Proof Size summary in bytes:
86-
// Measured: `66011`
93+
// Measured: `66402`
8794
// Estimated: `69046`
88-
// Minimum execution time: 96_000_000 picoseconds.
89-
Weight::from_parts(111_000_000, 0)
95+
// Minimum execution time: 156_752_000 picoseconds.
96+
Weight::from_parts(164_242_000, 0)
9097
.saturating_add(Weight::from_parts(0, 69046))
9198
.saturating_add(T::DbWeight::get().reads(6))
92-
.saturating_add(T::DbWeight::get().writes(4))
99+
.saturating_add(T::DbWeight::get().writes(6))
93100
}
94101
/// Storage: `AmbassadorCore::Member` (r:1 w:1)
95102
/// Proof: `AmbassadorCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
96103
/// Storage: `AmbassadorCollective::Members` (r:1 w:1)
97104
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
98105
/// Storage: `AmbassadorCore::Params` (r:1 w:0)
99-
/// Proof: `AmbassadorCore::Params` (`max_values`: Some(1), `max_size`: Some(364), added: 859, mode: `MaxEncodedLen`)
106+
/// Proof: `AmbassadorCore::Params` (`max_values`: Some(1), `max_size`: Some(368), added: 863, mode: `MaxEncodedLen`)
100107
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:1)
101108
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
102-
/// Storage: `AmbassadorCollective::IdToIndex` (r:1 w:0)
109+
/// Storage: `AmbassadorCollective::IdToIndex` (r:1 w:1)
103110
/// Proof: `AmbassadorCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
104111
/// Storage: `AmbassadorCore::MemberEvidence` (r:1 w:1)
105112
/// Proof: `AmbassadorCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
113+
/// Storage: `AmbassadorCollective::IndexToId` (r:0 w:1)
114+
/// Proof: `AmbassadorCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
106115
fn bump_demote() -> Weight {
107116
// Proof Size summary in bytes:
108-
// Measured: `66121`
117+
// Measured: `66512`
109118
// Estimated: `69046`
110-
// Minimum execution time: 99_000_000 picoseconds.
111-
Weight::from_parts(116_000_000, 0)
119+
// Minimum execution time: 158_877_000 picoseconds.
120+
Weight::from_parts(165_228_000, 0)
112121
.saturating_add(Weight::from_parts(0, 69046))
113122
.saturating_add(T::DbWeight::get().reads(6))
114-
.saturating_add(T::DbWeight::get().writes(4))
123+
.saturating_add(T::DbWeight::get().writes(6))
115124
}
116125
/// Storage: `AmbassadorCollective::Members` (r:1 w:0)
117126
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
@@ -121,8 +130,8 @@ impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<
121130
// Proof Size summary in bytes:
122131
// Measured: `360`
123132
// Estimated: `3514`
124-
// Minimum execution time: 21_000_000 picoseconds.
125-
Weight::from_parts(22_000_000, 0)
133+
// Minimum execution time: 25_056_000 picoseconds.
134+
Weight::from_parts(26_028_000, 0)
126135
.saturating_add(Weight::from_parts(0, 3514))
127136
.saturating_add(T::DbWeight::get().reads(2))
128137
.saturating_add(T::DbWeight::get().writes(1))
@@ -141,8 +150,8 @@ impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<
141150
// Proof Size summary in bytes:
142151
// Measured: `118`
143152
// Estimated: `3514`
144-
// Minimum execution time: 36_000_000 picoseconds.
145-
Weight::from_parts(36_000_000, 0)
153+
// Minimum execution time: 34_784_000 picoseconds.
154+
Weight::from_parts(35_970_000, 0)
146155
.saturating_add(Weight::from_parts(0, 3514))
147156
.saturating_add(T::DbWeight::get().reads(3))
148157
.saturating_add(T::DbWeight::get().writes(5))
@@ -152,7 +161,7 @@ impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<
152161
/// Storage: `AmbassadorCore::Member` (r:1 w:1)
153162
/// Proof: `AmbassadorCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
154163
/// Storage: `AmbassadorCore::Params` (r:1 w:0)
155-
/// Proof: `AmbassadorCore::Params` (`max_values`: Some(1), `max_size`: Some(364), added: 859, mode: `MaxEncodedLen`)
164+
/// Proof: `AmbassadorCore::Params` (`max_values`: Some(1), `max_size`: Some(368), added: 863, mode: `MaxEncodedLen`)
156165
/// Storage: `AmbassadorCollective::MemberCount` (r:1 w:1)
157166
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
158167
/// Storage: `AmbassadorCore::MemberEvidence` (r:1 w:1)
@@ -163,25 +172,40 @@ impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<
163172
/// Proof: `AmbassadorCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
164173
fn promote() -> Weight {
165174
// Proof Size summary in bytes:
166-
// Measured: `65989`
175+
// Measured: `66055`
167176
// Estimated: `69046`
168-
// Minimum execution time: 95_000_000 picoseconds.
169-
Weight::from_parts(110_000_000, 0)
177+
// Minimum execution time: 147_616_000 picoseconds.
178+
Weight::from_parts(154_534_000, 0)
170179
.saturating_add(Weight::from_parts(0, 69046))
171180
.saturating_add(T::DbWeight::get().reads(5))
172181
.saturating_add(T::DbWeight::get().writes(6))
173182
}
183+
/// Storage: `AmbassadorCollective::Members` (r:1 w:1)
184+
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
185+
/// Storage: `AmbassadorCore::Member` (r:1 w:1)
186+
/// Proof: `AmbassadorCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
187+
/// Storage: `AmbassadorCollective::MemberCount` (r:9 w:9)
188+
/// Proof: `AmbassadorCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
189+
/// Storage: `AmbassadorCore::MemberEvidence` (r:1 w:1)
190+
/// Proof: `AmbassadorCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
191+
/// Storage: `AmbassadorCollective::IndexToId` (r:0 w:9)
192+
/// Proof: `AmbassadorCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
193+
/// Storage: `AmbassadorCollective::IdToIndex` (r:0 w:9)
194+
/// Proof: `AmbassadorCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
195+
/// The range of component `r` is `[1, 9]`.
196+
/// The range of component `r` is `[1, 9]`.
174197
fn promote_fast(r: u32, ) -> Weight {
175198
// Proof Size summary in bytes:
176-
// Measured: `16844`
177-
// Estimated: `19894 + r * (2489 ±0)`
178-
// Minimum execution time: 45_065_000 picoseconds.
179-
Weight::from_parts(34_090_392, 19894)
180-
// Standard Error: 18_620
181-
.saturating_add(Weight::from_parts(13_578_046, 0).saturating_mul(r.into()))
182-
.saturating_add(T::DbWeight::get().reads(3_u64))
199+
// Measured: `65968`
200+
// Estimated: `69046 + r * (2489 ±0)`
201+
// Minimum execution time: 138_323_000 picoseconds.
202+
Weight::from_parts(125_497_264, 0)
203+
.saturating_add(Weight::from_parts(0, 69046))
204+
// Standard Error: 56_050
205+
.saturating_add(Weight::from_parts(19_863_853, 0).saturating_mul(r.into()))
206+
.saturating_add(T::DbWeight::get().reads(3))
183207
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
184-
.saturating_add(T::DbWeight::get().writes(3_u64))
208+
.saturating_add(T::DbWeight::get().writes(3))
185209
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(r.into())))
186210
.saturating_add(Weight::from_parts(0, 2489).saturating_mul(r.into()))
187211
}
@@ -193,10 +217,10 @@ impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<
193217
/// Proof: `AmbassadorCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
194218
fn offboard() -> Weight {
195219
// Proof Size summary in bytes:
196-
// Measured: `331`
220+
// Measured: `265`
197221
// Estimated: `3514`
198-
// Minimum execution time: 21_000_000 picoseconds.
199-
Weight::from_parts(22_000_000, 0)
222+
// Minimum execution time: 26_903_000 picoseconds.
223+
Weight::from_parts(27_645_000, 0)
200224
.saturating_add(Weight::from_parts(0, 3514))
201225
.saturating_add(T::DbWeight::get().reads(2))
202226
.saturating_add(T::DbWeight::get().writes(2))
@@ -209,8 +233,22 @@ impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<
209233
// Proof Size summary in bytes:
210234
// Measured: `285`
211235
// Estimated: `3514`
212-
// Minimum execution time: 20_000_000 picoseconds.
213-
Weight::from_parts(21_000_000, 0)
236+
// Minimum execution time: 23_286_000 picoseconds.
237+
Weight::from_parts(23_848_000, 0)
238+
.saturating_add(Weight::from_parts(0, 3514))
239+
.saturating_add(T::DbWeight::get().reads(2))
240+
.saturating_add(T::DbWeight::get().writes(1))
241+
}
242+
/// Storage: `AmbassadorCore::Member` (r:1 w:1)
243+
/// Proof: `AmbassadorCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
244+
/// Storage: `AmbassadorCollective::Members` (r:1 w:0)
245+
/// Proof: `AmbassadorCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
246+
fn import_member() -> Weight {
247+
// Proof Size summary in bytes:
248+
// Measured: `285`
249+
// Estimated: `3514`
250+
// Minimum execution time: 23_239_000 picoseconds.
251+
Weight::from_parts(23_684_000, 0)
214252
.saturating_add(Weight::from_parts(0, 3514))
215253
.saturating_add(T::DbWeight::get().reads(2))
216254
.saturating_add(T::DbWeight::get().writes(1))
@@ -225,8 +263,8 @@ impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<
225263
// Proof Size summary in bytes:
226264
// Measured: `65967`
227265
// Estimated: `69046`
228-
// Minimum execution time: 78_000_000 picoseconds.
229-
Weight::from_parts(104_000_000, 0)
266+
// Minimum execution time: 125_987_000 picoseconds.
267+
Weight::from_parts(130_625_000, 0)
230268
.saturating_add(Weight::from_parts(0, 69046))
231269
.saturating_add(T::DbWeight::get().reads(3))
232270
.saturating_add(T::DbWeight::get().writes(2))
@@ -239,8 +277,8 @@ impl<T: frame_system::Config> pallet_core_fellowship::WeightInfo for WeightInfo<
239277
// Proof Size summary in bytes:
240278
// Measured: `151`
241279
// Estimated: `69046`
242-
// Minimum execution time: 43_000_000 picoseconds.
243-
Weight::from_parts(44_000_000, 0)
280+
// Minimum execution time: 104_431_000 picoseconds.
281+
Weight::from_parts(106_646_000, 0)
244282
.saturating_add(Weight::from_parts(0, 69046))
245283
.saturating_add(T::DbWeight::get().reads(2))
246284
.saturating_add(T::DbWeight::get().writes(1))

0 commit comments

Comments
 (0)