difftreelog
fix remove preimage benchmark
in: master
6 files changed
node/cli/src/service.rsdiffbeforeafterbothno syntactic changes
pallets/app-promotion/src/weights.rsdiffbeforeafterboth3//! Autogenerated weights for pallet_app_promotion3//! Autogenerated weights for pallet_app_promotion4//!4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev6//! DATE: 2023-09-26, STEPS: `50`, REPEAT: `400`, LOW RANGE: `[]`, HIGH RANGE: `[]`6//! DATE: 2023-10-12, STEPS: `50`, REPEAT: `80`, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! WORST CASE MAP SIZE: `1000000`7//! WORST CASE MAP SIZE: `1000000`8//! HOSTNAME: `bench-host`, CPU: `Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz`8//! HOSTNAME: `ubuntu-11`, CPU: `QEMU Virtual CPU version 2.5+`9//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 10249//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024101011// Executed Command:11// Executed Command:12// target/production/unique-collator12// target/production/unique-collator20// *20// *21// --template=.maintain/frame-weight-template.hbs21// --template=.maintain/frame-weight-template.hbs22// --steps=5022// --steps=5023// --repeat=40023// --repeat=8024// --heap-pages=409624// --heap-pages=409625// --output=./pallets/app-promotion/src/weights.rs25// --output=./pallets/app-promotion/src/weights.rs262648/// Weights for pallet_app_promotion using the Substrate node and recommended hardware.48/// Weights for pallet_app_promotion using the Substrate node and recommended hardware.49pub struct SubstrateWeight<T>(PhantomData<T>);49pub struct SubstrateWeight<T>(PhantomData<T>);50impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {50impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {51 /// Storage: Maintenance Enabled (r:1 w:0)51 /// Storage: `Maintenance::Enabled` (r:1 w:0)52 /// Proof: Maintenance Enabled (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen)52 /// Proof: `Maintenance::Enabled` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)53 /// Storage: AppPromotion PendingUnstake (r:1 w:1)53 /// Storage: `AppPromotion::PendingUnstake` (r:1 w:1)54 /// Proof: AppPromotion PendingUnstake (max_values: None, max_size: Some(157), added: 2632, mode: MaxEncodedLen)54 /// Proof: `AppPromotion::PendingUnstake` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`)55 /// Storage: Balances Freezes (r:3 w:3)55 /// Storage: `Balances::Freezes` (r:3 w:3)56 /// Proof: Balances Freezes (max_values: None, max_size: Some(369), added: 2844, mode: MaxEncodedLen)56 /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(369), added: 2844, mode: `MaxEncodedLen`)57 /// Storage: System Account (r:3 w:3)57 /// Storage: `System::Account` (r:3 w:3)58 /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)58 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)59 /// Storage: Balances Locks (r:3 w:0)59 /// Storage: `Balances::Locks` (r:3 w:0)60 /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)60 /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)61 /// The range of component `b` is `[0, 3]`.61 /// The range of component `b` is `[0, 3]`.62 fn on_initialize(b: u32, ) -> Weight {62 fn on_initialize(b: u32, ) -> Weight {63 // Proof Size summary in bytes:63 // Proof Size summary in bytes:64 // Measured: `222 + b * (285 ±0)`64 // Measured: `222 + b * (285 ±0)`65 // Estimated: `3622 + b * (3774 ±0)`65 // Estimated: `3622 + b * (3774 ±0)`66 // Minimum execution time: 4_107_000 picoseconds.66 // Minimum execution time: 6_031_000 picoseconds.67 Weight::from_parts(4_751_973, 3622)67 Weight::from_parts(6_880_848, 3622)68 // Standard Error: 4_66868 // Standard Error: 18_75369 .saturating_add(Weight::from_parts(10_570_330, 0).saturating_mul(b.into()))69 .saturating_add(Weight::from_parts(22_907_186, 0).saturating_mul(b.into()))70 .saturating_add(T::DbWeight::get().reads(2_u64))70 .saturating_add(T::DbWeight::get().reads(2_u64))71 .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(b.into())))71 .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(b.into())))72 .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(b.into())))72 .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(b.into())))73 .saturating_add(Weight::from_parts(0, 3774).saturating_mul(b.into()))73 .saturating_add(Weight::from_parts(0, 3774).saturating_mul(b.into()))74 }74 }75 /// Storage: AppPromotion Admin (r:0 w:1)75 /// Storage: `AppPromotion::Admin` (r:0 w:1)76 /// Proof: AppPromotion Admin (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)76 /// Proof: `AppPromotion::Admin` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)77 fn set_admin_address() -> Weight {77 fn set_admin_address() -> Weight {78 // Proof Size summary in bytes:78 // Proof Size summary in bytes:79 // Measured: `0`79 // Measured: `0`80 // Estimated: `0`80 // Estimated: `0`81 // Minimum execution time: 3_459_000 picoseconds.81 // Minimum execution time: 7_565_000 picoseconds.82 Weight::from_parts(3_627_000, 0)82 Weight::from_parts(7_795_000, 0)83 .saturating_add(T::DbWeight::get().writes(1_u64))83 .saturating_add(T::DbWeight::get().writes(1_u64))84 }84 }85 /// Storage: AppPromotion Admin (r:1 w:0)85 /// Storage: `AppPromotion::Admin` (r:1 w:0)86 /// Proof: AppPromotion Admin (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)86 /// Proof: `AppPromotion::Admin` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)87 /// Storage: Configuration AppPromomotionConfigurationOverride (r:1 w:0)87 /// Storage: `Configuration::AppPromomotionConfigurationOverride` (r:1 w:0)88 /// Proof: Configuration AppPromomotionConfigurationOverride (max_values: Some(1), max_size: Some(17), added: 512, mode: MaxEncodedLen)88 /// Proof: `Configuration::AppPromomotionConfigurationOverride` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`)89 /// Storage: ParachainSystem ValidationData (r:1 w:0)89 /// Storage: `ParachainSystem::ValidationData` (r:1 w:0)90 /// Proof Skipped: ParachainSystem ValidationData (max_values: Some(1), max_size: None, mode: Measured)90 /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)91 /// Storage: AppPromotion PreviousCalculatedRecord (r:1 w:1)91 /// Storage: `AppPromotion::PreviousCalculatedRecord` (r:1 w:1)92 /// Proof: AppPromotion PreviousCalculatedRecord (max_values: Some(1), max_size: Some(36), added: 531, mode: MaxEncodedLen)92 /// Proof: `AppPromotion::PreviousCalculatedRecord` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)93 /// Storage: AppPromotion Staked (r:1001 w:1000)93 /// Storage: `AppPromotion::Staked` (r:1001 w:1000)94 /// Proof: AppPromotion Staked (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen)94 /// Proof: `AppPromotion::Staked` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)95 /// Storage: System Account (r:101 w:101)95 /// Storage: `System::Account` (r:101 w:101)96 /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)96 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)97 /// Storage: Balances Freezes (r:100 w:100)97 /// Storage: `Balances::Freezes` (r:100 w:100)98 /// Proof: Balances Freezes (max_values: None, max_size: Some(369), added: 2844, mode: MaxEncodedLen)98 /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(369), added: 2844, mode: `MaxEncodedLen`)99 /// Storage: Balances Locks (r:100 w:0)99 /// Storage: `Balances::Locks` (r:100 w:0)100 /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)100 /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)101 /// Storage: AppPromotion TotalStaked (r:1 w:1)101 /// Storage: `AppPromotion::TotalStaked` (r:1 w:1)102 /// Proof: AppPromotion TotalStaked (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)102 /// Proof: `AppPromotion::TotalStaked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)103 /// The range of component `b` is `[1, 100]`.103 /// The range of component `b` is `[1, 100]`.104 fn payout_stakers(b: u32, ) -> Weight {104 fn payout_stakers(b: u32, ) -> Weight {105 // Proof Size summary in bytes:105 // Proof Size summary in bytes:106 // Measured: `564 + b * (641 ±0)`106 // Measured: `564 + b * (641 ±0)`107 // Estimated: `3593 + b * (25550 ±0)`107 // Estimated: `3593 + b * (25550 ±0)`108 // Minimum execution time: 73_245_000 picoseconds.108 // Minimum execution time: 146_577_000 picoseconds.109 Weight::from_parts(74_196_000, 3593)109 Weight::from_parts(147_970_000, 3593)110 // Standard Error: 8_231110 // Standard Error: 59_065111 .saturating_add(Weight::from_parts(49_090_053, 0).saturating_mul(b.into()))111 .saturating_add(Weight::from_parts(115_527_092, 0).saturating_mul(b.into()))112 .saturating_add(T::DbWeight::get().reads(7_u64))112 .saturating_add(T::DbWeight::get().reads(7_u64))113 .saturating_add(T::DbWeight::get().reads((13_u64).saturating_mul(b.into())))113 .saturating_add(T::DbWeight::get().reads((13_u64).saturating_mul(b.into())))114 .saturating_add(T::DbWeight::get().writes(3_u64))114 .saturating_add(T::DbWeight::get().writes(3_u64))115 .saturating_add(T::DbWeight::get().writes((12_u64).saturating_mul(b.into())))115 .saturating_add(T::DbWeight::get().writes((12_u64).saturating_mul(b.into())))116 .saturating_add(Weight::from_parts(0, 25550).saturating_mul(b.into()))116 .saturating_add(Weight::from_parts(0, 25550).saturating_mul(b.into()))117 }117 }118 /// Storage: AppPromotion StakesPerAccount (r:1 w:1)118 /// Storage: `AppPromotion::StakesPerAccount` (r:1 w:1)119 /// Proof: AppPromotion StakesPerAccount (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)119 /// Proof: `AppPromotion::StakesPerAccount` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)120 /// Storage: Configuration AppPromomotionConfigurationOverride (r:1 w:0)120 /// Storage: `Configuration::AppPromomotionConfigurationOverride` (r:1 w:0)121 /// Proof: Configuration AppPromomotionConfigurationOverride (max_values: Some(1), max_size: Some(17), added: 512, mode: MaxEncodedLen)121 /// Proof: `Configuration::AppPromomotionConfigurationOverride` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`)122 /// Storage: System Account (r:1 w:1)122 /// Storage: `System::Account` (r:1 w:1)123 /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)123 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)124 /// Storage: Balances Freezes (r:1 w:1)124 /// Storage: `Balances::Freezes` (r:1 w:1)125 /// Proof: Balances Freezes (max_values: None, max_size: Some(369), added: 2844, mode: MaxEncodedLen)125 /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(369), added: 2844, mode: `MaxEncodedLen`)126 /// Storage: Balances Locks (r:1 w:0)126 /// Storage: `Balances::Locks` (r:1 w:0)127 /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)127 /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)128 /// Storage: ParachainSystem ValidationData (r:1 w:0)128 /// Storage: `ParachainSystem::ValidationData` (r:1 w:0)129 /// Proof Skipped: ParachainSystem ValidationData (max_values: Some(1), max_size: None, mode: Measured)129 /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)130 /// Storage: AppPromotion Staked (r:1 w:1)130 /// Storage: `AppPromotion::Staked` (r:1 w:1)131 /// Proof: AppPromotion Staked (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen)131 /// Proof: `AppPromotion::Staked` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)132 /// Storage: AppPromotion TotalStaked (r:1 w:1)132 /// Storage: `AppPromotion::TotalStaked` (r:1 w:1)133 /// Proof: AppPromotion TotalStaked (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)133 /// Proof: `AppPromotion::TotalStaked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)134 fn stake() -> Weight {134 fn stake() -> Weight {135 // Proof Size summary in bytes:135 // Proof Size summary in bytes:136 // Measured: `389`136 // Measured: `389`137 // Estimated: `4764`137 // Estimated: `4764`138 // Minimum execution time: 21_088_000 picoseconds.138 // Minimum execution time: 46_889_000 picoseconds.139 Weight::from_parts(21_639_000, 4764)139 Weight::from_parts(47_549_000, 4764)140 .saturating_add(T::DbWeight::get().reads(8_u64))140 .saturating_add(T::DbWeight::get().reads(8_u64))141 .saturating_add(T::DbWeight::get().writes(5_u64))141 .saturating_add(T::DbWeight::get().writes(5_u64))142 }142 }143 /// Storage: Configuration AppPromomotionConfigurationOverride (r:1 w:0)143 /// Storage: `Configuration::AppPromomotionConfigurationOverride` (r:1 w:0)144 /// Proof: Configuration AppPromomotionConfigurationOverride (max_values: Some(1), max_size: Some(17), added: 512, mode: MaxEncodedLen)144 /// Proof: `Configuration::AppPromomotionConfigurationOverride` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`)145 /// Storage: AppPromotion PendingUnstake (r:1 w:1)145 /// Storage: `AppPromotion::PendingUnstake` (r:1 w:1)146 /// Proof: AppPromotion PendingUnstake (max_values: None, max_size: Some(157), added: 2632, mode: MaxEncodedLen)146 /// Proof: `AppPromotion::PendingUnstake` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`)147 /// Storage: AppPromotion Staked (r:11 w:10)147 /// Storage: `AppPromotion::Staked` (r:11 w:10)148 /// Proof: AppPromotion Staked (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen)148 /// Proof: `AppPromotion::Staked` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)149 /// Storage: AppPromotion TotalStaked (r:1 w:1)149 /// Storage: `AppPromotion::TotalStaked` (r:1 w:1)150 /// Proof: AppPromotion TotalStaked (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)150 /// Proof: `AppPromotion::TotalStaked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)151 /// Storage: AppPromotion StakesPerAccount (r:0 w:1)151 /// Storage: `AppPromotion::StakesPerAccount` (r:0 w:1)152 /// Proof: AppPromotion StakesPerAccount (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)152 /// Proof: `AppPromotion::StakesPerAccount` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)153 fn unstake_all() -> Weight {153 fn unstake_all() -> Weight {154 // Proof Size summary in bytes:154 // Proof Size summary in bytes:155 // Measured: `829`155 // Measured: `829`156 // Estimated: `29095`156 // Estimated: `29095`157 // Minimum execution time: 42_086_000 picoseconds.157 // Minimum execution time: 63_069_000 picoseconds.158 Weight::from_parts(43_149_000, 29095)158 Weight::from_parts(64_522_000, 29095)159 .saturating_add(T::DbWeight::get().reads(14_u64))159 .saturating_add(T::DbWeight::get().reads(14_u64))160 .saturating_add(T::DbWeight::get().writes(13_u64))160 .saturating_add(T::DbWeight::get().writes(13_u64))161 }161 }162 /// Storage: Configuration AppPromomotionConfigurationOverride (r:1 w:0)162 /// Storage: `Configuration::AppPromomotionConfigurationOverride` (r:1 w:0)163 /// Proof: Configuration AppPromomotionConfigurationOverride (max_values: Some(1), max_size: Some(17), added: 512, mode: MaxEncodedLen)163 /// Proof: `Configuration::AppPromomotionConfigurationOverride` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`)164 /// Storage: AppPromotion PendingUnstake (r:1 w:1)164 /// Storage: `AppPromotion::PendingUnstake` (r:1 w:1)165 /// Proof: AppPromotion PendingUnstake (max_values: None, max_size: Some(157), added: 2632, mode: MaxEncodedLen)165 /// Proof: `AppPromotion::PendingUnstake` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`)166 /// Storage: AppPromotion Staked (r:11 w:10)166 /// Storage: `AppPromotion::Staked` (r:11 w:10)167 /// Proof: AppPromotion Staked (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen)167 /// Proof: `AppPromotion::Staked` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)168 /// Storage: AppPromotion TotalStaked (r:1 w:1)168 /// Storage: `AppPromotion::TotalStaked` (r:1 w:1)169 /// Proof: AppPromotion TotalStaked (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)169 /// Proof: `AppPromotion::TotalStaked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)170 /// Storage: AppPromotion StakesPerAccount (r:1 w:1)170 /// Storage: `AppPromotion::StakesPerAccount` (r:1 w:1)171 /// Proof: AppPromotion StakesPerAccount (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)171 /// Proof: `AppPromotion::StakesPerAccount` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)172 fn unstake_partial() -> Weight {172 fn unstake_partial() -> Weight {173 // Proof Size summary in bytes:173 // Proof Size summary in bytes:174 // Measured: `829`174 // Measured: `829`175 // Estimated: `29095`175 // Estimated: `29095`176 // Minimum execution time: 46_458_000 picoseconds.176 // Minimum execution time: 84_649_000 picoseconds.177 Weight::from_parts(47_333_000, 29095)177 Weight::from_parts(86_173_000, 29095)178 .saturating_add(T::DbWeight::get().reads(15_u64))178 .saturating_add(T::DbWeight::get().reads(15_u64))179 .saturating_add(T::DbWeight::get().writes(13_u64))179 .saturating_add(T::DbWeight::get().writes(13_u64))180 }180 }181 /// Storage: AppPromotion Admin (r:1 w:0)181 /// Storage: `AppPromotion::Admin` (r:1 w:0)182 /// Proof: AppPromotion Admin (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)182 /// Proof: `AppPromotion::Admin` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)183 /// Storage: Common CollectionById (r:1 w:1)183 /// Storage: `Common::CollectionById` (r:1 w:1)184 /// Proof: Common CollectionById (max_values: None, max_size: Some(860), added: 3335, mode: MaxEncodedLen)184 /// Proof: `Common::CollectionById` (`max_values`: None, `max_size`: Some(860), added: 3335, mode: `MaxEncodedLen`)185 fn sponsor_collection() -> Weight {185 fn sponsor_collection() -> Weight {186 // Proof Size summary in bytes:186 // Proof Size summary in bytes:187 // Measured: `1060`187 // Measured: `1060`188 // Estimated: `4325`188 // Estimated: `4325`189 // Minimum execution time: 12_827_000 picoseconds.189 // Minimum execution time: 24_396_000 picoseconds.190 Weight::from_parts(13_610_000, 4325)190 Weight::from_parts(24_917_000, 4325)191 .saturating_add(T::DbWeight::get().reads(2_u64))191 .saturating_add(T::DbWeight::get().reads(2_u64))192 .saturating_add(T::DbWeight::get().writes(1_u64))192 .saturating_add(T::DbWeight::get().writes(1_u64))193 }193 }194 /// Storage: AppPromotion Admin (r:1 w:0)194 /// Storage: `AppPromotion::Admin` (r:1 w:0)195 /// Proof: AppPromotion Admin (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)195 /// Proof: `AppPromotion::Admin` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)196 /// Storage: Common CollectionById (r:1 w:1)196 /// Storage: `Common::CollectionById` (r:1 w:1)197 /// Proof: Common CollectionById (max_values: None, max_size: Some(860), added: 3335, mode: MaxEncodedLen)197 /// Proof: `Common::CollectionById` (`max_values`: None, `max_size`: Some(860), added: 3335, mode: `MaxEncodedLen`)198 fn stop_sponsoring_collection() -> Weight {198 fn stop_sponsoring_collection() -> Weight {199 // Proof Size summary in bytes:199 // Proof Size summary in bytes:200 // Measured: `1092`200 // Measured: `1092`201 // Estimated: `4325`201 // Estimated: `4325`202 // Minimum execution time: 11_899_000 picoseconds.202 // Minimum execution time: 22_412_000 picoseconds.203 Weight::from_parts(12_303_000, 4325)203 Weight::from_parts(23_033_000, 4325)204 .saturating_add(T::DbWeight::get().reads(2_u64))204 .saturating_add(T::DbWeight::get().reads(2_u64))205 .saturating_add(T::DbWeight::get().writes(1_u64))205 .saturating_add(T::DbWeight::get().writes(1_u64))206 }206 }207 /// Storage: AppPromotion Admin (r:1 w:0)207 /// Storage: `AppPromotion::Admin` (r:1 w:0)208 /// Proof: AppPromotion Admin (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)208 /// Proof: `AppPromotion::Admin` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)209 /// Storage: EvmContractHelpers Sponsoring (r:0 w:1)209 /// Storage: `EvmContractHelpers::Sponsoring` (r:0 w:1)210 /// Proof: EvmContractHelpers Sponsoring (max_values: None, max_size: Some(62), added: 2537, mode: MaxEncodedLen)210 /// Proof: `EvmContractHelpers::Sponsoring` (`max_values`: None, `max_size`: Some(62), added: 2537, mode: `MaxEncodedLen`)211 fn sponsor_contract() -> Weight {211 fn sponsor_contract() -> Weight {212 // Proof Size summary in bytes:212 // Proof Size summary in bytes:213 // Measured: `198`213 // Measured: `198`214 // Estimated: `1517`214 // Estimated: `1517`215 // Minimum execution time: 10_226_000 picoseconds.215 // Minimum execution time: 21_621_000 picoseconds.216 Weight::from_parts(10_549_000, 1517)216 Weight::from_parts(22_041_000, 1517)217 .saturating_add(T::DbWeight::get().reads(1_u64))217 .saturating_add(T::DbWeight::get().reads(1_u64))218 .saturating_add(T::DbWeight::get().writes(1_u64))218 .saturating_add(T::DbWeight::get().writes(1_u64))219 }219 }220 /// Storage: AppPromotion Admin (r:1 w:0)220 /// Storage: `AppPromotion::Admin` (r:1 w:0)221 /// Proof: AppPromotion Admin (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)221 /// Proof: `AppPromotion::Admin` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)222 /// Storage: EvmContractHelpers Sponsoring (r:1 w:1)222 /// Storage: `EvmContractHelpers::Sponsoring` (r:1 w:1)223 /// Proof: EvmContractHelpers Sponsoring (max_values: None, max_size: Some(62), added: 2537, mode: MaxEncodedLen)223 /// Proof: `EvmContractHelpers::Sponsoring` (`max_values`: None, `max_size`: Some(62), added: 2537, mode: `MaxEncodedLen`)224 fn stop_sponsoring_contract() -> Weight {224 fn stop_sponsoring_contract() -> Weight {225 // Proof Size summary in bytes:225 // Proof Size summary in bytes:226 // Measured: `396`226 // Measured: `396`227 // Estimated: `3527`227 // Estimated: `3527`228 // Minimum execution time: 10_528_000 picoseconds.228 // Minimum execution time: 19_186_000 picoseconds.229 Weight::from_parts(10_842_000, 3527)229 Weight::from_parts(19_616_000, 3527)230 .saturating_add(T::DbWeight::get().reads(2_u64))230 .saturating_add(T::DbWeight::get().reads(2_u64))231 .saturating_add(T::DbWeight::get().writes(1_u64))231 .saturating_add(T::DbWeight::get().writes(1_u64))232 }232 }233}233}234234235// For backwards compatibility and tests235// For backwards compatibility and tests236impl WeightInfo for () {236impl WeightInfo for () {237 /// Storage: Maintenance Enabled (r:1 w:0)237 /// Storage: `Maintenance::Enabled` (r:1 w:0)238 /// Proof: Maintenance Enabled (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen)238 /// Proof: `Maintenance::Enabled` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)239 /// Storage: AppPromotion PendingUnstake (r:1 w:1)239 /// Storage: `AppPromotion::PendingUnstake` (r:1 w:1)240 /// Proof: AppPromotion PendingUnstake (max_values: None, max_size: Some(157), added: 2632, mode: MaxEncodedLen)240 /// Proof: `AppPromotion::PendingUnstake` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`)241 /// Storage: Balances Freezes (r:3 w:3)241 /// Storage: `Balances::Freezes` (r:3 w:3)242 /// Proof: Balances Freezes (max_values: None, max_size: Some(369), added: 2844, mode: MaxEncodedLen)242 /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(369), added: 2844, mode: `MaxEncodedLen`)243 /// Storage: System Account (r:3 w:3)243 /// Storage: `System::Account` (r:3 w:3)244 /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)244 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)245 /// Storage: Balances Locks (r:3 w:0)245 /// Storage: `Balances::Locks` (r:3 w:0)246 /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)246 /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)247 /// The range of component `b` is `[0, 3]`.247 /// The range of component `b` is `[0, 3]`.248 fn on_initialize(b: u32, ) -> Weight {248 fn on_initialize(b: u32, ) -> Weight {249 // Proof Size summary in bytes:249 // Proof Size summary in bytes:250 // Measured: `222 + b * (285 ±0)`250 // Measured: `222 + b * (285 ±0)`251 // Estimated: `3622 + b * (3774 ±0)`251 // Estimated: `3622 + b * (3774 ±0)`252 // Minimum execution time: 4_107_000 picoseconds.252 // Minimum execution time: 6_031_000 picoseconds.253 Weight::from_parts(4_751_973, 3622)253 Weight::from_parts(6_880_848, 3622)254 // Standard Error: 4_668254 // Standard Error: 18_753255 .saturating_add(Weight::from_parts(10_570_330, 0).saturating_mul(b.into()))255 .saturating_add(Weight::from_parts(22_907_186, 0).saturating_mul(b.into()))256 .saturating_add(RocksDbWeight::get().reads(2_u64))256 .saturating_add(RocksDbWeight::get().reads(2_u64))257 .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(b.into())))257 .saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(b.into())))258 .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(b.into())))258 .saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(b.into())))259 .saturating_add(Weight::from_parts(0, 3774).saturating_mul(b.into()))259 .saturating_add(Weight::from_parts(0, 3774).saturating_mul(b.into()))260 }260 }261 /// Storage: AppPromotion Admin (r:0 w:1)261 /// Storage: `AppPromotion::Admin` (r:0 w:1)262 /// Proof: AppPromotion Admin (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)262 /// Proof: `AppPromotion::Admin` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)263 fn set_admin_address() -> Weight {263 fn set_admin_address() -> Weight {264 // Proof Size summary in bytes:264 // Proof Size summary in bytes:265 // Measured: `0`265 // Measured: `0`266 // Estimated: `0`266 // Estimated: `0`267 // Minimum execution time: 3_459_000 picoseconds.267 // Minimum execution time: 7_565_000 picoseconds.268 Weight::from_parts(3_627_000, 0)268 Weight::from_parts(7_795_000, 0)269 .saturating_add(RocksDbWeight::get().writes(1_u64))269 .saturating_add(RocksDbWeight::get().writes(1_u64))270 }270 }271 /// Storage: AppPromotion Admin (r:1 w:0)271 /// Storage: `AppPromotion::Admin` (r:1 w:0)272 /// Proof: AppPromotion Admin (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)272 /// Proof: `AppPromotion::Admin` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)273 /// Storage: Configuration AppPromomotionConfigurationOverride (r:1 w:0)273 /// Storage: `Configuration::AppPromomotionConfigurationOverride` (r:1 w:0)274 /// Proof: Configuration AppPromomotionConfigurationOverride (max_values: Some(1), max_size: Some(17), added: 512, mode: MaxEncodedLen)274 /// Proof: `Configuration::AppPromomotionConfigurationOverride` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`)275 /// Storage: ParachainSystem ValidationData (r:1 w:0)275 /// Storage: `ParachainSystem::ValidationData` (r:1 w:0)276 /// Proof Skipped: ParachainSystem ValidationData (max_values: Some(1), max_size: None, mode: Measured)276 /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)277 /// Storage: AppPromotion PreviousCalculatedRecord (r:1 w:1)277 /// Storage: `AppPromotion::PreviousCalculatedRecord` (r:1 w:1)278 /// Proof: AppPromotion PreviousCalculatedRecord (max_values: Some(1), max_size: Some(36), added: 531, mode: MaxEncodedLen)278 /// Proof: `AppPromotion::PreviousCalculatedRecord` (`max_values`: Some(1), `max_size`: Some(36), added: 531, mode: `MaxEncodedLen`)279 /// Storage: AppPromotion Staked (r:1001 w:1000)279 /// Storage: `AppPromotion::Staked` (r:1001 w:1000)280 /// Proof: AppPromotion Staked (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen)280 /// Proof: `AppPromotion::Staked` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)281 /// Storage: System Account (r:101 w:101)281 /// Storage: `System::Account` (r:101 w:101)282 /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)282 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)283 /// Storage: Balances Freezes (r:100 w:100)283 /// Storage: `Balances::Freezes` (r:100 w:100)284 /// Proof: Balances Freezes (max_values: None, max_size: Some(369), added: 2844, mode: MaxEncodedLen)284 /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(369), added: 2844, mode: `MaxEncodedLen`)285 /// Storage: Balances Locks (r:100 w:0)285 /// Storage: `Balances::Locks` (r:100 w:0)286 /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)286 /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)287 /// Storage: AppPromotion TotalStaked (r:1 w:1)287 /// Storage: `AppPromotion::TotalStaked` (r:1 w:1)288 /// Proof: AppPromotion TotalStaked (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)288 /// Proof: `AppPromotion::TotalStaked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)289 /// The range of component `b` is `[1, 100]`.289 /// The range of component `b` is `[1, 100]`.290 fn payout_stakers(b: u32, ) -> Weight {290 fn payout_stakers(b: u32, ) -> Weight {291 // Proof Size summary in bytes:291 // Proof Size summary in bytes:292 // Measured: `564 + b * (641 ±0)`292 // Measured: `564 + b * (641 ±0)`293 // Estimated: `3593 + b * (25550 ±0)`293 // Estimated: `3593 + b * (25550 ±0)`294 // Minimum execution time: 73_245_000 picoseconds.294 // Minimum execution time: 146_577_000 picoseconds.295 Weight::from_parts(74_196_000, 3593)295 Weight::from_parts(147_970_000, 3593)296 // Standard Error: 8_231296 // Standard Error: 59_065297 .saturating_add(Weight::from_parts(49_090_053, 0).saturating_mul(b.into()))297 .saturating_add(Weight::from_parts(115_527_092, 0).saturating_mul(b.into()))298 .saturating_add(RocksDbWeight::get().reads(7_u64))298 .saturating_add(RocksDbWeight::get().reads(7_u64))299 .saturating_add(RocksDbWeight::get().reads((13_u64).saturating_mul(b.into())))299 .saturating_add(RocksDbWeight::get().reads((13_u64).saturating_mul(b.into())))300 .saturating_add(RocksDbWeight::get().writes(3_u64))300 .saturating_add(RocksDbWeight::get().writes(3_u64))301 .saturating_add(RocksDbWeight::get().writes((12_u64).saturating_mul(b.into())))301 .saturating_add(RocksDbWeight::get().writes((12_u64).saturating_mul(b.into())))302 .saturating_add(Weight::from_parts(0, 25550).saturating_mul(b.into()))302 .saturating_add(Weight::from_parts(0, 25550).saturating_mul(b.into()))303 }303 }304 /// Storage: AppPromotion StakesPerAccount (r:1 w:1)304 /// Storage: `AppPromotion::StakesPerAccount` (r:1 w:1)305 /// Proof: AppPromotion StakesPerAccount (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)305 /// Proof: `AppPromotion::StakesPerAccount` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)306 /// Storage: Configuration AppPromomotionConfigurationOverride (r:1 w:0)306 /// Storage: `Configuration::AppPromomotionConfigurationOverride` (r:1 w:0)307 /// Proof: Configuration AppPromomotionConfigurationOverride (max_values: Some(1), max_size: Some(17), added: 512, mode: MaxEncodedLen)307 /// Proof: `Configuration::AppPromomotionConfigurationOverride` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`)308 /// Storage: System Account (r:1 w:1)308 /// Storage: `System::Account` (r:1 w:1)309 /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)309 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)310 /// Storage: Balances Freezes (r:1 w:1)310 /// Storage: `Balances::Freezes` (r:1 w:1)311 /// Proof: Balances Freezes (max_values: None, max_size: Some(369), added: 2844, mode: MaxEncodedLen)311 /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(369), added: 2844, mode: `MaxEncodedLen`)312 /// Storage: Balances Locks (r:1 w:0)312 /// Storage: `Balances::Locks` (r:1 w:0)313 /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)313 /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)314 /// Storage: ParachainSystem ValidationData (r:1 w:0)314 /// Storage: `ParachainSystem::ValidationData` (r:1 w:0)315 /// Proof Skipped: ParachainSystem ValidationData (max_values: Some(1), max_size: None, mode: Measured)315 /// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)316 /// Storage: AppPromotion Staked (r:1 w:1)316 /// Storage: `AppPromotion::Staked` (r:1 w:1)317 /// Proof: AppPromotion Staked (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen)317 /// Proof: `AppPromotion::Staked` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)318 /// Storage: AppPromotion TotalStaked (r:1 w:1)318 /// Storage: `AppPromotion::TotalStaked` (r:1 w:1)319 /// Proof: AppPromotion TotalStaked (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)319 /// Proof: `AppPromotion::TotalStaked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)320 fn stake() -> Weight {320 fn stake() -> Weight {321 // Proof Size summary in bytes:321 // Proof Size summary in bytes:322 // Measured: `389`322 // Measured: `389`323 // Estimated: `4764`323 // Estimated: `4764`324 // Minimum execution time: 21_088_000 picoseconds.324 // Minimum execution time: 46_889_000 picoseconds.325 Weight::from_parts(21_639_000, 4764)325 Weight::from_parts(47_549_000, 4764)326 .saturating_add(RocksDbWeight::get().reads(8_u64))326 .saturating_add(RocksDbWeight::get().reads(8_u64))327 .saturating_add(RocksDbWeight::get().writes(5_u64))327 .saturating_add(RocksDbWeight::get().writes(5_u64))328 }328 }329 /// Storage: Configuration AppPromomotionConfigurationOverride (r:1 w:0)329 /// Storage: `Configuration::AppPromomotionConfigurationOverride` (r:1 w:0)330 /// Proof: Configuration AppPromomotionConfigurationOverride (max_values: Some(1), max_size: Some(17), added: 512, mode: MaxEncodedLen)330 /// Proof: `Configuration::AppPromomotionConfigurationOverride` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`)331 /// Storage: AppPromotion PendingUnstake (r:1 w:1)331 /// Storage: `AppPromotion::PendingUnstake` (r:1 w:1)332 /// Proof: AppPromotion PendingUnstake (max_values: None, max_size: Some(157), added: 2632, mode: MaxEncodedLen)332 /// Proof: `AppPromotion::PendingUnstake` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`)333 /// Storage: AppPromotion Staked (r:11 w:10)333 /// Storage: `AppPromotion::Staked` (r:11 w:10)334 /// Proof: AppPromotion Staked (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen)334 /// Proof: `AppPromotion::Staked` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)335 /// Storage: AppPromotion TotalStaked (r:1 w:1)335 /// Storage: `AppPromotion::TotalStaked` (r:1 w:1)336 /// Proof: AppPromotion TotalStaked (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)336 /// Proof: `AppPromotion::TotalStaked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)337 /// Storage: AppPromotion StakesPerAccount (r:0 w:1)337 /// Storage: `AppPromotion::StakesPerAccount` (r:0 w:1)338 /// Proof: AppPromotion StakesPerAccount (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)338 /// Proof: `AppPromotion::StakesPerAccount` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)339 fn unstake_all() -> Weight {339 fn unstake_all() -> Weight {340 // Proof Size summary in bytes:340 // Proof Size summary in bytes:341 // Measured: `829`341 // Measured: `829`342 // Estimated: `29095`342 // Estimated: `29095`343 // Minimum execution time: 42_086_000 picoseconds.343 // Minimum execution time: 63_069_000 picoseconds.344 Weight::from_parts(43_149_000, 29095)344 Weight::from_parts(64_522_000, 29095)345 .saturating_add(RocksDbWeight::get().reads(14_u64))345 .saturating_add(RocksDbWeight::get().reads(14_u64))346 .saturating_add(RocksDbWeight::get().writes(13_u64))346 .saturating_add(RocksDbWeight::get().writes(13_u64))347 }347 }348 /// Storage: Configuration AppPromomotionConfigurationOverride (r:1 w:0)348 /// Storage: `Configuration::AppPromomotionConfigurationOverride` (r:1 w:0)349 /// Proof: Configuration AppPromomotionConfigurationOverride (max_values: Some(1), max_size: Some(17), added: 512, mode: MaxEncodedLen)349 /// Proof: `Configuration::AppPromomotionConfigurationOverride` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`)350 /// Storage: AppPromotion PendingUnstake (r:1 w:1)350 /// Storage: `AppPromotion::PendingUnstake` (r:1 w:1)351 /// Proof: AppPromotion PendingUnstake (max_values: None, max_size: Some(157), added: 2632, mode: MaxEncodedLen)351 /// Proof: `AppPromotion::PendingUnstake` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`)352 /// Storage: AppPromotion Staked (r:11 w:10)352 /// Storage: `AppPromotion::Staked` (r:11 w:10)353 /// Proof: AppPromotion Staked (max_values: None, max_size: Some(80), added: 2555, mode: MaxEncodedLen)353 /// Proof: `AppPromotion::Staked` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)354 /// Storage: AppPromotion TotalStaked (r:1 w:1)354 /// Storage: `AppPromotion::TotalStaked` (r:1 w:1)355 /// Proof: AppPromotion TotalStaked (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)355 /// Proof: `AppPromotion::TotalStaked` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)356 /// Storage: AppPromotion StakesPerAccount (r:1 w:1)356 /// Storage: `AppPromotion::StakesPerAccount` (r:1 w:1)357 /// Proof: AppPromotion StakesPerAccount (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen)357 /// Proof: `AppPromotion::StakesPerAccount` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)358 fn unstake_partial() -> Weight {358 fn unstake_partial() -> Weight {359 // Proof Size summary in bytes:359 // Proof Size summary in bytes:360 // Measured: `829`360 // Measured: `829`361 // Estimated: `29095`361 // Estimated: `29095`362 // Minimum execution time: 46_458_000 picoseconds.362 // Minimum execution time: 84_649_000 picoseconds.363 Weight::from_parts(47_333_000, 29095)363 Weight::from_parts(86_173_000, 29095)364 .saturating_add(RocksDbWeight::get().reads(15_u64))364 .saturating_add(RocksDbWeight::get().reads(15_u64))365 .saturating_add(RocksDbWeight::get().writes(13_u64))365 .saturating_add(RocksDbWeight::get().writes(13_u64))366 }366 }367 /// Storage: AppPromotion Admin (r:1 w:0)367 /// Storage: `AppPromotion::Admin` (r:1 w:0)368 /// Proof: AppPromotion Admin (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)368 /// Proof: `AppPromotion::Admin` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)369 /// Storage: Common CollectionById (r:1 w:1)369 /// Storage: `Common::CollectionById` (r:1 w:1)370 /// Proof: Common CollectionById (max_values: None, max_size: Some(860), added: 3335, mode: MaxEncodedLen)370 /// Proof: `Common::CollectionById` (`max_values`: None, `max_size`: Some(860), added: 3335, mode: `MaxEncodedLen`)371 fn sponsor_collection() -> Weight {371 fn sponsor_collection() -> Weight {372 // Proof Size summary in bytes:372 // Proof Size summary in bytes:373 // Measured: `1060`373 // Measured: `1060`374 // Estimated: `4325`374 // Estimated: `4325`375 // Minimum execution time: 12_827_000 picoseconds.375 // Minimum execution time: 24_396_000 picoseconds.376 Weight::from_parts(13_610_000, 4325)376 Weight::from_parts(24_917_000, 4325)377 .saturating_add(RocksDbWeight::get().reads(2_u64))377 .saturating_add(RocksDbWeight::get().reads(2_u64))378 .saturating_add(RocksDbWeight::get().writes(1_u64))378 .saturating_add(RocksDbWeight::get().writes(1_u64))379 }379 }380 /// Storage: AppPromotion Admin (r:1 w:0)380 /// Storage: `AppPromotion::Admin` (r:1 w:0)381 /// Proof: AppPromotion Admin (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)381 /// Proof: `AppPromotion::Admin` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)382 /// Storage: Common CollectionById (r:1 w:1)382 /// Storage: `Common::CollectionById` (r:1 w:1)383 /// Proof: Common CollectionById (max_values: None, max_size: Some(860), added: 3335, mode: MaxEncodedLen)383 /// Proof: `Common::CollectionById` (`max_values`: None, `max_size`: Some(860), added: 3335, mode: `MaxEncodedLen`)384 fn stop_sponsoring_collection() -> Weight {384 fn stop_sponsoring_collection() -> Weight {385 // Proof Size summary in bytes:385 // Proof Size summary in bytes:386 // Measured: `1092`386 // Measured: `1092`387 // Estimated: `4325`387 // Estimated: `4325`388 // Minimum execution time: 11_899_000 picoseconds.388 // Minimum execution time: 22_412_000 picoseconds.389 Weight::from_parts(12_303_000, 4325)389 Weight::from_parts(23_033_000, 4325)390 .saturating_add(RocksDbWeight::get().reads(2_u64))390 .saturating_add(RocksDbWeight::get().reads(2_u64))391 .saturating_add(RocksDbWeight::get().writes(1_u64))391 .saturating_add(RocksDbWeight::get().writes(1_u64))392 }392 }393 /// Storage: AppPromotion Admin (r:1 w:0)393 /// Storage: `AppPromotion::Admin` (r:1 w:0)394 /// Proof: AppPromotion Admin (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)394 /// Proof: `AppPromotion::Admin` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)395 /// Storage: EvmContractHelpers Sponsoring (r:0 w:1)395 /// Storage: `EvmContractHelpers::Sponsoring` (r:0 w:1)396 /// Proof: EvmContractHelpers Sponsoring (max_values: None, max_size: Some(62), added: 2537, mode: MaxEncodedLen)396 /// Proof: `EvmContractHelpers::Sponsoring` (`max_values`: None, `max_size`: Some(62), added: 2537, mode: `MaxEncodedLen`)397 fn sponsor_contract() -> Weight {397 fn sponsor_contract() -> Weight {398 // Proof Size summary in bytes:398 // Proof Size summary in bytes:399 // Measured: `198`399 // Measured: `198`400 // Estimated: `1517`400 // Estimated: `1517`401 // Minimum execution time: 10_226_000 picoseconds.401 // Minimum execution time: 21_621_000 picoseconds.402 Weight::from_parts(10_549_000, 1517)402 Weight::from_parts(22_041_000, 1517)403 .saturating_add(RocksDbWeight::get().reads(1_u64))403 .saturating_add(RocksDbWeight::get().reads(1_u64))404 .saturating_add(RocksDbWeight::get().writes(1_u64))404 .saturating_add(RocksDbWeight::get().writes(1_u64))405 }405 }406 /// Storage: AppPromotion Admin (r:1 w:0)406 /// Storage: `AppPromotion::Admin` (r:1 w:0)407 /// Proof: AppPromotion Admin (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen)407 /// Proof: `AppPromotion::Admin` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)408 /// Storage: EvmContractHelpers Sponsoring (r:1 w:1)408 /// Storage: `EvmContractHelpers::Sponsoring` (r:1 w:1)409 /// Proof: EvmContractHelpers Sponsoring (max_values: None, max_size: Some(62), added: 2537, mode: MaxEncodedLen)409 /// Proof: `EvmContractHelpers::Sponsoring` (`max_values`: None, `max_size`: Some(62), added: 2537, mode: `MaxEncodedLen`)410 fn stop_sponsoring_contract() -> Weight {410 fn stop_sponsoring_contract() -> Weight {411 // Proof Size summary in bytes:411 // Proof Size summary in bytes:412 // Measured: `396`412 // Measured: `396`413 // Estimated: `3527`413 // Estimated: `3527`414 // Minimum execution time: 10_528_000 picoseconds.414 // Minimum execution time: 19_186_000 picoseconds.415 Weight::from_parts(10_842_000, 3527)415 Weight::from_parts(19_616_000, 3527)416 .saturating_add(RocksDbWeight::get().reads(2_u64))416 .saturating_add(RocksDbWeight::get().reads(2_u64))417 .saturating_add(RocksDbWeight::get().writes(1_u64))417 .saturating_add(RocksDbWeight::get().writes(1_u64))418 }418 }pallets/maintenance/src/benchmarking.rsdiffbeforeafterboth15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617use frame_benchmarking::v2::*;17use frame_benchmarking::v2::*;18use frame_support::{ensure, pallet_prelude::Weight, traits::StorePreimage};18use frame_support::ensure;19use frame_system::RawOrigin;19use frame_system::RawOrigin;20use parity_scale_codec::Encode;21use sp_std::vec;20use sp_std::vec;222123use super::*;22use super::*;49 Ok(())48 Ok(())50 }49 }5152 // TODO: fix53 // #[pov_mode = MaxEncodedLen {54 // // PoV size is deducted from weight_bound55 // Preimage::PreimageFor: Measured56 // }]57 #[benchmark]58 fn execute_preimage() -> Result<(), BenchmarkError> {59 let call = <T as Config>::RuntimeCall::from(frame_system::Call::<T>::remark {60 remark: 1u32.encode(),61 });62 let hash = T::Preimages::note(call.encode().into())?;6364 #[extrinsic_call]65 _(66 RawOrigin::Root,67 hash,68 Weight::from_parts(100000000000, 100000000000),69 );7071 Ok(())72 }73}50}7451pallets/maintenance/src/lib.rsdiffbeforeafterboth32 traits::{EnsureOrigin, QueryPreimage, StorePreimage},32 traits::{EnsureOrigin, QueryPreimage, StorePreimage},33 };33 };34 use frame_system::pallet_prelude::*;34 use frame_system::pallet_prelude::*;35 use sp_core::H256;36 use sp_runtime::traits::Dispatchable;35 use sp_runtime::traits::Dispatchable;373638 use crate::weights::WeightInfo;37 use crate::weights::WeightInfo;104 Ok(())103 Ok(())105 }104 }106107 /// Execute a runtime call stored as a preimage.108 ///109 /// `weight_bound` is the maximum weight that the caller is willing110 /// to allow the extrinsic to be executed with.111 #[pallet::call_index(2)]112 #[pallet::weight(<T as Config>::WeightInfo::execute_preimage() + *weight_bound)]113 pub fn execute_preimage(114 origin: OriginFor<T>,115 hash: H256,116 weight_bound: Weight,117 ) -> DispatchResultWithPostInfo {118 use parity_scale_codec::Decode;119120 T::PreimageOrigin::ensure_origin(origin.clone())?;121122 let data = T::Preimages::fetch(&hash, None)?;123 weight_bound.set_proof_size(124 weight_bound125 .proof_size()126 .checked_sub(127 data.len()128 .try_into()129 .map_err(|_| DispatchError::Corruption)?,130 )131 .ok_or(DispatchError::Exhausted)?,132 );133134 let call = <T as Config>::RuntimeCall::decode(&mut &data[..])135 .map_err(|_| DispatchError::Corruption)?;136137 ensure!(138 call.get_dispatch_info().weight.all_lte(weight_bound),139 DispatchError::Exhausted140 );141142 match call.dispatch(origin) {143 Ok(_) => Ok(Pays::No.into()),144 Err(error_and_info) => Err(DispatchErrorWithPostInfo {145 post_info: Pays::No.into(),146 error: error_and_info.error,147 }),148 }149 }150 }105 }151}106}152107pallets/maintenance/src/weights.rsdiffbeforeafterboth35pub trait WeightInfo {35pub trait WeightInfo {36 fn enable() -> Weight;36 fn enable() -> Weight;37 fn disable() -> Weight;37 fn disable() -> Weight;38 fn execute_preimage() -> Weight;39}38}403941/// Weights for pallet_maintenance using the Substrate node and recommended hardware.40/// Weights for pallet_maintenance using the Substrate node and recommended hardware.61 Weight::from_parts(3_111_000, 0)60 Weight::from_parts(3_111_000, 0)62 .saturating_add(T::DbWeight::get().writes(1_u64))61 .saturating_add(T::DbWeight::get().writes(1_u64))63 }62 }64 /// Storage: Preimage StatusFor (r:1 w:0)65 /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)66 /// Storage: Preimage PreimageFor (r:1 w:0)67 /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: Measured)68 fn execute_preimage() -> Weight {69 // Proof Size summary in bytes:70 // Measured: `209`71 // Estimated: `3674`72 // Minimum execution time: 7_359_000 picoseconds.73 Weight::from_parts(7_613_000, 3674)74 .saturating_add(T::DbWeight::get().reads(2_u64))75 }76}63}776478// For backwards compatibility and tests65// For backwards compatibility and tests97 Weight::from_parts(3_111_000, 0)84 Weight::from_parts(3_111_000, 0)98 .saturating_add(RocksDbWeight::get().writes(1_u64))85 .saturating_add(RocksDbWeight::get().writes(1_u64))99 }86 }100 /// Storage: Preimage StatusFor (r:1 w:0)101 /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen)102 /// Storage: Preimage PreimageFor (r:1 w:0)103 /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: Measured)104 fn execute_preimage() -> Weight {105 // Proof Size summary in bytes:106 // Measured: `209`107 // Estimated: `3674`108 // Minimum execution time: 7_359_000 picoseconds.109 Weight::from_parts(7_613_000, 3674)110 .saturating_add(RocksDbWeight::get().reads(2_u64))111 }112}87}1138811489tests/src/maintenance.seqtest.tsdiffbeforeafterboth283 });283 });284 });284 });285286 describe('Preimage Execution', () => {287 const preimageHashes: string[] = [];288289 before(async function() {290 await usingPlaygrounds(async (helper) => {291 requirePalletsOrSkip(this, helper, [Pallets.Preimage, Pallets.Maintenance]);292293 // create a preimage to be operated with in the tests294 const randomAccounts = await helper.arrange.createCrowd(10, 0n, superuser);295 const randomIdentities = randomAccounts.map((acc, i) => [296 acc.address, {297 deposit: 0n,298 judgements: [],299 info: {300 display: {301 raw: `Random Account #${i}`,302 },303 },304 },305 ]);306 const preimage = helper.constructApiCall('api.tx.identity.forceInsertIdentities', [randomIdentities]).method.toHex();307 preimageHashes.push(await helper.preimage.notePreimage(bob, preimage, true));308 });309 });310311 itSub('Successfully executes call in a preimage', async ({helper}) => {312 const result = await expect(helper.getSudo().executeExtrinsic(superuser, 'api.tx.maintenance.executePreimage', [313 preimageHashes[0], {refTime: 10000000000, proofSize: 10000},314 ])).to.be.fulfilled;315316 // preimage is executed, and an appropriate event is present317 const events = result.result.events.filter((x: any) => x.event.method === 'IdentitiesInserted' && x.event.section === 'identity');318 expect(events.length).to.be.equal(1);319320 // the preimage goes back to being unrequested321 expect(await helper.preimage.getPreimageInfo(preimageHashes[0])).to.have.property('unrequested');322 });323324 itSub('Does not allow execution of a preimage that would fail', async ({helper}) => {325 const [zeroAccount] = await helper.arrange.createAccounts([0n], superuser);326327 const preimage = helper.constructApiCall('api.tx.balances.forceTransfer', [328 {Id: zeroAccount.address}, {Id: superuser.address}, 1000n,329 ]).method.toHex();330 const preimageHash = await helper.preimage.notePreimage(bob, preimage, true);331 preimageHashes.push(preimageHash);332333 await expect(helper.getSudo().executeExtrinsic(superuser, 'api.tx.maintenance.executePreimage', [334 preimageHash, {refTime: 10000000000, proofSize: 10000},335 ])).to.be.rejectedWith(/^Token: FundsUnavailable$/);336 });337338 itSub('Does not allow preimage execution with non-root', async ({helper}) => {339 await expect(helper.executeExtrinsic(bob, 'api.tx.maintenance.executePreimage', [340 preimageHashes[0], {refTime: 10000000000, proofSize: 10000},341 ])).to.be.rejectedWith(/^Misc: BadOrigin$/);342 });343344 itSub('Does not allow execution of non-existent preimages', async ({helper}) => {345 await expect(helper.getSudo().executeExtrinsic(superuser, 'api.tx.maintenance.executePreimage', [346 '0x1010101010101010101010101010101010101010101010101010101010101010', {refTime: 10000000000, proofSize: 10000},347 ])).to.be.rejectedWith(/^Misc: Unavailable$/);348 });349350 itSub('Does not allow preimage execution with less than minimum weights', async ({helper}) => {351 await expect(helper.getSudo().executeExtrinsic(superuser, 'api.tx.maintenance.executePreimage', [352 preimageHashes[0], {refTime: 1000, proofSize: 100},353 ])).to.be.rejectedWith(/^Misc: Exhausted$/);354 });355356 after(async function() {357 await usingPlaygrounds(async (helper) => {358 if(helper.fetchMissingPalletNames([Pallets.Preimage, Pallets.Maintenance]).length != 0) return;359360 for(const hash of preimageHashes) {361 await helper.preimage.unnotePreimage(bob, hash);362 }363 });364 });365 });366285367 describe('Integration Test: Maintenance mode & App Promo', () => {286 describe('Integration Test: Maintenance mode & App Promo', () => {368 let superuser: IKeyringPair;287 let superuser: IKeyringPair;