diff --git a/pallet/account-migration/src/benchmarking.rs b/pallet/account-migration/src/benchmarking.rs index 41e0cffc8..518d93bee 100644 --- a/pallet/account-migration/src/benchmarking.rs +++ b/pallet/account-migration/src/benchmarking.rs @@ -160,12 +160,15 @@ mod benchmarks { _(RawOrigin::None, from, to, [0; 64]); } - fn other_multisig_members(count: u32) -> Vec { - (0..count).map(|i| [i as u8; 32].into()).collect() + fn other_multisig_members(count: u32) -> Vec + where + A: From<[u8; N]>, + { + (0..count).map(|i| [i as u8; N].into()).collect() } #[benchmark] - fn migrate_multisig(x: Linear<0, 99>, y: Linear<0, 99>) { + fn migrate_multisig(x: Linear<0, 99>, y: Linear<0, 99>, z: Linear<0, 99>) { let from = AccountId32::from([0; 32]); // Worst-case scenario: // @@ -173,11 +176,20 @@ mod benchmarks { let other_members = other_multisig_members(x); let (_, multisig) = multisig_of(from.clone(), other_members.clone(), y as _); let to = [0; 20].into(); + let new_multisig_params = if z == 0 { + None + } else { + Some(MultisigParams { + address: [0; 20].into(), + members: other_multisig_members(z), + threshold: Default::default(), + }) + }; preset_data::(&multisig); #[extrinsic_call] - _(RawOrigin::None, from, other_members, y as _, to, [0; 64]); + _(RawOrigin::None, from, other_members, y as _, to, [0; 64], new_multisig_params); } #[benchmark] @@ -197,6 +209,7 @@ mod benchmarks { 100, to, [0; 64], + None, ) .unwrap(); diff --git a/pallet/account-migration/src/lib.rs b/pallet/account-migration/src/lib.rs index 71876c610..ce04c1759 100644 --- a/pallet/account-migration/src/lib.rs +++ b/pallet/account-migration/src/lib.rs @@ -129,7 +129,9 @@ pub mod pallet { pub enum Event { /// An account has been migrated. Migrated { from: AccountId32, to: AccountId20 }, - /// An multisig account has been migrated. + /// A new multisig account params was noted/recorded on-chain. + NewMultisigParamsNoted { from: AccountId32, to: MultisigParams }, + /// A multisig account has been migrated. MultisigMigrated { from: AccountId32, detail: MultisigMigrationDetail }, } @@ -220,7 +222,11 @@ pub mod pallet { /// /// The `_signature` should be provided by `who`. #[pallet::call_index(1)] - #[pallet::weight(::WeightInfo::migrate_multisig(others.len() as _, *threshold as _))] + #[pallet::weight(::WeightInfo::migrate_multisig( + others.len() as _, + *threshold as _, + new_multisig_params.as_ref().map(|p| p.members.len()).unwrap_or_default() as _ + ))] pub fn migrate_multisig( origin: OriginFor, submitter: AccountId32, @@ -228,6 +234,7 @@ pub mod pallet { threshold: u16, to: AccountId20, _signature: Signature, + new_multisig_params: Option, ) -> DispatchResult { ensure_none(origin)?; @@ -248,9 +255,13 @@ pub mod pallet { if threshold < 2 { Self::migrate_inner(&from, &to)?; - Self::deposit_event(Event::MultisigMigrated { from, detail }); + Self::deposit_event(Event::MultisigMigrated { from: from.clone(), detail }); } else { - >::insert(from, detail); + >::insert(&from, detail); + } + + if let Some(to) = new_multisig_params { + Self::deposit_event(Event::NewMultisigParamsNoted { from, to }); } Ok(()) @@ -314,11 +325,12 @@ pub mod pallet { Self::pre_check_signature(from, to, signature) }, - Call::migrate_multisig { submitter, others, threshold, to, signature } => { + Call::migrate_multisig { submitter, others, threshold, to, signature, .. } => { let (_, multisig) = multisig_of(submitter.to_owned(), others.to_owned(), *threshold); Self::pre_check_existing(&multisig, to)?; + Self::pre_check_duplicative(&multisig)?; Self::pre_check_signature(submitter, to, signature) }, @@ -369,6 +381,14 @@ pub mod pallet { Ok(()) } + fn pre_check_duplicative(multisig: &AccountId32) -> Result<(), TransactionValidityError> { + if >::contains_key(multisig) { + Err(InvalidTransaction::Custom(E_DUPLICATIVE_SUBMISSION))? + } else { + Ok(()) + } + } + fn pre_check_signature( from: &AccountId32, to: &AccountId20, @@ -576,6 +596,14 @@ pub(crate) enum AssetStatus { Destroying, } +#[allow(missing_docs)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, TypeInfo)] +pub struct MultisigParams { + address: AccountId20, + members: Vec, + threshold: u16, +} + #[allow(missing_docs)] #[derive(Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, TypeInfo)] pub struct MultisigMigrationDetail { diff --git a/pallet/account-migration/src/tests.rs b/pallet/account-migration/src/tests.rs index 1422a97ef..a070fe06d 100644 --- a/pallet/account-migration/src/tests.rs +++ b/pallet/account-migration/src/tests.rs @@ -118,7 +118,8 @@ fn migrate_multisig_should_work() { others: vec![b.public().0.into(), c.public().0.into()], threshold: 2, to, - signature: signature.0 + signature: signature.0, + new_multisig_params: None })); assert_ok!(AccountMigration::migrate_multisig( RuntimeOrigin::none(), @@ -127,7 +128,19 @@ fn migrate_multisig_should_work() { 2, to, signature.0, + None )); + assert_noop!( + AccountMigration::pre_dispatch(&Call::migrate_multisig { + submitter: a.public().0.into(), + others: vec![b.public().0.into(), c.public().0.into()], + threshold: 2, + to, + signature: signature.0, + new_multisig_params: None + }), + TransactionValidityError::Invalid(InvalidTransaction::Custom(E_DUPLICATIVE_SUBMISSION)) + ); assert!(>::get(&multisig).is_some()); assert_eq!(>::get(to).consumers, 0); diff --git a/pallet/account-migration/src/weights.rs b/pallet/account-migration/src/weights.rs index 989471b71..dc6515e8b 100644 --- a/pallet/account-migration/src/weights.rs +++ b/pallet/account-migration/src/weights.rs @@ -19,13 +19,13 @@ //! Autogenerated weights for darwinia_account_migration //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-03-17, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-03-29, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `inv.cafe`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("pangolin-local"), DB CACHE: 1024 // Executed Command: -// target/x86_64-unknown-linux-gnu/release/darwinia +// target/release/darwinia // benchmark // pallet // --header @@ -56,7 +56,7 @@ use sp_std::marker::PhantomData; /// Weight functions needed for darwinia_account_migration. pub trait WeightInfo { fn migrate() -> Weight; - fn migrate_multisig(x: u32, y: u32, ) -> Weight; + fn migrate_multisig(x: u32, y: u32, z: u32, ) -> Weight; fn complete_multisig_migration() -> Weight; } @@ -97,8 +97,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `5667` // Estimated: `52015` - // Minimum execution time: 202_426 nanoseconds. - Weight::from_ref_time(202_426_000) + // Minimum execution time: 169_486 nanoseconds. + Weight::from_ref_time(169_486_000) .saturating_add(Weight::from_proof_size(52015)) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(18_u64)) @@ -137,18 +137,22 @@ impl WeightInfo for SubstrateWeight { /// Proof: Deposit Deposits (max_values: None, max_size: Some(853), added: 3328, mode: MaxEncodedLen) /// The range of component `x` is `[0, 99]`. /// The range of component `y` is `[0, 99]`. - fn migrate_multisig(x: u32, y: u32, ) -> Weight { + /// The range of component `z` is `[0, 99]`. + fn migrate_multisig(x: u32, y: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `5667` - // Estimated: `52015 + y * (7 ±0)` - // Minimum execution time: 12_545 nanoseconds. - Weight::from_ref_time(165_632_000) + // Measured: `5328 + z * (3 ±0)` + // Estimated: `52015 + y * (7 ±0) + z * (3 ±0)` + // Minimum execution time: 24_233 nanoseconds. + Weight::from_ref_time(153_169_000) .saturating_add(Weight::from_proof_size(52015)) - // Standard Error: 78_799 - .saturating_add(Weight::from_ref_time(95_121).saturating_mul(x.into())) + // Standard Error: 7_204 + .saturating_add(Weight::from_ref_time(13_888).saturating_mul(x.into())) + // Standard Error: 7_204 + .saturating_add(Weight::from_ref_time(138_484).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(12_u64)) .saturating_add(T::DbWeight::get().writes(18_u64)) .saturating_add(Weight::from_proof_size(7).saturating_mul(y.into())) + .saturating_add(Weight::from_proof_size(3).saturating_mul(z.into())) } /// Storage: AccountMigration Multisigs (r:1 w:1) /// Proof Skipped: AccountMigration Multisigs (max_values: None, max_size: None, mode: Measured) @@ -158,8 +162,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `4848` // Estimated: `9914` - // Minimum execution time: 23_172 nanoseconds. - Weight::from_ref_time(23_172_000) + // Minimum execution time: 20_927 nanoseconds. + Weight::from_ref_time(20_927_000) .saturating_add(Weight::from_proof_size(9914)) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) @@ -202,8 +206,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `5667` // Estimated: `52015` - // Minimum execution time: 202_426 nanoseconds. - Weight::from_ref_time(202_426_000) + // Minimum execution time: 169_486 nanoseconds. + Weight::from_ref_time(169_486_000) .saturating_add(Weight::from_proof_size(52015)) .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(18_u64)) @@ -242,18 +246,22 @@ impl WeightInfo for () { /// Proof: Deposit Deposits (max_values: None, max_size: Some(853), added: 3328, mode: MaxEncodedLen) /// The range of component `x` is `[0, 99]`. /// The range of component `y` is `[0, 99]`. - fn migrate_multisig(x: u32, y: u32, ) -> Weight { + /// The range of component `z` is `[0, 99]`. + fn migrate_multisig(x: u32, y: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `5667` - // Estimated: `52015 + y * (7 ±0)` - // Minimum execution time: 12_545 nanoseconds. - Weight::from_ref_time(165_632_000) + // Measured: `5328 + z * (3 ±0)` + // Estimated: `52015 + y * (7 ±0) + z * (3 ±0)` + // Minimum execution time: 24_233 nanoseconds. + Weight::from_ref_time(153_169_000) .saturating_add(Weight::from_proof_size(52015)) - // Standard Error: 78_799 - .saturating_add(Weight::from_ref_time(95_121).saturating_mul(x.into())) + // Standard Error: 7_204 + .saturating_add(Weight::from_ref_time(13_888).saturating_mul(x.into())) + // Standard Error: 7_204 + .saturating_add(Weight::from_ref_time(138_484).saturating_mul(z.into())) .saturating_add(RocksDbWeight::get().reads(12_u64)) .saturating_add(RocksDbWeight::get().writes(18_u64)) .saturating_add(Weight::from_proof_size(7).saturating_mul(y.into())) + .saturating_add(Weight::from_proof_size(3).saturating_mul(z.into())) } /// Storage: AccountMigration Multisigs (r:1 w:1) /// Proof Skipped: AccountMigration Multisigs (max_values: None, max_size: None, mode: Measured) @@ -263,8 +271,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `4848` // Estimated: `9914` - // Minimum execution time: 23_172 nanoseconds. - Weight::from_ref_time(23_172_000) + // Minimum execution time: 20_927 nanoseconds. + Weight::from_ref_time(20_927_000) .saturating_add(Weight::from_proof_size(9914)) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) diff --git a/runtime/crab/src/weights/darwinia_account_migration.rs b/runtime/crab/src/weights/darwinia_account_migration.rs index e9be61e1e..70258a018 100644 --- a/runtime/crab/src/weights/darwinia_account_migration.rs +++ b/runtime/crab/src/weights/darwinia_account_migration.rs @@ -19,13 +19,13 @@ //! Autogenerated weights for `darwinia_account_migration` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-03-17, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-03-29, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `inv.cafe`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("crab-local"), DB CACHE: 1024 // Executed Command: -// target/x86_64-unknown-linux-gnu/release/darwinia +// target/release/darwinia // benchmark // pallet // --header @@ -87,8 +87,8 @@ impl darwinia_account_migration::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `5626` // Estimated: `51933` - // Minimum execution time: 168_311 nanoseconds. - Weight::from_parts(168_311_000, 51933) + // Minimum execution time: 282_114 nanoseconds. + Weight::from_parts(282_114_000, 51933) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(18)) } @@ -126,17 +126,21 @@ impl darwinia_account_migration::WeightInfo for WeightI /// Proof: Deposit Deposits (max_values: None, max_size: Some(853), added: 3328, mode: MaxEncodedLen) /// The range of component `x` is `[0, 99]`. /// The range of component `y` is `[0, 99]`. - fn migrate_multisig(x: u32, y: u32, ) -> Weight { + /// The range of component `z` is `[0, 99]`. + fn migrate_multisig(x: u32, y: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `5626` - // Estimated: `51933 + y * (7 ±0)` - // Minimum execution time: 22_259 nanoseconds. - Weight::from_parts(169_703_500, 51933) - // Standard Error: 11_923 - .saturating_add(Weight::from_ref_time(41_671).saturating_mul(x.into())) + // Measured: `5291 + z * (3 ±0)` + // Estimated: `51933 + y * (7 ±0) + z * (3 ±0)` + // Minimum execution time: 25_521 nanoseconds. + Weight::from_parts(124_506_666, 51933) + // Standard Error: 281_540 + .saturating_add(Weight::from_ref_time(226_299).saturating_mul(x.into())) + // Standard Error: 281_540 + .saturating_add(Weight::from_ref_time(295_461).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(18)) .saturating_add(Weight::from_proof_size(7).saturating_mul(y.into())) + .saturating_add(Weight::from_proof_size(3).saturating_mul(z.into())) } /// Storage: AccountMigration Multisigs (r:1 w:1) /// Proof Skipped: AccountMigration Multisigs (max_values: None, max_size: None, mode: Measured) @@ -146,8 +150,8 @@ impl darwinia_account_migration::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `4877` // Estimated: `9943` - // Minimum execution time: 21_026 nanoseconds. - Weight::from_parts(21_026_000, 9943) + // Minimum execution time: 21_466 nanoseconds. + Weight::from_parts(21_466_000, 9943) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/darwinia/src/weights/darwinia_account_migration.rs b/runtime/darwinia/src/weights/darwinia_account_migration.rs index 31fa6af46..afa897d54 100644 --- a/runtime/darwinia/src/weights/darwinia_account_migration.rs +++ b/runtime/darwinia/src/weights/darwinia_account_migration.rs @@ -19,13 +19,13 @@ //! Autogenerated weights for `darwinia_account_migration` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-03-17, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-03-29, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `inv.cafe`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("darwinia-local"), DB CACHE: 1024 // Executed Command: -// target/x86_64-unknown-linux-gnu/release/darwinia +// target/release/darwinia // benchmark // pallet // --header @@ -87,8 +87,8 @@ impl darwinia_account_migration::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `5668` // Estimated: `52017` - // Minimum execution time: 210_142 nanoseconds. - Weight::from_parts(210_142_000, 52017) + // Minimum execution time: 235_808 nanoseconds. + Weight::from_parts(235_808_000, 52017) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(18)) } @@ -126,17 +126,21 @@ impl darwinia_account_migration::WeightInfo for WeightI /// Proof: Deposit Deposits (max_values: None, max_size: Some(853), added: 3328, mode: MaxEncodedLen) /// The range of component `x` is `[0, 99]`. /// The range of component `y` is `[0, 99]`. - fn migrate_multisig(x: u32, y: u32, ) -> Weight { + /// The range of component `z` is `[0, 99]`. + fn migrate_multisig(x: u32, y: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `5668` - // Estimated: `52017 + y * (7 ±0)` - // Minimum execution time: 27_933 nanoseconds. - Weight::from_parts(254_670_500, 52017) - // Standard Error: 247_744 - .saturating_add(Weight::from_ref_time(51_772).saturating_mul(x.into())) + // Measured: `5329 + z * (3 ±0)` + // Estimated: `52017 + y * (7 ±0) + z * (3 ±0)` + // Minimum execution time: 33_160 nanoseconds. + Weight::from_parts(197_482_666, 52017) + // Standard Error: 134_286 + .saturating_add(Weight::from_ref_time(176_269).saturating_mul(x.into())) + // Standard Error: 134_286 + .saturating_add(Weight::from_ref_time(15_875).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(18)) .saturating_add(Weight::from_proof_size(7).saturating_mul(y.into())) + .saturating_add(Weight::from_proof_size(3).saturating_mul(z.into())) } /// Storage: AccountMigration Multisigs (r:1 w:1) /// Proof Skipped: AccountMigration Multisigs (max_values: None, max_size: None, mode: Measured) @@ -146,8 +150,8 @@ impl darwinia_account_migration::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `4881` // Estimated: `9947` - // Minimum execution time: 22_770 nanoseconds. - Weight::from_parts(22_770_000, 9947) + // Minimum execution time: 21_179 nanoseconds. + Weight::from_parts(21_179_000, 9947) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/pangolin/src/weights/darwinia_account_migration.rs b/runtime/pangolin/src/weights/darwinia_account_migration.rs index c00fb3042..53b185e84 100644 --- a/runtime/pangolin/src/weights/darwinia_account_migration.rs +++ b/runtime/pangolin/src/weights/darwinia_account_migration.rs @@ -19,13 +19,13 @@ //! Autogenerated weights for `darwinia_account_migration` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-03-17, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-03-29, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `inv.cafe`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("pangolin-local"), DB CACHE: 1024 // Executed Command: -// target/x86_64-unknown-linux-gnu/release/darwinia +// target/release/darwinia // benchmark // pallet // --header @@ -87,8 +87,8 @@ impl darwinia_account_migration::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `5667` // Estimated: `52015` - // Minimum execution time: 152_085 nanoseconds. - Weight::from_parts(152_085_000, 52015) + // Minimum execution time: 168_993 nanoseconds. + Weight::from_parts(168_993_000, 52015) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(18)) } @@ -126,17 +126,19 @@ impl darwinia_account_migration::WeightInfo for WeightI /// Proof: Deposit Deposits (max_values: None, max_size: Some(853), added: 3328, mode: MaxEncodedLen) /// The range of component `x` is `[0, 99]`. /// The range of component `y` is `[0, 99]`. - fn migrate_multisig(x: u32, y: u32, ) -> Weight { + /// The range of component `z` is `[0, 99]`. + fn migrate_multisig(x: u32, y: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `5667` - // Estimated: `52015 + y * (7 ±0)` - // Minimum execution time: 11_495 nanoseconds. - Weight::from_parts(190_326_500, 52015) - // Standard Error: 33_162 - .saturating_add(Weight::from_ref_time(85_368).saturating_mul(x.into())) + // Measured: `5328 + z * (3 ±0)` + // Estimated: `52015 + y * (7 ±0) + z * (3 ±0)` + // Minimum execution time: 30_619 nanoseconds. + Weight::from_parts(222_440_000, 52015) + // Standard Error: 25_723 + .saturating_add(Weight::from_ref_time(103_141).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(18)) .saturating_add(Weight::from_proof_size(7).saturating_mul(y.into())) + .saturating_add(Weight::from_proof_size(3).saturating_mul(z.into())) } /// Storage: AccountMigration Multisigs (r:1 w:1) /// Proof Skipped: AccountMigration Multisigs (max_values: None, max_size: None, mode: Measured) @@ -146,8 +148,8 @@ impl darwinia_account_migration::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `4848` // Estimated: `9914` - // Minimum execution time: 20_708 nanoseconds. - Weight::from_parts(20_708_000, 9914) + // Minimum execution time: 21_747 nanoseconds. + Weight::from_parts(21_747_000, 9914) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/pangoro/src/weights/darwinia_account_migration.rs b/runtime/pangoro/src/weights/darwinia_account_migration.rs index 211543c71..0b61f0791 100644 --- a/runtime/pangoro/src/weights/darwinia_account_migration.rs +++ b/runtime/pangoro/src/weights/darwinia_account_migration.rs @@ -19,13 +19,13 @@ //! Autogenerated weights for `darwinia_account_migration` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-03-17, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-03-29, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `inv.cafe`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("pangoro-local"), DB CACHE: 1024 // Executed Command: -// target/x86_64-unknown-linux-gnu/release/darwinia +// target/release/darwinia // benchmark // pallet // --header @@ -87,8 +87,8 @@ impl darwinia_account_migration::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `5629` // Estimated: `51939` - // Minimum execution time: 258_968 nanoseconds. - Weight::from_parts(258_968_000, 51939) + // Minimum execution time: 171_585 nanoseconds. + Weight::from_parts(171_585_000, 51939) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(18)) } @@ -126,17 +126,21 @@ impl darwinia_account_migration::WeightInfo for WeightI /// Proof: Deposit Deposits (max_values: None, max_size: Some(853), added: 3328, mode: MaxEncodedLen) /// The range of component `x` is `[0, 99]`. /// The range of component `y` is `[0, 99]`. - fn migrate_multisig(x: u32, y: u32, ) -> Weight { + /// The range of component `z` is `[0, 99]`. + fn migrate_multisig(x: u32, y: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `5629` - // Estimated: `51939 + y * (7 ±0)` - // Minimum execution time: 13_552 nanoseconds. - Weight::from_parts(237_578_500, 51939) - // Standard Error: 638_803 - .saturating_add(Weight::from_ref_time(413_752).saturating_mul(x.into())) + // Measured: `5291 + z * (3 ±0)` + // Estimated: `51939 + y * (7 ±0) + z * (3 ±0)` + // Minimum execution time: 25_155 nanoseconds. + Weight::from_parts(163_054_000, 51939) + // Standard Error: 31_802 + .saturating_add(Weight::from_ref_time(91_575).saturating_mul(x.into())) + // Standard Error: 31_802 + .saturating_add(Weight::from_ref_time(152_000).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(18)) .saturating_add(Weight::from_proof_size(7).saturating_mul(y.into())) + .saturating_add(Weight::from_proof_size(3).saturating_mul(z.into())) } /// Storage: AccountMigration Multisigs (r:1 w:1) /// Proof Skipped: AccountMigration Multisigs (max_values: None, max_size: None, mode: Measured) @@ -146,8 +150,8 @@ impl darwinia_account_migration::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `4880` // Estimated: `9946` - // Minimum execution time: 36_876 nanoseconds. - Weight::from_parts(36_876_000, 9946) + // Minimum execution time: 21_065 nanoseconds. + Weight::from_parts(21_065_000, 9946) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) }