Deprecate Weight::from_{ref_time, proof_size} (#13475)

* Deprecate Weight::from_{ref_time, proof_size}

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update templates

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use from_parts

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use from_parts

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Dont revert comment 🤦

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_balances

* Update weight files

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* More fixes

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Adapt to Master changes

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
This commit is contained in:
Oliver Tale-Yazdi
2023-03-02 22:28:17 +01:00
committed by GitHub
parent 7981d4aa59
commit 9e56e1acdd
101 changed files with 2695 additions and 2857 deletions
@@ -130,7 +130,7 @@ mod tests {
fn signed_ext_check_era_should_change_longevity() {
new_test_ext().execute_with(|| {
let normal = DispatchInfo {
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
class: DispatchClass::Normal,
pays_fee: Pays::Yes,
};
@@ -308,7 +308,7 @@ mod tests {
new_test_ext().execute_with(|| {
let max = DispatchInfo {
weight: block_weights().get(DispatchClass::Normal).max_extrinsic.unwrap() +
Weight::from_ref_time(1),
Weight::from_parts(1, 0),
class: DispatchClass::Normal,
..Default::default()
};
@@ -334,7 +334,7 @@ mod tests {
let okay =
DispatchInfo { weight, class: DispatchClass::Operational, ..Default::default() };
let max = DispatchInfo {
weight: weight + Weight::from_ref_time(1),
weight: weight + Weight::from_parts(1, 0),
class: DispatchClass::Operational,
..Default::default()
};
@@ -366,9 +366,9 @@ mod tests {
// So normal extrinsic can be 758 weight (-5 for base extrinsic weight)
// And Operational can be 246 to produce a full block (-10 for base)
let max_normal =
DispatchInfo { weight: Weight::from_ref_time(753), ..Default::default() };
DispatchInfo { weight: Weight::from_parts(753, 0), ..Default::default() };
let rest_operational = DispatchInfo {
weight: Weight::from_ref_time(246),
weight: Weight::from_parts(246, 0),
class: DispatchClass::Operational,
..Default::default()
};
@@ -376,9 +376,9 @@ mod tests {
let len = 0_usize;
assert_ok!(CheckWeight::<Test>::do_pre_dispatch(&max_normal, len));
assert_eq!(System::block_weight().total(), Weight::from_ref_time(768));
assert_eq!(System::block_weight().total(), Weight::from_parts(768, 0));
assert_ok!(CheckWeight::<Test>::do_pre_dispatch(&rest_operational, len));
assert_eq!(block_weight_limit(), Weight::from_ref_time(1024).set_proof_size(u64::MAX));
assert_eq!(block_weight_limit(), Weight::from_parts(1024, u64::MAX));
assert_eq!(System::block_weight().total(), block_weight_limit().set_proof_size(0));
// Checking single extrinsic should not take current block weight into account.
assert_eq!(CheckWeight::<Test>::check_extrinsic_weight(&rest_operational), Ok(()));
@@ -390,9 +390,9 @@ mod tests {
new_test_ext().execute_with(|| {
// We switch the order of `full_block_with_normal_and_operational`
let max_normal =
DispatchInfo { weight: Weight::from_ref_time(753), ..Default::default() };
DispatchInfo { weight: Weight::from_parts(753, 0), ..Default::default() };
let rest_operational = DispatchInfo {
weight: Weight::from_ref_time(246),
weight: Weight::from_parts(246, 0),
class: DispatchClass::Operational,
..Default::default()
};
@@ -401,9 +401,9 @@ mod tests {
assert_ok!(CheckWeight::<Test>::do_pre_dispatch(&rest_operational, len));
// Extra 20 here from block execution + base extrinsic weight
assert_eq!(System::block_weight().total(), Weight::from_ref_time(266));
assert_eq!(System::block_weight().total(), Weight::from_parts(266, 0));
assert_ok!(CheckWeight::<Test>::do_pre_dispatch(&max_normal, len));
assert_eq!(block_weight_limit(), Weight::from_ref_time(1024).set_proof_size(u64::MAX));
assert_eq!(block_weight_limit(), Weight::from_parts(1024, u64::MAX));
assert_eq!(System::block_weight().total(), block_weight_limit().set_proof_size(0));
});
}
@@ -414,12 +414,12 @@ mod tests {
// An on_initialize takes up the whole block! (Every time!)
System::register_extra_weight_unchecked(Weight::MAX, DispatchClass::Mandatory);
let dispatch_normal = DispatchInfo {
weight: Weight::from_ref_time(251),
weight: Weight::from_parts(251, 0),
class: DispatchClass::Normal,
..Default::default()
};
let dispatch_operational = DispatchInfo {
weight: Weight::from_ref_time(246),
weight: Weight::from_parts(246, 0),
class: DispatchClass::Operational,
..Default::default()
};
@@ -445,9 +445,9 @@ mod tests {
#[test]
fn signed_ext_check_weight_works_operational_tx() {
new_test_ext().execute_with(|| {
let normal = DispatchInfo { weight: Weight::from_ref_time(100), ..Default::default() };
let normal = DispatchInfo { weight: Weight::from_parts(100, 0), ..Default::default() };
let op = DispatchInfo {
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
class: DispatchClass::Operational,
pays_fee: Pays::Yes,
};
@@ -513,12 +513,12 @@ mod tests {
fn signed_ext_check_weight_works_normal_tx() {
new_test_ext().execute_with(|| {
let normal_limit = normal_weight_limit();
let small = DispatchInfo { weight: Weight::from_ref_time(100), ..Default::default() };
let small = DispatchInfo { weight: Weight::from_parts(100, 0), ..Default::default() };
let base_extrinsic = block_weights().get(DispatchClass::Normal).base_extrinsic;
let medium =
DispatchInfo { weight: normal_limit - base_extrinsic, ..Default::default() };
let big = DispatchInfo {
weight: normal_limit - base_extrinsic + Weight::from_ref_time(1),
weight: normal_limit - base_extrinsic + Weight::from_parts(1, 0),
..Default::default()
};
let len = 0_usize;
@@ -537,7 +537,7 @@ mod tests {
reset_check_weight(&small, false, Weight::zero());
reset_check_weight(&medium, false, Weight::zero());
reset_check_weight(&big, true, Weight::from_ref_time(1));
reset_check_weight(&big, true, Weight::from_parts(1, 0));
})
}
@@ -545,9 +545,9 @@ mod tests {
fn signed_ext_check_weight_refund_works() {
new_test_ext().execute_with(|| {
// This is half of the max block weight
let info = DispatchInfo { weight: Weight::from_ref_time(512), ..Default::default() };
let info = DispatchInfo { weight: Weight::from_parts(512, 0), ..Default::default() };
let post_info = PostDispatchInfo {
actual_weight: Some(Weight::from_ref_time(128)),
actual_weight: Some(Weight::from_parts(128, 0)),
pays_fee: Default::default(),
};
let len = 0_usize;
@@ -557,13 +557,13 @@ mod tests {
BlockWeight::<Test>::mutate(|current_weight| {
current_weight.set(Weight::zero(), DispatchClass::Mandatory);
current_weight
.set(Weight::from_ref_time(256) - base_extrinsic, DispatchClass::Normal);
.set(Weight::from_parts(256, 0) - base_extrinsic, DispatchClass::Normal);
});
let pre = CheckWeight::<Test>(PhantomData).pre_dispatch(&1, CALL, &info, len).unwrap();
assert_eq!(
BlockWeight::<Test>::get().total(),
info.weight + Weight::from_ref_time(256)
info.weight + Weight::from_parts(256, 0)
);
assert_ok!(CheckWeight::<Test>::post_dispatch(
@@ -575,7 +575,7 @@ mod tests {
));
assert_eq!(
BlockWeight::<Test>::get().total(),
post_info.actual_weight.unwrap() + Weight::from_ref_time(256)
post_info.actual_weight.unwrap() + Weight::from_parts(256, 0)
);
})
}
@@ -583,23 +583,23 @@ mod tests {
#[test]
fn signed_ext_check_weight_actual_weight_higher_than_max_is_capped() {
new_test_ext().execute_with(|| {
let info = DispatchInfo { weight: Weight::from_ref_time(512), ..Default::default() };
let info = DispatchInfo { weight: Weight::from_parts(512, 0), ..Default::default() };
let post_info = PostDispatchInfo {
actual_weight: Some(Weight::from_ref_time(700)),
actual_weight: Some(Weight::from_parts(700, 0)),
pays_fee: Default::default(),
};
let len = 0_usize;
BlockWeight::<Test>::mutate(|current_weight| {
current_weight.set(Weight::zero(), DispatchClass::Mandatory);
current_weight.set(Weight::from_ref_time(128), DispatchClass::Normal);
current_weight.set(Weight::from_parts(128, 0), DispatchClass::Normal);
});
let pre = CheckWeight::<Test>(PhantomData).pre_dispatch(&1, CALL, &info, len).unwrap();
assert_eq!(
BlockWeight::<Test>::get().total(),
info.weight +
Weight::from_ref_time(128) +
Weight::from_parts(128, 0) +
block_weights().get(DispatchClass::Normal).base_extrinsic,
);
@@ -613,7 +613,7 @@ mod tests {
assert_eq!(
BlockWeight::<Test>::get().total(),
info.weight +
Weight::from_ref_time(128) +
Weight::from_parts(128, 0) +
block_weights().get(DispatchClass::Normal).base_extrinsic,
);
})
@@ -643,9 +643,9 @@ mod tests {
// Max normal is 768 (75%)
// Max mandatory is unlimited
let max_normal =
DispatchInfo { weight: Weight::from_ref_time(753), ..Default::default() };
DispatchInfo { weight: Weight::from_parts(753, 0), ..Default::default() };
let mandatory = DispatchInfo {
weight: Weight::from_ref_time(1019),
weight: Weight::from_parts(1019, 0),
class: DispatchClass::Mandatory,
..Default::default()
};
@@ -653,10 +653,10 @@ mod tests {
let len = 0_usize;
assert_ok!(CheckWeight::<Test>::do_pre_dispatch(&max_normal, len));
assert_eq!(System::block_weight().total(), Weight::from_ref_time(768));
assert_eq!(System::block_weight().total(), Weight::from_parts(768, 0));
assert_ok!(CheckWeight::<Test>::do_pre_dispatch(&mandatory, len));
assert_eq!(block_weight_limit(), Weight::from_ref_time(1024).set_proof_size(u64::MAX));
assert_eq!(System::block_weight().total(), Weight::from_ref_time(1024 + 768));
assert_eq!(block_weight_limit(), Weight::from_parts(1024, u64::MAX));
assert_eq!(System::block_weight().total(), Weight::from_parts(1024 + 768, 0));
assert_eq!(CheckWeight::<Test>::check_extrinsic_weight(&mandatory), Ok(()));
});
}
@@ -668,30 +668,30 @@ mod tests {
.base_block(Weight::zero())
.for_class(DispatchClass::non_mandatory(), |w| {
w.base_extrinsic = Weight::zero();
w.max_total = Some(Weight::from_ref_time(20).set_proof_size(u64::MAX));
w.max_total = Some(Weight::from_parts(20, u64::MAX));
})
.for_class(DispatchClass::Mandatory, |w| {
w.base_extrinsic = Weight::zero();
w.reserved = Some(Weight::from_ref_time(5).set_proof_size(u64::MAX));
w.reserved = Some(Weight::from_parts(5, u64::MAX));
w.max_total = None;
})
.build_or_panic();
let all_weight = crate::ConsumedWeight::new(|class| match class {
DispatchClass::Normal => Weight::from_ref_time(10),
DispatchClass::Operational => Weight::from_ref_time(10),
DispatchClass::Normal => Weight::from_parts(10, 0),
DispatchClass::Operational => Weight::from_parts(10, 0),
DispatchClass::Mandatory => Weight::zero(),
});
assert_eq!(maximum_weight.max_block, all_weight.total().set_proof_size(u64::MAX));
// fits into reserved
let mandatory1 = DispatchInfo {
weight: Weight::from_ref_time(5),
weight: Weight::from_parts(5, 0),
class: DispatchClass::Mandatory,
..Default::default()
};
// does not fit into reserved and the block is full.
let mandatory2 = DispatchInfo {
weight: Weight::from_ref_time(6),
weight: Weight::from_parts(6, 0),
class: DispatchClass::Mandatory,
..Default::default()
};
+4 -4
View File
@@ -41,7 +41,7 @@ frame_support::construct_runtime!(
);
const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
const MAX_BLOCK_WEIGHT: Weight = Weight::from_ref_time(1024).set_proof_size(u64::MAX);
const MAX_BLOCK_WEIGHT: Weight = Weight::from_parts(1024, u64::MAX);
parameter_types! {
pub Version: RuntimeVersion = RuntimeVersion {
@@ -59,15 +59,15 @@ parameter_types! {
write: 100,
};
pub RuntimeBlockWeights: limits::BlockWeights = limits::BlockWeights::builder()
.base_block(Weight::from_ref_time(10))
.base_block(Weight::from_parts(10, 0))
.for_class(DispatchClass::all(), |weights| {
weights.base_extrinsic = Weight::from_ref_time(5);
weights.base_extrinsic = Weight::from_parts(5, 0);
})
.for_class(DispatchClass::Normal, |weights| {
weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAX_BLOCK_WEIGHT);
})
.for_class(DispatchClass::Operational, |weights| {
weights.base_extrinsic = Weight::from_ref_time(10);
weights.base_extrinsic = Weight::from_parts(10, 0);
weights.max_total = Some(MAX_BLOCK_WEIGHT);
weights.reserved = Some(
MAX_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAX_BLOCK_WEIGHT
+17 -17
View File
@@ -233,7 +233,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
let normal_base = <Test as crate::Config>::BlockWeights::get()
.get(DispatchClass::Normal)
.base_extrinsic;
let pre_info = DispatchInfo { weight: Weight::from_ref_time(1000), ..Default::default() };
let pre_info = DispatchInfo { weight: Weight::from_parts(1000, 0), ..Default::default() };
System::note_applied_extrinsic(&Ok(Some(300).into()), pre_info);
System::note_applied_extrinsic(&Ok(Some(1000).into()), pre_info);
System::note_applied_extrinsic(
@@ -246,7 +246,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
System::note_applied_extrinsic(&Ok((Some(2_500_000), Pays::No).into()), pre_info);
System::note_applied_extrinsic(&Ok((Some(500), Pays::No).into()), pre_info);
System::note_applied_extrinsic(
&Err(DispatchError::BadOrigin.with_weight(Weight::from_ref_time(999))),
&Err(DispatchError::BadOrigin.with_weight(Weight::from_parts(999, 0))),
pre_info,
);
@@ -260,7 +260,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
System::note_applied_extrinsic(
&Err(DispatchErrorWithPostInfo {
post_info: PostDispatchInfo {
actual_weight: Some(Weight::from_ref_time(800)),
actual_weight: Some(Weight::from_parts(800, 0)),
pays_fee: Pays::Yes,
},
error: DispatchError::BadOrigin,
@@ -270,7 +270,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
System::note_applied_extrinsic(
&Err(DispatchErrorWithPostInfo {
post_info: PostDispatchInfo {
actual_weight: Some(Weight::from_ref_time(800)),
actual_weight: Some(Weight::from_parts(800, 0)),
pays_fee: Pays::No,
},
error: DispatchError::BadOrigin,
@@ -283,7 +283,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
.base_extrinsic;
assert!(normal_base != operational_base, "Test pre-condition violated");
let pre_info = DispatchInfo {
weight: Weight::from_ref_time(1000),
weight: Weight::from_parts(1000, 0),
class: DispatchClass::Operational,
..Default::default()
};
@@ -295,7 +295,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
phase: Phase::ApplyExtrinsic(0),
event: SysEvent::ExtrinsicSuccess {
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(300).saturating_add(normal_base),
weight: Weight::from_parts(300, 0).saturating_add(normal_base),
..Default::default()
},
}
@@ -306,7 +306,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
phase: Phase::ApplyExtrinsic(1),
event: SysEvent::ExtrinsicSuccess {
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(1000).saturating_add(normal_base),
weight: Weight::from_parts(1000, 0).saturating_add(normal_base),
..Default::default()
},
}
@@ -317,7 +317,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
phase: Phase::ApplyExtrinsic(2),
event: SysEvent::ExtrinsicSuccess {
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(1000).saturating_add(normal_base),
weight: Weight::from_parts(1000, 0).saturating_add(normal_base),
..Default::default()
},
}
@@ -328,7 +328,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
phase: Phase::ApplyExtrinsic(3),
event: SysEvent::ExtrinsicSuccess {
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(1000).saturating_add(normal_base),
weight: Weight::from_parts(1000, 0).saturating_add(normal_base),
pays_fee: Pays::Yes,
..Default::default()
},
@@ -340,7 +340,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
phase: Phase::ApplyExtrinsic(4),
event: SysEvent::ExtrinsicSuccess {
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(1000).saturating_add(normal_base),
weight: Weight::from_parts(1000, 0).saturating_add(normal_base),
pays_fee: Pays::No,
..Default::default()
},
@@ -352,7 +352,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
phase: Phase::ApplyExtrinsic(5),
event: SysEvent::ExtrinsicSuccess {
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(1000).saturating_add(normal_base),
weight: Weight::from_parts(1000, 0).saturating_add(normal_base),
pays_fee: Pays::No,
..Default::default()
},
@@ -364,7 +364,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
phase: Phase::ApplyExtrinsic(6),
event: SysEvent::ExtrinsicSuccess {
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(500).saturating_add(normal_base),
weight: Weight::from_parts(500, 0).saturating_add(normal_base),
pays_fee: Pays::No,
..Default::default()
},
@@ -377,7 +377,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
event: SysEvent::ExtrinsicFailed {
dispatch_error: DispatchError::BadOrigin.into(),
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(999).saturating_add(normal_base),
weight: Weight::from_parts(999, 0).saturating_add(normal_base),
..Default::default()
},
}
@@ -389,7 +389,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
event: SysEvent::ExtrinsicFailed {
dispatch_error: DispatchError::BadOrigin.into(),
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(1000).saturating_add(normal_base),
weight: Weight::from_parts(1000, 0).saturating_add(normal_base),
pays_fee: Pays::Yes,
..Default::default()
},
@@ -402,7 +402,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
event: SysEvent::ExtrinsicFailed {
dispatch_error: DispatchError::BadOrigin.into(),
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(800).saturating_add(normal_base),
weight: Weight::from_parts(800, 0).saturating_add(normal_base),
pays_fee: Pays::Yes,
..Default::default()
},
@@ -415,7 +415,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
event: SysEvent::ExtrinsicFailed {
dispatch_error: DispatchError::BadOrigin.into(),
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(800).saturating_add(normal_base),
weight: Weight::from_parts(800, 0).saturating_add(normal_base),
pays_fee: Pays::No,
..Default::default()
},
@@ -427,7 +427,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
phase: Phase::ApplyExtrinsic(11),
event: SysEvent::ExtrinsicSuccess {
dispatch_info: DispatchInfo {
weight: Weight::from_ref_time(300).saturating_add(operational_base),
weight: Weight::from_parts(300, 0).saturating_add(operational_base),
class: DispatchClass::Operational,
..Default::default()
},
+20 -20
View File
@@ -65,9 +65,9 @@ impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_018 nanoseconds.
Weight::from_ref_time(2_091_000)
Weight::from_parts(2_091_000, 0)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(362).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(362, 0).saturating_mul(b.into()))
}
/// The range of component `b` is `[0, 3932160]`.
fn remark_with_event(b: u32, ) -> Weight {
@@ -75,9 +75,9 @@ impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_449 nanoseconds.
Weight::from_ref_time(7_748_000)
Weight::from_parts(7_748_000, 0)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_423).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(1_423, 0).saturating_mul(b.into()))
}
/// Storage: System Digest (r:1 w:1)
/// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured)
@@ -100,9 +100,9 @@ impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_981 nanoseconds.
Weight::from_ref_time(2_114_000)
Weight::from_parts(2_114_000, 0)
// Standard Error: 804
.saturating_add(Weight::from_ref_time(631_438).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(631_438, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
}
/// Storage: Skipped Metadata (r:0 w:0)
@@ -113,9 +113,9 @@ impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_061 nanoseconds.
Weight::from_ref_time(2_153_000)
Weight::from_parts(2_153_000, 0)
// Standard Error: 952
.saturating_add(Weight::from_ref_time(502_629).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(502_629, 0).saturating_mul(i.into()))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
}
/// Storage: Skipped Metadata (r:0 w:0)
@@ -128,9 +128,9 @@ impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 4_026 nanoseconds.
Weight::from_parts(4_174_000, 121)
// Standard Error: 1_148
.saturating_add(Weight::from_ref_time(1_093_099).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(1_093_099, 0).saturating_mul(p.into()))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
.saturating_add(Weight::from_proof_size(70).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into()))
}
}
@@ -142,9 +142,9 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_018 nanoseconds.
Weight::from_ref_time(2_091_000)
Weight::from_parts(2_091_000, 0)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(362).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(362, 0).saturating_mul(b.into()))
}
/// The range of component `b` is `[0, 3932160]`.
fn remark_with_event(b: u32, ) -> Weight {
@@ -152,9 +152,9 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_449 nanoseconds.
Weight::from_ref_time(7_748_000)
Weight::from_parts(7_748_000, 0)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_423).saturating_mul(b.into()))
.saturating_add(Weight::from_parts(1_423, 0).saturating_mul(b.into()))
}
/// Storage: System Digest (r:1 w:1)
/// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured)
@@ -177,9 +177,9 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_981 nanoseconds.
Weight::from_ref_time(2_114_000)
Weight::from_parts(2_114_000, 0)
// Standard Error: 804
.saturating_add(Weight::from_ref_time(631_438).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(631_438, 0).saturating_mul(i.into()))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(i.into())))
}
/// Storage: Skipped Metadata (r:0 w:0)
@@ -190,9 +190,9 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_061 nanoseconds.
Weight::from_ref_time(2_153_000)
Weight::from_parts(2_153_000, 0)
// Standard Error: 952
.saturating_add(Weight::from_ref_time(502_629).saturating_mul(i.into()))
.saturating_add(Weight::from_parts(502_629, 0).saturating_mul(i.into()))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(i.into())))
}
/// Storage: Skipped Metadata (r:0 w:0)
@@ -205,8 +205,8 @@ impl WeightInfo for () {
// Minimum execution time: 4_026 nanoseconds.
Weight::from_parts(4_174_000, 121)
// Standard Error: 1_148
.saturating_add(Weight::from_ref_time(1_093_099).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(1_093_099, 0).saturating_mul(p.into()))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(p.into())))
.saturating_add(Weight::from_proof_size(70).saturating_mul(p.into()))
.saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into()))
}
}