diff --git a/.maintain/frame-weight-template.hbs b/.maintain/frame-weight-template.hbs index c6df85194ac99..5beeaf5f0521e 100644 --- a/.maintain/frame-weight-template.hbs +++ b/.maintain/frame-weight-template.hbs @@ -67,7 +67,7 @@ impl WeightInfo for SubstrateWeight { Weight::from_ref_time({{underscore benchmark.base_weight}} as RefTimeWeight) {{#each benchmark.component_weight as |cw|}} // Standard Error: {{underscore cw.error}} - .saturating_add(Weight::from_ref_time({{underscore cw.slope}} as RefTimeWeight).scalar_saturating_mul({{cw.name}} as RefTimeWeight)) + .saturating_add(Weight::from_ref_time({{underscore cw.slope}} as RefTimeWeight).saturating_mul({{cw.name}} as RefTimeWeight)) {{/each}} {{#if (ne benchmark.base_reads "0")}} .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as RefTimeWeight)) @@ -102,7 +102,7 @@ impl WeightInfo for () { Weight::from_ref_time({{underscore benchmark.base_weight}} as RefTimeWeight) {{#each benchmark.component_weight as |cw|}} // Standard Error: {{underscore cw.error}} - .saturating_add(Weight::from_ref_time({{underscore cw.slope}} as RefTimeWeight).scalar_saturating_mul({{cw.name}} as RefTimeWeight)) + .saturating_add(Weight::from_ref_time({{underscore cw.slope}} as RefTimeWeight).saturating_mul({{cw.name}} as RefTimeWeight)) {{/each}} {{#if (ne benchmark.base_reads "0")}} .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as RefTimeWeight)) diff --git a/bin/node-template/runtime/src/lib.rs b/bin/node-template/runtime/src/lib.rs index 7280336cada3d..e28a3bb2adb9d 100644 --- a/bin/node-template/runtime/src/lib.rs +++ b/bin/node-template/runtime/src/lib.rs @@ -138,7 +138,7 @@ parameter_types! { pub const Version: RuntimeVersion = VERSION; /// We allow for 2 seconds of compute with a 6 second average block time. pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights - ::with_sensible_defaults(2 * WEIGHT_PER_SECOND, NORMAL_DISPATCH_RATIO); + ::with_sensible_defaults(2u64 * WEIGHT_PER_SECOND, NORMAL_DISPATCH_RATIO); pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength ::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); pub const SS58Prefix: u8 = 42; diff --git a/bin/node/runtime/src/impls.rs b/bin/node/runtime/src/impls.rs index 4d58abc81d16d..0d0f864097af5 100644 --- a/bin/node/runtime/src/impls.rs +++ b/bin/node/runtime/src/impls.rs @@ -239,7 +239,7 @@ mod multiplier_tests { #[test] fn multiplier_cannot_go_below_limit() { // will not go any further below even if block is empty. - run_with_system_weight(Weight::new(), || { + run_with_system_weight(Weight::zero(), || { let next = runtime_multiplier_update(min_multiplier()); assert_eq!(next, min_multiplier()); }) @@ -257,7 +257,7 @@ mod multiplier_tests { // 1 < 0.00001 * k * 0.1875 // 10^9 / 1875 < k // k > 533_333 ~ 18,5 days. - run_with_system_weight(Weight::new(), || { + run_with_system_weight(Weight::zero(), || { // start from 1, the default. let mut fm = Multiplier::one(); let mut iterations: u64 = 0; @@ -419,20 +419,20 @@ mod multiplier_tests { #[test] fn weight_to_fee_should_not_overflow_on_large_weights() { let kb = Weight::from_ref_time(1024); - let mb = kb * kb; + let mb = 1024u64 * kb; let max_fm = Multiplier::saturating_from_integer(i128::MAX); // check that for all values it can compute, correctly. vec![ Weight::zero(), - Weight::one(), + Weight::from_ref_time(1), Weight::from_ref_time(10), Weight::from_ref_time(1000), kb, - 10 * kb, - 100 * kb, + 10u64 * kb, + 100u64 * kb, mb, - 10 * mb, + 10u64 * mb, Weight::from_ref_time(2147483647), Weight::from_ref_time(4294967295), BlockWeights::get().max_block / 2, diff --git a/bin/node/runtime/src/lib.rs b/bin/node/runtime/src/lib.rs index 8ef7e7852ad02..fa0f877c5938d 100644 --- a/bin/node/runtime/src/lib.rs +++ b/bin/node/runtime/src/lib.rs @@ -170,7 +170,7 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); /// by Operational extrinsics. const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for 2 seconds of compute with a 6 second average block time. -const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.scalar_saturating_mul(2); +const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_mul(2); parameter_types! { pub const BlockHashCount: BlockNumber = 2400; diff --git a/docs/Upgrading-2.0-to-3.0.md b/docs/Upgrading-2.0-to-3.0.md index f750c6dd5865b..bcba7d88047ce 100644 --- a/docs/Upgrading-2.0-to-3.0.md +++ b/docs/Upgrading-2.0-to-3.0.md @@ -100,12 +100,12 @@ And update the overall definition for weights on frame and a few related types a +/// by Operational extrinsics. +const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); +/// We allow for 2 seconds of compute with a 6 second average block time. -+const MAXIMUM_BLOCK_WEIGHT: Weight = 2 * WEIGHT_PER_SECOND; ++const MAXIMUM_BLOCK_WEIGHT: Weight = 2u64 * WEIGHT_PER_SECOND; + parameter_types! { pub const BlockHashCount: BlockNumber = 2400; - /// We allow for 2 seconds of compute with a 6 second average block time. -- pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND; +- pub const MaximumBlockWeight: Weight = 2u64 * WEIGHT_PER_SECOND; - pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); - /// Assume 10% of weight for average on_initialize calls. - pub MaximumExtrinsicWeight: Weight = diff --git a/frame/alliance/src/migration.rs b/frame/alliance/src/migration.rs index 010603902f0fd..7e3df5219f25b 100644 --- a/frame/alliance/src/migration.rs +++ b/frame/alliance/src/migration.rs @@ -25,7 +25,7 @@ pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); /// Wrapper for all migrations of this pallet. pub fn migrate, I: 'static>() -> Weight { let onchain_version = Pallet::::on_chain_storage_version(); - let mut weight: Weight = Weight::new(); + let mut weight: Weight = Weight::zero(); if onchain_version < 1 { weight = weight.saturating_add(v0_to_v1::migrate::()); diff --git a/frame/alliance/src/weights.rs b/frame/alliance/src/weights.rs index 8436b3ddbd530..2da5782f1bb4f 100644 --- a/frame/alliance/src/weights.rs +++ b/frame/alliance/src/weights.rs @@ -82,11 +82,11 @@ impl WeightInfo for SubstrateWeight { fn propose_proposed(_b: u32, x: u32, y: u32, p: u32, ) -> Weight { Weight::from_ref_time(37_864_000 as RefTimeWeight) // Standard Error: 28_000 - .saturating_add(Weight::from_ref_time(69_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(69_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(66_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(66_000 as RefTimeWeight).saturating_mul(y as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(192_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(192_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } @@ -97,7 +97,7 @@ impl WeightInfo for SubstrateWeight { fn vote(_x: u32, y: u32, ) -> Weight { Weight::from_ref_time(46_813_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(125_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(125_000 as RefTimeWeight).saturating_mul(y as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -109,7 +109,7 @@ impl WeightInfo for SubstrateWeight { fn veto(p: u32, ) -> Weight { Weight::from_ref_time(35_316_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(172_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(172_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -124,11 +124,11 @@ impl WeightInfo for SubstrateWeight { fn close_early_disapproved(x: u32, y: u32, p: u32, ) -> Weight { Weight::from_ref_time(36_245_000 as RefTimeWeight) // Standard Error: 18_000 - .saturating_add(Weight::from_ref_time(336_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(336_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(109_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(109_000 as RefTimeWeight).saturating_mul(y as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(178_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(178_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -144,13 +144,13 @@ impl WeightInfo for SubstrateWeight { fn close_early_approved(b: u32, x: u32, y: u32, p: u32, ) -> Weight { Weight::from_ref_time(48_088_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) // Standard Error: 16_000 - .saturating_add(Weight::from_ref_time(194_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(194_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(93_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(93_000 as RefTimeWeight).saturating_mul(y as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(201_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(201_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -166,9 +166,9 @@ impl WeightInfo for SubstrateWeight { fn close_disapproved(_x: u32, y: u32, p: u32, ) -> Weight { Weight::from_ref_time(43_374_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(101_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(101_000 as RefTimeWeight).saturating_mul(y as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(182_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(182_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -185,9 +185,9 @@ impl WeightInfo for SubstrateWeight { fn close_approved(_b: u32, _x: u32, y: u32, p: u32, ) -> Weight { Weight::from_ref_time(42_798_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(87_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(87_000 as RefTimeWeight).saturating_mul(y as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(192_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(192_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -208,17 +208,17 @@ impl WeightInfo for SubstrateWeight { fn force_set_members(x: u32, y: u32, z: u32, p: u32, c: u32, m: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 221_000 - .saturating_add(Weight::from_ref_time(1_294_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_294_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) // Standard Error: 23_000 - .saturating_add(Weight::from_ref_time(231_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(231_000 as RefTimeWeight).saturating_mul(y as RefTimeWeight)) // Standard Error: 21_000 - .saturating_add(Weight::from_ref_time(115_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(115_000 as RefTimeWeight).saturating_mul(z as RefTimeWeight)) // Standard Error: 21_000 - .saturating_add(Weight::from_ref_time(9_371_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(9_371_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) // Standard Error: 21_000 - .saturating_add(Weight::from_ref_time(11_673_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(11_673_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) // Standard Error: 21_000 - .saturating_add(Weight::from_ref_time(11_581_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(11_581_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) .saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(m as RefTimeWeight))) @@ -306,9 +306,9 @@ impl WeightInfo for SubstrateWeight { fn add_unscrupulous_items(n: u32, l: u32, ) -> Weight { Weight::from_ref_time(359_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_376_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_376_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(112_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(112_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -319,9 +319,9 @@ impl WeightInfo for SubstrateWeight { fn remove_unscrupulous_items(n: u32, l: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 145_000 - .saturating_add(Weight::from_ref_time(20_932_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(20_932_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) // Standard Error: 56_000 - .saturating_add(Weight::from_ref_time(3_649_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(3_649_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -341,11 +341,11 @@ impl WeightInfo for () { fn propose_proposed(_b: u32, x: u32, y: u32, p: u32, ) -> Weight { Weight::from_ref_time(37_864_000 as RefTimeWeight) // Standard Error: 28_000 - .saturating_add(Weight::from_ref_time(69_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(69_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(66_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(66_000 as RefTimeWeight).saturating_mul(y as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(192_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(192_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(4 as RefTimeWeight)) } @@ -356,7 +356,7 @@ impl WeightInfo for () { fn vote(_x: u32, y: u32, ) -> Weight { Weight::from_ref_time(46_813_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(125_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(125_000 as RefTimeWeight).saturating_mul(y as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -368,7 +368,7 @@ impl WeightInfo for () { fn veto(p: u32, ) -> Weight { Weight::from_ref_time(35_316_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(172_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(172_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -383,11 +383,11 @@ impl WeightInfo for () { fn close_early_disapproved(x: u32, y: u32, p: u32, ) -> Weight { Weight::from_ref_time(36_245_000 as RefTimeWeight) // Standard Error: 18_000 - .saturating_add(Weight::from_ref_time(336_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(336_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(109_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(109_000 as RefTimeWeight).saturating_mul(y as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(178_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(178_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -403,13 +403,13 @@ impl WeightInfo for () { fn close_early_approved(b: u32, x: u32, y: u32, p: u32, ) -> Weight { Weight::from_ref_time(48_088_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) // Standard Error: 16_000 - .saturating_add(Weight::from_ref_time(194_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(194_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(93_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(93_000 as RefTimeWeight).saturating_mul(y as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(201_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(201_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -425,9 +425,9 @@ impl WeightInfo for () { fn close_disapproved(_x: u32, y: u32, p: u32, ) -> Weight { Weight::from_ref_time(43_374_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(101_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(101_000 as RefTimeWeight).saturating_mul(y as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(182_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(182_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -444,9 +444,9 @@ impl WeightInfo for () { fn close_approved(_b: u32, _x: u32, y: u32, p: u32, ) -> Weight { Weight::from_ref_time(42_798_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(87_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(87_000 as RefTimeWeight).saturating_mul(y as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(192_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(192_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -467,17 +467,17 @@ impl WeightInfo for () { fn force_set_members(x: u32, y: u32, z: u32, p: u32, c: u32, m: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 221_000 - .saturating_add(Weight::from_ref_time(1_294_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_294_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) // Standard Error: 23_000 - .saturating_add(Weight::from_ref_time(231_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(231_000 as RefTimeWeight).saturating_mul(y as RefTimeWeight)) // Standard Error: 21_000 - .saturating_add(Weight::from_ref_time(115_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(115_000 as RefTimeWeight).saturating_mul(z as RefTimeWeight)) // Standard Error: 21_000 - .saturating_add(Weight::from_ref_time(9_371_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(9_371_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) // Standard Error: 21_000 - .saturating_add(Weight::from_ref_time(11_673_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(11_673_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) // Standard Error: 21_000 - .saturating_add(Weight::from_ref_time(11_581_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(11_581_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) .saturating_add(RocksDbWeight::get().reads((2 as RefTimeWeight).saturating_mul(m as RefTimeWeight))) @@ -565,9 +565,9 @@ impl WeightInfo for () { fn add_unscrupulous_items(n: u32, l: u32, ) -> Weight { Weight::from_ref_time(359_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_376_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_376_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(112_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(112_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -578,9 +578,9 @@ impl WeightInfo for () { fn remove_unscrupulous_items(n: u32, l: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 145_000 - .saturating_add(Weight::from_ref_time(20_932_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(20_932_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) // Standard Error: 56_000 - .saturating_add(Weight::from_ref_time(3_649_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(3_649_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } diff --git a/frame/assets/src/weights.rs b/frame/assets/src/weights.rs index 971728df46c24..d59567e00ef69 100644 --- a/frame/assets/src/weights.rs +++ b/frame/assets/src/weights.rs @@ -92,11 +92,11 @@ impl WeightInfo for SubstrateWeight { fn destroy(c: u32, s: u32, a: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 37_000 - .saturating_add(Weight::from_ref_time(17_145_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(17_145_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) // Standard Error: 37_000 - .saturating_add(Weight::from_ref_time(19_333_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(19_333_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) // Standard Error: 375_000 - .saturating_add(Weight::from_ref_time(17_046_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(17_046_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) .saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) @@ -188,9 +188,9 @@ impl WeightInfo for SubstrateWeight { fn set_metadata(n: u32, s: u32, ) -> Weight { Weight::from_ref_time(32_395_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -206,7 +206,7 @@ impl WeightInfo for SubstrateWeight { fn force_set_metadata(_n: u32, s: u32, ) -> Weight { Weight::from_ref_time(19_586_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -277,11 +277,11 @@ impl WeightInfo for () { fn destroy(c: u32, s: u32, a: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 37_000 - .saturating_add(Weight::from_ref_time(17_145_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(17_145_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) // Standard Error: 37_000 - .saturating_add(Weight::from_ref_time(19_333_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(19_333_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) // Standard Error: 375_000 - .saturating_add(Weight::from_ref_time(17_046_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(17_046_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) .saturating_add(RocksDbWeight::get().reads((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) @@ -373,9 +373,9 @@ impl WeightInfo for () { fn set_metadata(n: u32, s: u32, ) -> Weight { Weight::from_ref_time(32_395_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -391,7 +391,7 @@ impl WeightInfo for () { fn force_set_metadata(_n: u32, s: u32, ) -> Weight { Weight::from_ref_time(19_586_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } diff --git a/frame/babe/src/default_weights.rs b/frame/babe/src/default_weights.rs index cc1d11108b2e1..d3e0c9d044883 100644 --- a/frame/babe/src/default_weights.rs +++ b/frame/babe/src/default_weights.rs @@ -38,14 +38,14 @@ impl crate::WeightInfo for () { const MAX_NOMINATORS: u64 = 200; // checking membership proof - let ref_time_weight = (35 * WEIGHT_PER_MICROS) - .saturating_add((175 * WEIGHT_PER_NANOS).scalar_saturating_mul(validator_count)) + let ref_time_weight = (35u64 * WEIGHT_PER_MICROS) + .saturating_add((175u64 * WEIGHT_PER_NANOS).saturating_mul(validator_count)) .saturating_add(DbWeight::get().reads(5)) // check equivocation proof - .saturating_add(110 * WEIGHT_PER_MICROS) + .saturating_add(110u64 * WEIGHT_PER_MICROS) // report offence - .saturating_add(110 * WEIGHT_PER_MICROS) - .saturating_add(25 * WEIGHT_PER_MICROS * MAX_NOMINATORS) + .saturating_add(110u64 * WEIGHT_PER_MICROS) + .saturating_add(25u64 * WEIGHT_PER_MICROS * MAX_NOMINATORS) .saturating_add(DbWeight::get().reads(14 + 3 * MAX_NOMINATORS)) .saturating_add(DbWeight::get().writes(10 + 3 * MAX_NOMINATORS)); diff --git a/frame/balances/src/tests.rs b/frame/balances/src/tests.rs index 6605af530563d..96bee9be1991c 100644 --- a/frame/balances/src/tests.rs +++ b/frame/balances/src/tests.rs @@ -188,14 +188,14 @@ macro_rules! decl_tests { ChargeTransactionPayment::from(1), &1, CALL, - &info_from_weight(Weight::one()), + &info_from_weight(Weight::from_ref_time(1)), 1, ).is_err()); assert_ok!( as SignedExtension>::pre_dispatch( ChargeTransactionPayment::from(0), &1, CALL, - &info_from_weight(Weight::one()), + &info_from_weight(Weight::from_ref_time(1)), 1, )); @@ -206,14 +206,14 @@ macro_rules! decl_tests { ChargeTransactionPayment::from(1), &1, CALL, - &info_from_weight(Weight::one()), + &info_from_weight(Weight::from_ref_time(1)), 1, ).is_err()); assert!( as SignedExtension>::pre_dispatch( ChargeTransactionPayment::from(0), &1, CALL, - &info_from_weight(Weight::one()), + &info_from_weight(Weight::from_ref_time(1)), 1, ).is_err()); }); diff --git a/frame/benchmarking/src/weights.rs b/frame/benchmarking/src/weights.rs index dc2ca26e1af02..9a40e488b7243 100644 --- a/frame/benchmarking/src/weights.rs +++ b/frame/benchmarking/src/weights.rs @@ -75,20 +75,20 @@ impl WeightInfo for SubstrateWeight { fn sr25519_verification(i: u32, ) -> Weight { Weight::from_ref_time(319_000 as RefTimeWeight) // Standard Error: 8_000 - .saturating_add(Weight::from_ref_time(47_171_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(47_171_000 as RefTimeWeight).saturating_mul(i as RefTimeWeight)) } // Storage: Skipped Metadata (r:0 w:0) fn storage_read(i: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(2_110_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_110_000 as RefTimeWeight).saturating_mul(i as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) } // Storage: Skipped Metadata (r:0 w:0) fn storage_write(i: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(372_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(372_000 as RefTimeWeight).saturating_mul(i as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) } } @@ -113,20 +113,20 @@ impl WeightInfo for () { fn sr25519_verification(i: u32, ) -> Weight { Weight::from_ref_time(319_000 as RefTimeWeight) // Standard Error: 8_000 - .saturating_add(Weight::from_ref_time(47_171_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(47_171_000 as RefTimeWeight).saturating_mul(i as RefTimeWeight)) } // Storage: Skipped Metadata (r:0 w:0) fn storage_read(i: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(2_110_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_110_000 as RefTimeWeight).saturating_mul(i as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) } // Storage: Skipped Metadata (r:0 w:0) fn storage_write(i: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(372_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(372_000 as RefTimeWeight).saturating_mul(i as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) } } diff --git a/frame/bounties/src/weights.rs b/frame/bounties/src/weights.rs index 27a23cb4ffeae..0bb9a16d3cd8a 100644 --- a/frame/bounties/src/weights.rs +++ b/frame/bounties/src/weights.rs @@ -142,7 +142,7 @@ impl WeightInfo for SubstrateWeight { fn spend_funds(b: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 17_000 - .saturating_add(Weight::from_ref_time(29_233_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(29_233_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((3 as RefTimeWeight).saturating_mul(b as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -234,7 +234,7 @@ impl WeightInfo for () { fn spend_funds(b: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 17_000 - .saturating_add(Weight::from_ref_time(29_233_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(29_233_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((3 as RefTimeWeight).saturating_mul(b as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) diff --git a/frame/child-bounties/src/weights.rs b/frame/child-bounties/src/weights.rs index c5d00d6ed0bd4..d806a676356b6 100644 --- a/frame/child-bounties/src/weights.rs +++ b/frame/child-bounties/src/weights.rs @@ -66,7 +66,7 @@ impl WeightInfo for SubstrateWeight { fn add_child_bounty(d: u32, ) -> Weight { Weight::from_ref_time(51_064_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(d as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(d as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(6 as RefTimeWeight)) } @@ -145,7 +145,7 @@ impl WeightInfo for () { fn add_child_bounty(d: u32, ) -> Weight { Weight::from_ref_time(51_064_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(d as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(d as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(6 as RefTimeWeight)) } diff --git a/frame/collective/src/weights.rs b/frame/collective/src/weights.rs index a0cc64cc2408d..fcc0e7134f51c 100644 --- a/frame/collective/src/weights.rs +++ b/frame/collective/src/weights.rs @@ -66,11 +66,11 @@ impl WeightInfo for SubstrateWeight { fn set_members(m: u32, n: u32, p: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 12_000 - .saturating_add(Weight::from_ref_time(10_280_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(10_280_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) // Standard Error: 12_000 - .saturating_add(Weight::from_ref_time(126_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(126_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) // Standard Error: 12_000 - .saturating_add(Weight::from_ref_time(13_310_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(13_310_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(p as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) @@ -80,9 +80,9 @@ impl WeightInfo for SubstrateWeight { fn execute(b: u32, m: u32, ) -> Weight { Weight::from_ref_time(16_819_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(33_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(33_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) } // Storage: Council Members (r:1 w:0) @@ -90,9 +90,9 @@ impl WeightInfo for SubstrateWeight { fn propose_execute(b: u32, m: u32, ) -> Weight { Weight::from_ref_time(18_849_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) } // Storage: Council Members (r:1 w:0) @@ -103,11 +103,11 @@ impl WeightInfo for SubstrateWeight { fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { Weight::from_ref_time(22_204_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(8_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(8_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(49_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(49_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(180_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(180_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } @@ -116,7 +116,7 @@ impl WeightInfo for SubstrateWeight { fn vote(m: u32, ) -> Weight { Weight::from_ref_time(30_941_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(77_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(77_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -127,9 +127,9 @@ impl WeightInfo for SubstrateWeight { fn close_early_disapproved(m: u32, p: u32, ) -> Weight { Weight::from_ref_time(32_485_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(39_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(39_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(124_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(124_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -140,11 +140,11 @@ impl WeightInfo for SubstrateWeight { fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { Weight::from_ref_time(33_487_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(66_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(66_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(157_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(157_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -156,9 +156,9 @@ impl WeightInfo for SubstrateWeight { fn close_disapproved(m: u32, p: u32, ) -> Weight { Weight::from_ref_time(33_494_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(58_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(58_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(124_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(124_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -170,11 +170,11 @@ impl WeightInfo for SubstrateWeight { fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { Weight::from_ref_time(36_566_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(63_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(63_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(158_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(158_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -184,7 +184,7 @@ impl WeightInfo for SubstrateWeight { fn disapprove_proposal(p: u32, ) -> Weight { Weight::from_ref_time(20_159_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(173_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(173_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -199,11 +199,11 @@ impl WeightInfo for () { fn set_members(m: u32, n: u32, p: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 12_000 - .saturating_add(Weight::from_ref_time(10_280_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(10_280_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) // Standard Error: 12_000 - .saturating_add(Weight::from_ref_time(126_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(126_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) // Standard Error: 12_000 - .saturating_add(Weight::from_ref_time(13_310_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(13_310_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(p as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) @@ -213,9 +213,9 @@ impl WeightInfo for () { fn execute(b: u32, m: u32, ) -> Weight { Weight::from_ref_time(16_819_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(33_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(33_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) } // Storage: Council Members (r:1 w:0) @@ -223,9 +223,9 @@ impl WeightInfo for () { fn propose_execute(b: u32, m: u32, ) -> Weight { Weight::from_ref_time(18_849_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) } // Storage: Council Members (r:1 w:0) @@ -236,11 +236,11 @@ impl WeightInfo for () { fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { Weight::from_ref_time(22_204_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(8_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(8_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(49_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(49_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(180_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(180_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(4 as RefTimeWeight)) } @@ -249,7 +249,7 @@ impl WeightInfo for () { fn vote(m: u32, ) -> Weight { Weight::from_ref_time(30_941_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(77_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(77_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -260,9 +260,9 @@ impl WeightInfo for () { fn close_early_disapproved(m: u32, p: u32, ) -> Weight { Weight::from_ref_time(32_485_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(39_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(39_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(124_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(124_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -273,11 +273,11 @@ impl WeightInfo for () { fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { Weight::from_ref_time(33_487_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(66_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(66_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(157_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(157_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -289,9 +289,9 @@ impl WeightInfo for () { fn close_disapproved(m: u32, p: u32, ) -> Weight { Weight::from_ref_time(33_494_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(58_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(58_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(124_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(124_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -303,11 +303,11 @@ impl WeightInfo for () { fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { Weight::from_ref_time(36_566_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(63_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(63_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(158_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(158_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -317,7 +317,7 @@ impl WeightInfo for () { fn disapprove_proposal(p: u32, ) -> Weight { Weight::from_ref_time(20_159_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(173_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(173_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index 9d90cf38269b1..0db285e81a91f 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -26,7 +26,7 @@ use sp_std::{marker::PhantomData, prelude::*}; /// Wrapper for all migrations of this pallet, based on `StorageVersion`. pub fn migrate() -> Weight { let version = StorageVersion::get::>(); - let mut weight = Weight::new(); + let mut weight = Weight::zero(); if version < 4 { weight = weight.saturating_add(v4::migrate::()); @@ -127,7 +127,7 @@ mod v5 { type DeletionQueue = StorageValue, Vec>; pub fn migrate() -> Weight { - let mut weight = Weight::new(); + let mut weight = Weight::zero(); >::translate(|_key, old: OldContractInfo| { weight = weight.saturating_add(T::DbWeight::get().reads_writes(1, 1)); @@ -216,7 +216,7 @@ mod v6 { type OwnerInfoOf = StorageMap, Identity, CodeHash, OwnerInfo>; pub fn migrate() -> Weight { - let mut weight = Weight::new(); + let mut weight = Weight::zero(); >::translate(|_key, old: OldContractInfo| { weight = weight.saturating_add(T::DbWeight::get().reads_writes(1, 1)); diff --git a/frame/contracts/src/storage.rs b/frame/contracts/src/storage.rs index 76e2d74f3d887..9c340b5c93deb 100644 --- a/frame/contracts/src/storage.rs +++ b/frame/contracts/src/storage.rs @@ -230,8 +230,7 @@ where let weight_per_key = (T::WeightInfo::on_initialize_per_trie_key(1) - T::WeightInfo::on_initialize_per_trie_key(0)) .ref_time(); - let decoding_weight = - weight_per_queue_item.scalar_saturating_mul(queue_len as RefTimeWeight); + let decoding_weight = weight_per_queue_item.saturating_mul(queue_len as RefTimeWeight); // `weight_per_key` being zero makes no sense and would constitute a failure to // benchmark properly. We opt for not removing any keys at all in this case. diff --git a/frame/contracts/src/tests.rs b/frame/contracts/src/tests.rs index 3571434bb823b..f4fa6bb3d72db 100644 --- a/frame/contracts/src/tests.rs +++ b/frame/contracts/src/tests.rs @@ -264,7 +264,7 @@ impl RegisteredChainExtension for TempStorageExtension { parameter_types! { pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(2 * WEIGHT_PER_SECOND); + frame_system::limits::BlockWeights::simple_max(2u64 * WEIGHT_PER_SECOND); pub static ExistentialDeposit: u64 = 1; } impl frame_system::Config for Test { diff --git a/frame/contracts/src/wasm/code_cache.rs b/frame/contracts/src/wasm/code_cache.rs index 659caafa7f0b0..d482d5c4bbf3f 100644 --- a/frame/contracts/src/wasm/code_cache.rs +++ b/frame/contracts/src/wasm/code_cache.rs @@ -223,7 +223,7 @@ impl Token for CodeToken { Load(len) => { let computation = T::WeightInfo::call_with_code_per_byte(len) .saturating_sub(T::WeightInfo::call_with_code_per_byte(0)); - let bandwidth = T::ContractAccessWeight::get().scalar_saturating_mul(len as u64); + let bandwidth = T::ContractAccessWeight::get().saturating_mul(len as u64); computation.max(bandwidth) }, }; diff --git a/frame/contracts/src/weights.rs b/frame/contracts/src/weights.rs index 17be3c3da0138..daee41bc63f32 100644 --- a/frame/contracts/src/weights.rs +++ b/frame/contracts/src/weights.rs @@ -174,7 +174,7 @@ impl WeightInfo for SubstrateWeight { fn on_initialize_per_trie_key(k: u32, ) -> Weight { Weight::from_ref_time(8_564_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(868_000 as RefTimeWeight).scalar_saturating_mul(k as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(868_000 as RefTimeWeight).saturating_mul(k as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(k as RefTimeWeight))) @@ -184,7 +184,7 @@ impl WeightInfo for SubstrateWeight { fn on_initialize_per_queue_item(q: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(1_944_000 as RefTimeWeight).scalar_saturating_mul(q as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_944_000 as RefTimeWeight).saturating_mul(q as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -194,7 +194,7 @@ impl WeightInfo for SubstrateWeight { fn reinstrument(c: u32, ) -> Weight { Weight::from_ref_time(19_016_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(49_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(49_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -206,7 +206,7 @@ impl WeightInfo for SubstrateWeight { fn call_with_code_per_byte(c: u32, ) -> Weight { Weight::from_ref_time(205_194_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(53_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(53_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -222,9 +222,9 @@ impl WeightInfo for SubstrateWeight { fn instantiate_with_code(c: u32, s: u32, ) -> Weight { Weight::from_ref_time(288_487_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(124_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(124_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(6 as RefTimeWeight)) } @@ -238,7 +238,7 @@ impl WeightInfo for SubstrateWeight { fn instantiate(s: u32, ) -> Weight { Weight::from_ref_time(186_136_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight)) } @@ -258,7 +258,7 @@ impl WeightInfo for SubstrateWeight { fn upload_code(c: u32, ) -> Weight { Weight::from_ref_time(51_721_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(48_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(48_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -285,7 +285,7 @@ impl WeightInfo for SubstrateWeight { fn seal_caller(r: u32, ) -> Weight { Weight::from_ref_time(206_405_000 as RefTimeWeight) // Standard Error: 112_000 - .saturating_add(Weight::from_ref_time(40_987_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(40_987_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -297,7 +297,7 @@ impl WeightInfo for SubstrateWeight { fn seal_is_contract(r: u32, ) -> Weight { Weight::from_ref_time(106_220_000 as RefTimeWeight) // Standard Error: 710_000 - .saturating_add(Weight::from_ref_time(307_648_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(307_648_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((80 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -310,7 +310,7 @@ impl WeightInfo for SubstrateWeight { fn seal_code_hash(r: u32, ) -> Weight { Weight::from_ref_time(104_498_000 as RefTimeWeight) // Standard Error: 633_000 - .saturating_add(Weight::from_ref_time(368_901_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(368_901_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((80 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -323,7 +323,7 @@ impl WeightInfo for SubstrateWeight { fn seal_own_code_hash(r: u32, ) -> Weight { Weight::from_ref_time(208_696_000 as RefTimeWeight) // Standard Error: 101_000 - .saturating_add(Weight::from_ref_time(44_445_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(44_445_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -335,7 +335,7 @@ impl WeightInfo for SubstrateWeight { fn seal_caller_is_origin(r: u32, ) -> Weight { Weight::from_ref_time(205_612_000 as RefTimeWeight) // Standard Error: 68_000 - .saturating_add(Weight::from_ref_time(17_145_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(17_145_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -347,7 +347,7 @@ impl WeightInfo for SubstrateWeight { fn seal_address(r: u32, ) -> Weight { Weight::from_ref_time(206_947_000 as RefTimeWeight) // Standard Error: 107_000 - .saturating_add(Weight::from_ref_time(40_789_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(40_789_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -359,7 +359,7 @@ impl WeightInfo for SubstrateWeight { fn seal_gas_left(r: u32, ) -> Weight { Weight::from_ref_time(208_692_000 as RefTimeWeight) // Standard Error: 109_000 - .saturating_add(Weight::from_ref_time(40_600_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(40_600_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -371,7 +371,7 @@ impl WeightInfo for SubstrateWeight { fn seal_balance(r: u32, ) -> Weight { Weight::from_ref_time(209_811_000 as RefTimeWeight) // Standard Error: 208_000 - .saturating_add(Weight::from_ref_time(116_831_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(116_831_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -383,7 +383,7 @@ impl WeightInfo for SubstrateWeight { fn seal_value_transferred(r: u32, ) -> Weight { Weight::from_ref_time(207_406_000 as RefTimeWeight) // Standard Error: 117_000 - .saturating_add(Weight::from_ref_time(40_702_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(40_702_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -395,7 +395,7 @@ impl WeightInfo for SubstrateWeight { fn seal_minimum_balance(r: u32, ) -> Weight { Weight::from_ref_time(209_260_000 as RefTimeWeight) // Standard Error: 130_000 - .saturating_add(Weight::from_ref_time(40_479_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(40_479_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -407,7 +407,7 @@ impl WeightInfo for SubstrateWeight { fn seal_block_number(r: u32, ) -> Weight { Weight::from_ref_time(206_448_000 as RefTimeWeight) // Standard Error: 95_000 - .saturating_add(Weight::from_ref_time(40_134_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(40_134_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -419,7 +419,7 @@ impl WeightInfo for SubstrateWeight { fn seal_now(r: u32, ) -> Weight { Weight::from_ref_time(206_969_000 as RefTimeWeight) // Standard Error: 116_000 - .saturating_add(Weight::from_ref_time(40_251_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(40_251_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -432,7 +432,7 @@ impl WeightInfo for SubstrateWeight { fn seal_weight_to_fee(r: u32, ) -> Weight { Weight::from_ref_time(211_611_000 as RefTimeWeight) // Standard Error: 175_000 - .saturating_add(Weight::from_ref_time(98_675_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(98_675_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -444,7 +444,7 @@ impl WeightInfo for SubstrateWeight { fn seal_gas(r: u32, ) -> Weight { Weight::from_ref_time(134_484_000 as RefTimeWeight) // Standard Error: 57_000 - .saturating_add(Weight::from_ref_time(19_329_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(19_329_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -456,7 +456,7 @@ impl WeightInfo for SubstrateWeight { fn seal_input(r: u32, ) -> Weight { Weight::from_ref_time(208_556_000 as RefTimeWeight) // Standard Error: 125_000 - .saturating_add(Weight::from_ref_time(40_328_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(40_328_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -468,7 +468,7 @@ impl WeightInfo for SubstrateWeight { fn seal_input_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(268_886_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(9_627_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(9_627_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -490,7 +490,7 @@ impl WeightInfo for SubstrateWeight { fn seal_return_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(204_258_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(183_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(183_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -504,7 +504,7 @@ impl WeightInfo for SubstrateWeight { fn seal_terminate(r: u32, ) -> Weight { Weight::from_ref_time(206_625_000 as RefTimeWeight) // Standard Error: 672_000 - .saturating_add(Weight::from_ref_time(59_377_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(59_377_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((4 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -519,7 +519,7 @@ impl WeightInfo for SubstrateWeight { fn seal_random(r: u32, ) -> Weight { Weight::from_ref_time(208_866_000 as RefTimeWeight) // Standard Error: 164_000 - .saturating_add(Weight::from_ref_time(133_438_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(133_438_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -531,7 +531,7 @@ impl WeightInfo for SubstrateWeight { fn seal_deposit_event(r: u32, ) -> Weight { Weight::from_ref_time(220_860_000 as RefTimeWeight) // Standard Error: 209_000 - .saturating_add(Weight::from_ref_time(239_951_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(239_951_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -545,9 +545,9 @@ impl WeightInfo for SubstrateWeight { fn seal_deposit_event_per_topic_and_kb(t: u32, n: u32, ) -> Weight { Weight::from_ref_time(439_782_000 as RefTimeWeight) // Standard Error: 1_643_000 - .saturating_add(Weight::from_ref_time(264_687_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(264_687_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) // Standard Error: 323_000 - .saturating_add(Weight::from_ref_time(67_636_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(67_636_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((80 as RefTimeWeight).saturating_mul(t as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -561,7 +561,7 @@ impl WeightInfo for SubstrateWeight { fn seal_debug_message(r: u32, ) -> Weight { Weight::from_ref_time(140_280_000 as RefTimeWeight) // Standard Error: 82_000 - .saturating_add(Weight::from_ref_time(32_717_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(32_717_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -570,7 +570,7 @@ impl WeightInfo for SubstrateWeight { fn seal_set_storage(r: u32, ) -> Weight { Weight::from_ref_time(161_247_000 as RefTimeWeight) // Standard Error: 883_000 - .saturating_add(Weight::from_ref_time(423_997_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(423_997_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((80 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -581,7 +581,7 @@ impl WeightInfo for SubstrateWeight { fn seal_set_storage_per_new_kb(n: u32, ) -> Weight { Weight::from_ref_time(529_247_000 as RefTimeWeight) // Standard Error: 2_745_000 - .saturating_add(Weight::from_ref_time(85_282_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(85_282_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(55 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((5 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(53 as RefTimeWeight)) @@ -592,7 +592,7 @@ impl WeightInfo for SubstrateWeight { fn seal_set_storage_per_old_kb(n: u32, ) -> Weight { Weight::from_ref_time(529_812_000 as RefTimeWeight) // Standard Error: 2_513_000 - .saturating_add(Weight::from_ref_time(74_554_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(74_554_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(55 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((5 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(53 as RefTimeWeight)) @@ -603,7 +603,7 @@ impl WeightInfo for SubstrateWeight { fn seal_clear_storage(r: u32, ) -> Weight { Weight::from_ref_time(184_803_000 as RefTimeWeight) // Standard Error: 733_000 - .saturating_add(Weight::from_ref_time(404_933_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(404_933_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((80 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) @@ -614,7 +614,7 @@ impl WeightInfo for SubstrateWeight { fn seal_clear_storage_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(500_958_000 as RefTimeWeight) // Standard Error: 2_980_000 - .saturating_add(Weight::from_ref_time(75_996_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(75_996_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(55 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((5 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(52 as RefTimeWeight)) @@ -625,7 +625,7 @@ impl WeightInfo for SubstrateWeight { fn seal_get_storage(r: u32, ) -> Weight { Weight::from_ref_time(177_682_000 as RefTimeWeight) // Standard Error: 743_000 - .saturating_add(Weight::from_ref_time(338_172_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(338_172_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((80 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -635,7 +635,7 @@ impl WeightInfo for SubstrateWeight { fn seal_get_storage_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(465_285_000 as RefTimeWeight) // Standard Error: 2_599_000 - .saturating_add(Weight::from_ref_time(155_106_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(155_106_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(55 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((5 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -645,7 +645,7 @@ impl WeightInfo for SubstrateWeight { fn seal_contains_storage(r: u32, ) -> Weight { Weight::from_ref_time(179_118_000 as RefTimeWeight) // Standard Error: 572_000 - .saturating_add(Weight::from_ref_time(311_083_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(311_083_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((80 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -655,7 +655,7 @@ impl WeightInfo for SubstrateWeight { fn seal_contains_storage_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(423_056_000 as RefTimeWeight) // Standard Error: 2_037_000 - .saturating_add(Weight::from_ref_time(69_665_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(69_665_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(54 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((5 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -665,7 +665,7 @@ impl WeightInfo for SubstrateWeight { fn seal_take_storage(r: u32, ) -> Weight { Weight::from_ref_time(188_884_000 as RefTimeWeight) // Standard Error: 761_000 - .saturating_add(Weight::from_ref_time(432_781_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(432_781_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((80 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) @@ -676,7 +676,7 @@ impl WeightInfo for SubstrateWeight { fn seal_take_storage_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(532_408_000 as RefTimeWeight) // Standard Error: 3_348_000 - .saturating_add(Weight::from_ref_time(164_943_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(164_943_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(55 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((5 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(53 as RefTimeWeight)) @@ -690,7 +690,7 @@ impl WeightInfo for SubstrateWeight { fn seal_transfer(r: u32, ) -> Weight { Weight::from_ref_time(127_181_000 as RefTimeWeight) // Standard Error: 1_495_000 - .saturating_add(Weight::from_ref_time(1_500_589_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_500_589_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((80 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) @@ -704,7 +704,7 @@ impl WeightInfo for SubstrateWeight { fn seal_call(r: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 3_803_000 - .saturating_add(Weight::from_ref_time(14_860_909_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(14_860_909_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((80 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -718,7 +718,7 @@ impl WeightInfo for SubstrateWeight { fn seal_delegate_call(r: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 6_045_000 - .saturating_add(Weight::from_ref_time(14_797_140_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(14_797_140_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((79 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -731,9 +731,9 @@ impl WeightInfo for SubstrateWeight { fn seal_call_per_transfer_clone_kb(t: u32, c: u32, ) -> Weight { Weight::from_ref_time(9_196_444_000 as RefTimeWeight) // Standard Error: 20_486_000 - .saturating_add(Weight::from_ref_time(1_458_153_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_458_153_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) // Standard Error: 8_000 - .saturating_add(Weight::from_ref_time(9_718_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(9_718_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(85 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((81 as RefTimeWeight).saturating_mul(t as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(81 as RefTimeWeight)) @@ -749,7 +749,7 @@ impl WeightInfo for SubstrateWeight { fn seal_instantiate(r: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 36_253_000 - .saturating_add(Weight::from_ref_time(21_201_529_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(21_201_529_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((320 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) @@ -766,9 +766,9 @@ impl WeightInfo for SubstrateWeight { fn seal_instantiate_per_transfer_salt_kb(t: u32, s: u32, ) -> Weight { Weight::from_ref_time(12_282_498_000 as RefTimeWeight) // Standard Error: 48_112_000 - .saturating_add(Weight::from_ref_time(720_795_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(720_795_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) // Standard Error: 22_000 - .saturating_add(Weight::from_ref_time(124_274_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(124_274_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(167 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(t as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(165 as RefTimeWeight)) @@ -782,7 +782,7 @@ impl WeightInfo for SubstrateWeight { fn seal_hash_sha2_256(r: u32, ) -> Weight { Weight::from_ref_time(203_959_000 as RefTimeWeight) // Standard Error: 142_000 - .saturating_add(Weight::from_ref_time(61_311_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(61_311_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -794,7 +794,7 @@ impl WeightInfo for SubstrateWeight { fn seal_hash_sha2_256_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(349_915_000 as RefTimeWeight) // Standard Error: 40_000 - .saturating_add(Weight::from_ref_time(320_652_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(320_652_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -806,7 +806,7 @@ impl WeightInfo for SubstrateWeight { fn seal_hash_keccak_256(r: u32, ) -> Weight { Weight::from_ref_time(209_219_000 as RefTimeWeight) // Standard Error: 157_000 - .saturating_add(Weight::from_ref_time(73_728_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(73_728_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -818,7 +818,7 @@ impl WeightInfo for SubstrateWeight { fn seal_hash_keccak_256_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(208_860_000 as RefTimeWeight) // Standard Error: 25_000 - .saturating_add(Weight::from_ref_time(245_718_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(245_718_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -830,7 +830,7 @@ impl WeightInfo for SubstrateWeight { fn seal_hash_blake2_256(r: u32, ) -> Weight { Weight::from_ref_time(206_165_000 as RefTimeWeight) // Standard Error: 138_000 - .saturating_add(Weight::from_ref_time(51_644_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(51_644_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -842,7 +842,7 @@ impl WeightInfo for SubstrateWeight { fn seal_hash_blake2_256_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(255_955_000 as RefTimeWeight) // Standard Error: 14_000 - .saturating_add(Weight::from_ref_time(95_090_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(95_090_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -854,7 +854,7 @@ impl WeightInfo for SubstrateWeight { fn seal_hash_blake2_128(r: u32, ) -> Weight { Weight::from_ref_time(208_153_000 as RefTimeWeight) // Standard Error: 140_000 - .saturating_add(Weight::from_ref_time(51_264_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(51_264_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -866,7 +866,7 @@ impl WeightInfo for SubstrateWeight { fn seal_hash_blake2_128_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(278_368_000 as RefTimeWeight) // Standard Error: 14_000 - .saturating_add(Weight::from_ref_time(95_006_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(95_006_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -878,7 +878,7 @@ impl WeightInfo for SubstrateWeight { fn seal_ecdsa_recover(r: u32, ) -> Weight { Weight::from_ref_time(331_955_000 as RefTimeWeight) // Standard Error: 1_155_000 - .saturating_add(Weight::from_ref_time(3_069_955_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(3_069_955_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -890,7 +890,7 @@ impl WeightInfo for SubstrateWeight { fn seal_ecdsa_to_eth_address(r: u32, ) -> Weight { Weight::from_ref_time(207_838_000 as RefTimeWeight) // Standard Error: 783_000 - .saturating_add(Weight::from_ref_time(2_058_503_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_058_503_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -903,7 +903,7 @@ impl WeightInfo for SubstrateWeight { fn seal_set_code_hash(r: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_567_000 - .saturating_add(Weight::from_ref_time(774_380_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(774_380_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((79 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes((79 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) } @@ -911,307 +911,307 @@ impl WeightInfo for SubstrateWeight { fn instr_i64const(r: u32, ) -> Weight { Weight::from_ref_time(73_955_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(612_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(612_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64load(r: u32, ) -> Weight { Weight::from_ref_time(74_057_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(1_324_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_324_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64store(r: u32, ) -> Weight { Weight::from_ref_time(74_137_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(1_427_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_427_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_select(r: u32, ) -> Weight { Weight::from_ref_time(73_844_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_773_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_773_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_if(r: u32, ) -> Weight { Weight::from_ref_time(73_979_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(1_952_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_952_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_br(r: u32, ) -> Weight { Weight::from_ref_time(73_924_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(941_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(941_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_br_if(r: u32, ) -> Weight { Weight::from_ref_time(73_574_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(1_439_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_439_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_br_table(r: u32, ) -> Weight { Weight::from_ref_time(73_343_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(1_603_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_603_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `e` is `[1, 256]`. fn instr_br_table_per_entry(e: u32, ) -> Weight { Weight::from_ref_time(76_267_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(4_000 as RefTimeWeight).scalar_saturating_mul(e as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(4_000 as RefTimeWeight).saturating_mul(e as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_call(r: u32, ) -> Weight { Weight::from_ref_time(74_877_000 as RefTimeWeight) // Standard Error: 12_000 - .saturating_add(Weight::from_ref_time(7_144_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(7_144_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_call_indirect(r: u32, ) -> Weight { Weight::from_ref_time(88_665_000 as RefTimeWeight) // Standard Error: 20_000 - .saturating_add(Weight::from_ref_time(9_142_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(9_142_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `p` is `[0, 128]`. fn instr_call_indirect_per_param(p: u32, ) -> Weight { Weight::from_ref_time(98_600_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(469_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(469_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_local_get(r: u32, ) -> Weight { Weight::from_ref_time(74_555_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(624_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(624_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_local_set(r: u32, ) -> Weight { Weight::from_ref_time(74_329_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(688_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(688_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_local_tee(r: u32, ) -> Weight { Weight::from_ref_time(74_612_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(909_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(909_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_global_get(r: u32, ) -> Weight { Weight::from_ref_time(76_906_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_192_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_192_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_global_set(r: u32, ) -> Weight { Weight::from_ref_time(76_979_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_361_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_361_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_memory_current(r: u32, ) -> Weight { Weight::from_ref_time(74_370_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(661_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(661_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 1]`. fn instr_memory_grow(r: u32, ) -> Weight { Weight::from_ref_time(73_584_000 as RefTimeWeight) // Standard Error: 353_000 - .saturating_add(Weight::from_ref_time(187_114_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(187_114_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64clz(r: u32, ) -> Weight { Weight::from_ref_time(74_206_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(884_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(884_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64ctz(r: u32, ) -> Weight { Weight::from_ref_time(73_992_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(893_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(893_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64popcnt(r: u32, ) -> Weight { Weight::from_ref_time(73_985_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(891_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(891_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64eqz(r: u32, ) -> Weight { Weight::from_ref_time(74_117_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(901_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(901_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64extendsi32(r: u32, ) -> Weight { Weight::from_ref_time(73_981_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(866_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(866_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64extendui32(r: u32, ) -> Weight { Weight::from_ref_time(74_104_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(868_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(868_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i32wrapi64(r: u32, ) -> Weight { Weight::from_ref_time(74_293_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(878_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(878_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64eq(r: u32, ) -> Weight { Weight::from_ref_time(74_055_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_350_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_350_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64ne(r: u32, ) -> Weight { Weight::from_ref_time(73_710_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_360_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_360_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64lts(r: u32, ) -> Weight { Weight::from_ref_time(73_917_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_355_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_355_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64ltu(r: u32, ) -> Weight { Weight::from_ref_time(74_048_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_360_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_360_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64gts(r: u32, ) -> Weight { Weight::from_ref_time(74_029_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_349_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_349_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64gtu(r: u32, ) -> Weight { Weight::from_ref_time(74_267_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_353_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_353_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64les(r: u32, ) -> Weight { Weight::from_ref_time(73_952_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_350_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_350_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64leu(r: u32, ) -> Weight { Weight::from_ref_time(73_851_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_368_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_368_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64ges(r: u32, ) -> Weight { Weight::from_ref_time(74_034_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_348_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_348_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64geu(r: u32, ) -> Weight { Weight::from_ref_time(73_979_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(1_353_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_353_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64add(r: u32, ) -> Weight { Weight::from_ref_time(74_000_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_328_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_328_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64sub(r: u32, ) -> Weight { Weight::from_ref_time(73_883_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_331_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_331_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64mul(r: u32, ) -> Weight { Weight::from_ref_time(74_216_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(1_324_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_324_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64divs(r: u32, ) -> Weight { Weight::from_ref_time(73_989_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_998_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_998_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64divu(r: u32, ) -> Weight { Weight::from_ref_time(73_857_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(2_073_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_073_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64rems(r: u32, ) -> Weight { Weight::from_ref_time(73_801_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(2_027_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_027_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64remu(r: u32, ) -> Weight { Weight::from_ref_time(74_130_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(2_064_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_064_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64and(r: u32, ) -> Weight { Weight::from_ref_time(74_071_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_327_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_327_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64or(r: u32, ) -> Weight { Weight::from_ref_time(74_201_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(1_330_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_330_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64xor(r: u32, ) -> Weight { Weight::from_ref_time(74_241_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_321_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_321_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64shl(r: u32, ) -> Weight { Weight::from_ref_time(74_331_000 as RefTimeWeight) // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(1_347_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_347_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64shrs(r: u32, ) -> Weight { Weight::from_ref_time(73_674_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_359_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_359_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64shru(r: u32, ) -> Weight { Weight::from_ref_time(73_807_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_358_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_358_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64rotl(r: u32, ) -> Weight { Weight::from_ref_time(73_725_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_358_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_358_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64rotr(r: u32, ) -> Weight { Weight::from_ref_time(73_755_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(1_360_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_360_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } } @@ -1227,7 +1227,7 @@ impl WeightInfo for () { fn on_initialize_per_trie_key(k: u32, ) -> Weight { Weight::from_ref_time(8_564_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(868_000 as RefTimeWeight).scalar_saturating_mul(k as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(868_000 as RefTimeWeight).saturating_mul(k as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes((1 as RefTimeWeight).saturating_mul(k as RefTimeWeight))) @@ -1237,7 +1237,7 @@ impl WeightInfo for () { fn on_initialize_per_queue_item(q: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(1_944_000 as RefTimeWeight).scalar_saturating_mul(q as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_944_000 as RefTimeWeight).saturating_mul(q as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1247,7 +1247,7 @@ impl WeightInfo for () { fn reinstrument(c: u32, ) -> Weight { Weight::from_ref_time(19_016_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(49_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(49_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1259,7 +1259,7 @@ impl WeightInfo for () { fn call_with_code_per_byte(c: u32, ) -> Weight { Weight::from_ref_time(205_194_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(53_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(53_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -1275,9 +1275,9 @@ impl WeightInfo for () { fn instantiate_with_code(c: u32, s: u32, ) -> Weight { Weight::from_ref_time(288_487_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(124_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(124_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(6 as RefTimeWeight)) } @@ -1291,7 +1291,7 @@ impl WeightInfo for () { fn instantiate(s: u32, ) -> Weight { Weight::from_ref_time(186_136_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(6 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(5 as RefTimeWeight)) } @@ -1311,7 +1311,7 @@ impl WeightInfo for () { fn upload_code(c: u32, ) -> Weight { Weight::from_ref_time(51_721_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(48_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(48_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -1338,7 +1338,7 @@ impl WeightInfo for () { fn seal_caller(r: u32, ) -> Weight { Weight::from_ref_time(206_405_000 as RefTimeWeight) // Standard Error: 112_000 - .saturating_add(Weight::from_ref_time(40_987_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(40_987_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1350,7 +1350,7 @@ impl WeightInfo for () { fn seal_is_contract(r: u32, ) -> Weight { Weight::from_ref_time(106_220_000 as RefTimeWeight) // Standard Error: 710_000 - .saturating_add(Weight::from_ref_time(307_648_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(307_648_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((80 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) @@ -1363,7 +1363,7 @@ impl WeightInfo for () { fn seal_code_hash(r: u32, ) -> Weight { Weight::from_ref_time(104_498_000 as RefTimeWeight) // Standard Error: 633_000 - .saturating_add(Weight::from_ref_time(368_901_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(368_901_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((80 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) @@ -1376,7 +1376,7 @@ impl WeightInfo for () { fn seal_own_code_hash(r: u32, ) -> Weight { Weight::from_ref_time(208_696_000 as RefTimeWeight) // Standard Error: 101_000 - .saturating_add(Weight::from_ref_time(44_445_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(44_445_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1388,7 +1388,7 @@ impl WeightInfo for () { fn seal_caller_is_origin(r: u32, ) -> Weight { Weight::from_ref_time(205_612_000 as RefTimeWeight) // Standard Error: 68_000 - .saturating_add(Weight::from_ref_time(17_145_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(17_145_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1400,7 +1400,7 @@ impl WeightInfo for () { fn seal_address(r: u32, ) -> Weight { Weight::from_ref_time(206_947_000 as RefTimeWeight) // Standard Error: 107_000 - .saturating_add(Weight::from_ref_time(40_789_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(40_789_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1412,7 +1412,7 @@ impl WeightInfo for () { fn seal_gas_left(r: u32, ) -> Weight { Weight::from_ref_time(208_692_000 as RefTimeWeight) // Standard Error: 109_000 - .saturating_add(Weight::from_ref_time(40_600_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(40_600_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1424,7 +1424,7 @@ impl WeightInfo for () { fn seal_balance(r: u32, ) -> Weight { Weight::from_ref_time(209_811_000 as RefTimeWeight) // Standard Error: 208_000 - .saturating_add(Weight::from_ref_time(116_831_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(116_831_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1436,7 +1436,7 @@ impl WeightInfo for () { fn seal_value_transferred(r: u32, ) -> Weight { Weight::from_ref_time(207_406_000 as RefTimeWeight) // Standard Error: 117_000 - .saturating_add(Weight::from_ref_time(40_702_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(40_702_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1448,7 +1448,7 @@ impl WeightInfo for () { fn seal_minimum_balance(r: u32, ) -> Weight { Weight::from_ref_time(209_260_000 as RefTimeWeight) // Standard Error: 130_000 - .saturating_add(Weight::from_ref_time(40_479_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(40_479_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1460,7 +1460,7 @@ impl WeightInfo for () { fn seal_block_number(r: u32, ) -> Weight { Weight::from_ref_time(206_448_000 as RefTimeWeight) // Standard Error: 95_000 - .saturating_add(Weight::from_ref_time(40_134_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(40_134_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1472,7 +1472,7 @@ impl WeightInfo for () { fn seal_now(r: u32, ) -> Weight { Weight::from_ref_time(206_969_000 as RefTimeWeight) // Standard Error: 116_000 - .saturating_add(Weight::from_ref_time(40_251_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(40_251_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1485,7 +1485,7 @@ impl WeightInfo for () { fn seal_weight_to_fee(r: u32, ) -> Weight { Weight::from_ref_time(211_611_000 as RefTimeWeight) // Standard Error: 175_000 - .saturating_add(Weight::from_ref_time(98_675_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(98_675_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1497,7 +1497,7 @@ impl WeightInfo for () { fn seal_gas(r: u32, ) -> Weight { Weight::from_ref_time(134_484_000 as RefTimeWeight) // Standard Error: 57_000 - .saturating_add(Weight::from_ref_time(19_329_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(19_329_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1509,7 +1509,7 @@ impl WeightInfo for () { fn seal_input(r: u32, ) -> Weight { Weight::from_ref_time(208_556_000 as RefTimeWeight) // Standard Error: 125_000 - .saturating_add(Weight::from_ref_time(40_328_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(40_328_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1521,7 +1521,7 @@ impl WeightInfo for () { fn seal_input_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(268_886_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(9_627_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(9_627_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1543,7 +1543,7 @@ impl WeightInfo for () { fn seal_return_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(204_258_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(183_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(183_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1557,7 +1557,7 @@ impl WeightInfo for () { fn seal_terminate(r: u32, ) -> Weight { Weight::from_ref_time(206_625_000 as RefTimeWeight) // Standard Error: 672_000 - .saturating_add(Weight::from_ref_time(59_377_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(59_377_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((4 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) @@ -1572,7 +1572,7 @@ impl WeightInfo for () { fn seal_random(r: u32, ) -> Weight { Weight::from_ref_time(208_866_000 as RefTimeWeight) // Standard Error: 164_000 - .saturating_add(Weight::from_ref_time(133_438_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(133_438_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1584,7 +1584,7 @@ impl WeightInfo for () { fn seal_deposit_event(r: u32, ) -> Weight { Weight::from_ref_time(220_860_000 as RefTimeWeight) // Standard Error: 209_000 - .saturating_add(Weight::from_ref_time(239_951_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(239_951_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1598,9 +1598,9 @@ impl WeightInfo for () { fn seal_deposit_event_per_topic_and_kb(t: u32, n: u32, ) -> Weight { Weight::from_ref_time(439_782_000 as RefTimeWeight) // Standard Error: 1_643_000 - .saturating_add(Weight::from_ref_time(264_687_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(264_687_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) // Standard Error: 323_000 - .saturating_add(Weight::from_ref_time(67_636_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(67_636_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((80 as RefTimeWeight).saturating_mul(t as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) @@ -1614,7 +1614,7 @@ impl WeightInfo for () { fn seal_debug_message(r: u32, ) -> Weight { Weight::from_ref_time(140_280_000 as RefTimeWeight) // Standard Error: 82_000 - .saturating_add(Weight::from_ref_time(32_717_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(32_717_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1623,7 +1623,7 @@ impl WeightInfo for () { fn seal_set_storage(r: u32, ) -> Weight { Weight::from_ref_time(161_247_000 as RefTimeWeight) // Standard Error: 883_000 - .saturating_add(Weight::from_ref_time(423_997_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(423_997_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((80 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) @@ -1634,7 +1634,7 @@ impl WeightInfo for () { fn seal_set_storage_per_new_kb(n: u32, ) -> Weight { Weight::from_ref_time(529_247_000 as RefTimeWeight) // Standard Error: 2_745_000 - .saturating_add(Weight::from_ref_time(85_282_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(85_282_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(55 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((5 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(53 as RefTimeWeight)) @@ -1645,7 +1645,7 @@ impl WeightInfo for () { fn seal_set_storage_per_old_kb(n: u32, ) -> Weight { Weight::from_ref_time(529_812_000 as RefTimeWeight) // Standard Error: 2_513_000 - .saturating_add(Weight::from_ref_time(74_554_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(74_554_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(55 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((5 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(53 as RefTimeWeight)) @@ -1656,7 +1656,7 @@ impl WeightInfo for () { fn seal_clear_storage(r: u32, ) -> Weight { Weight::from_ref_time(184_803_000 as RefTimeWeight) // Standard Error: 733_000 - .saturating_add(Weight::from_ref_time(404_933_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(404_933_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((80 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) @@ -1667,7 +1667,7 @@ impl WeightInfo for () { fn seal_clear_storage_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(500_958_000 as RefTimeWeight) // Standard Error: 2_980_000 - .saturating_add(Weight::from_ref_time(75_996_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(75_996_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(55 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((5 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(52 as RefTimeWeight)) @@ -1678,7 +1678,7 @@ impl WeightInfo for () { fn seal_get_storage(r: u32, ) -> Weight { Weight::from_ref_time(177_682_000 as RefTimeWeight) // Standard Error: 743_000 - .saturating_add(Weight::from_ref_time(338_172_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(338_172_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((80 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) @@ -1688,7 +1688,7 @@ impl WeightInfo for () { fn seal_get_storage_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(465_285_000 as RefTimeWeight) // Standard Error: 2_599_000 - .saturating_add(Weight::from_ref_time(155_106_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(155_106_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(55 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((5 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) @@ -1698,7 +1698,7 @@ impl WeightInfo for () { fn seal_contains_storage(r: u32, ) -> Weight { Weight::from_ref_time(179_118_000 as RefTimeWeight) // Standard Error: 572_000 - .saturating_add(Weight::from_ref_time(311_083_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(311_083_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((80 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) @@ -1708,7 +1708,7 @@ impl WeightInfo for () { fn seal_contains_storage_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(423_056_000 as RefTimeWeight) // Standard Error: 2_037_000 - .saturating_add(Weight::from_ref_time(69_665_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(69_665_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(54 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((5 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) @@ -1718,7 +1718,7 @@ impl WeightInfo for () { fn seal_take_storage(r: u32, ) -> Weight { Weight::from_ref_time(188_884_000 as RefTimeWeight) // Standard Error: 761_000 - .saturating_add(Weight::from_ref_time(432_781_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(432_781_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((80 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) @@ -1729,7 +1729,7 @@ impl WeightInfo for () { fn seal_take_storage_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(532_408_000 as RefTimeWeight) // Standard Error: 3_348_000 - .saturating_add(Weight::from_ref_time(164_943_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(164_943_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(55 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((5 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(53 as RefTimeWeight)) @@ -1743,7 +1743,7 @@ impl WeightInfo for () { fn seal_transfer(r: u32, ) -> Weight { Weight::from_ref_time(127_181_000 as RefTimeWeight) // Standard Error: 1_495_000 - .saturating_add(Weight::from_ref_time(1_500_589_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_500_589_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((80 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) @@ -1757,7 +1757,7 @@ impl WeightInfo for () { fn seal_call(r: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 3_803_000 - .saturating_add(Weight::from_ref_time(14_860_909_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(14_860_909_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((80 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) @@ -1771,7 +1771,7 @@ impl WeightInfo for () { fn seal_delegate_call(r: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 6_045_000 - .saturating_add(Weight::from_ref_time(14_797_140_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(14_797_140_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((79 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1784,9 +1784,9 @@ impl WeightInfo for () { fn seal_call_per_transfer_clone_kb(t: u32, c: u32, ) -> Weight { Weight::from_ref_time(9_196_444_000 as RefTimeWeight) // Standard Error: 20_486_000 - .saturating_add(Weight::from_ref_time(1_458_153_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_458_153_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) // Standard Error: 8_000 - .saturating_add(Weight::from_ref_time(9_718_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(9_718_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(85 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((81 as RefTimeWeight).saturating_mul(t as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(81 as RefTimeWeight)) @@ -1802,7 +1802,7 @@ impl WeightInfo for () { fn seal_instantiate(r: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 36_253_000 - .saturating_add(Weight::from_ref_time(21_201_529_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(21_201_529_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(6 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((320 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) @@ -1819,9 +1819,9 @@ impl WeightInfo for () { fn seal_instantiate_per_transfer_salt_kb(t: u32, s: u32, ) -> Weight { Weight::from_ref_time(12_282_498_000 as RefTimeWeight) // Standard Error: 48_112_000 - .saturating_add(Weight::from_ref_time(720_795_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(720_795_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) // Standard Error: 22_000 - .saturating_add(Weight::from_ref_time(124_274_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(124_274_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(167 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(t as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(165 as RefTimeWeight)) @@ -1835,7 +1835,7 @@ impl WeightInfo for () { fn seal_hash_sha2_256(r: u32, ) -> Weight { Weight::from_ref_time(203_959_000 as RefTimeWeight) // Standard Error: 142_000 - .saturating_add(Weight::from_ref_time(61_311_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(61_311_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1847,7 +1847,7 @@ impl WeightInfo for () { fn seal_hash_sha2_256_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(349_915_000 as RefTimeWeight) // Standard Error: 40_000 - .saturating_add(Weight::from_ref_time(320_652_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(320_652_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1859,7 +1859,7 @@ impl WeightInfo for () { fn seal_hash_keccak_256(r: u32, ) -> Weight { Weight::from_ref_time(209_219_000 as RefTimeWeight) // Standard Error: 157_000 - .saturating_add(Weight::from_ref_time(73_728_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(73_728_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1871,7 +1871,7 @@ impl WeightInfo for () { fn seal_hash_keccak_256_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(208_860_000 as RefTimeWeight) // Standard Error: 25_000 - .saturating_add(Weight::from_ref_time(245_718_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(245_718_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1883,7 +1883,7 @@ impl WeightInfo for () { fn seal_hash_blake2_256(r: u32, ) -> Weight { Weight::from_ref_time(206_165_000 as RefTimeWeight) // Standard Error: 138_000 - .saturating_add(Weight::from_ref_time(51_644_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(51_644_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1895,7 +1895,7 @@ impl WeightInfo for () { fn seal_hash_blake2_256_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(255_955_000 as RefTimeWeight) // Standard Error: 14_000 - .saturating_add(Weight::from_ref_time(95_090_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(95_090_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1907,7 +1907,7 @@ impl WeightInfo for () { fn seal_hash_blake2_128(r: u32, ) -> Weight { Weight::from_ref_time(208_153_000 as RefTimeWeight) // Standard Error: 140_000 - .saturating_add(Weight::from_ref_time(51_264_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(51_264_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1919,7 +1919,7 @@ impl WeightInfo for () { fn seal_hash_blake2_128_per_kb(n: u32, ) -> Weight { Weight::from_ref_time(278_368_000 as RefTimeWeight) // Standard Error: 14_000 - .saturating_add(Weight::from_ref_time(95_006_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(95_006_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1931,7 +1931,7 @@ impl WeightInfo for () { fn seal_ecdsa_recover(r: u32, ) -> Weight { Weight::from_ref_time(331_955_000 as RefTimeWeight) // Standard Error: 1_155_000 - .saturating_add(Weight::from_ref_time(3_069_955_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(3_069_955_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1943,7 +1943,7 @@ impl WeightInfo for () { fn seal_ecdsa_to_eth_address(r: u32, ) -> Weight { Weight::from_ref_time(207_838_000 as RefTimeWeight) // Standard Error: 783_000 - .saturating_add(Weight::from_ref_time(2_058_503_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_058_503_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -1956,7 +1956,7 @@ impl WeightInfo for () { fn seal_set_code_hash(r: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_567_000 - .saturating_add(Weight::from_ref_time(774_380_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(774_380_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((79 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes((79 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) } @@ -1964,306 +1964,306 @@ impl WeightInfo for () { fn instr_i64const(r: u32, ) -> Weight { Weight::from_ref_time(73_955_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(612_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(612_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64load(r: u32, ) -> Weight { Weight::from_ref_time(74_057_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(1_324_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_324_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64store(r: u32, ) -> Weight { Weight::from_ref_time(74_137_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(1_427_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_427_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_select(r: u32, ) -> Weight { Weight::from_ref_time(73_844_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_773_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_773_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_if(r: u32, ) -> Weight { Weight::from_ref_time(73_979_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(1_952_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_952_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_br(r: u32, ) -> Weight { Weight::from_ref_time(73_924_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(941_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(941_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_br_if(r: u32, ) -> Weight { Weight::from_ref_time(73_574_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(1_439_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_439_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_br_table(r: u32, ) -> Weight { Weight::from_ref_time(73_343_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(1_603_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_603_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `e` is `[1, 256]`. fn instr_br_table_per_entry(e: u32, ) -> Weight { Weight::from_ref_time(76_267_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(4_000 as RefTimeWeight).scalar_saturating_mul(e as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(4_000 as RefTimeWeight).saturating_mul(e as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_call(r: u32, ) -> Weight { Weight::from_ref_time(74_877_000 as RefTimeWeight) // Standard Error: 12_000 - .saturating_add(Weight::from_ref_time(7_144_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(7_144_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_call_indirect(r: u32, ) -> Weight { Weight::from_ref_time(88_665_000 as RefTimeWeight) // Standard Error: 20_000 - .saturating_add(Weight::from_ref_time(9_142_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(9_142_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `p` is `[0, 128]`. fn instr_call_indirect_per_param(p: u32, ) -> Weight { Weight::from_ref_time(98_600_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(469_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(469_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_local_get(r: u32, ) -> Weight { Weight::from_ref_time(74_555_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(624_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(624_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_local_set(r: u32, ) -> Weight { Weight::from_ref_time(74_329_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(688_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(688_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_local_tee(r: u32, ) -> Weight { Weight::from_ref_time(74_612_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(909_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(909_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_global_get(r: u32, ) -> Weight { Weight::from_ref_time(76_906_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_192_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_192_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_global_set(r: u32, ) -> Weight { Weight::from_ref_time(76_979_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_361_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_361_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_memory_current(r: u32, ) -> Weight { Weight::from_ref_time(74_370_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(661_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(661_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 1]`. fn instr_memory_grow(r: u32, ) -> Weight { Weight::from_ref_time(73_584_000 as RefTimeWeight) // Standard Error: 353_000 - .saturating_add(Weight::from_ref_time(187_114_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(187_114_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64clz(r: u32, ) -> Weight { Weight::from_ref_time(74_206_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(884_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(884_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64ctz(r: u32, ) -> Weight { Weight::from_ref_time(73_992_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(893_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(893_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64popcnt(r: u32, ) -> Weight { Weight::from_ref_time(73_985_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(891_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(891_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64eqz(r: u32, ) -> Weight { Weight::from_ref_time(74_117_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(901_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(901_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64extendsi32(r: u32, ) -> Weight { Weight::from_ref_time(73_981_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(866_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(866_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64extendui32(r: u32, ) -> Weight { Weight::from_ref_time(74_104_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(868_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(868_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i32wrapi64(r: u32, ) -> Weight { Weight::from_ref_time(74_293_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(878_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(878_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64eq(r: u32, ) -> Weight { Weight::from_ref_time(74_055_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_350_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_350_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64ne(r: u32, ) -> Weight { Weight::from_ref_time(73_710_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_360_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_360_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64lts(r: u32, ) -> Weight { Weight::from_ref_time(73_917_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_355_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_355_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64ltu(r: u32, ) -> Weight { Weight::from_ref_time(74_048_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_360_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_360_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64gts(r: u32, ) -> Weight { Weight::from_ref_time(74_029_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_349_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_349_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64gtu(r: u32, ) -> Weight { Weight::from_ref_time(74_267_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_353_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_353_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64les(r: u32, ) -> Weight { Weight::from_ref_time(73_952_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_350_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_350_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64leu(r: u32, ) -> Weight { Weight::from_ref_time(73_851_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_368_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_368_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64ges(r: u32, ) -> Weight { Weight::from_ref_time(74_034_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_348_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_348_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64geu(r: u32, ) -> Weight { Weight::from_ref_time(73_979_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(1_353_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_353_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64add(r: u32, ) -> Weight { Weight::from_ref_time(74_000_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_328_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_328_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64sub(r: u32, ) -> Weight { Weight::from_ref_time(73_883_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_331_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_331_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64mul(r: u32, ) -> Weight { Weight::from_ref_time(74_216_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(1_324_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_324_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64divs(r: u32, ) -> Weight { Weight::from_ref_time(73_989_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_998_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_998_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64divu(r: u32, ) -> Weight { Weight::from_ref_time(73_857_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(2_073_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_073_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64rems(r: u32, ) -> Weight { Weight::from_ref_time(73_801_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(2_027_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_027_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64remu(r: u32, ) -> Weight { Weight::from_ref_time(74_130_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(2_064_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_064_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64and(r: u32, ) -> Weight { Weight::from_ref_time(74_071_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_327_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_327_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64or(r: u32, ) -> Weight { Weight::from_ref_time(74_201_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(1_330_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_330_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64xor(r: u32, ) -> Weight { Weight::from_ref_time(74_241_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_321_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_321_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64shl(r: u32, ) -> Weight { Weight::from_ref_time(74_331_000 as RefTimeWeight) // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(1_347_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_347_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64shrs(r: u32, ) -> Weight { Weight::from_ref_time(73_674_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_359_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_359_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64shru(r: u32, ) -> Weight { Weight::from_ref_time(73_807_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(1_358_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_358_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64rotl(r: u32, ) -> Weight { Weight::from_ref_time(73_725_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_358_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_358_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } /// The range of component `r` is `[0, 50]`. fn instr_i64rotr(r: u32, ) -> Weight { Weight::from_ref_time(73_755_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(1_360_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_360_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) } } diff --git a/frame/conviction-voting/src/weights.rs b/frame/conviction-voting/src/weights.rs index 10c5c975a81f1..dbc7ce06ee825 100644 --- a/frame/conviction-voting/src/weights.rs +++ b/frame/conviction-voting/src/weights.rs @@ -99,7 +99,7 @@ impl WeightInfo for SubstrateWeight { fn delegate(r: u32, ) -> Weight { Weight::from_ref_time(51_518_000 as RefTimeWeight) // Standard Error: 83_000 - .saturating_add(Weight::from_ref_time(27_235_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(27_235_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((3 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) @@ -111,7 +111,7 @@ impl WeightInfo for SubstrateWeight { fn undelegate(r: u32, ) -> Weight { Weight::from_ref_time(37_885_000 as RefTimeWeight) // Standard Error: 75_000 - .saturating_add(Weight::from_ref_time(24_395_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(24_395_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((3 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) @@ -172,7 +172,7 @@ impl WeightInfo for () { fn delegate(r: u32, ) -> Weight { Weight::from_ref_time(51_518_000 as RefTimeWeight) // Standard Error: 83_000 - .saturating_add(Weight::from_ref_time(27_235_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(27_235_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((3 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(4 as RefTimeWeight)) @@ -184,7 +184,7 @@ impl WeightInfo for () { fn undelegate(r: u32, ) -> Weight { Weight::from_ref_time(37_885_000 as RefTimeWeight) // Standard Error: 75_000 - .saturating_add(Weight::from_ref_time(24_395_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(24_395_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((3 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) diff --git a/frame/democracy/src/lib.rs b/frame/democracy/src/lib.rs index 5bbc97fa16e30..bbc5b767e97ff 100644 --- a/frame/democracy/src/lib.rs +++ b/frame/democracy/src/lib.rs @@ -1765,7 +1765,7 @@ impl Pallet { /// # fn begin_block(now: T::BlockNumber) -> Weight { let max_block_weight = T::BlockWeights::get().max_block; - let mut weight = Weight::new(); + let mut weight = Weight::zero(); let next = Self::lowest_unbaked(); let last = Self::referendum_count(); diff --git a/frame/democracy/src/weights.rs b/frame/democracy/src/weights.rs index 351ed42cca8e9..ad11526736c9c 100644 --- a/frame/democracy/src/weights.rs +++ b/frame/democracy/src/weights.rs @@ -88,7 +88,7 @@ impl WeightInfo for SubstrateWeight { fn second(s: u32, ) -> Weight { Weight::from_ref_time(30_923_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(142_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(142_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -98,7 +98,7 @@ impl WeightInfo for SubstrateWeight { fn vote_new(r: u32, ) -> Weight { Weight::from_ref_time(40_345_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(140_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(140_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -108,7 +108,7 @@ impl WeightInfo for SubstrateWeight { fn vote_existing(r: u32, ) -> Weight { Weight::from_ref_time(39_853_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(150_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(150_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -128,7 +128,7 @@ impl WeightInfo for SubstrateWeight { fn blacklist(p: u32, ) -> Weight { Weight::from_ref_time(57_708_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(192_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(192_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(6 as RefTimeWeight)) } @@ -137,7 +137,7 @@ impl WeightInfo for SubstrateWeight { fn external_propose(v: u32, ) -> Weight { Weight::from_ref_time(10_714_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(33_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(33_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -164,7 +164,7 @@ impl WeightInfo for SubstrateWeight { fn veto_external(v: u32, ) -> Weight { Weight::from_ref_time(21_319_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(52_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(52_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -174,7 +174,7 @@ impl WeightInfo for SubstrateWeight { fn cancel_proposal(p: u32, ) -> Weight { Weight::from_ref_time(43_960_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(184_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(184_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -188,7 +188,7 @@ impl WeightInfo for SubstrateWeight { fn cancel_queued(r: u32, ) -> Weight { Weight::from_ref_time(24_320_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(560_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(560_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -198,7 +198,7 @@ impl WeightInfo for SubstrateWeight { fn on_initialize_base(r: u32, ) -> Weight { Weight::from_ref_time(3_428_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(3_171_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(3_171_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -212,7 +212,7 @@ impl WeightInfo for SubstrateWeight { fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { Weight::from_ref_time(7_867_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(3_177_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(3_177_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -223,7 +223,7 @@ impl WeightInfo for SubstrateWeight { fn delegate(r: u32, ) -> Weight { Weight::from_ref_time(37_902_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(4_335_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(4_335_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) @@ -234,7 +234,7 @@ impl WeightInfo for SubstrateWeight { fn undelegate(r: u32, ) -> Weight { Weight::from_ref_time(21_272_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(4_351_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(4_351_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) @@ -249,7 +249,7 @@ impl WeightInfo for SubstrateWeight { fn note_preimage(b: u32, ) -> Weight { Weight::from_ref_time(27_986_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -257,7 +257,7 @@ impl WeightInfo for SubstrateWeight { fn note_imminent_preimage(b: u32, ) -> Weight { Weight::from_ref_time(20_058_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -266,7 +266,7 @@ impl WeightInfo for SubstrateWeight { fn reap_preimage(b: u32, ) -> Weight { Weight::from_ref_time(28_619_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -276,7 +276,7 @@ impl WeightInfo for SubstrateWeight { fn unlock_remove(r: u32, ) -> Weight { Weight::from_ref_time(26_619_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -286,7 +286,7 @@ impl WeightInfo for SubstrateWeight { fn unlock_set(r: u32, ) -> Weight { Weight::from_ref_time(25_373_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(142_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(142_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -295,7 +295,7 @@ impl WeightInfo for SubstrateWeight { fn remove_vote(r: u32, ) -> Weight { Weight::from_ref_time(15_961_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(115_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(115_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -304,7 +304,7 @@ impl WeightInfo for SubstrateWeight { fn remove_other_vote(r: u32, ) -> Weight { Weight::from_ref_time(15_992_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(113_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(113_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -325,7 +325,7 @@ impl WeightInfo for () { fn second(s: u32, ) -> Weight { Weight::from_ref_time(30_923_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(142_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(142_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -335,7 +335,7 @@ impl WeightInfo for () { fn vote_new(r: u32, ) -> Weight { Weight::from_ref_time(40_345_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(140_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(140_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -345,7 +345,7 @@ impl WeightInfo for () { fn vote_existing(r: u32, ) -> Weight { Weight::from_ref_time(39_853_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(150_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(150_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -365,7 +365,7 @@ impl WeightInfo for () { fn blacklist(p: u32, ) -> Weight { Weight::from_ref_time(57_708_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(192_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(192_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(6 as RefTimeWeight)) } @@ -374,7 +374,7 @@ impl WeightInfo for () { fn external_propose(v: u32, ) -> Weight { Weight::from_ref_time(10_714_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(33_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(33_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -401,7 +401,7 @@ impl WeightInfo for () { fn veto_external(v: u32, ) -> Weight { Weight::from_ref_time(21_319_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(52_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(52_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -411,7 +411,7 @@ impl WeightInfo for () { fn cancel_proposal(p: u32, ) -> Weight { Weight::from_ref_time(43_960_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(184_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(184_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -425,7 +425,7 @@ impl WeightInfo for () { fn cancel_queued(r: u32, ) -> Weight { Weight::from_ref_time(24_320_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(560_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(560_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -435,7 +435,7 @@ impl WeightInfo for () { fn on_initialize_base(r: u32, ) -> Weight { Weight::from_ref_time(3_428_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(3_171_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(3_171_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) @@ -449,7 +449,7 @@ impl WeightInfo for () { fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { Weight::from_ref_time(7_867_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(3_177_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(3_177_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) @@ -460,7 +460,7 @@ impl WeightInfo for () { fn delegate(r: u32, ) -> Weight { Weight::from_ref_time(37_902_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(4_335_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(4_335_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(4 as RefTimeWeight)) @@ -471,7 +471,7 @@ impl WeightInfo for () { fn undelegate(r: u32, ) -> Weight { Weight::from_ref_time(21_272_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(4_351_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(4_351_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) @@ -486,7 +486,7 @@ impl WeightInfo for () { fn note_preimage(b: u32, ) -> Weight { Weight::from_ref_time(27_986_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -494,7 +494,7 @@ impl WeightInfo for () { fn note_imminent_preimage(b: u32, ) -> Weight { Weight::from_ref_time(20_058_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -503,7 +503,7 @@ impl WeightInfo for () { fn reap_preimage(b: u32, ) -> Weight { Weight::from_ref_time(28_619_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -513,7 +513,7 @@ impl WeightInfo for () { fn unlock_remove(r: u32, ) -> Weight { Weight::from_ref_time(26_619_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -523,7 +523,7 @@ impl WeightInfo for () { fn unlock_set(r: u32, ) -> Weight { Weight::from_ref_time(25_373_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(142_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(142_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -532,7 +532,7 @@ impl WeightInfo for () { fn remove_vote(r: u32, ) -> Weight { Weight::from_ref_time(15_961_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(115_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(115_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -541,7 +541,7 @@ impl WeightInfo for () { fn remove_other_vote(r: u32, ) -> Weight { Weight::from_ref_time(15_992_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(113_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(113_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } diff --git a/frame/election-provider-multi-phase/src/mock.rs b/frame/election-provider-multi-phase/src/mock.rs index 72b3ec9764079..48b76bbb98a8f 100644 --- a/frame/election-provider-multi-phase/src/mock.rs +++ b/frame/election-provider-multi-phase/src/mock.rs @@ -226,7 +226,7 @@ const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); parameter_types! { pub const ExistentialDeposit: u64 = 1; pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights - ::with_sensible_defaults(2 * frame_support::weights::constants::WEIGHT_PER_SECOND, NORMAL_DISPATCH_RATIO); + ::with_sensible_defaults(2u64 * frame_support::weights::constants::WEIGHT_PER_SECOND, NORMAL_DISPATCH_RATIO); } impl pallet_balances::Config for Runtime { diff --git a/frame/election-provider-multi-phase/src/weights.rs b/frame/election-provider-multi-phase/src/weights.rs index 7ceb4a20e042a..0e7af39badd44 100644 --- a/frame/election-provider-multi-phase/src/weights.rs +++ b/frame/election-provider-multi-phase/src/weights.rs @@ -104,9 +104,9 @@ impl WeightInfo for SubstrateWeight { fn create_snapshot_internal(v: u32, t: u32, ) -> Weight { Weight::from_ref_time(3_186_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(202_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(202_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(60_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(60_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } // Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) @@ -121,9 +121,9 @@ impl WeightInfo for SubstrateWeight { fn elect_queued(a: u32, d: u32, ) -> Weight { Weight::from_ref_time(137_653_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(640_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(640_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight)) // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(48_000 as RefTimeWeight).scalar_saturating_mul(d as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(48_000 as RefTimeWeight).saturating_mul(d as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(8 as RefTimeWeight)) } @@ -148,13 +148,13 @@ impl WeightInfo for SubstrateWeight { fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(867_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(867_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(107_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(107_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) // Standard Error: 12_000 - .saturating_add(Weight::from_ref_time(6_907_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(6_907_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight)) // Standard Error: 18_000 - .saturating_add(Weight::from_ref_time(1_427_000 as RefTimeWeight).scalar_saturating_mul(d as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_427_000 as RefTimeWeight).saturating_mul(d as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(7 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -165,13 +165,13 @@ impl WeightInfo for SubstrateWeight { fn feasibility_check(v: u32, t: u32, a: u32, d: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(844_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(844_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(150_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(150_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) // Standard Error: 8_000 - .saturating_add(Weight::from_ref_time(5_421_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(5_421_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight)) // Standard Error: 13_000 - .saturating_add(Weight::from_ref_time(1_167_000 as RefTimeWeight).scalar_saturating_mul(d as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_167_000 as RefTimeWeight).saturating_mul(d as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) } } @@ -223,9 +223,9 @@ impl WeightInfo for () { fn create_snapshot_internal(v: u32, t: u32, ) -> Weight { Weight::from_ref_time(3_186_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(202_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(202_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(60_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(60_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } // Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1) @@ -240,9 +240,9 @@ impl WeightInfo for () { fn elect_queued(a: u32, d: u32, ) -> Weight { Weight::from_ref_time(137_653_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(640_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(640_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight)) // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(48_000 as RefTimeWeight).scalar_saturating_mul(d as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(48_000 as RefTimeWeight).saturating_mul(d as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(6 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(8 as RefTimeWeight)) } @@ -267,13 +267,13 @@ impl WeightInfo for () { fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(867_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(867_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(107_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(107_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) // Standard Error: 12_000 - .saturating_add(Weight::from_ref_time(6_907_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(6_907_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight)) // Standard Error: 18_000 - .saturating_add(Weight::from_ref_time(1_427_000 as RefTimeWeight).scalar_saturating_mul(d as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_427_000 as RefTimeWeight).saturating_mul(d as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(7 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -284,13 +284,13 @@ impl WeightInfo for () { fn feasibility_check(v: u32, t: u32, a: u32, d: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(844_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(844_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(150_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(150_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) // Standard Error: 8_000 - .saturating_add(Weight::from_ref_time(5_421_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(5_421_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight)) // Standard Error: 13_000 - .saturating_add(Weight::from_ref_time(1_167_000 as RefTimeWeight).scalar_saturating_mul(d as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_167_000 as RefTimeWeight).saturating_mul(d as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) } } diff --git a/frame/election-provider-support/src/weights.rs b/frame/election-provider-support/src/weights.rs index 4f9e47b09a4da..ed7360940ba58 100644 --- a/frame/election-provider-support/src/weights.rs +++ b/frame/election-provider-support/src/weights.rs @@ -55,20 +55,20 @@ impl WeightInfo for SubstrateWeight { fn phragmen(v: u32, t: u32, d: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 667_000 - .saturating_add(Weight::from_ref_time(32_973_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(32_973_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) // Standard Error: 1_334_000 - .saturating_add(Weight::from_ref_time(1_334_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_334_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) // Standard Error: 60_644_000 - .saturating_add(Weight::from_ref_time(2_636_364_000 as RefTimeWeight).scalar_saturating_mul(d as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_636_364_000 as RefTimeWeight).saturating_mul(d as RefTimeWeight)) } fn phragmms(v: u32, t: u32, d: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 73_000 - .saturating_add(Weight::from_ref_time(21_073_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(21_073_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) // Standard Error: 146_000 - .saturating_add(Weight::from_ref_time(65_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(65_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) // Standard Error: 6_649_000 - .saturating_add(Weight::from_ref_time(1_711_424_000 as RefTimeWeight).scalar_saturating_mul(d as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_711_424_000 as RefTimeWeight).saturating_mul(d as RefTimeWeight)) } } @@ -77,19 +77,19 @@ impl WeightInfo for () { fn phragmen(v: u32, t: u32, d: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 667_000 - .saturating_add(Weight::from_ref_time(32_973_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(32_973_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) // Standard Error: 1_334_000 - .saturating_add(Weight::from_ref_time(1_334_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_334_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) // Standard Error: 60_644_000 - .saturating_add(Weight::from_ref_time(2_636_364_000 as RefTimeWeight).scalar_saturating_mul(d as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_636_364_000 as RefTimeWeight).saturating_mul(d as RefTimeWeight)) } fn phragmms(v: u32, t: u32, d: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 73_000 - .saturating_add(Weight::from_ref_time(21_073_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(21_073_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) // Standard Error: 146_000 - .saturating_add(Weight::from_ref_time(65_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(65_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) // Standard Error: 6_649_000 - .saturating_add(Weight::from_ref_time(1_711_424_000 as RefTimeWeight).scalar_saturating_mul(d as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_711_424_000 as RefTimeWeight).saturating_mul(d as RefTimeWeight)) } } diff --git a/frame/elections-phragmen/src/migrations/v5.rs b/frame/elections-phragmen/src/migrations/v5.rs index eb96d7ddf6a99..eb35c1fae0f29 100644 --- a/frame/elections-phragmen/src/migrations/v5.rs +++ b/frame/elections-phragmen/src/migrations/v5.rs @@ -8,7 +8,7 @@ use super::super::*; /// situation where they could increase their free balance but still not be able to use their funds /// because they were less than the lock. pub fn migrate(to_migrate: Vec) -> Weight { - let mut weight = Weight::new(); + let mut weight = Weight::zero(); for who in to_migrate.iter() { if let Ok(mut voter) = Voting::::try_get(who) { diff --git a/frame/elections-phragmen/src/weights.rs b/frame/elections-phragmen/src/weights.rs index 14c69bf16f7f1..051aaa793588c 100644 --- a/frame/elections-phragmen/src/weights.rs +++ b/frame/elections-phragmen/src/weights.rs @@ -72,7 +72,7 @@ impl WeightInfo for SubstrateWeight { fn vote_equal(v: u32, ) -> Weight { Weight::from_ref_time(27_011_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(214_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(214_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -85,7 +85,7 @@ impl WeightInfo for SubstrateWeight { fn vote_more(v: u32, ) -> Weight { Weight::from_ref_time(40_240_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(244_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(244_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -98,7 +98,7 @@ impl WeightInfo for SubstrateWeight { fn vote_less(v: u32, ) -> Weight { Weight::from_ref_time(40_394_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(217_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(217_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -116,7 +116,7 @@ impl WeightInfo for SubstrateWeight { fn submit_candidacy(c: u32, ) -> Weight { Weight::from_ref_time(42_217_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(50_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(50_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -125,7 +125,7 @@ impl WeightInfo for SubstrateWeight { fn renounce_candidacy_candidate(c: u32, ) -> Weight { Weight::from_ref_time(46_459_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(26_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(26_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -171,7 +171,7 @@ impl WeightInfo for SubstrateWeight { fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 76_000 - .saturating_add(Weight::from_ref_time(63_721_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(63_721_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((3 as RefTimeWeight).saturating_mul(v as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes((3 as RefTimeWeight).saturating_mul(v as RefTimeWeight))) @@ -191,9 +191,9 @@ impl WeightInfo for SubstrateWeight { fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 773_000 - .saturating_add(Weight::from_ref_time(81_534_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(81_534_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) // Standard Error: 51_000 - .saturating_add(Weight::from_ref_time(4_453_000 as RefTimeWeight).scalar_saturating_mul(e as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(4_453_000 as RefTimeWeight).saturating_mul(e as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(280 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(v as RefTimeWeight))) @@ -212,7 +212,7 @@ impl WeightInfo for () { fn vote_equal(v: u32, ) -> Weight { Weight::from_ref_time(27_011_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(214_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(214_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -225,7 +225,7 @@ impl WeightInfo for () { fn vote_more(v: u32, ) -> Weight { Weight::from_ref_time(40_240_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(244_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(244_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -238,7 +238,7 @@ impl WeightInfo for () { fn vote_less(v: u32, ) -> Weight { Weight::from_ref_time(40_394_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(217_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(217_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(5 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -256,7 +256,7 @@ impl WeightInfo for () { fn submit_candidacy(c: u32, ) -> Weight { Weight::from_ref_time(42_217_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(50_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(50_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -265,7 +265,7 @@ impl WeightInfo for () { fn renounce_candidacy_candidate(c: u32, ) -> Weight { Weight::from_ref_time(46_459_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(26_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(26_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -311,7 +311,7 @@ impl WeightInfo for () { fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 76_000 - .saturating_add(Weight::from_ref_time(63_721_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(63_721_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((3 as RefTimeWeight).saturating_mul(v as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes((3 as RefTimeWeight).saturating_mul(v as RefTimeWeight))) @@ -331,9 +331,9 @@ impl WeightInfo for () { fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 773_000 - .saturating_add(Weight::from_ref_time(81_534_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(81_534_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) // Standard Error: 51_000 - .saturating_add(Weight::from_ref_time(4_453_000 as RefTimeWeight).scalar_saturating_mul(e as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(4_453_000 as RefTimeWeight).saturating_mul(e as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(280 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(c as RefTimeWeight))) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(v as RefTimeWeight))) diff --git a/frame/examples/basic/src/weights.rs b/frame/examples/basic/src/weights.rs index e8fc44bc4b050..d27915ef1b02a 100644 --- a/frame/examples/basic/src/weights.rs +++ b/frame/examples/basic/src/weights.rs @@ -64,19 +64,19 @@ pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { fn set_dummy_benchmark(b: u32, ) -> Weight { Weight::from_ref_time(5_834_000 as RefTimeWeight) - .saturating_add(Weight::from_ref_time(24_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(24_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } fn accumulate_dummy(b: u32, ) -> Weight { Weight::from_ref_time(51_353_000 as RefTimeWeight) - .saturating_add(Weight::from_ref_time(14_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(14_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } fn sort_vector(x: u32, ) -> Weight { Weight::from_ref_time(2_569_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(4_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(4_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) } } @@ -84,18 +84,18 @@ impl WeightInfo for SubstrateWeight { impl WeightInfo for () { fn set_dummy_benchmark(b: u32, ) -> Weight { Weight::from_ref_time(5_834_000 as RefTimeWeight) - .saturating_add(Weight::from_ref_time(24_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(24_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } fn accumulate_dummy(b: u32, ) -> Weight { Weight::from_ref_time(51_353_000 as RefTimeWeight) - .saturating_add(Weight::from_ref_time(14_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(14_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } fn sort_vector(x: u32, ) -> Weight { Weight::from_ref_time(2_569_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(4_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(4_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) } } diff --git a/frame/executive/src/lib.rs b/frame/executive/src/lib.rs index d7cd1da7910a4..5d3954ded0998 100644 --- a/frame/executive/src/lib.rs +++ b/frame/executive/src/lib.rs @@ -348,7 +348,7 @@ where // This means the format of all the event related storages must always be compatible. >::reset_events(); - let mut weight = Weight::new(); + let mut weight = Weight::zero(); if Self::runtime_upgraded() { weight = weight.saturating_add(Self::execute_on_runtime_upgrade()); } @@ -1121,7 +1121,7 @@ mod tests { .base_extrinsic; assert_eq!( >::block_weight().total(), - base_block_weight + 3 * extrinsic_weight, + base_block_weight + 3u64 * extrinsic_weight, ); assert_eq!(>::all_extrinsics_len(), 3 * len); diff --git a/frame/gilt/src/weights.rs b/frame/gilt/src/weights.rs index 3d2b629e8b16b..124ee7593a778 100644 --- a/frame/gilt/src/weights.rs +++ b/frame/gilt/src/weights.rs @@ -62,7 +62,7 @@ impl WeightInfo for SubstrateWeight { fn place_bid(l: u32, ) -> Weight { Weight::from_ref_time(41_605_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(62_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(62_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -78,7 +78,7 @@ impl WeightInfo for SubstrateWeight { fn retract_bid(l: u32, ) -> Weight { Weight::from_ref_time(42_061_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(52_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(52_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -107,7 +107,7 @@ impl WeightInfo for SubstrateWeight { fn pursue_target_per_item(b: u32, ) -> Weight { Weight::from_ref_time(40_797_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(4_122_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(4_122_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(b as RefTimeWeight))) @@ -119,7 +119,7 @@ impl WeightInfo for SubstrateWeight { fn pursue_target_per_queue(q: u32, ) -> Weight { Weight::from_ref_time(14_944_000 as RefTimeWeight) // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(8_135_000 as RefTimeWeight).scalar_saturating_mul(q as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(8_135_000 as RefTimeWeight).saturating_mul(q as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(q as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) @@ -134,7 +134,7 @@ impl WeightInfo for () { fn place_bid(l: u32, ) -> Weight { Weight::from_ref_time(41_605_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(62_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(62_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -150,7 +150,7 @@ impl WeightInfo for () { fn retract_bid(l: u32, ) -> Weight { Weight::from_ref_time(42_061_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(52_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(52_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -179,7 +179,7 @@ impl WeightInfo for () { fn pursue_target_per_item(b: u32, ) -> Weight { Weight::from_ref_time(40_797_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(4_122_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(4_122_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes((1 as RefTimeWeight).saturating_mul(b as RefTimeWeight))) @@ -191,7 +191,7 @@ impl WeightInfo for () { fn pursue_target_per_queue(q: u32, ) -> Weight { Weight::from_ref_time(14_944_000 as RefTimeWeight) // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(8_135_000 as RefTimeWeight).scalar_saturating_mul(q as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(8_135_000 as RefTimeWeight).saturating_mul(q as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(q as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) diff --git a/frame/grandpa/src/default_weights.rs b/frame/grandpa/src/default_weights.rs index f21c3ddc101f7..4ca94dd576fb7 100644 --- a/frame/grandpa/src/default_weights.rs +++ b/frame/grandpa/src/default_weights.rs @@ -34,14 +34,14 @@ impl crate::WeightInfo for () { const MAX_NOMINATORS: u64 = 200; // checking membership proof - (35 * WEIGHT_PER_MICROS) - .saturating_add((175 * WEIGHT_PER_NANOS).scalar_saturating_mul(validator_count)) + (35u64 * WEIGHT_PER_MICROS) + .saturating_add((175u64 * WEIGHT_PER_NANOS).saturating_mul(validator_count)) .saturating_add(DbWeight::get().reads(5)) // check equivocation proof - .saturating_add(95 * WEIGHT_PER_MICROS) + .saturating_add(95u64 * WEIGHT_PER_MICROS) // report offence - .saturating_add(110 * WEIGHT_PER_MICROS) - .saturating_add(25 * WEIGHT_PER_MICROS * MAX_NOMINATORS) + .saturating_add(110u64 * WEIGHT_PER_MICROS) + .saturating_add(25u64 * WEIGHT_PER_MICROS * MAX_NOMINATORS) .saturating_add(DbWeight::get().reads(14 + 3 * MAX_NOMINATORS)) .saturating_add(DbWeight::get().writes(10 + 3 * MAX_NOMINATORS)) // fetching set id -> session index mappings @@ -49,6 +49,6 @@ impl crate::WeightInfo for () { } fn note_stalled() -> Weight { - (3 * WEIGHT_PER_MICROS).saturating_add(DbWeight::get().writes(1)) + (3u64 * WEIGHT_PER_MICROS).saturating_add(DbWeight::get().writes(1)) } } diff --git a/frame/identity/src/weights.rs b/frame/identity/src/weights.rs index 780abf1bb01df..1aa8d7963223e 100644 --- a/frame/identity/src/weights.rs +++ b/frame/identity/src/weights.rs @@ -71,7 +71,7 @@ impl WeightInfo for SubstrateWeight { fn add_registrar(r: u32, ) -> Weight { Weight::from_ref_time(16_649_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(241_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(241_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -81,9 +81,9 @@ impl WeightInfo for SubstrateWeight { fn set_identity(r: u32, x: u32, ) -> Weight { Weight::from_ref_time(31_322_000 as RefTimeWeight) // Standard Error: 10_000 - .saturating_add(Weight::from_ref_time(252_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(252_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(312_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(312_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -94,7 +94,7 @@ impl WeightInfo for SubstrateWeight { fn set_subs_new(s: u32, ) -> Weight { Weight::from_ref_time(30_012_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(3_005_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(3_005_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -107,7 +107,7 @@ impl WeightInfo for SubstrateWeight { fn set_subs_old(p: u32, ) -> Weight { Weight::from_ref_time(29_623_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_100_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_100_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(p as RefTimeWeight))) @@ -121,11 +121,11 @@ impl WeightInfo for SubstrateWeight { fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { Weight::from_ref_time(34_370_000 as RefTimeWeight) // Standard Error: 10_000 - .saturating_add(Weight::from_ref_time(186_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(186_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_114_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_114_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(189_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(189_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) @@ -137,9 +137,9 @@ impl WeightInfo for SubstrateWeight { fn request_judgement(r: u32, x: u32, ) -> Weight { Weight::from_ref_time(34_759_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(251_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(251_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(340_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(340_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -149,9 +149,9 @@ impl WeightInfo for SubstrateWeight { fn cancel_request(r: u32, x: u32, ) -> Weight { Weight::from_ref_time(32_254_000 as RefTimeWeight) // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(159_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(159_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(347_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(347_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -160,7 +160,7 @@ impl WeightInfo for SubstrateWeight { fn set_fee(r: u32, ) -> Weight { Weight::from_ref_time(7_858_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(190_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(190_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -169,7 +169,7 @@ impl WeightInfo for SubstrateWeight { fn set_account_id(r: u32, ) -> Weight { Weight::from_ref_time(8_011_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(187_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(187_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -178,7 +178,7 @@ impl WeightInfo for SubstrateWeight { fn set_fields(r: u32, ) -> Weight { Weight::from_ref_time(7_970_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(175_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(175_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -189,9 +189,9 @@ impl WeightInfo for SubstrateWeight { fn provide_judgement(r: u32, x: u32, ) -> Weight { Weight::from_ref_time(24_730_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(196_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(196_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(341_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(341_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -205,11 +205,11 @@ impl WeightInfo for SubstrateWeight { fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { Weight::from_ref_time(44_988_000 as RefTimeWeight) // Standard Error: 10_000 - .saturating_add(Weight::from_ref_time(201_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(201_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_126_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_126_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) @@ -221,7 +221,7 @@ impl WeightInfo for SubstrateWeight { fn add_sub(s: u32, ) -> Weight { Weight::from_ref_time(36_768_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(115_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(115_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -231,7 +231,7 @@ impl WeightInfo for SubstrateWeight { fn rename_sub(s: u32, ) -> Weight { Weight::from_ref_time(13_474_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -242,7 +242,7 @@ impl WeightInfo for SubstrateWeight { fn remove_sub(s: u32, ) -> Weight { Weight::from_ref_time(37_720_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(114_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(114_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -252,7 +252,7 @@ impl WeightInfo for SubstrateWeight { fn quit_sub(s: u32, ) -> Weight { Weight::from_ref_time(26_848_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(115_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(115_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -265,7 +265,7 @@ impl WeightInfo for () { fn add_registrar(r: u32, ) -> Weight { Weight::from_ref_time(16_649_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(241_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(241_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -275,9 +275,9 @@ impl WeightInfo for () { fn set_identity(r: u32, x: u32, ) -> Weight { Weight::from_ref_time(31_322_000 as RefTimeWeight) // Standard Error: 10_000 - .saturating_add(Weight::from_ref_time(252_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(252_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(312_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(312_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -288,7 +288,7 @@ impl WeightInfo for () { fn set_subs_new(s: u32, ) -> Weight { Weight::from_ref_time(30_012_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(3_005_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(3_005_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) @@ -301,7 +301,7 @@ impl WeightInfo for () { fn set_subs_old(p: u32, ) -> Weight { Weight::from_ref_time(29_623_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_100_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_100_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes((1 as RefTimeWeight).saturating_mul(p as RefTimeWeight))) @@ -315,11 +315,11 @@ impl WeightInfo for () { fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { Weight::from_ref_time(34_370_000 as RefTimeWeight) // Standard Error: 10_000 - .saturating_add(Weight::from_ref_time(186_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(186_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_114_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_114_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(189_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(189_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) @@ -331,9 +331,9 @@ impl WeightInfo for () { fn request_judgement(r: u32, x: u32, ) -> Weight { Weight::from_ref_time(34_759_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(251_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(251_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(340_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(340_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -343,9 +343,9 @@ impl WeightInfo for () { fn cancel_request(r: u32, x: u32, ) -> Weight { Weight::from_ref_time(32_254_000 as RefTimeWeight) // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(159_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(159_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(347_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(347_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -354,7 +354,7 @@ impl WeightInfo for () { fn set_fee(r: u32, ) -> Weight { Weight::from_ref_time(7_858_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(190_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(190_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -363,7 +363,7 @@ impl WeightInfo for () { fn set_account_id(r: u32, ) -> Weight { Weight::from_ref_time(8_011_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(187_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(187_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -372,7 +372,7 @@ impl WeightInfo for () { fn set_fields(r: u32, ) -> Weight { Weight::from_ref_time(7_970_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(175_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(175_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -383,9 +383,9 @@ impl WeightInfo for () { fn provide_judgement(r: u32, x: u32, ) -> Weight { Weight::from_ref_time(24_730_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(196_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(196_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(341_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(341_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -399,11 +399,11 @@ impl WeightInfo for () { fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { Weight::from_ref_time(44_988_000 as RefTimeWeight) // Standard Error: 10_000 - .saturating_add(Weight::from_ref_time(201_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(201_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_126_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_126_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(x as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) @@ -415,7 +415,7 @@ impl WeightInfo for () { fn add_sub(s: u32, ) -> Weight { Weight::from_ref_time(36_768_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(115_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(115_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -425,7 +425,7 @@ impl WeightInfo for () { fn rename_sub(s: u32, ) -> Weight { Weight::from_ref_time(13_474_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -436,7 +436,7 @@ impl WeightInfo for () { fn remove_sub(s: u32, ) -> Weight { Weight::from_ref_time(37_720_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(114_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(114_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -446,7 +446,7 @@ impl WeightInfo for () { fn quit_sub(s: u32, ) -> Weight { Weight::from_ref_time(26_848_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(115_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(115_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } diff --git a/frame/im-online/src/weights.rs b/frame/im-online/src/weights.rs index 09fbc55854288..acad1e1165d4c 100644 --- a/frame/im-online/src/weights.rs +++ b/frame/im-online/src/weights.rs @@ -58,9 +58,9 @@ impl WeightInfo for SubstrateWeight { fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { Weight::from_ref_time(79_225_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(41_000 as RefTimeWeight).scalar_saturating_mul(k as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(41_000 as RefTimeWeight).saturating_mul(k as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(293_000 as RefTimeWeight).scalar_saturating_mul(e as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(293_000 as RefTimeWeight).saturating_mul(e as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -76,9 +76,9 @@ impl WeightInfo for () { fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { Weight::from_ref_time(79_225_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(41_000 as RefTimeWeight).scalar_saturating_mul(k as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(41_000 as RefTimeWeight).saturating_mul(k as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(293_000 as RefTimeWeight).scalar_saturating_mul(e as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(293_000 as RefTimeWeight).saturating_mul(e as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } diff --git a/frame/lottery/src/weights.rs b/frame/lottery/src/weights.rs index f646ca02a0377..10eda18e0e24f 100644 --- a/frame/lottery/src/weights.rs +++ b/frame/lottery/src/weights.rs @@ -71,7 +71,7 @@ impl WeightInfo for SubstrateWeight { fn set_calls(n: u32, ) -> Weight { Weight::from_ref_time(12_556_000 as RefTimeWeight) // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(295_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(295_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Lottery Lottery (r:1 w:1) @@ -129,7 +129,7 @@ impl WeightInfo for () { fn set_calls(n: u32, ) -> Weight { Weight::from_ref_time(12_556_000 as RefTimeWeight) // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(295_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(295_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Lottery Lottery (r:1 w:1) diff --git a/frame/membership/src/weights.rs b/frame/membership/src/weights.rs index 54b67e5b68a8a..636f8eba64694 100644 --- a/frame/membership/src/weights.rs +++ b/frame/membership/src/weights.rs @@ -63,7 +63,7 @@ impl WeightInfo for SubstrateWeight { fn add_member(m: u32, ) -> Weight { Weight::from_ref_time(15_318_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(51_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(51_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -75,7 +75,7 @@ impl WeightInfo for SubstrateWeight { fn remove_member(m: u32, ) -> Weight { Weight::from_ref_time(18_005_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(45_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(45_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -87,7 +87,7 @@ impl WeightInfo for SubstrateWeight { fn swap_member(m: u32, ) -> Weight { Weight::from_ref_time(18_029_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(55_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(55_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -99,7 +99,7 @@ impl WeightInfo for SubstrateWeight { fn reset_member(m: u32, ) -> Weight { Weight::from_ref_time(18_105_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(158_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(158_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -111,7 +111,7 @@ impl WeightInfo for SubstrateWeight { fn change_key(m: u32, ) -> Weight { Weight::from_ref_time(18_852_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(55_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(55_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } @@ -121,7 +121,7 @@ impl WeightInfo for SubstrateWeight { fn set_prime(m: u32, ) -> Weight { Weight::from_ref_time(4_869_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(28_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(28_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -130,7 +130,7 @@ impl WeightInfo for SubstrateWeight { fn clear_prime(m: u32, ) -> Weight { Weight::from_ref_time(1_593_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } } @@ -144,7 +144,7 @@ impl WeightInfo for () { fn add_member(m: u32, ) -> Weight { Weight::from_ref_time(15_318_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(51_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(51_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -156,7 +156,7 @@ impl WeightInfo for () { fn remove_member(m: u32, ) -> Weight { Weight::from_ref_time(18_005_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(45_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(45_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -168,7 +168,7 @@ impl WeightInfo for () { fn swap_member(m: u32, ) -> Weight { Weight::from_ref_time(18_029_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(55_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(55_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -180,7 +180,7 @@ impl WeightInfo for () { fn reset_member(m: u32, ) -> Weight { Weight::from_ref_time(18_105_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(158_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(158_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -192,7 +192,7 @@ impl WeightInfo for () { fn change_key(m: u32, ) -> Weight { Weight::from_ref_time(18_852_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(55_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(55_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(4 as RefTimeWeight)) } @@ -202,7 +202,7 @@ impl WeightInfo for () { fn set_prime(m: u32, ) -> Weight { Weight::from_ref_time(4_869_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(28_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(28_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -211,7 +211,7 @@ impl WeightInfo for () { fn clear_prime(m: u32, ) -> Weight { Weight::from_ref_time(1_593_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } } diff --git a/frame/merkle-mountain-range/src/default_weights.rs b/frame/merkle-mountain-range/src/default_weights.rs index e7a4b6ab31c4a..e513e2197f1c6 100644 --- a/frame/merkle-mountain-range/src/default_weights.rs +++ b/frame/merkle-mountain-range/src/default_weights.rs @@ -28,7 +28,7 @@ impl crate::WeightInfo for () { // Reading the parent hash. let leaf_weight = DbWeight::get().reads(1); // Blake2 hash cost. - let hash_weight = 2 * WEIGHT_PER_NANOS; + let hash_weight = 2u64 * WEIGHT_PER_NANOS; // No-op hook. let hook_weight = Weight::zero(); diff --git a/frame/multisig/src/weights.rs b/frame/multisig/src/weights.rs index 0b580ec82b640..455326b71de8c 100644 --- a/frame/multisig/src/weights.rs +++ b/frame/multisig/src/weights.rs @@ -67,9 +67,9 @@ impl WeightInfo for SubstrateWeight { fn as_multi_create(s: u32, z: u32, ) -> Weight { Weight::from_ref_time(36_535_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(99_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(99_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(z as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -79,9 +79,9 @@ impl WeightInfo for SubstrateWeight { fn as_multi_create_store(s: u32, z: u32, ) -> Weight { Weight::from_ref_time(39_918_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(95_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(95_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(z as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -89,9 +89,9 @@ impl WeightInfo for SubstrateWeight { fn as_multi_approve(s: u32, z: u32, ) -> Weight { Weight::from_ref_time(25_524_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(94_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(94_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(z as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -100,9 +100,9 @@ impl WeightInfo for SubstrateWeight { fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { Weight::from_ref_time(39_923_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(91_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(91_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(z as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -112,9 +112,9 @@ impl WeightInfo for SubstrateWeight { fn as_multi_complete(s: u32, z: u32, ) -> Weight { Weight::from_ref_time(45_877_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(146_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(146_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(z as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -123,7 +123,7 @@ impl WeightInfo for SubstrateWeight { fn approve_as_multi_create(s: u32, ) -> Weight { Weight::from_ref_time(34_309_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(114_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(114_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -132,7 +132,7 @@ impl WeightInfo for SubstrateWeight { fn approve_as_multi_approve(s: u32, ) -> Weight { Weight::from_ref_time(22_848_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(114_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(114_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -142,7 +142,7 @@ impl WeightInfo for SubstrateWeight { fn approve_as_multi_complete(s: u32, ) -> Weight { Weight::from_ref_time(63_239_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(161_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(161_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -151,7 +151,7 @@ impl WeightInfo for SubstrateWeight { fn cancel_as_multi(s: u32, ) -> Weight { Weight::from_ref_time(51_254_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(118_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(118_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -167,9 +167,9 @@ impl WeightInfo for () { fn as_multi_create(s: u32, z: u32, ) -> Weight { Weight::from_ref_time(36_535_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(99_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(99_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(z as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -179,9 +179,9 @@ impl WeightInfo for () { fn as_multi_create_store(s: u32, z: u32, ) -> Weight { Weight::from_ref_time(39_918_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(95_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(95_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(z as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -189,9 +189,9 @@ impl WeightInfo for () { fn as_multi_approve(s: u32, z: u32, ) -> Weight { Weight::from_ref_time(25_524_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(94_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(94_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(z as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -200,9 +200,9 @@ impl WeightInfo for () { fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { Weight::from_ref_time(39_923_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(91_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(91_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(z as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -212,9 +212,9 @@ impl WeightInfo for () { fn as_multi_complete(s: u32, z: u32, ) -> Weight { Weight::from_ref_time(45_877_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(146_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(146_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(z as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -223,7 +223,7 @@ impl WeightInfo for () { fn approve_as_multi_create(s: u32, ) -> Weight { Weight::from_ref_time(34_309_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(114_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(114_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -232,7 +232,7 @@ impl WeightInfo for () { fn approve_as_multi_approve(s: u32, ) -> Weight { Weight::from_ref_time(22_848_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(114_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(114_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -242,7 +242,7 @@ impl WeightInfo for () { fn approve_as_multi_complete(s: u32, ) -> Weight { Weight::from_ref_time(63_239_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(161_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(161_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -251,7 +251,7 @@ impl WeightInfo for () { fn cancel_as_multi(s: u32, ) -> Weight { Weight::from_ref_time(51_254_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(118_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(118_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } diff --git a/frame/nomination-pools/src/weights.rs b/frame/nomination-pools/src/weights.rs index 1f0d2ce8cddc4..f24aeb6a0ee0d 100644 --- a/frame/nomination-pools/src/weights.rs +++ b/frame/nomination-pools/src/weights.rs @@ -148,7 +148,7 @@ impl WeightInfo for SubstrateWeight { fn pool_withdraw_unbonded(s: u32, ) -> Weight { Weight::from_ref_time(41_928_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(52_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(52_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -164,7 +164,7 @@ impl WeightInfo for SubstrateWeight { fn withdraw_unbonded_update(s: u32, ) -> Weight { Weight::from_ref_time(81_611_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(8 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(7 as RefTimeWeight)) } @@ -236,7 +236,7 @@ impl WeightInfo for SubstrateWeight { fn nominate(n: u32, ) -> Weight { Weight::from_ref_time(48_829_000 as RefTimeWeight) // Standard Error: 10_000 - .saturating_add(Weight::from_ref_time(2_204_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_204_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(12 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight)) @@ -255,7 +255,7 @@ impl WeightInfo for SubstrateWeight { fn set_metadata(n: u32, ) -> Weight { Weight::from_ref_time(14_519_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -373,7 +373,7 @@ impl WeightInfo for () { fn pool_withdraw_unbonded(s: u32, ) -> Weight { Weight::from_ref_time(41_928_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(52_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(52_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -389,7 +389,7 @@ impl WeightInfo for () { fn withdraw_unbonded_update(s: u32, ) -> Weight { Weight::from_ref_time(81_611_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(8 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(7 as RefTimeWeight)) } @@ -461,7 +461,7 @@ impl WeightInfo for () { fn nominate(n: u32, ) -> Weight { Weight::from_ref_time(48_829_000 as RefTimeWeight) // Standard Error: 10_000 - .saturating_add(Weight::from_ref_time(2_204_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_204_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(12 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(5 as RefTimeWeight)) @@ -480,7 +480,7 @@ impl WeightInfo for () { fn set_metadata(n: u32, ) -> Weight { Weight::from_ref_time(14_519_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } diff --git a/frame/offences/benchmarking/src/mock.rs b/frame/offences/benchmarking/src/mock.rs index 312bc4e18f413..6d66f5251c78c 100644 --- a/frame/offences/benchmarking/src/mock.rs +++ b/frame/offences/benchmarking/src/mock.rs @@ -41,7 +41,7 @@ type Balance = u64; parameter_types! { pub BlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights::simple_max( - 2 * WEIGHT_PER_SECOND + 2u64 * WEIGHT_PER_SECOND ); } diff --git a/frame/offences/src/mock.rs b/frame/offences/src/mock.rs index d9ecf44ad8734..a578a6082cf3e 100644 --- a/frame/offences/src/mock.rs +++ b/frame/offences/src/mock.rs @@ -86,7 +86,7 @@ frame_support::construct_runtime!( parameter_types! { pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(2 * WEIGHT_PER_SECOND); + frame_system::limits::BlockWeights::simple_max(2u64 * WEIGHT_PER_SECOND); } impl frame_system::Config for Runtime { type BaseCallFilter = frame_support::traits::Everything; diff --git a/frame/preimage/src/weights.rs b/frame/preimage/src/weights.rs index 183b704ec705d..0d93611a1f097 100644 --- a/frame/preimage/src/weights.rs +++ b/frame/preimage/src/weights.rs @@ -66,7 +66,7 @@ impl WeightInfo for SubstrateWeight { fn note_preimage(s: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -75,7 +75,7 @@ impl WeightInfo for SubstrateWeight { fn note_requested_preimage(s: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -84,7 +84,7 @@ impl WeightInfo for SubstrateWeight { fn note_no_deposit_preimage(s: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -155,7 +155,7 @@ impl WeightInfo for () { fn note_preimage(s: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -164,7 +164,7 @@ impl WeightInfo for () { fn note_requested_preimage(s: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -173,7 +173,7 @@ impl WeightInfo for () { fn note_no_deposit_preimage(s: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } diff --git a/frame/proxy/src/weights.rs b/frame/proxy/src/weights.rs index 119df271e0d55..5b332d98db09b 100644 --- a/frame/proxy/src/weights.rs +++ b/frame/proxy/src/weights.rs @@ -63,7 +63,7 @@ impl WeightInfo for SubstrateWeight { fn proxy(p: u32, ) -> Weight { Weight::from_ref_time(17_768_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(76_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(76_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:0) @@ -72,9 +72,9 @@ impl WeightInfo for SubstrateWeight { fn proxy_announced(a: u32, p: u32, ) -> Weight { Weight::from_ref_time(35_682_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(158_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(158_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(73_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(73_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -83,9 +83,9 @@ impl WeightInfo for SubstrateWeight { fn remove_announcement(a: u32, p: u32, ) -> Weight { Weight::from_ref_time(25_586_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(175_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(175_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(18_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(18_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -94,9 +94,9 @@ impl WeightInfo for SubstrateWeight { fn reject_announcement(a: u32, p: u32, ) -> Weight { Weight::from_ref_time(25_794_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(173_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(173_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(13_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(13_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -106,9 +106,9 @@ impl WeightInfo for SubstrateWeight { fn announce(a: u32, p: u32, ) -> Weight { Weight::from_ref_time(33_002_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(163_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(163_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(79_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(79_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -116,7 +116,7 @@ impl WeightInfo for SubstrateWeight { fn add_proxy(p: u32, ) -> Weight { Weight::from_ref_time(28_166_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(105_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(105_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -124,7 +124,7 @@ impl WeightInfo for SubstrateWeight { fn remove_proxy(p: u32, ) -> Weight { Weight::from_ref_time(28_128_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(118_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(118_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -132,7 +132,7 @@ impl WeightInfo for SubstrateWeight { fn remove_proxies(p: u32, ) -> Weight { Weight::from_ref_time(24_066_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(81_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(81_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -141,7 +141,7 @@ impl WeightInfo for SubstrateWeight { fn anonymous(p: u32, ) -> Weight { Weight::from_ref_time(31_077_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(37_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(37_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -149,7 +149,7 @@ impl WeightInfo for SubstrateWeight { fn kill_anonymous(p: u32, ) -> Weight { Weight::from_ref_time(24_657_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(87_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(87_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -161,7 +161,7 @@ impl WeightInfo for () { fn proxy(p: u32, ) -> Weight { Weight::from_ref_time(17_768_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(76_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(76_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) } // Storage: Proxy Proxies (r:1 w:0) @@ -170,9 +170,9 @@ impl WeightInfo for () { fn proxy_announced(a: u32, p: u32, ) -> Weight { Weight::from_ref_time(35_682_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(158_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(158_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(73_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(73_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -181,9 +181,9 @@ impl WeightInfo for () { fn remove_announcement(a: u32, p: u32, ) -> Weight { Weight::from_ref_time(25_586_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(175_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(175_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(18_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(18_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -192,9 +192,9 @@ impl WeightInfo for () { fn reject_announcement(a: u32, p: u32, ) -> Weight { Weight::from_ref_time(25_794_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(173_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(173_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight)) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(13_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(13_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -204,9 +204,9 @@ impl WeightInfo for () { fn announce(a: u32, p: u32, ) -> Weight { Weight::from_ref_time(33_002_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(163_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(163_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(79_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(79_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -214,7 +214,7 @@ impl WeightInfo for () { fn add_proxy(p: u32, ) -> Weight { Weight::from_ref_time(28_166_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(105_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(105_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -222,7 +222,7 @@ impl WeightInfo for () { fn remove_proxy(p: u32, ) -> Weight { Weight::from_ref_time(28_128_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(118_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(118_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -230,7 +230,7 @@ impl WeightInfo for () { fn remove_proxies(p: u32, ) -> Weight { Weight::from_ref_time(24_066_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(81_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(81_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -239,7 +239,7 @@ impl WeightInfo for () { fn anonymous(p: u32, ) -> Weight { Weight::from_ref_time(31_077_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(37_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(37_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -247,7 +247,7 @@ impl WeightInfo for () { fn kill_anonymous(p: u32, ) -> Weight { Weight::from_ref_time(24_657_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(87_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(87_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } diff --git a/frame/ranked-collective/src/weights.rs b/frame/ranked-collective/src/weights.rs index a0309daea2263..052a9bfdcc9e1 100644 --- a/frame/ranked-collective/src/weights.rs +++ b/frame/ranked-collective/src/weights.rs @@ -72,7 +72,7 @@ impl WeightInfo for SubstrateWeight { fn remove_member(r: u32, ) -> Weight { Weight::from_ref_time(16_855_000 as RefTimeWeight) // Standard Error: 27_000 - .saturating_add(Weight::from_ref_time(8_107_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(8_107_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((3 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) @@ -85,7 +85,7 @@ impl WeightInfo for SubstrateWeight { fn promote_member(r: u32, ) -> Weight { Weight::from_ref_time(11_936_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(9_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(9_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } @@ -96,7 +96,7 @@ impl WeightInfo for SubstrateWeight { fn demote_member(r: u32, ) -> Weight { Weight::from_ref_time(17_582_000 as RefTimeWeight) // Standard Error: 14_000 - .saturating_add(Weight::from_ref_time(142_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(142_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } @@ -114,7 +114,7 @@ impl WeightInfo for SubstrateWeight { fn cleanup_poll(n: u32, ) -> Weight { Weight::from_ref_time(6_188_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(867_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(867_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) } @@ -138,7 +138,7 @@ impl WeightInfo for () { fn remove_member(r: u32, ) -> Weight { Weight::from_ref_time(16_855_000 as RefTimeWeight) // Standard Error: 27_000 - .saturating_add(Weight::from_ref_time(8_107_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(8_107_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((3 as RefTimeWeight).saturating_mul(r as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(4 as RefTimeWeight)) @@ -151,7 +151,7 @@ impl WeightInfo for () { fn promote_member(r: u32, ) -> Weight { Weight::from_ref_time(11_936_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(9_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(9_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(4 as RefTimeWeight)) } @@ -162,7 +162,7 @@ impl WeightInfo for () { fn demote_member(r: u32, ) -> Weight { Weight::from_ref_time(17_582_000 as RefTimeWeight) // Standard Error: 14_000 - .saturating_add(Weight::from_ref_time(142_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(142_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(4 as RefTimeWeight)) } @@ -180,7 +180,7 @@ impl WeightInfo for () { fn cleanup_poll(n: u32, ) -> Weight { Weight::from_ref_time(6_188_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(867_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(867_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes((1 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) } diff --git a/frame/recovery/src/weights.rs b/frame/recovery/src/weights.rs index 8b82454d5849d..06a4759938964 100644 --- a/frame/recovery/src/weights.rs +++ b/frame/recovery/src/weights.rs @@ -72,7 +72,7 @@ impl WeightInfo for SubstrateWeight { fn create_recovery(n: u32, ) -> Weight { Weight::from_ref_time(28_217_000 as RefTimeWeight) // Standard Error: 13_000 - .saturating_add(Weight::from_ref_time(172_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(172_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -88,7 +88,7 @@ impl WeightInfo for SubstrateWeight { fn vouch_recovery(n: u32, ) -> Weight { Weight::from_ref_time(22_038_000 as RefTimeWeight) // Standard Error: 19_000 - .saturating_add(Weight::from_ref_time(307_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(307_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -98,7 +98,7 @@ impl WeightInfo for SubstrateWeight { fn claim_recovery(n: u32, ) -> Weight { Weight::from_ref_time(28_621_000 as RefTimeWeight) // Standard Error: 13_000 - .saturating_add(Weight::from_ref_time(353_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(353_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -107,7 +107,7 @@ impl WeightInfo for SubstrateWeight { fn close_recovery(n: u32, ) -> Weight { Weight::from_ref_time(33_287_000 as RefTimeWeight) // Standard Error: 19_000 - .saturating_add(Weight::from_ref_time(264_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(264_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -116,7 +116,7 @@ impl WeightInfo for SubstrateWeight { fn remove_recovery(n: u32, ) -> Weight { Weight::from_ref_time(31_964_000 as RefTimeWeight) // Standard Error: 13_000 - .saturating_add(Weight::from_ref_time(222_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(222_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -144,7 +144,7 @@ impl WeightInfo for () { fn create_recovery(n: u32, ) -> Weight { Weight::from_ref_time(28_217_000 as RefTimeWeight) // Standard Error: 13_000 - .saturating_add(Weight::from_ref_time(172_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(172_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -160,7 +160,7 @@ impl WeightInfo for () { fn vouch_recovery(n: u32, ) -> Weight { Weight::from_ref_time(22_038_000 as RefTimeWeight) // Standard Error: 19_000 - .saturating_add(Weight::from_ref_time(307_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(307_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -170,7 +170,7 @@ impl WeightInfo for () { fn claim_recovery(n: u32, ) -> Weight { Weight::from_ref_time(28_621_000 as RefTimeWeight) // Standard Error: 13_000 - .saturating_add(Weight::from_ref_time(353_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(353_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -179,7 +179,7 @@ impl WeightInfo for () { fn close_recovery(n: u32, ) -> Weight { Weight::from_ref_time(33_287_000 as RefTimeWeight) // Standard Error: 19_000 - .saturating_add(Weight::from_ref_time(264_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(264_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -188,7 +188,7 @@ impl WeightInfo for () { fn remove_recovery(n: u32, ) -> Weight { Weight::from_ref_time(31_964_000 as RefTimeWeight) // Standard Error: 13_000 - .saturating_add(Weight::from_ref_time(222_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(222_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } diff --git a/frame/referenda/src/branch.rs b/frame/referenda/src/branch.rs index 172b5af999df5..d3744979fc547 100644 --- a/frame/referenda/src/branch.rs +++ b/frame/referenda/src/branch.rs @@ -83,7 +83,7 @@ impl ServiceBranch { /// Return the maximum possible weight of the `nudge` function. pub fn max_weight_of_nudge, I: 'static>() -> frame_support::weights::Weight { - Weight::new() + Weight::zero() .max(T::WeightInfo::nudge_referendum_no_deposit()) .max(T::WeightInfo::nudge_referendum_preparing()) .max(T::WeightInfo::nudge_referendum_queued()) @@ -131,7 +131,7 @@ impl ServiceBranch { /// Return the maximum possible weight of the `place_decision_deposit` function. pub fn max_weight_of_deposit, I: 'static>() -> frame_support::weights::Weight { - Weight::new() + Weight::zero() .max(T::WeightInfo::place_decision_deposit_preparing()) .max(T::WeightInfo::place_decision_deposit_queued()) .max(T::WeightInfo::place_decision_deposit_not_queued()) @@ -172,7 +172,7 @@ impl OneFewerDecidingBranch { /// Return the maximum possible weight of the `one_fewer_deciding` function. pub fn max_weight, I: 'static>() -> frame_support::weights::Weight { - Weight::new() + Weight::zero() .max(T::WeightInfo::one_fewer_deciding_queue_empty()) .max(T::WeightInfo::one_fewer_deciding_passing()) .max(T::WeightInfo::one_fewer_deciding_failing()) diff --git a/frame/remark/src/weights.rs b/frame/remark/src/weights.rs index a098670ccf100..f33ef47cd67e8 100644 --- a/frame/remark/src/weights.rs +++ b/frame/remark/src/weights.rs @@ -54,7 +54,7 @@ impl WeightInfo for SubstrateWeight { fn store(l: u32, ) -> Weight { Weight::from_ref_time(13_140_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) } } @@ -65,7 +65,7 @@ impl WeightInfo for () { fn store(l: u32, ) -> Weight { Weight::from_ref_time(13_140_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) } } diff --git a/frame/scheduler/src/tests.rs b/frame/scheduler/src/tests.rs index 56f9298dd4b0c..999a810d3b7c1 100644 --- a/frame/scheduler/src/tests.rs +++ b/frame/scheduler/src/tests.rs @@ -460,7 +460,7 @@ fn scheduler_respects_priority_ordering_with_soft_deadlines() { root(), Call::Logger(LoggerCall::log { i: 2600, - weight: max_weight / 2 - item_weight + Weight::one() + weight: max_weight / 2 - item_weight + Weight::from_ref_time(1) }) .into(), )); @@ -487,7 +487,8 @@ fn on_initialize_weight_is_correct() { None, 255, root(), - Call::Logger(LoggerCall::log { i: 3, weight: call_weight + Weight::one() }).into(), + Call::Logger(LoggerCall::log { i: 3, weight: call_weight + Weight::from_ref_time(1) }) + .into(), )); // Anon Periodic assert_ok!(Scheduler::do_schedule( diff --git a/frame/scheduler/src/weights.rs b/frame/scheduler/src/weights.rs index f201c89eaf278..9688c9f1a2f9f 100644 --- a/frame/scheduler/src/weights.rs +++ b/frame/scheduler/src/weights.rs @@ -70,7 +70,7 @@ impl WeightInfo for SubstrateWeight { fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight { Weight::from_ref_time(9_994_000 as RefTimeWeight) // Standard Error: 20_000 - .saturating_add(Weight::from_ref_time(19_843_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(19_843_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((3 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -83,7 +83,7 @@ impl WeightInfo for SubstrateWeight { fn on_initialize_named_resolved(s: u32, ) -> Weight { Weight::from_ref_time(10_318_000 as RefTimeWeight) // Standard Error: 17_000 - .saturating_add(Weight::from_ref_time(15_451_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(15_451_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -95,7 +95,7 @@ impl WeightInfo for SubstrateWeight { fn on_initialize_periodic_resolved(s: u32, ) -> Weight { Weight::from_ref_time(11_675_000 as RefTimeWeight) // Standard Error: 17_000 - .saturating_add(Weight::from_ref_time(17_019_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(17_019_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((3 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -107,7 +107,7 @@ impl WeightInfo for SubstrateWeight { fn on_initialize_resolved(s: u32, ) -> Weight { Weight::from_ref_time(11_934_000 as RefTimeWeight) // Standard Error: 11_000 - .saturating_add(Weight::from_ref_time(14_134_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(14_134_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -119,7 +119,7 @@ impl WeightInfo for SubstrateWeight { fn on_initialize_named_aborted(s: u32, ) -> Weight { Weight::from_ref_time(7_279_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(5_388_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(5_388_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) @@ -130,7 +130,7 @@ impl WeightInfo for SubstrateWeight { fn on_initialize_aborted(s: u32, ) -> Weight { Weight::from_ref_time(8_619_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(2_969_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_969_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) @@ -140,7 +140,7 @@ impl WeightInfo for SubstrateWeight { fn on_initialize_periodic_named(s: u32, ) -> Weight { Weight::from_ref_time(16_129_000 as RefTimeWeight) // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(9_772_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(9_772_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -150,7 +150,7 @@ impl WeightInfo for SubstrateWeight { fn on_initialize_periodic(s: u32, ) -> Weight { Weight::from_ref_time(15_785_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(7_208_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(7_208_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -161,7 +161,7 @@ impl WeightInfo for SubstrateWeight { fn on_initialize_named(s: u32, ) -> Weight { Weight::from_ref_time(15_778_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(5_597_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(5_597_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) @@ -170,7 +170,7 @@ impl WeightInfo for SubstrateWeight { fn on_initialize(s: u32, ) -> Weight { Weight::from_ref_time(15_912_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(4_530_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(4_530_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -178,7 +178,7 @@ impl WeightInfo for SubstrateWeight { fn schedule(s: u32, ) -> Weight { Weight::from_ref_time(18_013_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(87_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(87_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -187,7 +187,7 @@ impl WeightInfo for SubstrateWeight { fn cancel(s: u32, ) -> Weight { Weight::from_ref_time(18_131_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(595_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(595_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -196,7 +196,7 @@ impl WeightInfo for SubstrateWeight { fn schedule_named(s: u32, ) -> Weight { Weight::from_ref_time(21_230_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(98_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(98_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -205,7 +205,7 @@ impl WeightInfo for SubstrateWeight { fn cancel_named(s: u32, ) -> Weight { Weight::from_ref_time(20_139_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(595_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(595_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -220,7 +220,7 @@ impl WeightInfo for () { fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight { Weight::from_ref_time(9_994_000 as RefTimeWeight) // Standard Error: 20_000 - .saturating_add(Weight::from_ref_time(19_843_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(19_843_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((3 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) @@ -233,7 +233,7 @@ impl WeightInfo for () { fn on_initialize_named_resolved(s: u32, ) -> Weight { Weight::from_ref_time(10_318_000 as RefTimeWeight) // Standard Error: 17_000 - .saturating_add(Weight::from_ref_time(15_451_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(15_451_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) @@ -245,7 +245,7 @@ impl WeightInfo for () { fn on_initialize_periodic_resolved(s: u32, ) -> Weight { Weight::from_ref_time(11_675_000 as RefTimeWeight) // Standard Error: 17_000 - .saturating_add(Weight::from_ref_time(17_019_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(17_019_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((3 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) @@ -257,7 +257,7 @@ impl WeightInfo for () { fn on_initialize_resolved(s: u32, ) -> Weight { Weight::from_ref_time(11_934_000 as RefTimeWeight) // Standard Error: 11_000 - .saturating_add(Weight::from_ref_time(14_134_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(14_134_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) @@ -269,7 +269,7 @@ impl WeightInfo for () { fn on_initialize_named_aborted(s: u32, ) -> Weight { Weight::from_ref_time(7_279_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(5_388_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(5_388_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) @@ -280,7 +280,7 @@ impl WeightInfo for () { fn on_initialize_aborted(s: u32, ) -> Weight { Weight::from_ref_time(8_619_000 as RefTimeWeight) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(2_969_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_969_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) @@ -290,7 +290,7 @@ impl WeightInfo for () { fn on_initialize_periodic_named(s: u32, ) -> Weight { Weight::from_ref_time(16_129_000 as RefTimeWeight) // Standard Error: 7_000 - .saturating_add(Weight::from_ref_time(9_772_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(9_772_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) @@ -300,7 +300,7 @@ impl WeightInfo for () { fn on_initialize_periodic(s: u32, ) -> Weight { Weight::from_ref_time(15_785_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(7_208_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(7_208_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) @@ -311,7 +311,7 @@ impl WeightInfo for () { fn on_initialize_named(s: u32, ) -> Weight { Weight::from_ref_time(15_778_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(5_597_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(5_597_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) @@ -320,7 +320,7 @@ impl WeightInfo for () { fn on_initialize(s: u32, ) -> Weight { Weight::from_ref_time(15_912_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(4_530_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(4_530_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -328,7 +328,7 @@ impl WeightInfo for () { fn schedule(s: u32, ) -> Weight { Weight::from_ref_time(18_013_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(87_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(87_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -337,7 +337,7 @@ impl WeightInfo for () { fn cancel(s: u32, ) -> Weight { Weight::from_ref_time(18_131_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(595_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(595_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -346,7 +346,7 @@ impl WeightInfo for () { fn schedule_named(s: u32, ) -> Weight { Weight::from_ref_time(21_230_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(98_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(98_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -355,7 +355,7 @@ impl WeightInfo for () { fn cancel_named(s: u32, ) -> Weight { Weight::from_ref_time(20_139_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(595_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(595_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } diff --git a/frame/society/src/lib.rs b/frame/society/src/lib.rs index 626562f7a45f8..9717486644761 100644 --- a/frame/society/src/lib.rs +++ b/frame/society/src/lib.rs @@ -614,7 +614,7 @@ pub mod pallet { fn on_initialize(n: T::BlockNumber) -> Weight { let mut members = vec![]; - let mut weight = Weight::new(); + let mut weight = Weight::zero(); let weights = T::BlockWeights::get(); // Run a candidate/membership rotation diff --git a/frame/staking/src/tests.rs b/frame/staking/src/tests.rs index cda606008a9cc..107d494a9711b 100644 --- a/frame/staking/src/tests.rs +++ b/frame/staking/src/tests.rs @@ -4250,7 +4250,7 @@ mod election_data_provider { fn targets_2sec_block() { let mut validators = 1000; while ::WeightInfo::get_npos_targets(validators) < - 2 * frame_support::weights::constants::WEIGHT_PER_SECOND + 2u64 * frame_support::weights::constants::WEIGHT_PER_SECOND { validators += 1; } @@ -4268,7 +4268,7 @@ mod election_data_provider { let mut nominators = 1000; while ::WeightInfo::get_npos_voters(validators, nominators, slashing_spans) < - 2 * frame_support::weights::constants::WEIGHT_PER_SECOND + 2u64 * frame_support::weights::constants::WEIGHT_PER_SECOND { nominators += 1; } diff --git a/frame/staking/src/weights.rs b/frame/staking/src/weights.rs index c5f584054d1f4..82ab44f428372 100644 --- a/frame/staking/src/weights.rs +++ b/frame/staking/src/weights.rs @@ -121,7 +121,7 @@ impl WeightInfo for SubstrateWeight { fn withdraw_unbonded_update(s: u32, ) -> Weight { Weight::from_ref_time(35_763_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(57_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(57_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -164,7 +164,7 @@ impl WeightInfo for SubstrateWeight { fn kick(k: u32, ) -> Weight { Weight::from_ref_time(23_264_000 as RefTimeWeight) // Standard Error: 11_000 - .saturating_add(Weight::from_ref_time(8_006_000 as RefTimeWeight).scalar_saturating_mul(k as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(8_006_000 as RefTimeWeight).saturating_mul(k as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(k as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(k as RefTimeWeight))) @@ -183,7 +183,7 @@ impl WeightInfo for SubstrateWeight { fn nominate(n: u32, ) -> Weight { Weight::from_ref_time(56_596_000 as RefTimeWeight) // Standard Error: 14_000 - .saturating_add(Weight::from_ref_time(3_644_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(3_644_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(12 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(6 as RefTimeWeight)) @@ -238,7 +238,7 @@ impl WeightInfo for SubstrateWeight { fn set_invulnerables(v: u32, ) -> Weight { Weight::from_ref_time(4_318_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(10_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(10_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Staking Bonded (r:1 w:1) @@ -257,7 +257,7 @@ impl WeightInfo for SubstrateWeight { fn force_unstake(s: u32, ) -> Weight { Weight::from_ref_time(65_265_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_029_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_029_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(11 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(12 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) @@ -266,7 +266,7 @@ impl WeightInfo for SubstrateWeight { fn cancel_deferred_slash(s: u32, ) -> Weight { Weight::from_ref_time(903_312_000 as RefTimeWeight) // Standard Error: 56_000 - .saturating_add(Weight::from_ref_time(4_968_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(4_968_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -283,7 +283,7 @@ impl WeightInfo for SubstrateWeight { fn payout_stakers_dead_controller(n: u32, ) -> Weight { Weight::from_ref_time(87_569_000 as RefTimeWeight) // Standard Error: 14_000 - .saturating_add(Weight::from_ref_time(24_232_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(24_232_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(10 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((3 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) @@ -303,7 +303,7 @@ impl WeightInfo for SubstrateWeight { fn payout_stakers_alive_staked(n: u32, ) -> Weight { Weight::from_ref_time(98_839_000 as RefTimeWeight) // Standard Error: 21_000 - .saturating_add(Weight::from_ref_time(34_480_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(34_480_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(11 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((5 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) @@ -318,7 +318,7 @@ impl WeightInfo for SubstrateWeight { fn rebond(l: u32, ) -> Weight { Weight::from_ref_time(74_865_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(64_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(64_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(9 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(8 as RefTimeWeight)) } @@ -334,7 +334,7 @@ impl WeightInfo for SubstrateWeight { fn set_history_depth(e: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 62_000 - .saturating_add(Weight::from_ref_time(22_829_000 as RefTimeWeight).scalar_saturating_mul(e as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(22_829_000 as RefTimeWeight).saturating_mul(e as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes((7 as RefTimeWeight).saturating_mul(e as RefTimeWeight))) @@ -355,7 +355,7 @@ impl WeightInfo for SubstrateWeight { fn reap_stash(s: u32, ) -> Weight { Weight::from_ref_time(70_933_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_021_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_021_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(12 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(12 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) @@ -381,9 +381,9 @@ impl WeightInfo for SubstrateWeight { fn new_era(v: u32, n: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 897_000 - .saturating_add(Weight::from_ref_time(213_100_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(213_100_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) // Standard Error: 45_000 - .saturating_add(Weight::from_ref_time(31_123_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(31_123_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(208 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((5 as RefTimeWeight).saturating_mul(v as RefTimeWeight))) .saturating_add(T::DbWeight::get().reads((4 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) @@ -401,11 +401,11 @@ impl WeightInfo for SubstrateWeight { fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 116_000 - .saturating_add(Weight::from_ref_time(23_745_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(23_745_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) // Standard Error: 116_000 - .saturating_add(Weight::from_ref_time(22_497_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(22_497_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) // Standard Error: 3_968_000 - .saturating_add(Weight::from_ref_time(20_676_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(20_676_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(202 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((5 as RefTimeWeight).saturating_mul(v as RefTimeWeight))) .saturating_add(T::DbWeight::get().reads((4 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) @@ -415,7 +415,7 @@ impl WeightInfo for SubstrateWeight { fn get_npos_targets(v: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 36_000 - .saturating_add(Weight::from_ref_time(8_097_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(8_097_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(v as RefTimeWeight))) } @@ -507,7 +507,7 @@ impl WeightInfo for () { fn withdraw_unbonded_update(s: u32, ) -> Weight { Weight::from_ref_time(35_763_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(57_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(57_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -550,7 +550,7 @@ impl WeightInfo for () { fn kick(k: u32, ) -> Weight { Weight::from_ref_time(23_264_000 as RefTimeWeight) // Standard Error: 11_000 - .saturating_add(Weight::from_ref_time(8_006_000 as RefTimeWeight).scalar_saturating_mul(k as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(8_006_000 as RefTimeWeight).saturating_mul(k as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(k as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes((1 as RefTimeWeight).saturating_mul(k as RefTimeWeight))) @@ -569,7 +569,7 @@ impl WeightInfo for () { fn nominate(n: u32, ) -> Weight { Weight::from_ref_time(56_596_000 as RefTimeWeight) // Standard Error: 14_000 - .saturating_add(Weight::from_ref_time(3_644_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(3_644_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(12 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(6 as RefTimeWeight)) @@ -624,7 +624,7 @@ impl WeightInfo for () { fn set_invulnerables(v: u32, ) -> Weight { Weight::from_ref_time(4_318_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(10_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(10_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } // Storage: Staking Bonded (r:1 w:1) @@ -643,7 +643,7 @@ impl WeightInfo for () { fn force_unstake(s: u32, ) -> Weight { Weight::from_ref_time(65_265_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_029_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_029_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(11 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(12 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) @@ -652,7 +652,7 @@ impl WeightInfo for () { fn cancel_deferred_slash(s: u32, ) -> Weight { Weight::from_ref_time(903_312_000 as RefTimeWeight) // Standard Error: 56_000 - .saturating_add(Weight::from_ref_time(4_968_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(4_968_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -669,7 +669,7 @@ impl WeightInfo for () { fn payout_stakers_dead_controller(n: u32, ) -> Weight { Weight::from_ref_time(87_569_000 as RefTimeWeight) // Standard Error: 14_000 - .saturating_add(Weight::from_ref_time(24_232_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(24_232_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(10 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((3 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) @@ -689,7 +689,7 @@ impl WeightInfo for () { fn payout_stakers_alive_staked(n: u32, ) -> Weight { Weight::from_ref_time(98_839_000 as RefTimeWeight) // Standard Error: 21_000 - .saturating_add(Weight::from_ref_time(34_480_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(34_480_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(11 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((5 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) @@ -704,7 +704,7 @@ impl WeightInfo for () { fn rebond(l: u32, ) -> Weight { Weight::from_ref_time(74_865_000 as RefTimeWeight) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(64_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(64_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(9 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(8 as RefTimeWeight)) } @@ -720,7 +720,7 @@ impl WeightInfo for () { fn set_history_depth(e: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 62_000 - .saturating_add(Weight::from_ref_time(22_829_000 as RefTimeWeight).scalar_saturating_mul(e as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(22_829_000 as RefTimeWeight).saturating_mul(e as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes((7 as RefTimeWeight).saturating_mul(e as RefTimeWeight))) @@ -741,7 +741,7 @@ impl WeightInfo for () { fn reap_stash(s: u32, ) -> Weight { Weight::from_ref_time(70_933_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_021_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_021_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(12 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(12 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes((1 as RefTimeWeight).saturating_mul(s as RefTimeWeight))) @@ -767,9 +767,9 @@ impl WeightInfo for () { fn new_era(v: u32, n: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 897_000 - .saturating_add(Weight::from_ref_time(213_100_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(213_100_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) // Standard Error: 45_000 - .saturating_add(Weight::from_ref_time(31_123_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(31_123_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(208 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((5 as RefTimeWeight).saturating_mul(v as RefTimeWeight))) .saturating_add(RocksDbWeight::get().reads((4 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) @@ -787,11 +787,11 @@ impl WeightInfo for () { fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 116_000 - .saturating_add(Weight::from_ref_time(23_745_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(23_745_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) // Standard Error: 116_000 - .saturating_add(Weight::from_ref_time(22_497_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(22_497_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) // Standard Error: 3_968_000 - .saturating_add(Weight::from_ref_time(20_676_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(20_676_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(202 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((5 as RefTimeWeight).saturating_mul(v as RefTimeWeight))) .saturating_add(RocksDbWeight::get().reads((4 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) @@ -801,7 +801,7 @@ impl WeightInfo for () { fn get_npos_targets(v: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 36_000 - .saturating_add(Weight::from_ref_time(8_097_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(8_097_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(v as RefTimeWeight))) } diff --git a/frame/state-trie-migration/src/lib.rs b/frame/state-trie-migration/src/lib.rs index 93b5bd3468f6b..e29115382819a 100644 --- a/frame/state-trie-migration/src/lib.rs +++ b/frame/state-trie-migration/src/lib.rs @@ -842,7 +842,7 @@ pub mod pallet { let items = items as u64; ::DbWeight::get() .reads_writes(1, 1) - .scalar_saturating_mul(items) + .saturating_mul(items) // we assume that the read/write per-byte weight is the same for child and top tree. .saturating_add(T::WeightInfo::process_top_key(size)) } @@ -1246,7 +1246,7 @@ mod mock { pub(crate) fn run_to_block(n: u32) -> (H256, Weight) { let mut root = Default::default(); - let mut weight_sum = Weight::new(); + let mut weight_sum = Weight::zero(); log::trace!(target: LOG_TARGET, "running from {:?} to {:?}", System::block_number(), n); while System::block_number() < n { System::set_block_number(System::block_number() + 1); @@ -1622,7 +1622,7 @@ pub(crate) mod remote_tests { n: ::BlockNumber, ) -> (H256, Weight) { let mut root = Default::default(); - let mut weight_sum = Weight::new(); + let mut weight_sum = Weight::zero(); while System::::block_number() < n { System::::set_block_number(System::::block_number() + One::one()); System::::on_initialize(System::::block_number()); diff --git a/frame/state-trie-migration/src/weights.rs b/frame/state-trie-migration/src/weights.rs index 6fccc0b68f3d7..1967874157f75 100644 --- a/frame/state-trie-migration/src/weights.rs +++ b/frame/state-trie-migration/src/weights.rs @@ -90,7 +90,7 @@ impl WeightInfo for SubstrateWeight { fn process_top_key(v: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -132,7 +132,7 @@ impl WeightInfo for () { fn process_top_key(v: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } diff --git a/frame/sudo/src/tests.rs b/frame/sudo/src/tests.rs index 502c6476935a2..0508772cc88ec 100644 --- a/frame/sudo/src/tests.rs +++ b/frame/sudo/src/tests.rs @@ -62,8 +62,10 @@ fn sudo_emits_events_correctly() { System::set_block_number(1); // Should emit event to indicate success when called with the root `key` and `call` is `Ok`. - let call = - Box::new(Call::Logger(LoggerCall::privileged_i32_log { i: 42, weight: Weight::one() })); + let call = Box::new(Call::Logger(LoggerCall::privileged_i32_log { + i: 42, + weight: Weight::from_ref_time(1), + })); assert_ok!(Sudo::sudo(Origin::signed(1), call)); System::assert_has_event(TestEvent::Sudo(Event::Sudid { sudo_result: Ok(()) })); }) @@ -97,8 +99,10 @@ fn sudo_unchecked_weight_basics() { assert_eq!(Logger::i32_log(), vec![42i32]); // Controls the dispatched weight. - let call = - Box::new(Call::Logger(LoggerCall::privileged_i32_log { i: 42, weight: Weight::one() })); + let call = Box::new(Call::Logger(LoggerCall::privileged_i32_log { + i: 42, + weight: Weight::from_ref_time(1), + })); let sudo_unchecked_weight_call = SudoCall::sudo_unchecked_weight { call, weight: Weight::from_ref_time(1_000) }; let info = sudo_unchecked_weight_call.get_dispatch_info(); @@ -113,8 +117,10 @@ fn sudo_unchecked_weight_emits_events_correctly() { System::set_block_number(1); // Should emit event to indicate success when called with the root `key` and `call` is `Ok`. - let call = - Box::new(Call::Logger(LoggerCall::privileged_i32_log { i: 42, weight: Weight::one() })); + let call = Box::new(Call::Logger(LoggerCall::privileged_i32_log { + i: 42, + weight: Weight::from_ref_time(1), + })); assert_ok!(Sudo::sudo_unchecked_weight( Origin::signed(1), call, @@ -167,13 +173,17 @@ fn sudo_as_basics() { assert!(Logger::account_log().is_empty()); // A non-privileged function should not work when called with a non-root `key`. - let call = - Box::new(Call::Logger(LoggerCall::non_privileged_log { i: 42, weight: Weight::one() })); + let call = Box::new(Call::Logger(LoggerCall::non_privileged_log { + i: 42, + weight: Weight::from_ref_time(1), + })); assert_noop!(Sudo::sudo_as(Origin::signed(3), 2, call), Error::::RequireSudo); // A non-privileged function will work when passed to `sudo_as` with the root `key`. - let call = - Box::new(Call::Logger(LoggerCall::non_privileged_log { i: 42, weight: Weight::one() })); + let call = Box::new(Call::Logger(LoggerCall::non_privileged_log { + i: 42, + weight: Weight::from_ref_time(1), + })); assert_ok!(Sudo::sudo_as(Origin::signed(1), 2, call)); assert_eq!(Logger::i32_log(), vec![42i32]); // The correct user makes the call within `sudo_as`. @@ -188,8 +198,10 @@ fn sudo_as_emits_events_correctly() { System::set_block_number(1); // A non-privileged function will work when passed to `sudo_as` with the root `key`. - let call = - Box::new(Call::Logger(LoggerCall::non_privileged_log { i: 42, weight: Weight::one() })); + let call = Box::new(Call::Logger(LoggerCall::non_privileged_log { + i: 42, + weight: Weight::from_ref_time(1), + })); assert_ok!(Sudo::sudo_as(Origin::signed(1), 2, call)); System::assert_has_event(TestEvent::Sudo(Event::SudoAsDone { sudo_result: Ok(()) })); }); diff --git a/frame/support/src/dispatch.rs b/frame/support/src/dispatch.rs index 94974888c1d5c..fc976b03556a4 100644 --- a/frame/support/src/dispatch.rs +++ b/frame/support/src/dispatch.rs @@ -1643,7 +1643,7 @@ macro_rules! decl_module { pallet_name, ); - $crate::dispatch::Weight::new() + $crate::dispatch::Weight::zero() } #[cfg(feature = "try-runtime")] diff --git a/frame/support/src/migrations.rs b/frame/support/src/migrations.rs index b559d3aca615f..63679fd56d667 100644 --- a/frame/support/src/migrations.rs +++ b/frame/support/src/migrations.rs @@ -48,7 +48,7 @@ impl PalletVersionToStorageVersionHelpe #[cfg_attr(feature = "tuples-128", impl_for_tuples(128))] impl PalletVersionToStorageVersionHelper for T { fn migrate(db_weight: &RuntimeDbWeight) -> Weight { - let mut weight = Weight::new(); + let mut weight = Weight::zero(); for_tuples!( #( weight = weight.saturating_add(T::migrate(db_weight)); )* ); diff --git a/frame/support/src/traits/hooks.rs b/frame/support/src/traits/hooks.rs index e8cd87823f3c3..25ec333a7dbe0 100644 --- a/frame/support/src/traits/hooks.rs +++ b/frame/support/src/traits/hooks.rs @@ -35,7 +35,7 @@ pub trait OnInitialize { /// including inherent extrinsics. Hence for instance, if you runtime includes /// `pallet_timestamp`, the `timestamp` is not yet up to date at this point. fn on_initialize(_n: BlockNumber) -> Weight { - Weight::new() + Weight::zero() } } @@ -44,7 +44,7 @@ pub trait OnInitialize { #[cfg_attr(feature = "tuples-128", impl_for_tuples(128))] impl OnInitialize for Tuple { fn on_initialize(n: BlockNumber) -> Weight { - let mut weight = Weight::new(); + let mut weight = Weight::zero(); for_tuples!( #( weight = weight.saturating_add(Tuple::on_initialize(n.clone())); )* ); weight } @@ -77,7 +77,7 @@ pub trait OnIdle { /// NOTE: This function is called AFTER ALL extrinsics - including inherent extrinsics - /// in a block are applied but before `on_finalize` is executed. fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight { - Weight::new() + Weight::zero() } } @@ -88,7 +88,7 @@ impl OnIdle for Tuple { fn on_idle(n: BlockNumber, remaining_weight: Weight) -> Weight { let on_idle_functions: &[fn(BlockNumber, Weight) -> Weight] = &[for_tuples!( #( Tuple::on_idle ),* )]; - let mut weight = Weight::new(); + let mut weight = Weight::zero(); let len = on_idle_functions.len(); let start_index = n % (len as u32).into(); let start_index = start_index.try_into().ok().expect( @@ -130,7 +130,7 @@ pub trait OnRuntimeUpgrade { /// /// Return the non-negotiable weight consumed for runtime upgrade. fn on_runtime_upgrade() -> Weight { - Weight::new() + Weight::zero() } /// Execute some pre-checks prior to a runtime upgrade. @@ -155,7 +155,7 @@ pub trait OnRuntimeUpgrade { #[cfg_attr(feature = "tuples-128", impl_for_tuples(128))] impl OnRuntimeUpgrade for Tuple { fn on_runtime_upgrade() -> Weight { - let mut weight = Weight::new(); + let mut weight = Weight::zero(); for_tuples!( #( weight = weight.saturating_add(Tuple::on_runtime_upgrade()); )* ); weight } @@ -199,14 +199,14 @@ pub trait Hooks { /// Return the weight used, the hook will subtract it from current weight used /// and pass the result to the next `on_idle` hook if it exists. fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight { - Weight::new() + Weight::zero() } /// The block is being initialized. Implement to have something happen. /// /// Return the non-negotiable weight consumed in the block. fn on_initialize(_n: BlockNumber) -> Weight { - Weight::new() + Weight::zero() } /// Perform a module upgrade. @@ -229,7 +229,7 @@ pub trait Hooks { /// logic as a free-function from your pallet, and pass it to `type Executive` from the /// top-level runtime. fn on_runtime_upgrade() -> Weight { - Weight::new() + Weight::zero() } /// Execute the sanity checks of this pallet, per block. diff --git a/frame/support/src/weights.rs b/frame/support/src/weights.rs index 568cb5535ccda..dab7f4a2746cf 100644 --- a/frame/support/src/weights.rs +++ b/frame/support/src/weights.rs @@ -650,7 +650,7 @@ impl PerDispatchClass { impl PerDispatchClass { /// Returns the total weight consumed by all extrinsics in the block. pub fn total(&self) -> Weight { - let mut sum = Weight::new(); + let mut sum = Weight::zero(); for class in DispatchClass::all() { sum = sum.saturating_add(*self.get(*class)); } diff --git a/frame/support/src/weights/block_weights.rs b/frame/support/src/weights/block_weights.rs index 93a80d12db96b..51f707b2b0df5 100644 --- a/frame/support/src/weights/block_weights.rs +++ b/frame/support/src/weights/block_weights.rs @@ -53,7 +53,7 @@ parameter_types! { /// 99th: 5_489_273 /// 95th: 5_433_314 /// 75th: 5_354_812 - pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.scalar_saturating_mul(5_346_284); + pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(5_346_284); } #[cfg(test)] @@ -68,8 +68,8 @@ mod test_weights { let w = super::BlockExecutionWeight::get(); // At least 100 µs. - assert!(w >= 100 * constants::WEIGHT_PER_MICROS, "Weight should be at least 100 µs."); + assert!(w >= 100u32 * constants::WEIGHT_PER_MICROS, "Weight should be at least 100 µs."); // At most 50 ms. - assert!(w <= 50 * constants::WEIGHT_PER_MILLIS, "Weight should be at most 50 ms."); + assert!(w <= 50u32 * constants::WEIGHT_PER_MILLIS, "Weight should be at most 50 ms."); } } diff --git a/frame/support/src/weights/extrinsic_weights.rs b/frame/support/src/weights/extrinsic_weights.rs index d223eb7c10efc..2bee1059b0dad 100644 --- a/frame/support/src/weights/extrinsic_weights.rs +++ b/frame/support/src/weights/extrinsic_weights.rs @@ -53,7 +53,7 @@ parameter_types! { /// 99th: 86_924 /// 95th: 86_828 /// 75th: 86_347 - pub const ExtrinsicBaseWeight: Weight = WEIGHT_PER_NANOS.scalar_saturating_mul(86_298); + pub const ExtrinsicBaseWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(86_298); } #[cfg(test)] @@ -68,7 +68,7 @@ mod test_weights { let w = super::ExtrinsicBaseWeight::get(); // At least 10 µs. - assert!(w >= 10 * constants::WEIGHT_PER_MICROS, "Weight should be at least 10 µs."); + assert!(w >= 10u32 * constants::WEIGHT_PER_MICROS, "Weight should be at least 10 µs."); // At most 1 ms. assert!(w <= constants::WEIGHT_PER_MILLIS, "Weight should be at most 1 ms."); } diff --git a/frame/support/src/weights/weight_v2.rs b/frame/support/src/weights/weight_v2.rs index d02aac3268838..bcda6358c965f 100644 --- a/frame/support/src/weights/weight_v2.rs +++ b/frame/support/src/weights/weight_v2.rs @@ -18,8 +18,8 @@ use codec::{CompactAs, Decode, Encode, MaxEncodedLen}; use core::ops::{Add, AddAssign, Div, Mul, Sub, SubAssign}; use sp_runtime::{ - traits::{Bounded, CheckedAdd, CheckedSub, One, Zero}, - Perquintill, RuntimeDebug, + traits::{Bounded, CheckedAdd, CheckedSub, Zero}, + RuntimeDebug, }; use super::*; @@ -50,11 +50,6 @@ pub struct Weight { } impl Weight { - /// Create a new Weight with zero. - pub const fn new() -> Self { - Self { ref_time: 0 } - } - /// Set the reference time part of the weight. pub const fn set_ref_time(mut self, c: RefTimeWeight) -> Self { self.ref_time = c; @@ -93,27 +88,84 @@ impl Weight { } } - /// Construct with reference time weight. + /// Construct [`Weight`] with reference time weight. pub const fn from_ref_time(ref_time: RefTimeWeight) -> Self { Self { ref_time } } - pub fn checked_mul(self, rhs: u64) -> Option { - let ref_time = self.ref_time.checked_mul(rhs)?; - Some(Self { ref_time }) + /// Saturating [`Weight`] addition. Computes `self + rhs`, saturating at the numeric bounds of + /// all fields instead of overflowing. + pub const fn saturating_add(self, rhs: Self) -> Self { + Self { ref_time: self.ref_time.saturating_add(rhs.ref_time) } + } + + /// Saturating [`Weight`] subtraction. Computes `self - rhs`, saturating at the numeric bounds + /// of all fields instead of overflowing. + pub const fn saturating_sub(self, rhs: Self) -> Self { + Self { ref_time: self.ref_time.saturating_sub(rhs.ref_time) } + } + + /// Saturating [`Weight`] scalar multiplication. Computes `self.field * scalar` for all fields, + /// saturating at the numeric bounds of all fields instead of overflowing. + pub const fn saturating_mul(self, scalar: u64) -> Self { + Self { ref_time: self.ref_time.saturating_mul(scalar) } } - pub fn checked_div(self, rhs: u64) -> Option { - let ref_time = self.ref_time.checked_div(rhs)?; - Some(Self { ref_time }) + /// Saturating [`Weight`] scalar division. Computes `self.field / scalar` for all fields, + /// saturating at the numeric bounds of all fields instead of overflowing. + pub const fn saturating_div(self, scalar: u64) -> Self { + Self { ref_time: self.ref_time.saturating_div(scalar) } } - pub const fn scalar_saturating_mul(self, rhs: u64) -> Self { - Self { ref_time: self.ref_time.saturating_mul(rhs) } + /// Saturating [`Weight`] scalar exponentiation. Computes `self.field.pow(exp)` for all fields, + /// saturating at the numeric bounds of all fields instead of overflowing. + pub const fn saturating_pow(self, exp: u32) -> Self { + Self { ref_time: self.ref_time.saturating_pow(exp) } } - pub const fn scalar_div(self, rhs: u64) -> Self { - Self { ref_time: self.ref_time / rhs } + /// Increment [`Weight`] by `amount` via saturating addition. + pub fn saturating_accrue(&mut self, amount: Self) { + *self = self.saturating_add(amount); + } + + /// Checked [`Weight`] addition. Computes `self + rhs`, returning `None` if overflow occurred. + pub const fn checked_add(&self, rhs: &Self) -> Option { + match self.ref_time.checked_add(rhs.ref_time) { + Some(ref_time) => Some(Self { ref_time }), + None => None, + } + } + + /// Checked [`Weight`] subtraction. Computes `self - rhs`, returning `None` if overflow + /// occurred. + pub const fn checked_sub(&self, rhs: &Self) -> Option { + match self.ref_time.checked_sub(rhs.ref_time) { + Some(ref_time) => Some(Self { ref_time }), + None => None, + } + } + + /// Checked [`Weight`] scalar multiplication. Computes `self.field * scalar` for each field, + /// returning `None` if overflow occurred. + pub const fn checked_mul(self, scalar: u64) -> Option { + match self.ref_time.checked_mul(scalar) { + Some(ref_time) => Some(Self { ref_time }), + None => None, + } + } + + /// Checked [`Weight`] scalar division. Computes `self.field / scalar` for each field, returning + /// `None` if overflow occurred. + pub const fn checked_div(self, scalar: u64) -> Option { + match self.ref_time.checked_div(scalar) { + Some(ref_time) => Some(Self { ref_time }), + None => None, + } + } + + /// Return a [`Weight`] where all fields are zero. + pub const fn zero() -> Self { + Self { ref_time: 0 } } } @@ -127,12 +179,6 @@ impl Zero for Weight { } } -impl One for Weight { - fn one() -> Self { - Self::one() - } -} - impl Add for Weight { type Output = Self; fn add(self, rhs: Self) -> Self { @@ -147,13 +193,6 @@ impl Sub for Weight { } } -impl Mul for Weight { - type Output = Self; - fn mul(self, b: Self) -> Self { - Self { ref_time: b.ref_time * self.ref_time } - } -} - impl Mul for Weight where T: Mul + Copy, @@ -164,26 +203,39 @@ where } } -impl Mul for Perbill { - type Output = Weight; - fn mul(self, b: Weight) -> Weight { - Weight { ref_time: self * b.ref_time } +macro_rules! weight_mul_per_impl { + ($($t:ty),* $(,)?) => { + $( + impl Mul for $t { + type Output = Weight; + fn mul(self, b: Weight) -> Weight { + Weight { ref_time: self * b.ref_time } + } + } + )* } } +weight_mul_per_impl!( + sp_runtime::Percent, + sp_runtime::PerU16, + sp_runtime::Permill, + sp_runtime::Perbill, + sp_runtime::Perquintill, +); -impl Mul for Perquintill { - type Output = Weight; - fn mul(self, b: Weight) -> Weight { - Weight { ref_time: self * b.ref_time } - } -} - -impl Mul for u64 { - type Output = Weight; - fn mul(self, b: Weight) -> Weight { - Weight { ref_time: self * b.ref_time } +macro_rules! weight_mul_primitive_impl { + ($($t:ty),* $(,)?) => { + $( + impl Mul for $t { + type Output = Weight; + fn mul(self, b: Weight) -> Weight { + Weight { ref_time: u64::from(self) * b.ref_time } + } + } + )* } } +weight_mul_primitive_impl!(u8, u16, u32, u64); impl Div for Weight where @@ -196,24 +248,6 @@ where } } -impl Saturating for Weight { - fn saturating_add(self, rhs: Self) -> Self { - self.saturating_add(rhs) - } - - fn saturating_sub(self, rhs: Self) -> Self { - self.saturating_sub(rhs) - } - - fn saturating_mul(self, rhs: Self) -> Self { - self.saturating_mul(rhs) - } - - fn saturating_pow(self, exp: usize) -> Self { - self.saturating_pow(exp) - } -} - impl CheckedAdd for Weight { fn checked_add(&self, rhs: &Self) -> Option { self.checked_add(rhs) @@ -344,53 +378,12 @@ impl sp_runtime::traits::Printable for Weight { } } -// Re-export common functions so you do not need to import trait. -impl Weight { - pub const fn zero() -> Self { - Self { ref_time: 0 } - } - - pub const fn one() -> Self { - Self { ref_time: 1 } - } - - pub const fn saturating_add(self, rhs: Self) -> Self { - Self { ref_time: self.ref_time.saturating_add(rhs.ref_time) } - } - - pub const fn saturating_sub(self, rhs: Self) -> Self { - Self { ref_time: self.ref_time.saturating_sub(rhs.ref_time) } - } - - pub const fn saturating_mul(self, rhs: Self) -> Self { - Self { ref_time: self.ref_time.saturating_mul(rhs.ref_time) } - } - - pub const fn saturating_pow(self, exp: usize) -> Self { - Self { ref_time: self.ref_time.saturating_pow(exp as u32) } - } - - pub const fn checked_add(&self, rhs: &Self) -> Option { - match self.ref_time.checked_add(rhs.ref_time) { - Some(ref_time) => Some(Self { ref_time }), - None => None, - } - } - - pub const fn checked_sub(&self, rhs: &Self) -> Option { - match self.ref_time.checked_sub(rhs.ref_time) { - Some(ref_time) => Some(Self { ref_time }), - None => None, - } - } -} - // TODO: Eventually remove these impl From> for PostDispatchInfo { fn from(maybe_actual_computation: Option) -> Self { let actual_weight = match maybe_actual_computation { - Some(actual_computation) => Some(Weight::new().set_ref_time(actual_computation)), + Some(actual_computation) => Some(Weight::zero().set_ref_time(actual_computation)), None => None, }; Self { actual_weight, pays_fee: Default::default() } @@ -401,7 +394,7 @@ impl From<(Option, Pays)> for PostDispatchInfo { fn from(post_weight_info: (Option, Pays)) -> Self { let (maybe_actual_time, pays_fee) = post_weight_info; let actual_weight = match maybe_actual_time { - Some(actual_time) => Some(Weight::new().set_ref_time(actual_time)), + Some(actual_time) => Some(Weight::zero().set_ref_time(actual_time)), None => None, }; Self { actual_weight, pays_fee } @@ -410,7 +403,7 @@ impl From<(Option, Pays)> for PostDispatchInfo { impl WeighData for RefTimeWeight { fn weigh_data(&self, _: T) -> Weight { - return Weight::new().set_ref_time(*self) + return Weight::zero().set_ref_time(*self) } } diff --git a/frame/system/src/extensions/check_weight.rs b/frame/system/src/extensions/check_weight.rs index b7232c430696d..d6434b6c63d8a 100644 --- a/frame/system/src/extensions/check_weight.rs +++ b/frame/system/src/extensions/check_weight.rs @@ -322,7 +322,7 @@ mod tests { new_test_ext().execute_with(|| { let max = DispatchInfo { weight: block_weights().get(DispatchClass::Normal).max_extrinsic.unwrap() + - Weight::one(), + Weight::from_ref_time(1), class: DispatchClass::Normal, ..Default::default() }; @@ -348,7 +348,7 @@ mod tests { let okay = DispatchInfo { weight, class: DispatchClass::Operational, ..Default::default() }; let max = DispatchInfo { - weight: weight + Weight::one(), + weight: weight + Weight::from_ref_time(1), class: DispatchClass::Operational, ..Default::default() }; @@ -532,7 +532,7 @@ mod tests { let medium = DispatchInfo { weight: normal_limit - base_extrinsic, ..Default::default() }; let big = DispatchInfo { - weight: normal_limit - base_extrinsic + Weight::one(), + weight: normal_limit - base_extrinsic + Weight::from_ref_time(1), ..Default::default() }; let len = 0_usize; @@ -551,7 +551,7 @@ mod tests { reset_check_weight(&small, false, Weight::zero()); reset_check_weight(&medium, false, Weight::zero()); - reset_check_weight(&big, true, Weight::one()); + reset_check_weight(&big, true, Weight::from_ref_time(1)); }) } diff --git a/frame/system/src/limits.rs b/frame/system/src/limits.rs index d9be460b3a4fb..7626c7e8665e6 100644 --- a/frame/system/src/limits.rs +++ b/frame/system/src/limits.rs @@ -204,7 +204,7 @@ pub struct BlockWeights { impl Default for BlockWeights { fn default() -> Self { - Self::with_sensible_defaults(1 * constants::WEIGHT_PER_SECOND, DEFAULT_NORMAL_RATIO) + Self::with_sensible_defaults(1u32 * constants::WEIGHT_PER_SECOND, DEFAULT_NORMAL_RATIO) } } @@ -295,9 +295,9 @@ impl BlockWeights { /// is not suitable for production deployments. pub fn simple_max(block_weight: Weight) -> Self { Self::builder() - .base_block(Weight::new()) + .base_block(Weight::zero()) .for_class(DispatchClass::all(), |weights| { - weights.base_extrinsic = Weight::new(); + weights.base_extrinsic = Weight::zero(); }) .for_class(DispatchClass::non_mandatory(), |weights| { weights.max_total = block_weight.into(); diff --git a/frame/system/src/weights.rs b/frame/system/src/weights.rs index 4f7f168eb55ab..8b6c291096d5a 100644 --- a/frame/system/src/weights.rs +++ b/frame/system/src/weights.rs @@ -65,7 +65,7 @@ impl WeightInfo for SubstrateWeight { fn remark_with_event(b: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) @@ -79,7 +79,7 @@ impl WeightInfo for SubstrateWeight { fn set_storage(i: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(603_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(603_000 as RefTimeWeight).saturating_mul(i as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) } // Storage: Skipped Metadata (r:0 w:0) @@ -87,7 +87,7 @@ impl WeightInfo for SubstrateWeight { fn kill_storage(i: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(513_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(513_000 as RefTimeWeight).saturating_mul(i as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) } // Storage: Skipped Metadata (r:0 w:0) @@ -95,7 +95,7 @@ impl WeightInfo for SubstrateWeight { fn kill_prefix(p: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_026_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_026_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(p as RefTimeWeight))) } } @@ -110,7 +110,7 @@ impl WeightInfo for () { fn remark_with_event(b: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(b as RefTimeWeight)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) @@ -124,7 +124,7 @@ impl WeightInfo for () { fn set_storage(i: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(603_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(603_000 as RefTimeWeight).saturating_mul(i as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) } // Storage: Skipped Metadata (r:0 w:0) @@ -132,7 +132,7 @@ impl WeightInfo for () { fn kill_storage(i: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(513_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(513_000 as RefTimeWeight).saturating_mul(i as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) } // Storage: Skipped Metadata (r:0 w:0) @@ -140,7 +140,7 @@ impl WeightInfo for () { fn kill_prefix(p: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(1_026_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_026_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes((1 as RefTimeWeight).saturating_mul(p as RefTimeWeight))) } } diff --git a/frame/tips/src/weights.rs b/frame/tips/src/weights.rs index 6fd4ccc7478f6..106e5e163f02d 100644 --- a/frame/tips/src/weights.rs +++ b/frame/tips/src/weights.rs @@ -60,7 +60,7 @@ impl WeightInfo for SubstrateWeight { fn report_awesome(r: u32, ) -> Weight { Weight::from_ref_time(30_669_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(4_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(4_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -77,9 +77,9 @@ impl WeightInfo for SubstrateWeight { fn tip_new(r: u32, t: u32, ) -> Weight { Weight::from_ref_time(20_385_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(166_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(166_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -88,7 +88,7 @@ impl WeightInfo for SubstrateWeight { fn tip(t: u32, ) -> Weight { Weight::from_ref_time(12_287_000 as RefTimeWeight) // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(363_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(363_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -99,7 +99,7 @@ impl WeightInfo for SubstrateWeight { fn close_tip(t: u32, ) -> Weight { Weight::from_ref_time(45_656_000 as RefTimeWeight) // Standard Error: 14_000 - .saturating_add(Weight::from_ref_time(276_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(276_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -108,7 +108,7 @@ impl WeightInfo for SubstrateWeight { fn slash_tip(t: u32, ) -> Weight { Weight::from_ref_time(18_525_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(37_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(37_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -121,7 +121,7 @@ impl WeightInfo for () { fn report_awesome(r: u32, ) -> Weight { Weight::from_ref_time(30_669_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(4_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(4_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -138,9 +138,9 @@ impl WeightInfo for () { fn tip_new(r: u32, t: u32, ) -> Weight { Weight::from_ref_time(20_385_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).saturating_mul(r as RefTimeWeight)) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(166_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(166_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -149,7 +149,7 @@ impl WeightInfo for () { fn tip(t: u32, ) -> Weight { Weight::from_ref_time(12_287_000 as RefTimeWeight) // Standard Error: 6_000 - .saturating_add(Weight::from_ref_time(363_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(363_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -160,7 +160,7 @@ impl WeightInfo for () { fn close_tip(t: u32, ) -> Weight { Weight::from_ref_time(45_656_000 as RefTimeWeight) // Standard Error: 14_000 - .saturating_add(Weight::from_ref_time(276_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(276_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -169,7 +169,7 @@ impl WeightInfo for () { fn slash_tip(t: u32, ) -> Weight { Weight::from_ref_time(18_525_000 as RefTimeWeight) // Standard Error: 5_000 - .saturating_add(Weight::from_ref_time(37_000 as RefTimeWeight).scalar_saturating_mul(t as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(37_000 as RefTimeWeight).saturating_mul(t as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } diff --git a/frame/transaction-payment/asset-tx-payment/src/tests.rs b/frame/transaction-payment/asset-tx-payment/src/tests.rs index a296a52b5e840..a17d564d7a334 100644 --- a/frame/transaction-payment/asset-tx-payment/src/tests.rs +++ b/frame/transaction-payment/asset-tx-payment/src/tests.rs @@ -59,7 +59,7 @@ const CALL: &::Call = &Call::Balances(BalancesCall::transfer { dest: 2, value: 69 }); thread_local! { - static EXTRINSIC_BASE_WEIGHT: RefCell = RefCell::new(Weight::new()); + static EXTRINSIC_BASE_WEIGHT: RefCell = RefCell::new(Weight::zero()); } pub struct BlockWeights; diff --git a/frame/transaction-payment/src/lib.rs b/frame/transaction-payment/src/lib.rs index 9777d7d240491..16986203de1e5 100644 --- a/frame/transaction-payment/src/lib.rs +++ b/frame/transaction-payment/src/lib.rs @@ -845,7 +845,7 @@ mod tests { &Call::Balances(BalancesCall::transfer { dest: 2, value: 69 }); thread_local! { - static EXTRINSIC_BASE_WEIGHT: RefCell = RefCell::new(Weight::new()); + static EXTRINSIC_BASE_WEIGHT: RefCell = RefCell::new(Weight::zero()); } pub struct BlockWeights; diff --git a/frame/transaction-storage/src/weights.rs b/frame/transaction-storage/src/weights.rs index 54d5b0723aad6..04fa4e3048c22 100644 --- a/frame/transaction-storage/src/weights.rs +++ b/frame/transaction-storage/src/weights.rs @@ -61,7 +61,7 @@ impl WeightInfo for SubstrateWeight { fn store(l: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -99,7 +99,7 @@ impl WeightInfo for () { fn store(l: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(5_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(6 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } diff --git a/frame/treasury/src/lib.rs b/frame/treasury/src/lib.rs index eecf225beea9b..cd4d9cf036abe 100644 --- a/frame/treasury/src/lib.rs +++ b/frame/treasury/src/lib.rs @@ -500,7 +500,7 @@ impl, I: 'static> Pallet { /// Spend some money! returns number of approvals before spend. pub fn spend_funds() -> Weight { - let mut total_weight = Weight::new(); + let mut total_weight = Weight::zero(); let mut budget_remaining = Self::pot(); Self::deposit_event(Event::Spending { budget_remaining }); diff --git a/frame/treasury/src/weights.rs b/frame/treasury/src/weights.rs index 74e6e9779000e..d2a5bc9f1f258 100644 --- a/frame/treasury/src/weights.rs +++ b/frame/treasury/src/weights.rs @@ -81,7 +81,7 @@ impl WeightInfo for SubstrateWeight { fn approve_proposal(p: u32, ) -> Weight { Weight::from_ref_time(10_786_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(110_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(110_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) } @@ -98,7 +98,7 @@ impl WeightInfo for SubstrateWeight { fn on_initialize_proposals(p: u32, ) -> Weight { Weight::from_ref_time(25_805_000 as RefTimeWeight) // Standard Error: 18_000 - .saturating_add(Weight::from_ref_time(28_473_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(28_473_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((3 as RefTimeWeight).saturating_mul(p as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) @@ -134,7 +134,7 @@ impl WeightInfo for () { fn approve_proposal(p: u32, ) -> Weight { Weight::from_ref_time(10_786_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(110_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(110_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) } @@ -151,7 +151,7 @@ impl WeightInfo for () { fn on_initialize_proposals(p: u32, ) -> Weight { Weight::from_ref_time(25_805_000 as RefTimeWeight) // Standard Error: 18_000 - .saturating_add(Weight::from_ref_time(28_473_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(28_473_000 as RefTimeWeight).saturating_mul(p as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((3 as RefTimeWeight).saturating_mul(p as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) diff --git a/frame/uniques/src/weights.rs b/frame/uniques/src/weights.rs index 4ed01e463cc86..dae72accd2adc 100644 --- a/frame/uniques/src/weights.rs +++ b/frame/uniques/src/weights.rs @@ -105,11 +105,11 @@ impl WeightInfo for SubstrateWeight { fn destroy(n: u32, m: u32, a: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 25_000 - .saturating_add(Weight::from_ref_time(13_639_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(13_639_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) // Standard Error: 25_000 - .saturating_add(Weight::from_ref_time(2_393_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_393_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) // Standard Error: 25_000 - .saturating_add(Weight::from_ref_time(2_217_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_217_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) @@ -150,7 +150,7 @@ impl WeightInfo for SubstrateWeight { fn redeposit(i: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 24_000 - .saturating_add(Weight::from_ref_time(15_540_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(15_540_000 as RefTimeWeight).saturating_mul(i as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) .saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight)) @@ -322,11 +322,11 @@ impl WeightInfo for () { fn destroy(n: u32, m: u32, a: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 25_000 - .saturating_add(Weight::from_ref_time(13_639_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(13_639_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) // Standard Error: 25_000 - .saturating_add(Weight::from_ref_time(2_393_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_393_000 as RefTimeWeight).saturating_mul(m as RefTimeWeight)) // Standard Error: 25_000 - .saturating_add(Weight::from_ref_time(2_217_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_217_000 as RefTimeWeight).saturating_mul(a as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(n as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(4 as RefTimeWeight)) @@ -367,7 +367,7 @@ impl WeightInfo for () { fn redeposit(i: u32, ) -> Weight { Weight::from_ref_time(0 as RefTimeWeight) // Standard Error: 24_000 - .saturating_add(Weight::from_ref_time(15_540_000 as RefTimeWeight).scalar_saturating_mul(i as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(15_540_000 as RefTimeWeight).saturating_mul(i as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight))) .saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight)) diff --git a/frame/utility/src/lib.rs b/frame/utility/src/lib.rs index 3df12d69e84eb..2209bc65d4958 100644 --- a/frame/utility/src/lib.rs +++ b/frame/utility/src/lib.rs @@ -185,7 +185,7 @@ pub mod pallet { let dispatch_infos = calls.iter().map(|call| call.get_dispatch_info()).collect::>(); let dispatch_weight = dispatch_infos.iter() .map(|di| di.weight) - .fold(Weight::new(), |total: Weight, weight: Weight| total.saturating_add(weight)) + .fold(Weight::zero(), |total: Weight, weight: Weight| total.saturating_add(weight)) .saturating_add(T::WeightInfo::batch(calls.len() as u32)); let dispatch_class = { let all_operational = dispatch_infos.iter() @@ -208,7 +208,7 @@ pub mod pallet { ensure!(calls_len <= Self::batched_calls_limit() as usize, Error::::TooManyCalls); // Track the actual weight of each of the batch calls. - let mut weight = Weight::new(); + let mut weight = Weight::zero(); for (index, call) in calls.into_iter().enumerate() { let info = call.get_dispatch_info(); // If origin is root, don't apply any dispatch filters; root can call anything. @@ -301,7 +301,7 @@ pub mod pallet { let dispatch_infos = calls.iter().map(|call| call.get_dispatch_info()).collect::>(); let dispatch_weight = dispatch_infos.iter() .map(|di| di.weight) - .fold(Weight::new(), |total: Weight, weight: Weight| total.saturating_add(weight)) + .fold(Weight::zero(), |total: Weight, weight: Weight| total.saturating_add(weight)) .saturating_add(T::WeightInfo::batch_all(calls.len() as u32)); let dispatch_class = { let all_operational = dispatch_infos.iter() @@ -324,7 +324,7 @@ pub mod pallet { ensure!(calls_len <= Self::batched_calls_limit() as usize, Error::::TooManyCalls); // Track the actual weight of each of the batch calls. - let mut weight = Weight::new(); + let mut weight = Weight::zero(); for (index, call) in calls.into_iter().enumerate() { let info = call.get_dispatch_info(); // If origin is root, bypass any dispatch filter; root can call anything. @@ -429,7 +429,7 @@ pub mod pallet { ensure!(calls_len <= Self::batched_calls_limit() as usize, Error::::TooManyCalls); // Track the actual weight of each of the batch calls. - let mut weight = Weight::new(); + let mut weight = Weight::zero(); // Track failed dispatch occur. let mut has_error: bool = false; for call in calls.into_iter() { diff --git a/frame/utility/src/tests.rs b/frame/utility/src/tests.rs index e3b16b5244fc0..09a2c6a4e4d38 100644 --- a/frame/utility/src/tests.rs +++ b/frame/utility/src/tests.rs @@ -420,7 +420,7 @@ fn batch_handles_weight_refund() { let good_call = call_foobar(false, start_weight, Some(end_weight)); let bad_call = call_foobar(true, start_weight, Some(end_weight)); let batch_calls = vec![good_call, bad_call]; - let batch_len = Weight::from_ref_time(batch_calls.len() as u64); + let batch_len = batch_calls.len() as u64; let call = Call::Utility(UtilityCall::batch { calls: batch_calls }); let info = call.get_dispatch_info(); let result = call.dispatch(Origin::signed(1)); @@ -533,7 +533,7 @@ fn batch_all_handles_weight_refund() { let good_call = call_foobar(false, start_weight, Some(end_weight)); let bad_call = call_foobar(true, start_weight, Some(end_weight)); let batch_calls = vec![good_call, bad_call]; - let batch_len = Weight::from_ref_time(batch_calls.len() as u64); + let batch_len = batch_calls.len() as u64; let call = Call::Utility(UtilityCall::batch_all { calls: batch_calls }); let info = call.get_dispatch_info(); let result = call.dispatch(Origin::signed(1)); diff --git a/frame/utility/src/weights.rs b/frame/utility/src/weights.rs index 0f0d171d8d4ee..1df9c2e67cc1f 100644 --- a/frame/utility/src/weights.rs +++ b/frame/utility/src/weights.rs @@ -60,7 +60,7 @@ impl WeightInfo for SubstrateWeight { fn batch(c: u32, ) -> Weight { Weight::from_ref_time(23_113_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(2_701_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_701_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) } fn as_derivative() -> Weight { Weight::from_ref_time(4_182_000 as RefTimeWeight) @@ -69,7 +69,7 @@ impl WeightInfo for SubstrateWeight { fn batch_all(c: u32, ) -> Weight { Weight::from_ref_time(18_682_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(2_794_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_794_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) } fn dispatch_as() -> Weight { Weight::from_ref_time(12_049_000 as RefTimeWeight) @@ -78,7 +78,7 @@ impl WeightInfo for SubstrateWeight { fn force_batch(c: u32, ) -> Weight { Weight::from_ref_time(19_136_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(2_697_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_697_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) } } @@ -88,7 +88,7 @@ impl WeightInfo for () { fn batch(c: u32, ) -> Weight { Weight::from_ref_time(23_113_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(2_701_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_701_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) } fn as_derivative() -> Weight { Weight::from_ref_time(4_182_000 as RefTimeWeight) @@ -97,7 +97,7 @@ impl WeightInfo for () { fn batch_all(c: u32, ) -> Weight { Weight::from_ref_time(18_682_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(2_794_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_794_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) } fn dispatch_as() -> Weight { Weight::from_ref_time(12_049_000 as RefTimeWeight) @@ -106,6 +106,6 @@ impl WeightInfo for () { fn force_batch(c: u32, ) -> Weight { Weight::from_ref_time(19_136_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(2_697_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(2_697_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight)) } } diff --git a/frame/vesting/src/weights.rs b/frame/vesting/src/weights.rs index bd3af72cdd182..5988b0bd47d54 100644 --- a/frame/vesting/src/weights.rs +++ b/frame/vesting/src/weights.rs @@ -62,9 +62,9 @@ impl WeightInfo for SubstrateWeight { fn vest_locked(l: u32, s: u32, ) -> Weight { Weight::from_ref_time(32_978_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(82_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(82_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(88_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(88_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -73,9 +73,9 @@ impl WeightInfo for SubstrateWeight { fn vest_unlocked(l: u32, s: u32, ) -> Weight { Weight::from_ref_time(32_856_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(79_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(79_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight)) } @@ -85,9 +85,9 @@ impl WeightInfo for SubstrateWeight { fn vest_other_locked(l: u32, s: u32, ) -> Weight { Weight::from_ref_time(33_522_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(74_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(74_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(72_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(72_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -97,9 +97,9 @@ impl WeightInfo for SubstrateWeight { fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { Weight::from_ref_time(32_558_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(78_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(78_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(61_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(61_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -109,9 +109,9 @@ impl WeightInfo for SubstrateWeight { fn vested_transfer(l: u32, s: u32, ) -> Weight { Weight::from_ref_time(49_260_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(80_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(80_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(55_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(55_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -121,9 +121,9 @@ impl WeightInfo for SubstrateWeight { fn force_vested_transfer(l: u32, s: u32, ) -> Weight { Weight::from_ref_time(49_166_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(77_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(77_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(43_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(43_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight)) } @@ -133,9 +133,9 @@ impl WeightInfo for SubstrateWeight { fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { Weight::from_ref_time(34_042_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(83_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(83_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(80_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(80_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -145,9 +145,9 @@ impl WeightInfo for SubstrateWeight { fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { Weight::from_ref_time(33_937_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(78_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(78_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(73_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(73_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -160,9 +160,9 @@ impl WeightInfo for () { fn vest_locked(l: u32, s: u32, ) -> Weight { Weight::from_ref_time(32_978_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(82_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(82_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(88_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(88_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -171,9 +171,9 @@ impl WeightInfo for () { fn vest_unlocked(l: u32, s: u32, ) -> Weight { Weight::from_ref_time(32_856_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(79_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(79_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(56_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight)) } @@ -183,9 +183,9 @@ impl WeightInfo for () { fn vest_other_locked(l: u32, s: u32, ) -> Weight { Weight::from_ref_time(33_522_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(74_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(74_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(72_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(72_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -195,9 +195,9 @@ impl WeightInfo for () { fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { Weight::from_ref_time(32_558_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(78_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(78_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(61_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(61_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -207,9 +207,9 @@ impl WeightInfo for () { fn vested_transfer(l: u32, s: u32, ) -> Weight { Weight::from_ref_time(49_260_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(80_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(80_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(55_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(55_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -219,9 +219,9 @@ impl WeightInfo for () { fn force_vested_transfer(l: u32, s: u32, ) -> Weight { Weight::from_ref_time(49_166_000 as RefTimeWeight) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(77_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(77_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) // Standard Error: 4_000 - .saturating_add(Weight::from_ref_time(43_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(43_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(4 as RefTimeWeight)) } @@ -231,9 +231,9 @@ impl WeightInfo for () { fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { Weight::from_ref_time(34_042_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(83_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(83_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(80_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(80_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } @@ -243,9 +243,9 @@ impl WeightInfo for () { fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { Weight::from_ref_time(33_937_000 as RefTimeWeight) // Standard Error: 1_000 - .saturating_add(Weight::from_ref_time(78_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(78_000 as RefTimeWeight).saturating_mul(l as RefTimeWeight)) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(73_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(73_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } diff --git a/frame/whitelist/src/tests.rs b/frame/whitelist/src/tests.rs index 3e20cd29efb4f..24974bd726d43 100644 --- a/frame/whitelist/src/tests.rs +++ b/frame/whitelist/src/tests.rs @@ -99,7 +99,7 @@ fn test_whitelist_call_and_execute() { Whitelist::dispatch_whitelisted_call( Origin::root(), call_hash, - call_weight - Weight::one() + call_weight - Weight::from_ref_time(1) ), crate::Error::::InvalidCallWeightWitness, ); diff --git a/frame/whitelist/src/weights.rs b/frame/whitelist/src/weights.rs index bb2ed9700c833..88d1dedb2de47 100644 --- a/frame/whitelist/src/weights.rs +++ b/frame/whitelist/src/weights.rs @@ -82,7 +82,7 @@ impl WeightInfo for SubstrateWeight { fn dispatch_whitelisted_call_with_preimage(n: u32, ) -> Weight { Weight::from_ref_time(25_325_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight)) } @@ -119,7 +119,7 @@ impl WeightInfo for () { fn dispatch_whitelisted_call_with_preimage(n: u32, ) -> Weight { Weight::from_ref_time(25_325_000 as RefTimeWeight) // Standard Error: 0 - .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight)) + .saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight)) .saturating_add(RocksDbWeight::get().reads(2 as RefTimeWeight)) .saturating_add(RocksDbWeight::get().writes(3 as RefTimeWeight)) } diff --git a/utils/frame/benchmarking-cli/src/overhead/README.md b/utils/frame/benchmarking-cli/src/overhead/README.md index a1da5da0d0792..9d723c3424f7b 100644 --- a/utils/frame/benchmarking-cli/src/overhead/README.md +++ b/utils/frame/benchmarking-cli/src/overhead/README.md @@ -30,7 +30,7 @@ The file will contain the concrete weight value and various statistics about the /// 99th: 3_631_863 /// 95th: 3_595_674 /// 75th: 3_526_435 -pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.scalar_saturating_mul(3_532_484); +pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(3_532_484); ``` In this example it takes 3.5 ms to execute an empty block. That means that it always takes at least 3.5 ms to execute *any* block. @@ -59,7 +59,7 @@ The relevant section in the output file looks like this: /// 99th: 68_758 /// 95th: 67_843 /// 75th: 67_749 -pub const ExtrinsicBaseWeight: Weight = Weight::from_ref_time(67_745 * WEIGHT_PER_NANOS); +pub const ExtrinsicBaseWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(67_745); ``` In this example it takes 67.7 µs to execute a NO-OP extrinsic. That means that it always takes at least 67.7 µs to execute *any* extrinsic. diff --git a/utils/frame/benchmarking-cli/src/overhead/weights.hbs b/utils/frame/benchmarking-cli/src/overhead/weights.hbs index d07533e9dbaa8..bddaa642a5a29 100644 --- a/utils/frame/benchmarking-cli/src/overhead/weights.hbs +++ b/utils/frame/benchmarking-cli/src/overhead/weights.hbs @@ -52,7 +52,7 @@ parameter_types! { /// 99th: {{underscore stats.p99}} /// 95th: {{underscore stats.p95}} /// 75th: {{underscore stats.p75}} - pub const {{long_name}}Weight: Weight = WEIGHT_PER_NANOS.scalar_saturating_mul({{underscore weight}}); + pub const {{long_name}}Weight: Weight = WEIGHT_PER_NANOS.saturating_mul({{underscore weight}}); } #[cfg(test)] diff --git a/utils/frame/benchmarking-cli/src/pallet/template.hbs b/utils/frame/benchmarking-cli/src/pallet/template.hbs index bf18e23367bc9..f6be16cf69ac9 100644 --- a/utils/frame/benchmarking-cli/src/pallet/template.hbs +++ b/utils/frame/benchmarking-cli/src/pallet/template.hbs @@ -36,7 +36,7 @@ impl {{pallet}}::WeightInfo for WeightInfo { Weight::from_ref_time({{underscore benchmark.base_weight}} as RefTimeWeight) {{#each benchmark.component_weight as |cw|}} // Standard Error: {{underscore cw.error}} - .saturating_add(Weight::from_ref_time({{underscore cw.slope}} as RefTimeWeight).scalar_saturating_mul({{cw.name}} as RefTimeWeight)) + .saturating_add(Weight::from_ref_time({{underscore cw.slope}} as RefTimeWeight).saturating_mul({{cw.name}} as RefTimeWeight)) {{/each}} {{#if (ne benchmark.base_reads "0")}} .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as RefTimeWeight))