Browse Source

Merge pull request #2067 from iorveth/membership_benchmarking

Membership benchmarking: benchmark against all possible membership length parameters
shamil-gadelshin 4 years ago
parent
commit
be26ea167a

+ 3 - 3
runtime-modules/council/src/mock.rs

@@ -370,10 +370,10 @@ impl referendum::WeightInfo for Weights {
 }
 
 impl membership::WeightInfo for Weights {
-    fn buy_membership_without_referrer(_: u32) -> Weight {
+    fn buy_membership_without_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
-    fn buy_membership_with_referrer(_: u32) -> Weight {
+    fn buy_membership_with_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
     fn update_profile(_: u32) -> Weight {
@@ -397,7 +397,7 @@ impl membership::WeightInfo for Weights {
     fn transfer_invites() -> Weight {
         unimplemented!()
     }
-    fn invite_member(_: u32) -> Weight {
+    fn invite_member(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
     fn set_membership_price() -> Weight {

+ 3 - 3
runtime-modules/forum/src/mock.rs

@@ -225,10 +225,10 @@ impl working_group::WeightInfo for Weights {
 }
 
 impl membership::WeightInfo for Weights {
-    fn buy_membership_without_referrer(_: u32) -> Weight {
+    fn buy_membership_without_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
-    fn buy_membership_with_referrer(_: u32) -> Weight {
+    fn buy_membership_with_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
     fn update_profile(_: u32) -> Weight {
@@ -252,7 +252,7 @@ impl membership::WeightInfo for Weights {
     fn transfer_invites() -> Weight {
         unimplemented!()
     }
-    fn invite_member(_: u32) -> Weight {
+    fn invite_member(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
     fn set_membership_price() -> Weight {

+ 42 - 10
runtime-modules/membership/src/benchmarking.rs

@@ -95,6 +95,10 @@ benchmarks! {
 
         let j in 0 .. MAX_BYTES;
 
+        let k in 0 .. MAX_BYTES;
+
+        let z in 0 .. MAX_BYTES;
+
         let member_id = 0;
 
         let account_id = account::<T::AccountId>("member", member_id, SEED);
@@ -109,15 +113,19 @@ benchmarks! {
 
         let fee = Module::<T>::membership_price();
 
-        let name = vec![0u8].repeat(j as usize);
+        let name = Some(vec![0u8].repeat(j as usize));
+
+        let avatar_uri = Some(vec![0u8].repeat(k as usize));
+
+        let about = Some(vec![0u8].repeat(z as usize));
 
         let params = BuyMembershipParameters {
             root_account: account_id.clone(),
             controller_account: account_id.clone(),
-            name: Some(name),
+            name,
             handle: Some(handle.clone()),
-            avatar_uri: None,
-            about: None,
+            avatar_uri,
+            about,
             referrer_id: None,
         };
 
@@ -151,6 +159,12 @@ benchmarks! {
 
         let i in 0 .. MAX_BYTES;
 
+        let j in 0 .. MAX_BYTES;
+
+        let k in 0 .. MAX_BYTES;
+
+        let z in 0 .. MAX_BYTES;
+
         let member_id = 0;
 
         let account_id = account::<T::AccountId>("member", member_id, SEED);
@@ -159,15 +173,21 @@ benchmarks! {
 
         let _ = Balances::<T>::make_free_balance_be(&account_id, BalanceOf::<T>::max_value());
 
+        let name = Some(vec![0u8].repeat(j as usize));
+
+        let avatar_uri = Some(vec![0u8].repeat(k as usize));
+
+        let about = Some(vec![0u8].repeat(z as usize));
+
         let fee = Module::<T>::membership_price();
 
         let mut params = BuyMembershipParameters {
             root_account: account_id.clone(),
             controller_account: account_id.clone(),
-            name: None,
+            name,
             handle: Some(handle.clone()),
-            avatar_uri: None,
-            about: None,
+            avatar_uri,
+            about,
             referrer_id: None,
         };
 
@@ -424,20 +444,32 @@ benchmarks! {
 
         let i in 1 .. MAX_BYTES;
 
+        let j in 0 .. MAX_BYTES;
+
+        let k in 0 .. MAX_BYTES;
+
+        let z in 0 .. MAX_BYTES;
+
         let member_id = 0;
 
         let (account_id, member_id) = member_funded_account::<T>("member", member_id);
 
         let handle = handle_from_id::<T>(i);
 
+        let name = Some(vec![0u8].repeat(j as usize));
+
+        let avatar_uri = Some(vec![0u8].repeat(k as usize));
+
+        let about = Some(vec![0u8].repeat(z as usize));
+
         let invite_params = InviteMembershipParameters {
             inviting_member_id: member_id,
             root_account: account_id.clone(),
             controller_account: account_id.clone(),
-            name: None,
+            name,
             handle: Some(handle.clone()),
-            avatar_uri: None,
-            about: None,
+            avatar_uri,
+            about,
         };
 
         let default_invitation_balance = T::DefaultInitialInvitationBalance::get();

+ 38 - 26
runtime-modules/membership/src/lib.rs

@@ -74,8 +74,8 @@ type WeightInfoMembership<T> = <T as Trait>::WeightInfo;
 /// pallet_forum WeightInfo.
 /// Note: This was auto generated through the benchmark CLI using the `--weight-trait` flag
 pub trait WeightInfo {
-    fn buy_membership_without_referrer(i: u32) -> Weight;
-    fn buy_membership_with_referrer(i: u32) -> Weight;
+    fn buy_membership_without_referrer(i: u32, j: u32, k: u32, z: u32) -> Weight;
+    fn buy_membership_with_referrer(i: u32, j: u32, k: u32, z: u32) -> Weight;
     fn update_profile(i: u32) -> Weight;
     fn update_accounts_none() -> Weight;
     fn update_accounts_root() -> Weight;
@@ -83,7 +83,7 @@ pub trait WeightInfo {
     fn update_accounts_both() -> Weight;
     fn set_referral_cut() -> Weight;
     fn transfer_invites() -> Weight;
-    fn invite_member(i: u32) -> Weight;
+    fn invite_member(i: u32, j: u32, k: u32, z: u32) -> Weight;
     fn set_membership_price() -> Weight;
     fn update_profile_verification() -> Weight;
     fn set_leader_invitation_quota() -> Weight;
@@ -352,10 +352,13 @@ decl_module! {
         /// <weight>
         ///
         /// ## Weight
-        /// `O (W)` where:
-        /// - `W` is the handle length
+        /// `O (W + V + X + Y)` where:
+        /// - `W` is the member name
+        /// - `V` is the member handle
+        /// - `X` is the member avatar uri
+        /// - `Y` is the member about
         /// - DB:
-        ///    - O(W)
+        ///    - O(V)
         /// # </weight>
         #[weight = Module::<T>::calculate_weight_for_buy_membership(params)]
         pub fn buy_membership(
@@ -619,17 +622,20 @@ decl_module! {
         /// <weight>
         ///
         /// ## Weight
-        /// `O (W)` where:
-        /// - `W` is the handle length
+        /// `O (W + V + X + Y)` where:
+        /// - `W` is the member name
+        /// - `V` is the member handle
+        /// - `X` is the member avatar uri
+        /// - `Y` is the member about
         /// - DB:
-        ///    - O(W)
+        ///    - O(V)
         /// # </weight>
         #[weight = WeightInfoMembership::<T>::invite_member(
-            params.handle.as_ref()
-                .map(|handle| handle.len().saturated_into())
-                .unwrap_or_default()
-            )
-        ]
+            Module::<T>::text_length_unwrap_or_default(&params.name),
+            Module::<T>::text_length_unwrap_or_default(&params.handle),
+            Module::<T>::text_length_unwrap_or_default(&params.avatar_uri),
+            Module::<T>::text_length_unwrap_or_default(&params.about),
+        )]
         pub fn invite_member(
             origin,
             params: InviteMembershipParameters<T::AccountId, T::MemberId>
@@ -900,7 +906,8 @@ decl_module! {
 }
 
 impl<T: Trait> Module<T> {
-    pub fn calculate_weight_for_update_account(
+    // Helper for update_account extrinsic weight calculation
+    fn calculate_weight_for_update_account(
         new_root_account: &Option<T::AccountId>,
         new_controller_account: &Option<T::AccountId>,
     ) -> Weight {
@@ -912,28 +919,33 @@ impl<T: Trait> Module<T> {
         }
     }
 
-    pub fn calculate_weight_for_buy_membership(
+    // Helper for buy_membership extrinsic weight calculation
+    fn calculate_weight_for_buy_membership(
         params: &BuyMembershipParameters<T::AccountId, T::MemberId>,
     ) -> Weight {
         if params.referrer_id.is_some() {
             WeightInfoMembership::<T>::buy_membership_with_referrer(
-                params
-                    .handle
-                    .as_ref()
-                    .map(|handle| handle.len().saturated_into())
-                    .unwrap_or_default(),
+                Self::text_length_unwrap_or_default(&params.name),
+                Self::text_length_unwrap_or_default(&params.handle),
+                Self::text_length_unwrap_or_default(&params.avatar_uri),
+                Self::text_length_unwrap_or_default(&params.about),
             )
         } else {
             WeightInfoMembership::<T>::buy_membership_without_referrer(
-                params
-                    .handle
-                    .as_ref()
-                    .map(|handle| handle.len().saturated_into())
-                    .unwrap_or_default(),
+                Self::text_length_unwrap_or_default(&params.name),
+                Self::text_length_unwrap_or_default(&params.handle),
+                Self::text_length_unwrap_or_default(&params.avatar_uri),
+                Self::text_length_unwrap_or_default(&params.about),
             )
         }
     }
 
+    fn text_length_unwrap_or_default(text: &Option<Vec<u8>>) -> u32 {
+        text.as_ref()
+            .map(|handle| handle.len().saturated_into())
+            .unwrap_or_default()
+    }
+
     /// Provided that the member_id exists return its membership. Returns error otherwise.
     fn ensure_membership(member_id: T::MemberId) -> Result<Membership<T>, Error<T>> {
         Self::ensure_membership_with_error(member_id, Error::<T>::MemberProfileNotFound)

+ 3 - 3
runtime-modules/membership/src/tests/mock.rs

@@ -226,10 +226,10 @@ impl working_group::WeightInfo for Weights {
 }
 
 impl WeightInfo for () {
-    fn buy_membership_without_referrer(_: u32) -> Weight {
+    fn buy_membership_without_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         0
     }
-    fn buy_membership_with_referrer(_: u32) -> Weight {
+    fn buy_membership_with_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         0
     }
     fn update_profile(_: u32) -> Weight {
@@ -253,7 +253,7 @@ impl WeightInfo for () {
     fn transfer_invites() -> Weight {
         0
     }
-    fn invite_member(_: u32) -> Weight {
+    fn invite_member(_: u32, _: u32, _: u32, _: u32) -> Weight {
         0
     }
     fn set_membership_price() -> Weight {

+ 3 - 3
runtime-modules/proposals/codex/src/tests/mock.rs

@@ -54,10 +54,10 @@ impl common::Trait for Test {
 // Weights info stub
 pub struct Weights;
 impl membership::WeightInfo for Weights {
-    fn buy_membership_without_referrer(_: u32) -> Weight {
+    fn buy_membership_without_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
-    fn buy_membership_with_referrer(_: u32) -> Weight {
+    fn buy_membership_with_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
     fn update_profile(_: u32) -> Weight {
@@ -81,7 +81,7 @@ impl membership::WeightInfo for Weights {
     fn transfer_invites() -> Weight {
         unimplemented!()
     }
-    fn invite_member(_: u32) -> Weight {
+    fn invite_member(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
     fn set_membership_price() -> Weight {

+ 3 - 3
runtime-modules/proposals/discussion/src/tests/mock.rs

@@ -80,10 +80,10 @@ parameter_types! {
 // Weights info stub
 pub struct Weights;
 impl membership::WeightInfo for Weights {
-    fn buy_membership_without_referrer(_: u32) -> Weight {
+    fn buy_membership_without_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
-    fn buy_membership_with_referrer(_: u32) -> Weight {
+    fn buy_membership_with_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
     fn update_profile(_: u32) -> Weight {
@@ -107,7 +107,7 @@ impl membership::WeightInfo for Weights {
     fn transfer_invites() -> Weight {
         unimplemented!()
     }
-    fn invite_member(_: u32) -> Weight {
+    fn invite_member(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
     fn set_membership_price() -> Weight {

+ 3 - 3
runtime-modules/proposals/engine/src/tests/mock/mod.rs

@@ -191,10 +191,10 @@ impl common::Trait for Test {
 // Weights info stub
 pub struct Weights;
 impl membership::WeightInfo for Weights {
-    fn buy_membership_without_referrer(_: u32) -> Weight {
+    fn buy_membership_without_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
-    fn buy_membership_with_referrer(_: u32) -> Weight {
+    fn buy_membership_with_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
     fn update_profile(_: u32) -> Weight {
@@ -218,7 +218,7 @@ impl membership::WeightInfo for Weights {
     fn transfer_invites() -> Weight {
         unimplemented!()
     }
-    fn invite_member(_: u32) -> Weight {
+    fn invite_member(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
     fn set_membership_price() -> Weight {

+ 3 - 3
runtime-modules/referendum/src/mock.rs

@@ -174,10 +174,10 @@ impl WeightInfo for () {
 // Weights info stub
 pub struct Weights;
 impl membership::WeightInfo for Weights {
-    fn buy_membership_without_referrer(_: u32) -> Weight {
+    fn buy_membership_without_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
-    fn buy_membership_with_referrer(_: u32) -> Weight {
+    fn buy_membership_with_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
     fn update_profile(_: u32) -> Weight {
@@ -201,7 +201,7 @@ impl membership::WeightInfo for Weights {
     fn transfer_invites() -> Weight {
         unimplemented!()
     }
-    fn invite_member(_: u32) -> Weight {
+    fn invite_member(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
     fn set_membership_price() -> Weight {

+ 3 - 3
runtime-modules/service-discovery/src/mock.rs

@@ -96,10 +96,10 @@ impl common::Trait for Test {
 // Weights info stub
 pub struct Weights;
 impl membership::WeightInfo for Weights {
-    fn buy_membership_without_referrer(_: u32) -> Weight {
+    fn buy_membership_without_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
-    fn buy_membership_with_referrer(_: u32) -> Weight {
+    fn buy_membership_with_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
     fn update_profile(_: u32) -> Weight {
@@ -123,7 +123,7 @@ impl membership::WeightInfo for Weights {
     fn transfer_invites() -> Weight {
         unimplemented!()
     }
-    fn invite_member(_: u32) -> Weight {
+    fn invite_member(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
     fn set_membership_price() -> Weight {

+ 3 - 3
runtime-modules/storage/src/tests/mock.rs

@@ -246,10 +246,10 @@ impl working_group::WeightInfo for WorkingGroupWeightInfo {
 // Weights info stub
 pub struct Weights;
 impl membership::WeightInfo for Weights {
-    fn buy_membership_without_referrer(_: u32) -> Weight {
+    fn buy_membership_without_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
-    fn buy_membership_with_referrer(_: u32) -> Weight {
+    fn buy_membership_with_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
     fn update_profile(_: u32) -> Weight {
@@ -273,7 +273,7 @@ impl membership::WeightInfo for Weights {
     fn transfer_invites() -> Weight {
         unimplemented!()
     }
-    fn invite_member(_: u32) -> Weight {
+    fn invite_member(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
     fn set_membership_price() -> Weight {

+ 3 - 3
runtime-modules/working-group/src/tests/mock.rs

@@ -100,10 +100,10 @@ impl common::Trait for Test {
 // Weights info stub
 pub struct Weights;
 impl membership::WeightInfo for Weights {
-    fn buy_membership_without_referrer(_: u32) -> Weight {
+    fn buy_membership_without_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
-    fn buy_membership_with_referrer(_: u32) -> Weight {
+    fn buy_membership_with_referrer(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
     fn update_profile(_: u32) -> Weight {
@@ -127,7 +127,7 @@ impl membership::WeightInfo for Weights {
     fn transfer_invites() -> Weight {
         unimplemented!()
     }
-    fn invite_member(_: u32) -> Weight {
+    fn invite_member(_: u32, _: u32, _: u32, _: u32) -> Weight {
         unimplemented!()
     }
     fn set_membership_price() -> Weight {

+ 33 - 24
runtime/src/weights/membership.rs

@@ -7,87 +7,96 @@ use frame_support::weights::{constants::RocksDbWeight as DbWeight, Weight};
 
 pub struct WeightInfo;
 impl membership::WeightInfo for WeightInfo {
-    fn buy_membership_without_referrer(i: u32) -> Weight {
-        (353_184_000 as Weight)
-            .saturating_add((2_000 as Weight).saturating_mul(i as Weight))
+    fn buy_membership_without_referrer(i: u32, j: u32, k: u32, z: u32) -> Weight {
+        (245_545_000 as Weight)
+            .saturating_add((3_000 as Weight).saturating_mul(i as Weight))
+            .saturating_add((1_000 as Weight).saturating_mul(j as Weight))
+            .saturating_add((1_000 as Weight).saturating_mul(k as Weight))
+            .saturating_add((1_000 as Weight).saturating_mul(z as Weight))
             .saturating_add(DbWeight::get().reads(5 as Weight))
             .saturating_add(DbWeight::get().writes(4 as Weight))
     }
-    fn buy_membership_with_referrer(i: u32) -> Weight {
-        (554_008_000 as Weight)
+    fn buy_membership_with_referrer(i: u32, j: u32, k: u32, z: u32) -> Weight {
+        (439_284_000 as Weight)
             .saturating_add((2_000 as Weight).saturating_mul(i as Weight))
+            .saturating_add((1_000 as Weight).saturating_mul(j as Weight))
+            .saturating_add((1_000 as Weight).saturating_mul(k as Weight))
+            .saturating_add((1_000 as Weight).saturating_mul(z as Weight))
             .saturating_add(DbWeight::get().reads(7 as Weight))
             .saturating_add(DbWeight::get().writes(4 as Weight))
     }
     fn update_profile(i: u32) -> Weight {
-        (446_195_000 as Weight)
-            .saturating_add((72_000 as Weight).saturating_mul(i as Weight))
+        (356_978_000 as Weight)
+            .saturating_add((55_000 as Weight).saturating_mul(i as Weight))
             .saturating_add(DbWeight::get().reads(2 as Weight))
             .saturating_add(DbWeight::get().writes(3 as Weight))
     }
     fn update_accounts_none() -> Weight {
-        (11_101_000 as Weight)
+        (9_314_000 as Weight)
     }
     fn update_accounts_root() -> Weight {
-        (224_926_000 as Weight)
+        (180_791_000 as Weight)
             .saturating_add(DbWeight::get().reads(1 as Weight))
             .saturating_add(DbWeight::get().writes(1 as Weight))
     }
     fn update_accounts_controller() -> Weight {
-        (224_476_000 as Weight)
+        (180_942_000 as Weight)
             .saturating_add(DbWeight::get().reads(1 as Weight))
             .saturating_add(DbWeight::get().writes(1 as Weight))
     }
     fn update_accounts_both() -> Weight {
-        (224_616_000 as Weight)
+        (181_642_000 as Weight)
             .saturating_add(DbWeight::get().reads(1 as Weight))
             .saturating_add(DbWeight::get().writes(1 as Weight))
     }
     fn set_referral_cut() -> Weight {
-        (78_995_000 as Weight).saturating_add(DbWeight::get().writes(1 as Weight))
+        (63_916_000 as Weight).saturating_add(DbWeight::get().writes(1 as Weight))
     }
     fn transfer_invites() -> Weight {
-        (507_472_000 as Weight)
+        (415_109_000 as Weight)
             .saturating_add(DbWeight::get().reads(2 as Weight))
             .saturating_add(DbWeight::get().writes(2 as Weight))
     }
-    fn invite_member(i: u32) -> Weight {
-        (657_622_000 as Weight)
-            .saturating_add((2_000 as Weight).saturating_mul(i as Weight))
+    fn invite_member(i: u32, j: u32, k: u32, z: u32) -> Weight {
+        (550_755_000 as Weight)
+            .saturating_add((3_000 as Weight).saturating_mul(i as Weight))
+            .saturating_add((1_000 as Weight).saturating_mul(j as Weight))
+            .saturating_add((1_000 as Weight).saturating_mul(k as Weight))
+            .saturating_add((1_000 as Weight).saturating_mul(z as Weight))
             .saturating_add(DbWeight::get().reads(6 as Weight))
             .saturating_add(DbWeight::get().writes(6 as Weight))
     }
     fn set_membership_price() -> Weight {
-        (78_998_000 as Weight).saturating_add(DbWeight::get().writes(1 as Weight))
+        (67_277_000 as Weight).saturating_add(DbWeight::get().writes(1 as Weight))
     }
     fn update_profile_verification() -> Weight {
-        (382_380_000 as Weight)
+        (315_084_000 as Weight)
             .saturating_add(DbWeight::get().reads(2 as Weight))
             .saturating_add(DbWeight::get().writes(1 as Weight))
     }
     fn set_leader_invitation_quota() -> Weight {
-        (352_240_000 as Weight)
+        (291_926_000 as Weight)
             .saturating_add(DbWeight::get().reads(3 as Weight))
             .saturating_add(DbWeight::get().writes(1 as Weight))
     }
     fn set_initial_invitation_balance() -> Weight {
-        (76_451_000 as Weight).saturating_add(DbWeight::get().writes(1 as Weight))
+        (67_445_000 as Weight).saturating_add(DbWeight::get().writes(1 as Weight))
     }
     fn set_initial_invitation_count() -> Weight {
-        (70_621_000 as Weight).saturating_add(DbWeight::get().writes(1 as Weight))
+        (59_675_000 as Weight).saturating_add(DbWeight::get().writes(1 as Weight))
     }
     fn add_staking_account_candidate() -> Weight {
-        (214_287_000 as Weight)
+        (183_576_000 as Weight)
             .saturating_add(DbWeight::get().reads(2 as Weight))
             .saturating_add(DbWeight::get().writes(1 as Weight))
     }
     fn confirm_staking_account() -> Weight {
-        (324_026_000 as Weight)
+        (267_844_000 as Weight)
             .saturating_add(DbWeight::get().reads(2 as Weight))
             .saturating_add(DbWeight::get().writes(1 as Weight))
     }
     fn remove_staking_account() -> Weight {
-        (247_835_000 as Weight)
+        (206_082_000 as Weight)
             .saturating_add(DbWeight::get().reads(2 as Weight))
             .saturating_add(DbWeight::get().writes(1 as Weight))
     }