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
+13 -13
View File
@@ -121,7 +121,7 @@ impl Contains<RuntimeCall> for BaseFilter {
parameter_types! {
pub BlockWeights: frame_system::limits::BlockWeights =
frame_system::limits::BlockWeights::simple_max(
Weight::from_ref_time(2_000_000_000_000).set_proof_size(u64::MAX),
Weight::from_parts(2_000_000_000_000, u64::MAX),
);
}
impl system::Config for Test {
@@ -169,40 +169,40 @@ impl pallet_preimage::Config for Test {
pub struct TestWeightInfo;
impl WeightInfo for TestWeightInfo {
fn service_agendas_base() -> Weight {
Weight::from_ref_time(0b0000_0001)
Weight::from_parts(0b0000_0001, 0)
}
fn service_agenda_base(i: u32) -> Weight {
Weight::from_ref_time((i << 8) as u64 + 0b0000_0010)
Weight::from_parts((i << 8) as u64 + 0b0000_0010, 0)
}
fn service_task_base() -> Weight {
Weight::from_ref_time(0b0000_0100)
Weight::from_parts(0b0000_0100, 0)
}
fn service_task_periodic() -> Weight {
Weight::from_ref_time(0b0000_1100)
Weight::from_parts(0b0000_1100, 0)
}
fn service_task_named() -> Weight {
Weight::from_ref_time(0b0001_0100)
Weight::from_parts(0b0001_0100, 0)
}
fn service_task_fetched(s: u32) -> Weight {
Weight::from_ref_time((s << 8) as u64 + 0b0010_0100)
Weight::from_parts((s << 8) as u64 + 0b0010_0100, 0)
}
fn execute_dispatch_signed() -> Weight {
Weight::from_ref_time(0b0100_0000)
Weight::from_parts(0b0100_0000, 0)
}
fn execute_dispatch_unsigned() -> Weight {
Weight::from_ref_time(0b1000_0000)
Weight::from_parts(0b1000_0000, 0)
}
fn schedule(_s: u32) -> Weight {
Weight::from_ref_time(50)
Weight::from_parts(50, 0)
}
fn cancel(_s: u32) -> Weight {
Weight::from_ref_time(50)
Weight::from_parts(50, 0)
}
fn schedule_named(_s: u32) -> Weight {
Weight::from_ref_time(50)
Weight::from_parts(50, 0)
}
fn cancel_named(_s: u32) -> Weight {
Weight::from_ref_time(50)
Weight::from_parts(50, 0)
}
}
parameter_types! {
+67 -67
View File
@@ -33,7 +33,7 @@ use substrate_test_utils::assert_eq_uvec;
fn basic_scheduling_works() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(&call));
assert_ok!(Scheduler::do_schedule(
DispatchTime::At(4),
@@ -55,7 +55,7 @@ fn basic_scheduling_works() {
fn scheduling_with_preimages_works() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let hash = <Test as frame_system::Config>::Hashing::hash_of(&call);
let len = call.using_encoded(|x| x.len()) as u32;
// Important to use here `Bounded::Lookup` to ensure that we request the hash.
@@ -79,7 +79,7 @@ fn schedule_after_works() {
new_test_ext().execute_with(|| {
run_to_block(2);
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(&call));
// This will schedule the call 3 blocks after the next block... so block 3 + 3 = 6
assert_ok!(Scheduler::do_schedule(
@@ -103,7 +103,7 @@ fn schedule_after_zero_works() {
new_test_ext().execute_with(|| {
run_to_block(2);
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(&call));
assert_ok!(Scheduler::do_schedule(
DispatchTime::After(0),
@@ -131,7 +131,7 @@ fn periodic_scheduling_works() {
root(),
Preimage::bound(RuntimeCall::Logger(logger::Call::log {
i: 42,
weight: Weight::from_ref_time(10)
weight: Weight::from_parts(10, 0)
}))
.unwrap()
));
@@ -156,7 +156,7 @@ fn periodic_scheduling_works() {
fn reschedule_works() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(&call));
assert_eq!(
Scheduler::do_schedule(
@@ -195,7 +195,7 @@ fn reschedule_works() {
fn reschedule_named_works() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(&call));
assert_eq!(
Scheduler::do_schedule_named(
@@ -235,7 +235,7 @@ fn reschedule_named_works() {
fn reschedule_named_perodic_works() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
assert!(!<Test as frame_system::Config>::BaseCallFilter::contains(&call));
assert_eq!(
Scheduler::do_schedule_named(
@@ -293,7 +293,7 @@ fn cancel_named_scheduling_works_with_normal_cancel() {
root(),
Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}))
.unwrap(),
)
@@ -305,7 +305,7 @@ fn cancel_named_scheduling_works_with_normal_cancel() {
root(),
Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 42,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}))
.unwrap(),
)
@@ -331,7 +331,7 @@ fn cancel_named_periodic_scheduling_works() {
root(),
Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 42,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}))
.unwrap(),
)
@@ -345,7 +345,7 @@ fn cancel_named_periodic_scheduling_works() {
root(),
Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10)
weight: Weight::from_parts(10, 0)
}))
.unwrap(),
)
@@ -359,7 +359,7 @@ fn cancel_named_periodic_scheduling_works() {
root(),
Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}))
.unwrap(),
)
@@ -581,12 +581,12 @@ fn scheduler_respects_priority_ordering_with_soft_deadlines() {
#[test]
fn on_initialize_weight_is_correct() {
new_test_ext().execute_with(|| {
let call_weight = Weight::from_ref_time(25);
let call_weight = Weight::from_parts(25, 0);
// Named
let call = RuntimeCall::Logger(LoggerCall::log {
i: 3,
weight: call_weight + Weight::from_ref_time(1),
weight: call_weight + Weight::from_parts(1, 0),
});
assert_ok!(Scheduler::do_schedule_named(
[1u8; 32],
@@ -598,7 +598,7 @@ fn on_initialize_weight_is_correct() {
));
let call = RuntimeCall::Logger(LoggerCall::log {
i: 42,
weight: call_weight + Weight::from_ref_time(2),
weight: call_weight + Weight::from_parts(2, 0),
});
// Anon Periodic
assert_ok!(Scheduler::do_schedule(
@@ -610,7 +610,7 @@ fn on_initialize_weight_is_correct() {
));
let call = RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: call_weight + Weight::from_ref_time(3),
weight: call_weight + Weight::from_parts(3, 0),
});
// Anon
assert_ok!(Scheduler::do_schedule(
@@ -623,7 +623,7 @@ fn on_initialize_weight_is_correct() {
// Named Periodic
let call = RuntimeCall::Logger(LoggerCall::log {
i: 2600,
weight: call_weight + Weight::from_ref_time(4),
weight: call_weight + Weight::from_parts(4, 0),
});
assert_ok!(Scheduler::do_schedule_named(
[2u8; 32],
@@ -641,7 +641,7 @@ fn on_initialize_weight_is_correct() {
TestWeightInfo::service_agenda_base(1) +
<TestWeightInfo as MarginalWeightInfo>::service_task(None, true, true) +
TestWeightInfo::execute_dispatch_unsigned() +
call_weight + Weight::from_ref_time(4)
call_weight + Weight::from_parts(4, 0)
);
assert_eq!(IncompleteSince::<Test>::get(), None);
assert_eq!(logger::log(), vec![(root(), 2600u32)]);
@@ -653,10 +653,10 @@ fn on_initialize_weight_is_correct() {
TestWeightInfo::service_agenda_base(2) +
<TestWeightInfo as MarginalWeightInfo>::service_task(None, false, true) +
TestWeightInfo::execute_dispatch_unsigned() +
call_weight + Weight::from_ref_time(3) +
call_weight + Weight::from_parts(3, 0) +
<TestWeightInfo as MarginalWeightInfo>::service_task(None, false, false) +
TestWeightInfo::execute_dispatch_unsigned() +
call_weight + Weight::from_ref_time(2)
call_weight + Weight::from_parts(2, 0)
);
assert_eq!(IncompleteSince::<Test>::get(), None);
assert_eq!(logger::log(), vec![(root(), 2600u32), (root(), 69u32), (root(), 42u32)]);
@@ -668,7 +668,7 @@ fn on_initialize_weight_is_correct() {
TestWeightInfo::service_agenda_base(1) +
<TestWeightInfo as MarginalWeightInfo>::service_task(None, true, false) +
TestWeightInfo::execute_dispatch_unsigned() +
call_weight + Weight::from_ref_time(1)
call_weight + Weight::from_parts(1, 0)
);
assert_eq!(IncompleteSince::<Test>::get(), None);
assert_eq!(
@@ -690,11 +690,11 @@ fn root_calls_works() {
new_test_ext().execute_with(|| {
let call = Box::new(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log {
i: 42,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
assert_ok!(
Scheduler::schedule_named(RuntimeOrigin::root(), [1u8; 32], 4, None, 127, call,)
@@ -719,15 +719,15 @@ fn fails_to_schedule_task_in_the_past() {
let call1 = Box::new(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log {
i: 42,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
let call3 = Box::new(RuntimeCall::Logger(LoggerCall::log {
i: 42,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
assert_noop!(
@@ -752,11 +752,11 @@ fn should_use_origin() {
new_test_ext().execute_with(|| {
let call = Box::new(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log {
i: 42,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
assert_ok!(Scheduler::schedule_named(
system::RawOrigin::Signed(1).into(),
@@ -784,11 +784,11 @@ fn should_check_origin() {
new_test_ext().execute_with(|| {
let call = Box::new(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log {
i: 42,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
assert_noop!(
Scheduler::schedule_named(
@@ -813,11 +813,11 @@ fn should_check_origin_for_cancel() {
new_test_ext().execute_with(|| {
let call = Box::new(RuntimeCall::Logger(LoggerCall::log_without_filter {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
let call2 = Box::new(RuntimeCall::Logger(LoggerCall::log_without_filter {
i: 42,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}));
assert_ok!(Scheduler::schedule_named(
system::RawOrigin::Signed(1).into(),
@@ -861,7 +861,7 @@ fn migration_to_v4_works() {
priority: i as u8 + 10,
call: RuntimeCall::Logger(LoggerCall::log {
i: 96,
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
}),
maybe_periodic: None,
}),
@@ -871,7 +871,7 @@ fn migration_to_v4_works() {
priority: 123,
call: RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}),
maybe_periodic: Some((456u64, 10)),
}),
@@ -892,7 +892,7 @@ fn migration_to_v4_works() {
priority: 10,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 96,
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
}))
.unwrap(),
maybe_periodic: None,
@@ -905,7 +905,7 @@ fn migration_to_v4_works() {
priority: 123,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}))
.unwrap(),
maybe_periodic: Some((456u64, 10)),
@@ -922,7 +922,7 @@ fn migration_to_v4_works() {
priority: 11,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 96,
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
}))
.unwrap(),
maybe_periodic: None,
@@ -935,7 +935,7 @@ fn migration_to_v4_works() {
priority: 123,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}))
.unwrap(),
maybe_periodic: Some((456u64, 10)),
@@ -952,7 +952,7 @@ fn migration_to_v4_works() {
priority: 12,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 96,
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
}))
.unwrap(),
maybe_periodic: None,
@@ -965,7 +965,7 @@ fn migration_to_v4_works() {
priority: 123,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}))
.unwrap(),
maybe_periodic: Some((456u64, 10)),
@@ -998,7 +998,7 @@ fn test_migrate_origin() {
priority: i as u8 + 10,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 96,
weight: Weight::from_ref_time(100),
weight: Weight::from_parts(100, 0),
}))
.unwrap(),
origin: 3u32,
@@ -1012,7 +1012,7 @@ fn test_migrate_origin() {
origin: 2u32,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10),
weight: Weight::from_parts(10, 0),
}))
.unwrap(),
maybe_periodic: Some((456u64, 10)),
@@ -1045,7 +1045,7 @@ fn test_migrate_origin() {
priority: 10,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 96,
weight: Weight::from_ref_time(100)
weight: Weight::from_parts(100, 0)
}))
.unwrap(),
maybe_periodic: None,
@@ -1058,7 +1058,7 @@ fn test_migrate_origin() {
priority: 123,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10)
weight: Weight::from_parts(10, 0)
}))
.unwrap(),
maybe_periodic: Some((456u64, 10)),
@@ -1075,7 +1075,7 @@ fn test_migrate_origin() {
priority: 11,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 96,
weight: Weight::from_ref_time(100)
weight: Weight::from_parts(100, 0)
}))
.unwrap(),
maybe_periodic: None,
@@ -1088,7 +1088,7 @@ fn test_migrate_origin() {
priority: 123,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10)
weight: Weight::from_parts(10, 0)
}))
.unwrap(),
maybe_periodic: Some((456u64, 10)),
@@ -1105,7 +1105,7 @@ fn test_migrate_origin() {
priority: 12,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 96,
weight: Weight::from_ref_time(100)
weight: Weight::from_parts(100, 0)
}))
.unwrap(),
maybe_periodic: None,
@@ -1118,7 +1118,7 @@ fn test_migrate_origin() {
priority: 123,
call: Preimage::bound(RuntimeCall::Logger(LoggerCall::log {
i: 69,
weight: Weight::from_ref_time(10)
weight: Weight::from_parts(10, 0)
}))
.unwrap(),
maybe_periodic: Some((456u64, 10)),
@@ -1136,7 +1136,7 @@ fn test_migrate_origin() {
fn postponed_named_task_cannot_be_rescheduled() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(1000) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(1000, 0) });
let hash = <Test as frame_system::Config>::Hashing::hash_of(&call);
let len = call.using_encoded(|x| x.len()) as u32;
// Important to use here `Bounded::Lookup` to ensure that we request the hash.
@@ -1204,7 +1204,7 @@ fn scheduler_v3_anon_basic_works() {
use frame_support::traits::schedule::v3::Anon;
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
// Schedule a call.
let _address = <Scheduler as Anon<_, _, _>>::schedule(
@@ -1233,7 +1233,7 @@ fn scheduler_v3_anon_cancel_works() {
use frame_support::traits::schedule::v3::Anon;
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let bound = Preimage::bound(call).unwrap();
// Schedule a call.
@@ -1260,7 +1260,7 @@ fn scheduler_v3_anon_reschedule_works() {
use frame_support::traits::schedule::v3::Anon;
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
// Schedule a call.
let address = <Scheduler as Anon<_, _, _>>::schedule(
@@ -1307,7 +1307,7 @@ fn scheduler_v3_anon_next_schedule_time_works() {
use frame_support::traits::schedule::v3::Anon;
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let bound = Preimage::bound(call).unwrap();
// Schedule a call.
@@ -1344,7 +1344,7 @@ fn scheduler_v3_anon_reschedule_and_next_schedule_time_work() {
use frame_support::traits::schedule::v3::Anon;
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let bound = Preimage::bound(call).unwrap();
// Schedule a call.
@@ -1386,7 +1386,7 @@ fn scheduler_v3_anon_schedule_agenda_overflows() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let bound = Preimage::bound(call).unwrap();
// Schedule the maximal number allowed per block.
@@ -1422,7 +1422,7 @@ fn scheduler_v3_anon_cancel_and_schedule_fills_holes() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let bound = Preimage::bound(call).unwrap();
let mut addrs = Vec::<_>::default();
@@ -1471,7 +1471,7 @@ fn scheduler_v3_anon_reschedule_fills_holes() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let bound = Preimage::bound(call).unwrap();
let mut addrs = Vec::<_>::default();
@@ -1515,7 +1515,7 @@ fn scheduler_v3_named_basic_works() {
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let name = [1u8; 32];
// Schedule a call.
@@ -1547,7 +1547,7 @@ fn scheduler_v3_named_cancel_named_works() {
use frame_support::traits::schedule::v3::Named;
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let bound = Preimage::bound(call).unwrap();
let name = [1u8; 32];
@@ -1577,7 +1577,7 @@ fn scheduler_v3_named_cancel_without_name_works() {
use frame_support::traits::schedule::v3::{Anon, Named};
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let bound = Preimage::bound(call).unwrap();
let name = [1u8; 32];
@@ -1607,7 +1607,7 @@ fn scheduler_v3_named_reschedule_named_works() {
use frame_support::traits::schedule::v3::{Anon, Named};
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let name = [1u8; 32];
// Schedule a call.
@@ -1666,7 +1666,7 @@ fn scheduler_v3_named_next_schedule_time_works() {
use frame_support::traits::schedule::v3::{Anon, Named};
new_test_ext().execute_with(|| {
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let bound = Preimage::bound(call).unwrap();
let name = [1u8; 32];
@@ -1711,7 +1711,7 @@ fn cancel_last_task_removes_agenda() {
new_test_ext().execute_with(|| {
let when = 4;
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let address = Scheduler::do_schedule(
DispatchTime::At(when),
None,
@@ -1745,7 +1745,7 @@ fn cancel_named_last_task_removes_agenda() {
new_test_ext().execute_with(|| {
let when = 4;
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
Scheduler::do_schedule_named(
[1u8; 32],
DispatchTime::At(when),
@@ -1781,7 +1781,7 @@ fn reschedule_last_task_removes_agenda() {
new_test_ext().execute_with(|| {
let when = 4;
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
let address = Scheduler::do_schedule(
DispatchTime::At(when),
None,
@@ -1818,7 +1818,7 @@ fn reschedule_named_last_task_removes_agenda() {
new_test_ext().execute_with(|| {
let when = 4;
let call =
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_ref_time(10) });
RuntimeCall::Logger(LoggerCall::log { i: 42, weight: Weight::from_parts(10, 0) });
Scheduler::do_schedule_named(
[1u8; 32],
DispatchTime::At(when),
+24 -24
View File
@@ -86,7 +86,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 3_079 nanoseconds.
Weight::from_parts(7_087_647, 109497)
// Standard Error: 658
.saturating_add(Weight::from_ref_time(279_320).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(279_320, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -95,7 +95,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_192 nanoseconds.
Weight::from_ref_time(5_528_000)
Weight::from_parts(5_528_000, 0)
}
/// Storage: Preimage PreimageFor (r:1 w:1)
/// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: Measured)
@@ -109,10 +109,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 17_284 nanoseconds.
Weight::from_parts(17_574_000, 5252)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_126).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_126, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(1).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into()))
}
/// Storage: Scheduler Lookup (r:0 w:1)
/// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen)
@@ -121,7 +121,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_020 nanoseconds.
Weight::from_ref_time(7_262_000)
Weight::from_parts(7_262_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
fn service_task_periodic() -> Weight {
@@ -129,21 +129,21 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_187 nanoseconds.
Weight::from_ref_time(5_368_000)
Weight::from_parts(5_368_000, 0)
}
fn execute_dispatch_signed() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_313 nanoseconds.
Weight::from_ref_time(2_404_000)
Weight::from_parts(2_404_000, 0)
}
fn execute_dispatch_unsigned() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_187 nanoseconds.
Weight::from_ref_time(2_362_000)
Weight::from_parts(2_362_000, 0)
}
/// Storage: Scheduler Agenda (r:1 w:1)
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(107022), added: 109497, mode: MaxEncodedLen)
@@ -155,7 +155,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 11_971 nanoseconds.
Weight::from_parts(16_060_361, 109497)
// Standard Error: 665
.saturating_add(Weight::from_ref_time(286_324).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(286_324, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -171,7 +171,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 15_594 nanoseconds.
Weight::from_parts(17_191_501, 109497)
// Standard Error: 626
.saturating_add(Weight::from_ref_time(425_572).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(425_572, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -187,7 +187,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 15_127 nanoseconds.
Weight::from_parts(20_932_642, 112020)
// Standard Error: 692
.saturating_add(Weight::from_ref_time(288_344).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(288_344, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -203,7 +203,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 16_859 nanoseconds.
Weight::from_parts(19_736_937, 112020)
// Standard Error: 676
.saturating_add(Weight::from_ref_time(429_770).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(429_770, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -232,7 +232,7 @@ impl WeightInfo for () {
// Minimum execution time: 3_079 nanoseconds.
Weight::from_parts(7_087_647, 109497)
// Standard Error: 658
.saturating_add(Weight::from_ref_time(279_320).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(279_320, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -241,7 +241,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_192 nanoseconds.
Weight::from_ref_time(5_528_000)
Weight::from_parts(5_528_000, 0)
}
/// Storage: Preimage PreimageFor (r:1 w:1)
/// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: Measured)
@@ -255,10 +255,10 @@ impl WeightInfo for () {
// Minimum execution time: 17_284 nanoseconds.
Weight::from_parts(17_574_000, 5252)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_126).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(1_126, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(1).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into()))
}
/// Storage: Scheduler Lookup (r:0 w:1)
/// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen)
@@ -267,7 +267,7 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_020 nanoseconds.
Weight::from_ref_time(7_262_000)
Weight::from_parts(7_262_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
fn service_task_periodic() -> Weight {
@@ -275,21 +275,21 @@ impl WeightInfo for () {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_187 nanoseconds.
Weight::from_ref_time(5_368_000)
Weight::from_parts(5_368_000, 0)
}
fn execute_dispatch_signed() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_313 nanoseconds.
Weight::from_ref_time(2_404_000)
Weight::from_parts(2_404_000, 0)
}
fn execute_dispatch_unsigned() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_187 nanoseconds.
Weight::from_ref_time(2_362_000)
Weight::from_parts(2_362_000, 0)
}
/// Storage: Scheduler Agenda (r:1 w:1)
/// Proof: Scheduler Agenda (max_values: None, max_size: Some(107022), added: 109497, mode: MaxEncodedLen)
@@ -301,7 +301,7 @@ impl WeightInfo for () {
// Minimum execution time: 11_971 nanoseconds.
Weight::from_parts(16_060_361, 109497)
// Standard Error: 665
.saturating_add(Weight::from_ref_time(286_324).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(286_324, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -317,7 +317,7 @@ impl WeightInfo for () {
// Minimum execution time: 15_594 nanoseconds.
Weight::from_parts(17_191_501, 109497)
// Standard Error: 626
.saturating_add(Weight::from_ref_time(425_572).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(425_572, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -333,7 +333,7 @@ impl WeightInfo for () {
// Minimum execution time: 15_127 nanoseconds.
Weight::from_parts(20_932_642, 112020)
// Standard Error: 692
.saturating_add(Weight::from_ref_time(288_344).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(288_344, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -349,7 +349,7 @@ impl WeightInfo for () {
// Minimum execution time: 16_859 nanoseconds.
Weight::from_parts(19_736_937, 112020)
// Standard Error: 676
.saturating_add(Weight::from_ref_time(429_770).saturating_mul(s.into()))
.saturating_add(Weight::from_parts(429_770, 0).saturating_mul(s.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}