diff --git a/benchmarking/frame-weight-template.hbs b/benchmarking/frame-weight-template.hbs index 2bb5157279..b2cb7ec5a4 100644 --- a/benchmarking/frame-weight-template.hbs +++ b/benchmarking/frame-weight-template.hbs @@ -28,12 +28,16 @@ #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{ + traits::Get, + weights::{constants::RocksDbWeight, Weight}, +}; use sp_std::marker::PhantomData; /// Weight functions needed for {{pallet}}. pub trait WeightInfo { {{#each benchmarks as |benchmark|}} + #[rustfmt::skip] fn {{benchmark.name~}} ( {{~#each benchmark.components as |c| ~}} @@ -49,6 +53,7 @@ impl WeightInfo for SubstrateWeight { {{#each benchmark.comments as |comment|}} // {{comment}} {{/each}} + #[rustfmt::skip] fn {{benchmark.name~}} ( {{~#each benchmark.components as |c| ~}} @@ -81,6 +86,7 @@ impl WeightInfo for () { {{#each benchmark.comments as |comment|}} // {{comment}} {{/each}} + #[rustfmt::skip] fn {{benchmark.name~}} ( {{~#each benchmark.components as |c| ~}} diff --git a/pallets/asset-manager/src/weights.rs b/pallets/asset-manager/src/weights.rs index 6bba69634d..d752224ccd 100644 --- a/pallets/asset-manager/src/weights.rs +++ b/pallets/asset-manager/src/weights.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_asset_manager //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-02-22, STEPS: `32`, REPEAT: 64, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-03-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: @@ -28,18 +28,19 @@ // --execution=wasm // --wasm-execution=compiled // --pallet -// pallet_asset_manager +// * // --extrinsic // * // --steps -// 32 +// 50 // --repeat -// 64 -// --raw +// 20 // --template=./benchmarking/frame-weight-template.hbs -// --output -// /tmp/ // --record-proof +// --json-file +// raw.json +// --output +// ./benchmarks/ #![allow(unused_parens)] #![allow(unused_imports)] @@ -52,76 +53,133 @@ use sp_std::marker::PhantomData; /// Weight functions needed for pallet_asset_manager. pub trait WeightInfo { + #[rustfmt::skip] fn register_asset() -> Weight; - fn set_asset_units_per_second(x: u32) -> Weight; - fn change_existing_asset_type(x: u32) -> Weight; - fn remove_supported_asset(x: u32) -> Weight; - fn remove_existing_asset_type(x: u32) -> Weight; + #[rustfmt::skip] + fn set_asset_units_per_second(x: u32, ) -> Weight; + #[rustfmt::skip] + fn change_existing_asset_type(x: u32, ) -> Weight; + #[rustfmt::skip] + fn remove_supported_asset(x: u32, ) -> Weight; + #[rustfmt::skip] + fn remove_existing_asset_type(x: u32, ) -> Weight; } /// Weights for pallet_asset_manager using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { + // Storage: AssetManager AssetIdType (r:1 w:1) + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:1) + // Storage: AssetManager AssetTypeId (r:0 w:1) + #[rustfmt::skip] fn register_asset() -> Weight { - (52_375_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) - } - fn set_asset_units_per_second(x: u32) -> Weight { - (31_655_000 as Weight) // Standard Error: 4_000 - .saturating_add((1_258_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) + (47_597_000 as Weight) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } - fn change_existing_asset_type(x: u32) -> Weight { - (39_476_000 as Weight) // Standard Error: 4_000 - .saturating_add((1_338_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + // Storage: AssetManager AssetTypeId (r:1 w:0) + // Storage: AssetManager SupportedFeePaymentAssets (r:1 w:1) + // Storage: AssetManager AssetTypeUnitsPerSecond (r:0 w:1) + #[rustfmt::skip] + fn set_asset_units_per_second(x: u32, ) -> Weight { + (32_865_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_210_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - fn remove_supported_asset(x: u32) -> Weight { - (24_269_000 as Weight) // Standard Error: 4_000 - .saturating_add((1_148_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - fn remove_existing_asset_type(x: u32) -> Weight { - (30_428_000 as Weight) // Standard Error: 3_000 - .saturating_add((1_166_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) + // Storage: AssetManager SupportedFeePaymentAssets (r:1 w:1) + // Storage: AssetManager AssetIdType (r:1 w:1) + // Storage: AssetManager AssetTypeUnitsPerSecond (r:1 w:2) + // Storage: AssetManager AssetTypeId (r:0 w:2) + #[rustfmt::skip] + fn change_existing_asset_type(x: u32, ) -> Weight { + (40_757_000 as Weight) + // Standard Error: 4_000 + .saturating_add((1_266_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } + // Storage: AssetManager SupportedFeePaymentAssets (r:1 w:1) + // Storage: AssetManager AssetTypeUnitsPerSecond (r:0 w:1) + #[rustfmt::skip] + fn remove_supported_asset(x: u32, ) -> Weight { + (25_700_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_043_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: AssetManager SupportedFeePaymentAssets (r:1 w:1) + // Storage: AssetManager AssetIdType (r:1 w:1) + // Storage: AssetManager AssetTypeUnitsPerSecond (r:0 w:1) + // Storage: AssetManager AssetTypeId (r:0 w:1) + #[rustfmt::skip] + fn remove_existing_asset_type(x: u32, ) -> Weight { + (32_359_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_073_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } } // For backwards compatibility and tests impl WeightInfo for () { + // Storage: AssetManager AssetIdType (r:1 w:1) + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Metadata (r:1 w:1) + // Storage: AssetManager AssetTypeId (r:0 w:1) + #[rustfmt::skip] fn register_asset() -> Weight { - (52_375_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) - } - fn set_asset_units_per_second(x: u32) -> Weight { - (31_655_000 as Weight) // Standard Error: 4_000 - .saturating_add((1_258_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) + (47_597_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } - fn change_existing_asset_type(x: u32) -> Weight { - (39_476_000 as Weight) // Standard Error: 4_000 - .saturating_add((1_338_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(8 as Weight)) - } - fn remove_supported_asset(x: u32) -> Weight { - (24_269_000 as Weight) // Standard Error: 4_000 - .saturating_add((1_148_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + // Storage: AssetManager AssetTypeId (r:1 w:0) + // Storage: AssetManager SupportedFeePaymentAssets (r:1 w:1) + // Storage: AssetManager AssetTypeUnitsPerSecond (r:0 w:1) + #[rustfmt::skip] + fn set_asset_units_per_second(x: u32, ) -> Weight { + (32_865_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_210_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } - fn remove_existing_asset_type(x: u32) -> Weight { - (30_428_000 as Weight) // Standard Error: 3_000 - .saturating_add((1_166_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) + // Storage: AssetManager SupportedFeePaymentAssets (r:1 w:1) + // Storage: AssetManager AssetIdType (r:1 w:1) + // Storage: AssetManager AssetTypeUnitsPerSecond (r:1 w:2) + // Storage: AssetManager AssetTypeId (r:0 w:2) + #[rustfmt::skip] + fn change_existing_asset_type(x: u32, ) -> Weight { + (40_757_000 as Weight) + // Standard Error: 4_000 + .saturating_add((1_266_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().writes(6 as Weight)) } + // Storage: AssetManager SupportedFeePaymentAssets (r:1 w:1) + // Storage: AssetManager AssetTypeUnitsPerSecond (r:0 w:1) + #[rustfmt::skip] + fn remove_supported_asset(x: u32, ) -> Weight { + (25_700_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_043_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + } + // Storage: AssetManager SupportedFeePaymentAssets (r:1 w:1) + // Storage: AssetManager AssetIdType (r:1 w:1) + // Storage: AssetManager AssetTypeUnitsPerSecond (r:0 w:1) + // Storage: AssetManager AssetTypeId (r:0 w:1) + #[rustfmt::skip] + fn remove_existing_asset_type(x: u32, ) -> Weight { + (32_359_000 as Weight) + // Standard Error: 3_000 + .saturating_add((1_073_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + } } diff --git a/pallets/author-mapping/src/weights.rs b/pallets/author-mapping/src/weights.rs index e5bdb904d8..c3a3da7d7c 100644 --- a/pallets/author-mapping/src/weights.rs +++ b/pallets/author-mapping/src/weights.rs @@ -16,9 +16,9 @@ //! Autogenerated weights for pallet_author_mapping //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-14, STEPS: `[32, ]`, REPEAT: 64, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-03-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/moonbeam @@ -28,69 +28,93 @@ // --execution=wasm // --wasm-execution=compiled // --pallet -// pallet_author_mapping +// * // --extrinsic // * // --steps -// 32 +// 50 // --repeat -// 64 -// --raw +// 20 // --template=./benchmarking/frame-weight-template.hbs +// --record-proof +// --json-file +// raw.json // --output -// /tmp/ +// ./benchmarks/ #![allow(unused_parens)] #![allow(unused_imports)] +#[rustfmt::skip] use frame_support::{ traits::Get, weights::{constants::RocksDbWeight, Weight}, }; +#[rustfmt::skip] use sp_std::marker::PhantomData; /// Weight functions needed for pallet_author_mapping. pub trait WeightInfo { + #[rustfmt::skip] fn add_association() -> Weight; + #[rustfmt::skip] fn update_association() -> Weight; + #[rustfmt::skip] fn clear_association() -> Weight; } /// Weights for pallet_author_mapping using the Substrate node and recommended hardware. +#[rustfmt::skip] pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { + // Storage: AuthorMapping MappingWithDeposit (r:1 w:1) + // Storage: System Account (r:1 w:1) + #[rustfmt::skip] fn add_association() -> Weight { - (44_032_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + (34_696_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) } + // Storage: AuthorMapping MappingWithDeposit (r:2 w:2) + #[rustfmt::skip] fn update_association() -> Weight { - (27_468_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + (26_877_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) } + // Storage: AuthorMapping MappingWithDeposit (r:1 w:1) + // Storage: System Account (r:1 w:1) + #[rustfmt::skip] fn clear_association() -> Weight { - (44_603_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + (36_253_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } // For backwards compatibility and tests impl WeightInfo for () { + // Storage: AuthorMapping MappingWithDeposit (r:1 w:1) + // Storage: System Account (r:1 w:1) + #[rustfmt::skip] fn add_association() -> Weight { - (44_032_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + (34_696_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } + // Storage: AuthorMapping MappingWithDeposit (r:2 w:2) + #[rustfmt::skip] fn update_association() -> Weight { - (27_468_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + (26_877_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } + // Storage: AuthorMapping MappingWithDeposit (r:1 w:1) + // Storage: System Account (r:1 w:1) + #[rustfmt::skip] fn clear_association() -> Weight { - (44_603_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + (36_253_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } } diff --git a/pallets/parachain-staking/src/weights.rs b/pallets/parachain-staking/src/weights.rs index ebffea2570..9ef41e1d8e 100644 --- a/pallets/parachain-staking/src/weights.rs +++ b/pallets/parachain-staking/src/weights.rs @@ -16,9 +16,9 @@ //! Autogenerated weights for parachain_staking //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-19, STEPS: `[32, ]`, REPEAT: 64, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128 +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-03-14, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/moonbeam @@ -28,17 +28,19 @@ // --execution=wasm // --wasm-execution=compiled // --pallet -// parachain_staking +// * // --extrinsic // * // --steps -// 32 +// 50 // --repeat -// 64 -// --raw +// 20 // --template=./benchmarking/frame-weight-template.hbs +// --record-proof +// --json-file +// raw.json // --output -// /tmp/ +// ./benchmarks/ #![allow(unused_parens)] #![allow(unused_imports)] @@ -51,414 +53,763 @@ use sp_std::marker::PhantomData; /// Weight functions needed for parachain_staking. pub trait WeightInfo { - fn hotfix_remove_delegation_requests(x: u32) -> Weight; - fn hotfix_update_candidate_pool_value(x: u32) -> Weight; + #[rustfmt::skip] + fn hotfix_remove_delegation_requests(x: u32, ) -> Weight; + #[rustfmt::skip] + fn hotfix_update_candidate_pool_value(x: u32, ) -> Weight; + #[rustfmt::skip] fn set_staking_expectations() -> Weight; + #[rustfmt::skip] fn set_inflation() -> Weight; + #[rustfmt::skip] fn set_parachain_bond_account() -> Weight; + #[rustfmt::skip] fn set_parachain_bond_reserve_percent() -> Weight; + #[rustfmt::skip] fn set_total_selected() -> Weight; + #[rustfmt::skip] fn set_collator_commission() -> Weight; + #[rustfmt::skip] fn set_blocks_per_round() -> Weight; - fn join_candidates(x: u32) -> Weight; - fn schedule_leave_candidates(x: u32) -> Weight; - fn execute_leave_candidates(x: u32) -> Weight; - fn cancel_leave_candidates(x: u32) -> Weight; + #[rustfmt::skip] + fn join_candidates(x: u32, ) -> Weight; + #[rustfmt::skip] + fn schedule_leave_candidates(x: u32, ) -> Weight; + #[rustfmt::skip] + fn execute_leave_candidates(x: u32, ) -> Weight; + #[rustfmt::skip] + fn cancel_leave_candidates(x: u32, ) -> Weight; + #[rustfmt::skip] fn go_offline() -> Weight; + #[rustfmt::skip] fn go_online() -> Weight; + #[rustfmt::skip] fn candidate_bond_more() -> Weight; + #[rustfmt::skip] fn schedule_candidate_bond_less() -> Weight; + #[rustfmt::skip] fn execute_candidate_bond_less() -> Weight; + #[rustfmt::skip] fn cancel_candidate_bond_less() -> Weight; - fn delegate(x: u32, y: u32) -> Weight; + #[rustfmt::skip] + fn delegate(x: u32, y: u32, ) -> Weight; + #[rustfmt::skip] fn schedule_leave_delegators() -> Weight; - fn execute_leave_delegators(x: u32) -> Weight; + #[rustfmt::skip] + fn execute_leave_delegators(x: u32, ) -> Weight; + #[rustfmt::skip] fn cancel_leave_delegators() -> Weight; + #[rustfmt::skip] fn schedule_revoke_delegation() -> Weight; + #[rustfmt::skip] fn delegator_bond_more() -> Weight; + #[rustfmt::skip] fn schedule_delegator_bond_less() -> Weight; + #[rustfmt::skip] fn execute_revoke_delegation() -> Weight; + #[rustfmt::skip] fn execute_delegator_bond_less() -> Weight; + #[rustfmt::skip] fn cancel_revoke_delegation() -> Weight; + #[rustfmt::skip] fn cancel_delegator_bond_less() -> Weight; - fn round_transition_on_initialize(x: u32, y: u32) -> Weight; + #[rustfmt::skip] + fn round_transition_on_initialize(x: u32, y: u32, ) -> Weight; + #[rustfmt::skip] + fn pay_one_collator_reward(y: u32, ) -> Weight; + #[rustfmt::skip] fn base_on_initialize() -> Weight; - fn pay_one_collator_reward(y: u32) -> Weight; } /// Weights for parachain_staking using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - fn hotfix_remove_delegation_requests(x: u32) -> Weight { - (0 as Weight) // Standard Error: 3_000 - .saturating_add((8_132_000 as Weight).saturating_mul(x as Weight)) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + #[rustfmt::skip] + fn hotfix_remove_delegation_requests(x: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 5_000 + .saturating_add((7_270_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(x as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(x as Weight))) } - fn hotfix_update_candidate_pool_value(x: u32) -> Weight { - (0 as Weight) // Standard Error: 147_000 - .saturating_add((26_825_000 as Weight).saturating_mul(x as Weight)) + // Storage: ParachainStaking CandidateInfo (r:4 w:0) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + #[rustfmt::skip] + fn hotfix_update_candidate_pool_value(x: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 174_000 + .saturating_add((24_976_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(x as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking InflationConfig (r:1 w:1) + #[rustfmt::skip] fn set_staking_expectations() -> Weight { - (20_719_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + (19_066_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking InflationConfig (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + #[rustfmt::skip] fn set_inflation() -> Weight { - (63_011_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + (55_185_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) + #[rustfmt::skip] fn set_parachain_bond_account() -> Weight { - (20_434_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + (18_702_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) + #[rustfmt::skip] fn set_parachain_bond_reserve_percent() -> Weight { - (19_239_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + (18_068_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking TotalSelected (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + #[rustfmt::skip] fn set_total_selected() -> Weight { - (18_402_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + (20_989_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking CollatorCommission (r:1 w:1) + #[rustfmt::skip] fn set_collator_commission() -> Weight { - (18_178_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + (17_218_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking Round (r:1 w:1) + // Storage: ParachainStaking TotalSelected (r:1 w:0) + // Storage: ParachainStaking InflationConfig (r:1 w:1) + #[rustfmt::skip] fn set_blocks_per_round() -> Weight { - (65_939_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - fn join_candidates(x: u32) -> Weight { - (80_619_000 as Weight) // Standard Error: 1_000 - .saturating_add((107_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) - } - fn schedule_leave_candidates(x: u32) -> Weight { - (50_933_000 as Weight) // Standard Error: 1_000 - .saturating_add((108_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + (60_675_000 as Weight) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking DelegatorState (r:1 w:0) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:0 w:1) + // Storage: ParachainStaking BottomDelegations (r:0 w:1) + #[rustfmt::skip] + fn join_candidates(x: u32, ) -> Weight { + (65_336_000 as Weight) + // Standard Error: 1_000 + .saturating_add((117_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) + .saturating_add(T::DbWeight::get().writes(6 as Weight)) } - fn execute_leave_candidates(x: u32) -> Weight { - (8_634_000 as Weight) // Standard Error: 6_000 - .saturating_add((26_979_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + #[rustfmt::skip] + fn schedule_leave_candidates(x: u32, ) -> Weight { + (53_788_000 as Weight) + // Standard Error: 1_000 + .saturating_add((102_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: System Account (r:2 w:2) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking BottomDelegations (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + #[rustfmt::skip] + fn execute_leave_candidates(x: u32, ) -> Weight { + (11_502_000 as Weight) + // Standard Error: 10_000 + .saturating_add((21_626_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(x as Weight))) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(x as Weight))) } - fn cancel_leave_candidates(x: u32) -> Weight { - (43_482_000 as Weight) // Standard Error: 0 - .saturating_add((111_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + #[rustfmt::skip] + fn cancel_leave_candidates(x: u32, ) -> Weight { + (60_402_000 as Weight) + // Standard Error: 2_000 + .saturating_add((90_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + #[rustfmt::skip] fn go_offline() -> Weight { - (30_778_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + (28_307_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + #[rustfmt::skip] fn go_online() -> Weight { - (31_178_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } + (28_102_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + #[rustfmt::skip] fn candidate_bond_more() -> Weight { - (53_492_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + (46_424_000 as Weight) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + #[rustfmt::skip] fn schedule_candidate_bond_less() -> Weight { - (29_393_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + (26_422_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + #[rustfmt::skip] fn execute_candidate_bond_less() -> Weight { - (62_395_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + (55_036_000 as Weight) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + #[rustfmt::skip] fn cancel_candidate_bond_less() -> Weight { - (25_564_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + (23_130_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - fn delegate(x: u32, y: u32) -> Weight { - (103_760_000 as Weight) // Standard Error: 12_000 - .saturating_add((198_000 as Weight).saturating_mul(x as Weight)) // Standard Error: 3000 - .saturating_add((112_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(T::DbWeight::get().reads(10 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + #[rustfmt::skip] + fn delegate(x: u32, y: u32, ) -> Weight { + (90_567_000 as Weight) + // Standard Error: 3_000 + .saturating_add((310_000 as Weight).saturating_mul(x as Weight)) + // Standard Error: 1_000 + .saturating_add((204_000 as Weight).saturating_mul(y as Weight)) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(6 as Weight)) } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + #[rustfmt::skip] fn schedule_leave_delegators() -> Weight { - (30_908_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + (27_353_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - fn execute_leave_delegators(x: u32) -> Weight { - (1_091_000 as Weight) // Standard Error: 14_000 - .saturating_add((37_192_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + #[rustfmt::skip] + fn execute_leave_delegators(x: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 76_000 + .saturating_add((39_542_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(x as Weight))) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(x as Weight))) } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + #[rustfmt::skip] fn cancel_leave_delegators() -> Weight { - (26_796_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + (24_218_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + #[rustfmt::skip] fn schedule_revoke_delegation() -> Weight { - (37_580_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + (28_053_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + #[rustfmt::skip] fn delegator_bond_more() -> Weight { - (65_757_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + (64_504_000 as Weight) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(6 as Weight)) } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + #[rustfmt::skip] fn schedule_delegator_bond_less() -> Weight { - (70_859_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + (29_017_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + #[rustfmt::skip] fn execute_revoke_delegation() -> Weight { - (87_836_000 as Weight) - .saturating_add(T::DbWeight::get().reads(10 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + (78_531_000 as Weight) + .saturating_add(T::DbWeight::get().reads(7 as Weight)) + .saturating_add(T::DbWeight::get().writes(6 as Weight)) } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + #[rustfmt::skip] fn execute_delegator_bond_less() -> Weight { - (80_983_000 as Weight) - .saturating_add(T::DbWeight::get().reads(11 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + (71_044_000 as Weight) + .saturating_add(T::DbWeight::get().reads(7 as Weight)) + .saturating_add(T::DbWeight::get().writes(6 as Weight)) } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + #[rustfmt::skip] fn cancel_revoke_delegation() -> Weight { - (37_923_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + (25_288_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + #[rustfmt::skip] fn cancel_delegator_bond_less() -> Weight { - (70_813_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) - } - fn round_transition_on_initialize(x: u32, y: u32) -> Weight { - (0 as Weight) // Standard Error: 1_560_000 - .saturating_add((62_210_000 as Weight).saturating_mul(x as Weight)) - // Standard Error: 4_000 + (30_562_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + // Storage: ParachainStaking Round (r:1 w:1) + // Storage: ParachainStaking Points (r:1 w:0) + // Storage: ParachainStaking Staked (r:1 w:2) + // Storage: ParachainStaking InflationConfig (r:1 w:0) + // Storage: ParachainStaking ParachainBondInfo (r:1 w:0) + // Storage: System Account (r:302 w:301) + // Storage: ParachainStaking CollatorCommission (r:1 w:0) + // Storage: ParachainStaking CandidatePool (r:1 w:0) + // Storage: ParachainStaking TotalSelected (r:1 w:0) + // Storage: ParachainStaking CandidateInfo (r:9 w:0) + // Storage: ParachainStaking TopDelegations (r:9 w:0) + // Storage: ParachainStaking Total (r:1 w:0) + // Storage: ParachainStaking AwardedPts (r:2 w:1) + // Storage: ParachainStaking AtStake (r:1 w:10) + // Storage: ParachainStaking SelectedCandidates (r:0 w:1) + // Storage: ParachainStaking DelayedPayouts (r:0 w:1) + #[rustfmt::skip] + fn round_transition_on_initialize(x: u32, y: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 827_000 + .saturating_add((65_228_000 as Weight).saturating_mul(x as Weight)) + // Standard Error: 2_000 .saturating_add((208_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(T::DbWeight::get().reads(168 as Weight)) + .saturating_add(T::DbWeight::get().reads(194 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(x as Weight))) - .saturating_add(T::DbWeight::get().writes(159 as Weight)) + .saturating_add(T::DbWeight::get().writes(188 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(x as Weight))) } - fn base_on_initialize() -> Weight { - (4_913_000 as Weight).saturating_add(T::DbWeight::get().reads(1 as Weight)) - } - fn pay_one_collator_reward(y: u32) -> Weight { - (44_854_000 as Weight) // Standard Error: 4_000 - .saturating_add((16_772_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(T::DbWeight::get().reads(11 as Weight)) + // Storage: ParachainStaking DelayedPayouts (r:1 w:0) + // Storage: ParachainStaking Points (r:1 w:0) + // Storage: ParachainStaking AwardedPts (r:2 w:1) + // Storage: ParachainStaking AtStake (r:1 w:1) + // Storage: System Account (r:1 w:1) + #[rustfmt::skip] + fn pay_one_collator_reward(y: u32, ) -> Weight { + (43_761_000 as Weight) + // Standard Error: 10_000 + .saturating_add((17_111_000 as Weight).saturating_mul(y as Weight)) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(y as Weight))) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(y as Weight))) } + // Storage: ParachainStaking Round (r:1 w:0) + #[rustfmt::skip] + fn base_on_initialize() -> Weight { + (4_892_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + } } // For backwards compatibility and tests impl WeightInfo for () { - fn hotfix_remove_delegation_requests(x: u32) -> Weight { - (0 as Weight) // Standard Error: 3_000 - .saturating_add((8_132_000 as Weight).saturating_mul(x as Weight)) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + #[rustfmt::skip] + fn hotfix_remove_delegation_requests(x: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 5_000 + .saturating_add((7_270_000 as Weight).saturating_mul(x as Weight)) .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(x as Weight))) .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(x as Weight))) } - fn hotfix_update_candidate_pool_value(x: u32) -> Weight { - (0 as Weight) // Standard Error: 147_000 - .saturating_add((26_825_000 as Weight).saturating_mul(x as Weight)) + // Storage: ParachainStaking CandidateInfo (r:4 w:0) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + #[rustfmt::skip] + fn hotfix_update_candidate_pool_value(x: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 174_000 + .saturating_add((24_976_000 as Weight).saturating_mul(x as Weight)) .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(x as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking InflationConfig (r:1 w:1) + #[rustfmt::skip] fn set_staking_expectations() -> Weight { - (20_719_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + (19_066_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking InflationConfig (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + #[rustfmt::skip] fn set_inflation() -> Weight { - (63_011_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + (55_185_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) + #[rustfmt::skip] fn set_parachain_bond_account() -> Weight { - (20_434_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + (18_702_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking ParachainBondInfo (r:1 w:1) + #[rustfmt::skip] fn set_parachain_bond_reserve_percent() -> Weight { - (19_239_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + (18_068_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking TotalSelected (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + #[rustfmt::skip] fn set_total_selected() -> Weight { - (18_402_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + (20_989_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking CollatorCommission (r:1 w:1) + #[rustfmt::skip] fn set_collator_commission() -> Weight { - (18_178_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + (17_218_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking Round (r:1 w:1) + // Storage: ParachainStaking TotalSelected (r:1 w:0) + // Storage: ParachainStaking InflationConfig (r:1 w:1) + #[rustfmt::skip] fn set_blocks_per_round() -> Weight { - (65_939_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - fn join_candidates(x: u32) -> Weight { - (80_619_000 as Weight) // Standard Error: 1_000 - .saturating_add((107_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(9 as Weight)) - .saturating_add(RocksDbWeight::get().writes(8 as Weight)) - } - fn schedule_leave_candidates(x: u32) -> Weight { - (50_933_000 as Weight) // Standard Error: 1_000 - .saturating_add((108_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + (60_675_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(3 as Weight)) + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking DelegatorState (r:1 w:0) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:0 w:1) + // Storage: ParachainStaking BottomDelegations (r:0 w:1) + #[rustfmt::skip] + fn join_candidates(x: u32, ) -> Weight { + (65_336_000 as Weight) + // Standard Error: 1_000 + .saturating_add((117_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(RocksDbWeight::get().reads(5 as Weight)) + .saturating_add(RocksDbWeight::get().writes(6 as Weight)) } - fn execute_leave_candidates(x: u32) -> Weight { - (8_634_000 as Weight) // Standard Error: 6_000 - .saturating_add((26_979_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + #[rustfmt::skip] + fn schedule_leave_candidates(x: u32, ) -> Weight { + (53_788_000 as Weight) + // Standard Error: 1_000 + .saturating_add((102_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(RocksDbWeight::get().reads(3 as Weight)) + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: System Account (r:2 w:2) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking BottomDelegations (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + #[rustfmt::skip] + fn execute_leave_candidates(x: u32, ) -> Weight { + (11_502_000 as Weight) + // Standard Error: 10_000 + .saturating_add((21_626_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(x as Weight))) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + .saturating_add(RocksDbWeight::get().writes(3 as Weight)) .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(x as Weight))) } - fn cancel_leave_candidates(x: u32) -> Weight { - (43_482_000 as Weight) // Standard Error: 0 - .saturating_add((111_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + #[rustfmt::skip] + fn cancel_leave_candidates(x: u32, ) -> Weight { + (60_402_000 as Weight) + // Standard Error: 2_000 + .saturating_add((90_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + #[rustfmt::skip] fn go_offline() -> Weight { - (30_778_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + (28_307_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + #[rustfmt::skip] fn go_online() -> Weight { - (31_178_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } + (28_102_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + #[rustfmt::skip] fn candidate_bond_more() -> Weight { - (53_492_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) + (46_424_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(4 as Weight)) + .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + #[rustfmt::skip] fn schedule_candidate_bond_less() -> Weight { - (29_393_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + (26_422_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + #[rustfmt::skip] fn execute_candidate_bond_less() -> Weight { - (62_395_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(9 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) + (55_036_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(5 as Weight)) + .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + #[rustfmt::skip] fn cancel_candidate_bond_less() -> Weight { - (25_564_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + (23_130_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } - fn delegate(x: u32, y: u32) -> Weight { - (103_760_000 as Weight) // Standard Error: 12_000 - .saturating_add((198_000 as Weight).saturating_mul(x as Weight)) // Standard Error: 3000 - .saturating_add((112_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(RocksDbWeight::get().reads(10 as Weight)) - .saturating_add(RocksDbWeight::get().writes(8 as Weight)) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + #[rustfmt::skip] + fn delegate(x: u32, y: u32, ) -> Weight { + (90_567_000 as Weight) + // Standard Error: 3_000 + .saturating_add((310_000 as Weight).saturating_mul(x as Weight)) + // Standard Error: 1_000 + .saturating_add((204_000 as Weight).saturating_mul(y as Weight)) + .saturating_add(RocksDbWeight::get().reads(6 as Weight)) + .saturating_add(RocksDbWeight::get().writes(6 as Weight)) } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + #[rustfmt::skip] fn schedule_leave_delegators() -> Weight { - (30_908_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + (27_353_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } - fn execute_leave_delegators(x: u32) -> Weight { - (1_091_000 as Weight) // Standard Error: 14_000 - .saturating_add((37_192_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + #[rustfmt::skip] + fn execute_leave_delegators(x: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 76_000 + .saturating_add((39_542_000 as Weight).saturating_mul(x as Weight)) + .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(x as Weight))) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(x as Weight))) } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + #[rustfmt::skip] fn cancel_leave_delegators() -> Weight { - (26_796_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + (24_218_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + #[rustfmt::skip] fn schedule_revoke_delegation() -> Weight { - (37_580_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + (28_053_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + #[rustfmt::skip] fn delegator_bond_more() -> Weight { - (65_757_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(9 as Weight)) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) + (64_504_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(6 as Weight)) + .saturating_add(RocksDbWeight::get().writes(6 as Weight)) } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + #[rustfmt::skip] fn schedule_delegator_bond_less() -> Weight { - (70_859_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(9 as Weight)) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) + (29_017_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + #[rustfmt::skip] fn execute_revoke_delegation() -> Weight { - (87_836_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(10 as Weight)) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) + (78_531_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(7 as Weight)) + .saturating_add(RocksDbWeight::get().writes(6 as Weight)) } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + // Storage: ParachainStaking Round (r:1 w:0) + // Storage: ParachainStaking CandidateInfo (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: ParachainStaking TopDelegations (r:1 w:1) + // Storage: ParachainStaking CandidatePool (r:1 w:1) + // Storage: ParachainStaking Total (r:1 w:1) + #[rustfmt::skip] fn execute_delegator_bond_less() -> Weight { - (80_983_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(11 as Weight)) - .saturating_add(RocksDbWeight::get().writes(8 as Weight)) + (71_044_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(7 as Weight)) + .saturating_add(RocksDbWeight::get().writes(6 as Weight)) } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + #[rustfmt::skip] fn cancel_revoke_delegation() -> Weight { - (37_923_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + (25_288_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } + // Storage: ParachainStaking DelegatorState (r:1 w:1) + #[rustfmt::skip] fn cancel_delegator_bond_less() -> Weight { - (70_813_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + (30_562_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } - fn round_transition_on_initialize(x: u32, y: u32) -> Weight { - (0 as Weight) // Standard Error: 1_560_000 - .saturating_add((62_210_000 as Weight).saturating_mul(x as Weight)) - // Standard Error: 4_000 + // Storage: ParachainStaking Round (r:1 w:1) + // Storage: ParachainStaking Points (r:1 w:0) + // Storage: ParachainStaking Staked (r:1 w:2) + // Storage: ParachainStaking InflationConfig (r:1 w:0) + // Storage: ParachainStaking ParachainBondInfo (r:1 w:0) + // Storage: System Account (r:302 w:301) + // Storage: ParachainStaking CollatorCommission (r:1 w:0) + // Storage: ParachainStaking CandidatePool (r:1 w:0) + // Storage: ParachainStaking TotalSelected (r:1 w:0) + // Storage: ParachainStaking CandidateInfo (r:9 w:0) + // Storage: ParachainStaking TopDelegations (r:9 w:0) + // Storage: ParachainStaking Total (r:1 w:0) + // Storage: ParachainStaking AwardedPts (r:2 w:1) + // Storage: ParachainStaking AtStake (r:1 w:10) + // Storage: ParachainStaking SelectedCandidates (r:0 w:1) + // Storage: ParachainStaking DelayedPayouts (r:0 w:1) + #[rustfmt::skip] + fn round_transition_on_initialize(x: u32, y: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 827_000 + .saturating_add((65_228_000 as Weight).saturating_mul(x as Weight)) + // Standard Error: 2_000 .saturating_add((208_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(RocksDbWeight::get().reads(168 as Weight)) + .saturating_add(RocksDbWeight::get().reads(194 as Weight)) .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(x as Weight))) - .saturating_add(RocksDbWeight::get().writes(159 as Weight)) + .saturating_add(RocksDbWeight::get().writes(188 as Weight)) .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(x as Weight))) } - fn base_on_initialize() -> Weight { - (4_913_000 as Weight).saturating_add(RocksDbWeight::get().reads(1 as Weight)) - } - fn pay_one_collator_reward(y: u32) -> Weight { - (44_854_000 as Weight) // Standard Error: 4_000 - .saturating_add((16_772_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(RocksDbWeight::get().reads(11 as Weight)) + // Storage: ParachainStaking DelayedPayouts (r:1 w:0) + // Storage: ParachainStaking Points (r:1 w:0) + // Storage: ParachainStaking AwardedPts (r:2 w:1) + // Storage: ParachainStaking AtStake (r:1 w:1) + // Storage: System Account (r:1 w:1) + #[rustfmt::skip] + fn pay_one_collator_reward(y: u32, ) -> Weight { + (43_761_000 as Weight) + // Standard Error: 10_000 + .saturating_add((17_111_000 as Weight).saturating_mul(y as Weight)) + .saturating_add(RocksDbWeight::get().reads(6 as Weight)) .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(y as Weight))) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) + .saturating_add(RocksDbWeight::get().writes(3 as Weight)) .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(y as Weight))) } + // Storage: ParachainStaking Round (r:1 w:0) + #[rustfmt::skip] + fn base_on_initialize() -> Weight { + (4_892_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + } } diff --git a/pallets/xcm-transactor/src/weights.rs b/pallets/xcm-transactor/src/weights.rs index a31bc3bc20..7681c98875 100644 --- a/pallets/xcm-transactor/src/weights.rs +++ b/pallets/xcm-transactor/src/weights.rs @@ -1,5 +1,6 @@ // Copyright 2019-2022 PureStake Inc. // This file is part of Moonbeam. + // Moonbeam is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or @@ -16,8 +17,8 @@ //! Autogenerated weights for xcm_transactor //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-01-27, STEPS: `32`, REPEAT: 64, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128 +//! DATE: 2022-03-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/moonbeam @@ -27,18 +28,19 @@ // --execution=wasm // --wasm-execution=compiled // --pallet -// xcm_transactor +// * // --extrinsic // * // --steps -// 32 +// 50 // --repeat -// 64 -// --raw +// 20 // --template=./benchmarking/frame-weight-template.hbs -// --output -// /tmp/ // --record-proof +// --json-file +// raw.json +// --output +// ./benchmarks/ #![allow(unused_parens)] #![allow(unused_imports)] @@ -51,57 +53,71 @@ use sp_std::marker::PhantomData; /// Weight functions needed for xcm_transactor. pub trait WeightInfo { + #[rustfmt::skip] fn register() -> Weight; + #[rustfmt::skip] fn deregister() -> Weight; + #[rustfmt::skip] fn set_transact_info() -> Weight; + #[rustfmt::skip] fn remove_transact_info() -> Weight; } /// Weights for xcm_transactor using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { + // Storage: XcmTransactor IndexToAccount (r:1 w:1) + #[rustfmt::skip] fn register() -> Weight { - (19_613_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + (19_401_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: XcmTransactor IndexToAccount (r:0 w:1) + #[rustfmt::skip] fn deregister() -> Weight { - (16_047_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + (16_181_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: XcmTransactor TransactInfoWithWeightLimit (r:0 w:1) + #[rustfmt::skip] fn set_transact_info() -> Weight { - (19_752_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + (19_595_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } + // Storage: XcmTransactor TransactInfoWithWeightLimit (r:0 w:1) + #[rustfmt::skip] fn remove_transact_info() -> Weight { - (18_768_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + (18_691_000 as Weight) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) } } // For backwards compatibility and tests impl WeightInfo for () { + // Storage: XcmTransactor IndexToAccount (r:1 w:1) + #[rustfmt::skip] fn register() -> Weight { - (19_613_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + (19_401_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } + // Storage: XcmTransactor IndexToAccount (r:0 w:1) + #[rustfmt::skip] fn deregister() -> Weight { - (16_047_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + (16_181_000 as Weight) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } + // Storage: XcmTransactor TransactInfoWithWeightLimit (r:0 w:1) + #[rustfmt::skip] fn set_transact_info() -> Weight { - (19_752_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + (19_595_000 as Weight) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } + // Storage: XcmTransactor TransactInfoWithWeightLimit (r:0 w:1) + #[rustfmt::skip] fn remove_transact_info() -> Weight { - (18_768_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + (18_691_000 as Weight) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } } diff --git a/runtime/moonbase/tests/integration_test.rs b/runtime/moonbase/tests/integration_test.rs index 37af840ff5..4578605d0e 100644 --- a/runtime/moonbase/tests/integration_test.rs +++ b/runtime/moonbase/tests/integration_test.rs @@ -1747,7 +1747,7 @@ fn author_mapping_precompile_associate_update_and_clear() { let associate_expected_result = Some(Ok(PrecompileOutput { exit_status: ExitSucceed::Returned, output: Default::default(), - cost: 23761u64, + cost: 11387u64, logs: Default::default(), })); @@ -1779,7 +1779,7 @@ fn author_mapping_precompile_associate_update_and_clear() { let update_expected_result = Some(Ok(PrecompileOutput { exit_status: ExitSucceed::Returned, output: Default::default(), - cost: 22098u64, + cost: 11075u64, logs: Default::default(), })); @@ -1812,7 +1812,7 @@ fn author_mapping_precompile_associate_update_and_clear() { let clear_expected_result = Some(Ok(PrecompileOutput { exit_status: ExitSucceed::Returned, output: Default::default(), - cost: 23784u64, + cost: 11450u64, logs: Default::default(), })); diff --git a/tests/tests/test-author-mapping.ts b/tests/tests/test-author-mapping.ts index f6a224892b..398ff143a5 100644 --- a/tests/tests/test-author-mapping.ts +++ b/tests/tests/test-author-mapping.ts @@ -67,7 +67,7 @@ describeDevMoonbeam("Author Mapping - simple association", (context) => { expect((await getMappingInfo(context, bobAuthorId)).account).to.eq(ALITH); expect( ((await context.polkadotApi.query.system.account(ALITH)) as any).data.free.toBigInt() - ).to.eq(1207725818354628455674176n); + ).to.eq(1207725818354628765010176n); expect( ((await context.polkadotApi.query.system.account(ALITH)) as any).data.reserved.toBigInt() ).to.eq(2n * DEFAULT_GENESIS_MAPPING + DEFAULT_GENESIS_STAKING); @@ -94,7 +94,7 @@ describeDevMoonbeam("Author Mapping - Fail to reassociate alice", (context) => { //check state expect( ((await context.polkadotApi.query.system.account(BALTATHAR)) as any).data.free.toBigInt() - ).to.eq(1208925818354628455674176n); + ).to.eq(1208925818354628765010176n); expect( ((await context.polkadotApi.query.system.account(BALTATHAR)) as any).data.reserved.toBigInt() ).to.eq(0n); @@ -204,7 +204,7 @@ describeDevMoonbeam("Author Mapping - double registration", (context) => { expect((await getMappingInfo(context, bobAuthorId)).account).to.eq(ALITH); expect( ((await context.polkadotApi.query.system.account(ALITH)) as any).data.free.toBigInt() - ).to.eq(1207725818354628455674176n); + ).to.eq(1207725818354628765010176n); expect( ((await context.polkadotApi.query.system.account(ALITH)) as any).data.reserved.toBigInt() ).to.eq(2n * DEFAULT_GENESIS_MAPPING + DEFAULT_GENESIS_STAKING); @@ -222,7 +222,7 @@ describeDevMoonbeam("Author Mapping - double registration", (context) => { expect((await getMappingInfo(context, bobAuthorId)).account).to.eq(ALITH); expect( ((await context.polkadotApi.query.system.account(ALITH)) as any).data.free.toBigInt() - ).to.eq(1207625817094627736646598n); + ).to.eq(1207625817094628355316302n); expect( ((await context.polkadotApi.query.system.account(ALITH)) as any).data.reserved.toBigInt() ).to.eq(3n * DEFAULT_GENESIS_MAPPING + DEFAULT_GENESIS_STAKING);