Companion for Weight v1.5 (#1581)

* cargo test -p cumulus-primitives-utility

* cargo test -p cumulus-pallet-xcmp-queue

* cargo test -p cumulus-pallet-xcm

* cargo test -p cumulus-pallet-dmp-queue

* cargo test -p pallet-template

* cargo test -p cumulus-test-runtime

* fix weights

* fix more weights

* cargo test -p parachains-common

* cargo test -p parachain-template-runtime

* fix weights import

* cargo test -p collectives-polkadot-runtime

* cargo test -p contracts-rococo-runtime

* more

* unused

* fixes

* Update benchmarking.rs

* Update lib.rs

* Update lib.rs

* fix

* fix bug in conversion

* update lockfile for {"polkadot", "substrate"}

Co-authored-by: parity-processbot <>
This commit is contained in:
Shawn Tabrizi
2022-08-31 13:24:42 +01:00
committed by GitHub
parent 1ab196df49
commit 3fb9c8a7be
118 changed files with 2005 additions and 1885 deletions
Generated
+249 -248
View File
File diff suppressed because it is too large Load Diff
+99 -47
View File
@@ -20,7 +20,7 @@
use frame_support::{
traits::Get,
weights::{constants::RocksDbWeight, Weight},
weights::{constants::RocksDbWeight, RefTimeWeight, Weight},
};
use sp_std::marker::PhantomData;
@@ -39,91 +39,143 @@ pub trait WeightInfo {
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn set_invulnerables(b: u32) -> Weight {
(18_563_000 as Weight)
Weight::from_ref_time(18_563_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((68_000 as Weight).saturating_mul(b as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(
Weight::from_ref_time(68_000 as RefTimeWeight)
.scalar_saturating_mul(b as RefTimeWeight),
)
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
fn set_desired_candidates() -> Weight {
(16_363_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(16_363_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
fn set_candidacy_bond() -> Weight {
(16_840_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(16_840_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
fn register_as_candidate(c: u32) -> Weight {
(71_196_000 as Weight)
Weight::from_ref_time(71_196_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((198_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(
Weight::from_ref_time(198_000 as RefTimeWeight)
.scalar_saturating_mul(c as RefTimeWeight),
)
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
fn leave_intent(c: u32) -> Weight {
(55_336_000 as Weight)
Weight::from_ref_time(55_336_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((151_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(
Weight::from_ref_time(151_000 as RefTimeWeight)
.scalar_saturating_mul(c as RefTimeWeight),
)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
fn note_author() -> Weight {
(71_461_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(71_461_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
fn new_session(r: u32, c: u32) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 1_010_000
.saturating_add((109_961_000 as Weight).saturating_mul(r as Weight))
.saturating_add(
Weight::from_ref_time(109_961_000 as RefTimeWeight)
.scalar_saturating_mul(r as RefTimeWeight),
)
// Standard Error: 1_010_000
.saturating_add((151_952_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight)))
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(r as Weight)))
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(c as Weight)))
.saturating_add(
Weight::from_ref_time(151_952_000 as RefTimeWeight)
.scalar_saturating_mul(c as RefTimeWeight),
)
.saturating_add(
T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)),
)
.saturating_add(
T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)),
)
.saturating_add(
T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(r as RefTimeWeight)),
)
.saturating_add(
T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)),
)
}
}
// For backwards compatibility and tests
impl WeightInfo for () {
fn set_invulnerables(b: u32) -> Weight {
(18_563_000 as Weight)
Weight::from_ref_time(18_563_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((68_000 as Weight).saturating_mul(b as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
.saturating_add(
Weight::from_ref_time(68_000 as RefTimeWeight)
.scalar_saturating_mul(b as RefTimeWeight),
)
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
}
fn set_desired_candidates() -> Weight {
(16_363_000 as Weight).saturating_add(RocksDbWeight::get().writes(1 as Weight))
Weight::from_ref_time(16_363_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
}
fn set_candidacy_bond() -> Weight {
(16_840_000 as Weight).saturating_add(RocksDbWeight::get().writes(1 as Weight))
Weight::from_ref_time(16_840_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
}
fn register_as_candidate(c: u32) -> Weight {
(71_196_000 as Weight)
Weight::from_ref_time(71_196_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((198_000 as Weight).saturating_mul(c as Weight))
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
.saturating_add(
Weight::from_ref_time(198_000 as RefTimeWeight)
.scalar_saturating_mul(c as RefTimeWeight),
)
.saturating_add(RocksDbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight))
}
fn leave_intent(c: u32) -> Weight {
(55_336_000 as Weight)
Weight::from_ref_time(55_336_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((151_000 as Weight).saturating_mul(c as Weight))
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
.saturating_add(
Weight::from_ref_time(151_000 as RefTimeWeight)
.scalar_saturating_mul(c as RefTimeWeight),
)
.saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(2 as RefTimeWeight))
}
fn note_author() -> Weight {
(71_461_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
Weight::from_ref_time(71_461_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(4 as RefTimeWeight))
}
fn new_session(r: u32, c: u32) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 1_010_000
.saturating_add((109_961_000 as Weight).saturating_mul(r as Weight))
.saturating_add(
Weight::from_ref_time(109_961_000 as RefTimeWeight)
.scalar_saturating_mul(r as RefTimeWeight),
)
// Standard Error: 1_010_000
.saturating_add((151_952_000 as Weight).saturating_mul(c as Weight))
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight)))
.saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(c as Weight)))
.saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(r as Weight)))
.saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(c as Weight)))
.saturating_add(
Weight::from_ref_time(151_952_000 as RefTimeWeight)
.scalar_saturating_mul(c as RefTimeWeight),
)
.saturating_add(
RocksDbWeight::get().reads((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)),
)
.saturating_add(
RocksDbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)),
)
.saturating_add(
RocksDbWeight::get()
.writes((2 as RefTimeWeight).saturating_mul(r as RefTimeWeight)),
)
.saturating_add(
RocksDbWeight::get()
.writes((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)),
)
}
}
+77 -71
View File
@@ -140,7 +140,7 @@ pub mod pallet {
///
/// Events:
/// - `OverweightServiced`: On success.
#[pallet::weight(weight_limit.saturating_add(1_000_000))]
#[pallet::weight(weight_limit.saturating_add(Weight::from_ref_time(1_000_000)))]
pub fn service_overweight(
origin: OriginFor<T>,
index: OverweightIndex,
@@ -153,7 +153,7 @@ pub mod pallet {
.map_err(|_| Error::<T>::OverLimit)?;
Overweight::<T>::remove(index);
Self::deposit_event(Event::OverweightServiced { overweight_index: index, weight_used });
Ok(Some(weight_used.saturating_add(1_000_000)).into())
Ok(Some(weight_used.saturating_add(Weight::from_ref_time(1_000_000))).into())
}
}
@@ -189,7 +189,7 @@ pub mod pallet {
/// Exactly equivalent to `service_queue` but expects a mutable `page_index` to be passed
/// in and any changes stored.
fn do_service_queue(limit: Weight, page_index: &mut PageIndexData) -> Weight {
let mut used = 0;
let mut used = Weight::new();
while page_index.begin_used < page_index.end_used {
let page = Pages::<T>::take(page_index.begin_used);
for (i, &(sent_at, ref data)) in page.iter().enumerate() {
@@ -232,19 +232,19 @@ pub mod pallet {
match maybe_msg {
Err(_) => {
Self::deposit_event(Event::InvalidFormat { message_id });
Ok(0)
Ok(Weight::zero())
},
Ok(Err(())) => {
Self::deposit_event(Event::UnsupportedVersion { message_id });
Ok(0)
Ok(Weight::zero())
},
Ok(Ok(x)) => {
let outcome = T::XcmExecutor::execute_xcm(Parent, x, limit);
let outcome = T::XcmExecutor::execute_xcm(Parent, x, limit.ref_time());
match outcome {
Outcome::Error(XcmError::WeightLimitReached(required)) =>
Err((message_id, required)),
Err((message_id, Weight::from_ref_time(required))),
outcome => {
let weight_used = outcome.weight_used();
let weight_used = Weight::from_ref_time(outcome.weight_used());
Self::deposit_event(Event::ExecutedDownward { message_id, outcome });
Ok(weight_used)
},
@@ -349,7 +349,7 @@ mod tests {
};
use sp_version::RuntimeVersion;
use std::cell::RefCell;
use xcm::latest::{MultiLocation, OriginKind};
use xcm::latest::{MultiLocation, OriginKind, Weight as XCMWeight};
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
type Block = frame_system::mocking::MockBlock<Test>;
@@ -379,8 +379,8 @@ mod tests {
state_version: 1,
};
pub const ParachainId: ParaId = ParaId::new(200);
pub const ReservedXcmpWeight: Weight = 0;
pub const ReservedDmpWeight: Weight = 0;
pub const ReservedXcmpWeight: Weight = Weight::zero();
pub const ReservedDmpWeight: Weight = Weight::zero();
}
type AccountId = u64;
@@ -429,8 +429,8 @@ mod tests {
fn execute_xcm_in_credit(
_origin: impl Into<MultiLocation>,
message: Xcm,
weight_limit: Weight,
_credit: Weight,
weight_limit: XCMWeight,
_credit: XCMWeight,
) -> Outcome {
let o = match (message.0.len(), &message.0.first()) {
(1, Some(Transact { require_weight_at_most, .. })) => {
@@ -478,7 +478,7 @@ mod tests {
DmpQueue::handle_dmp_messages(iter, limit)
}
fn msg(weight: Weight) -> Xcm {
fn msg(weight: XCMWeight) -> Xcm {
Xcm(vec![Transact {
origin_type: OriginKind::Native,
require_weight_at_most: weight,
@@ -486,11 +486,11 @@ mod tests {
}])
}
fn msg_complete(weight: Weight) -> (Xcm, Outcome) {
fn msg_complete(weight: XCMWeight) -> (Xcm, Outcome) {
(msg(weight), Outcome::Complete(weight))
}
fn msg_limit_reached(weight: Weight) -> (Xcm, Outcome) {
fn msg_limit_reached(weight: XCMWeight) -> (Xcm, Outcome) {
(msg(weight), Outcome::Error(XcmError::WeightLimitReached(weight)))
}
@@ -511,8 +511,8 @@ mod tests {
#[test]
fn basic_setup_works() {
new_test_ext().execute_with(|| {
let weight_used = handle_messages(&[], 1000);
assert_eq!(weight_used, 0);
let weight_used = handle_messages(&[], Weight::from_ref_time(1000));
assert_eq!(weight_used, Weight::zero());
assert_eq!(take_trace(), Vec::new());
assert!(queue_is_empty());
});
@@ -522,8 +522,8 @@ mod tests {
fn service_inline_complete_works() {
new_test_ext().execute_with(|| {
let incoming = vec![msg(1000), msg(1001)];
let weight_used = handle_messages(&incoming, 2500);
assert_eq!(weight_used, 2001);
let weight_used = handle_messages(&incoming, Weight::from_ref_time(2500));
assert_eq!(weight_used, Weight::from_ref_time(2001));
assert_eq!(take_trace(), vec![msg_complete(1000), msg_complete(1001)]);
assert!(queue_is_empty());
});
@@ -534,8 +534,8 @@ mod tests {
new_test_ext().execute_with(|| {
let enqueued = vec![msg(1000), msg(1001), msg(1002)];
enqueue(&enqueued);
let weight_used = handle_messages(&[], 2500);
assert_eq!(weight_used, 2001);
let weight_used = handle_messages(&[], Weight::from_ref_time(2500));
assert_eq!(weight_used, Weight::from_ref_time(2001));
assert_eq!(
take_trace(),
vec![msg_complete(1000), msg_complete(1001), msg_limit_reached(1002),]
@@ -547,8 +547,8 @@ mod tests {
fn enqueue_works() {
new_test_ext().execute_with(|| {
let incoming = vec![msg(1000), msg(1001), msg(1002)];
let weight_used = handle_messages(&incoming, 999);
assert_eq!(weight_used, 0);
let weight_used = handle_messages(&incoming, Weight::from_ref_time(999));
assert_eq!(weight_used, Weight::zero());
assert_eq!(
PageIndex::<Test>::get(),
PageIndexData { begin_used: 0, end_used: 1, overweight_count: 0 }
@@ -556,15 +556,15 @@ mod tests {
assert_eq!(Pages::<Test>::get(0).len(), 3);
assert_eq!(take_trace(), vec![msg_limit_reached(1000)]);
let weight_used = handle_messages(&[], 2500);
assert_eq!(weight_used, 2001);
let weight_used = handle_messages(&[], Weight::from_ref_time(2500));
assert_eq!(weight_used, Weight::from_ref_time(2001));
assert_eq!(
take_trace(),
vec![msg_complete(1000), msg_complete(1001), msg_limit_reached(1002),]
);
let weight_used = handle_messages(&[], 2500);
assert_eq!(weight_used, 1002);
let weight_used = handle_messages(&[], Weight::from_ref_time(2500));
assert_eq!(weight_used, Weight::from_ref_time(1002));
assert_eq!(take_trace(), vec![msg_complete(1002),]);
assert!(queue_is_empty());
});
@@ -574,14 +574,14 @@ mod tests {
fn service_inline_then_enqueue_works() {
new_test_ext().execute_with(|| {
let incoming = vec![msg(1000), msg(1001), msg(1002)];
let weight_used = handle_messages(&incoming, 1500);
assert_eq!(weight_used, 1000);
let weight_used = handle_messages(&incoming, Weight::from_ref_time(1500));
assert_eq!(weight_used, Weight::from_ref_time(1000));
assert_eq!(pages_queued(), 1);
assert_eq!(Pages::<Test>::get(0).len(), 2);
assert_eq!(take_trace(), vec![msg_complete(1000), msg_limit_reached(1001),]);
let weight_used = handle_messages(&[], 2500);
assert_eq!(weight_used, 2003);
let weight_used = handle_messages(&[], Weight::from_ref_time(2500));
assert_eq!(weight_used, Weight::from_ref_time(2003));
assert_eq!(take_trace(), vec![msg_complete(1001), msg_complete(1002),]);
assert!(queue_is_empty());
});
@@ -593,8 +593,8 @@ mod tests {
let enqueued = vec![msg(1000), msg(1001)];
let incoming = vec![msg(1002), msg(1003)];
enqueue(&enqueued);
let weight_used = handle_messages(&incoming, 5000);
assert_eq!(weight_used, 4006);
let weight_used = handle_messages(&incoming, Weight::from_ref_time(5000));
assert_eq!(weight_used, Weight::from_ref_time(4006));
assert_eq!(
take_trace(),
vec![
@@ -614,19 +614,19 @@ mod tests {
let enqueued = vec![msg(1000), msg(10001)];
let incoming = vec![msg(1002), msg(1003)];
enqueue(&enqueued);
let weight_used = handle_messages(&incoming, 5000);
assert_eq!(weight_used, 1000);
let weight_used = handle_messages(&incoming, Weight::from_ref_time(5000));
assert_eq!(weight_used, Weight::from_ref_time(1000));
assert_eq!(take_trace(), vec![msg_complete(1000), msg_limit_reached(10001),]);
assert_eq!(pages_queued(), 2);
// 5000 is not enough to process the 10001 blocker, so nothing happens.
let weight_used = handle_messages(&[], 5000);
assert_eq!(weight_used, 0);
let weight_used = handle_messages(&[], Weight::from_ref_time(5000));
assert_eq!(weight_used, Weight::zero());
assert_eq!(take_trace(), vec![msg_limit_reached(10001),]);
// 20000 is now enough to process everything.
let weight_used = handle_messages(&[], 20000);
assert_eq!(weight_used, 12006);
let weight_used = handle_messages(&[], Weight::from_ref_time(20000));
assert_eq!(weight_used, Weight::from_ref_time(12006));
assert_eq!(
take_trace(),
vec![msg_complete(10001), msg_complete(1002), msg_complete(1003),]
@@ -641,8 +641,8 @@ mod tests {
let enqueued = vec![msg(1000), msg(1001)];
let incoming = vec![msg(10002), msg(1003)];
enqueue(&enqueued);
let weight_used = handle_messages(&incoming, 5000);
assert_eq!(weight_used, 2001);
let weight_used = handle_messages(&incoming, Weight::from_ref_time(5000));
assert_eq!(weight_used, Weight::from_ref_time(2001));
assert_eq!(
take_trace(),
vec![msg_complete(1000), msg_complete(1001), msg_limit_reached(10002),]
@@ -650,8 +650,8 @@ mod tests {
assert_eq!(pages_queued(), 1);
// 20000 is now enough to process everything.
let weight_used = handle_messages(&[], 20000);
assert_eq!(weight_used, 11005);
let weight_used = handle_messages(&[], Weight::from_ref_time(20000));
assert_eq!(weight_used, Weight::from_ref_time(11005));
assert_eq!(take_trace(), vec![msg_complete(10002), msg_complete(1003),]);
assert!(queue_is_empty());
});
@@ -663,8 +663,8 @@ mod tests {
let enqueued = vec![msg(1000), msg(1001)];
let incoming = vec![msg(1002), msg(10003)];
enqueue(&enqueued);
let weight_used = handle_messages(&incoming, 5000);
assert_eq!(weight_used, 3003);
let weight_used = handle_messages(&incoming, Weight::from_ref_time(5000));
assert_eq!(weight_used, Weight::from_ref_time(3003));
assert_eq!(
take_trace(),
vec![
@@ -677,8 +677,8 @@ mod tests {
assert_eq!(pages_queued(), 1);
// 20000 is now enough to process everything.
let weight_used = handle_messages(&[], 20000);
assert_eq!(weight_used, 10003);
let weight_used = handle_messages(&[], Weight::from_ref_time(20000));
assert_eq!(weight_used, Weight::from_ref_time(10003));
assert_eq!(take_trace(), vec![msg_complete(10003),]);
assert!(queue_is_empty());
});
@@ -689,20 +689,20 @@ mod tests {
new_test_ext().execute_with(|| {
let enqueued = vec![msg(1000), msg(1001)];
enqueue(&enqueued);
let weight_used = handle_messages(&vec![msg(1002)], 1500);
assert_eq!(weight_used, 1000);
let weight_used = handle_messages(&vec![msg(1002)], Weight::from_ref_time(1500));
assert_eq!(weight_used, Weight::from_ref_time(1000));
assert_eq!(take_trace(), vec![msg_complete(1000), msg_limit_reached(1001),]);
assert_eq!(pages_queued(), 2);
assert_eq!(PageIndex::<Test>::get().begin_used, 0);
let weight_used = handle_messages(&vec![msg(1003)], 1500);
assert_eq!(weight_used, 1001);
let weight_used = handle_messages(&vec![msg(1003)], Weight::from_ref_time(1500));
assert_eq!(weight_used, Weight::from_ref_time(1001));
assert_eq!(take_trace(), vec![msg_complete(1001), msg_limit_reached(1002),]);
assert_eq!(pages_queued(), 2);
assert_eq!(PageIndex::<Test>::get().begin_used, 1);
let weight_used = handle_messages(&vec![msg(1004)], 1500);
assert_eq!(weight_used, 1002);
let weight_used = handle_messages(&vec![msg(1004)], Weight::from_ref_time(1500));
assert_eq!(weight_used, Weight::from_ref_time(1002));
assert_eq!(take_trace(), vec![msg_complete(1002), msg_limit_reached(1003),]);
assert_eq!(pages_queued(), 2);
assert_eq!(PageIndex::<Test>::get().begin_used, 2);
@@ -713,11 +713,11 @@ mod tests {
fn overweight_should_not_block_queue() {
new_test_ext().execute_with(|| {
// Set the overweight threshold to 9999.
Configuration::<Test>::put(ConfigData { max_individual: 9999 });
Configuration::<Test>::put(ConfigData { max_individual: Weight::from_ref_time(9999) });
let incoming = vec![msg(1000), msg(10001), msg(1002)];
let weight_used = handle_messages(&incoming, 2500);
assert_eq!(weight_used, 2002);
let weight_used = handle_messages(&incoming, Weight::from_ref_time(2500));
assert_eq!(weight_used, Weight::from_ref_time(2002));
assert!(queue_is_empty());
assert_eq!(
take_trace(),
@@ -732,37 +732,43 @@ mod tests {
fn overweights_should_be_manually_executable() {
new_test_ext().execute_with(|| {
// Set the overweight threshold to 9999.
Configuration::<Test>::put(ConfigData { max_individual: 9999 });
Configuration::<Test>::put(ConfigData { max_individual: Weight::from_ref_time(9999) });
let incoming = vec![msg(10000)];
let weight_used = handle_messages(&incoming, 2500);
assert_eq!(weight_used, 0);
let weight_used = handle_messages(&incoming, Weight::from_ref_time(2500));
assert_eq!(weight_used, Weight::zero());
assert_eq!(take_trace(), vec![msg_limit_reached(10000)]);
assert_eq!(overweights(), vec![0]);
assert_noop!(DmpQueue::service_overweight(Origin::signed(1), 0, 20000), BadOrigin);
assert_noop!(
DmpQueue::service_overweight(Origin::root(), 1, 20000),
DmpQueue::service_overweight(Origin::signed(1), 0, Weight::from_ref_time(20000)),
BadOrigin
);
assert_noop!(
DmpQueue::service_overweight(Origin::root(), 1, Weight::from_ref_time(20000)),
Error::<Test>::Unknown
);
assert_noop!(
DmpQueue::service_overweight(Origin::root(), 0, 9999),
DmpQueue::service_overweight(Origin::root(), 0, Weight::from_ref_time(9999)),
Error::<Test>::OverLimit
);
assert_eq!(take_trace(), vec![msg_limit_reached(10000)]);
let base_weight = super::Call::<Test>::service_overweight { index: 0, weight_limit: 0 }
.get_dispatch_info()
.weight;
let base_weight =
super::Call::<Test>::service_overweight { index: 0, weight_limit: Weight::zero() }
.get_dispatch_info()
.weight;
use frame_support::weights::GetDispatchInfo;
let info = DmpQueue::service_overweight(Origin::root(), 0, 20000).unwrap();
let info =
DmpQueue::service_overweight(Origin::root(), 0, Weight::from_ref_time(20000))
.unwrap();
let actual_weight = info.actual_weight.unwrap();
assert_eq!(actual_weight, base_weight + 10000);
assert_eq!(actual_weight, base_weight + Weight::from_ref_time(10000));
assert_eq!(take_trace(), vec![msg_complete(10000)]);
assert!(overweights().is_empty());
assert_noop!(
DmpQueue::service_overweight(Origin::root(), 0, 20000),
DmpQueue::service_overweight(Origin::root(), 0, Weight::from_ref_time(20000)),
Error::<Test>::Unknown
);
});
@@ -775,8 +781,8 @@ mod tests {
enqueue(&vec![msg(1002), msg(1003)]);
enqueue(&vec![msg(1004), msg(1005)]);
let weight_used = DmpQueue::on_idle(1, 6000);
assert_eq!(weight_used, 5010);
let weight_used = DmpQueue::on_idle(1, Weight::from_ref_time(6000));
assert_eq!(weight_used, Weight::from_ref_time(5010));
assert_eq!(
take_trace(),
vec![
+3 -3
View File
@@ -269,7 +269,7 @@ pub mod pallet {
}
fn on_initialize(_n: T::BlockNumber) -> Weight {
let mut weight = 0;
let mut weight = Weight::new();
// To prevent removing `NewValidationCode` that was set by another `on_initialize`
// like for example from scheduler, we only kill the storage entry if it was not yet
@@ -416,7 +416,7 @@ pub mod pallet {
<T::OnSystemEvent as OnSystemEvent>::on_validation_data(&vfp);
// TODO: This is more than zero, but will need benchmarking to figure out what.
let mut total_weight = 0;
let mut total_weight = Weight::zero();
total_weight += Self::process_inbound_downward_messages(
relevant_messaging_state.dmq_mqc_head,
downward_messages,
@@ -808,7 +808,7 @@ impl<T: Config> Pallet<T> {
let dm_count = downward_messages.len() as u32;
let mut dmq_head = <LastDmqMqcHead<T>>::get();
let mut weight_used = 0;
let mut weight_used = Weight::new();
if dm_count != 0 {
Self::deposit_event(Event::DownwardMessagesReceived { count: dm_count });
let max_weight =
+1 -1
View File
@@ -25,7 +25,7 @@ pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);
/// Call this during the next runtime upgrade for this module.
pub fn on_runtime_upgrade<T: Config>() -> Weight {
let mut weight: Weight = 0;
let mut weight: Weight = Weight::new();
if StorageVersion::get::<Pallet<T>>() == 0 {
weight = weight
+4 -4
View File
@@ -69,8 +69,8 @@ parameter_types! {
state_version: 1,
};
pub const ParachainId: ParaId = ParaId::new(200);
pub const ReservedXcmpWeight: Weight = 0;
pub const ReservedDmpWeight: Weight = 0;
pub const ReservedXcmpWeight: Weight = Weight::zero();
pub const ReservedDmpWeight: Weight = Weight::zero();
}
impl frame_system::Config for Test {
type Origin = Origin;
@@ -155,7 +155,7 @@ impl DmpMessageHandler for SaveIntoThreadLocal {
for i in iter {
m.borrow_mut().push(i);
}
0
Weight::zero()
})
}
}
@@ -169,7 +169,7 @@ impl XcmpMessageHandler for SaveIntoThreadLocal {
for (sender, sent_at, message) in iter {
m.borrow_mut().push((sender, sent_at, message.to_vec()));
}
0
Weight::zero()
})
}
}
+1 -1
View File
@@ -169,7 +169,7 @@ pub mod pallet {
if *who == root_account {
Ok(ValidTransaction {
priority: info.weight as TransactionPriority,
priority: info.weight.ref_time() as TransactionPriority,
longevity: TransactionLongevity::max_value(),
propagate: true,
..Default::default()
+6 -6
View File
@@ -111,7 +111,7 @@ impl<T: Config> DmpMessageHandler for UnlimitedDmpExecution<T> {
iter: impl Iterator<Item = (RelayBlockNumber, Vec<u8>)>,
limit: Weight,
) -> Weight {
let mut used = 0;
let mut used = Weight::new();
for (_sent_at, data) in iter {
let id = sp_io::hashing::twox_64(&data[..]);
let msg = VersionedXcm::<T::Call>::decode_all_with_depth_limit(
@@ -123,8 +123,8 @@ impl<T: Config> DmpMessageHandler for UnlimitedDmpExecution<T> {
Err(_) => Pallet::<T>::deposit_event(Event::InvalidFormat(id)),
Ok(Err(())) => Pallet::<T>::deposit_event(Event::UnsupportedVersion(id)),
Ok(Ok(x)) => {
let outcome = T::XcmExecutor::execute_xcm(Parent, x, limit);
used += outcome.weight_used();
let outcome = T::XcmExecutor::execute_xcm(Parent, x, limit.ref_time());
used += Weight::from_ref_time(outcome.weight_used());
Pallet::<T>::deposit_event(Event::ExecutedDownward(id, outcome));
},
}
@@ -144,7 +144,7 @@ impl<T: Config> DmpMessageHandler for LimitAndDropDmpExecution<T> {
iter: impl Iterator<Item = (RelayBlockNumber, Vec<u8>)>,
limit: Weight,
) -> Weight {
let mut used = 0;
let mut used = Weight::new();
for (_sent_at, data) in iter {
let id = sp_io::hashing::twox_64(&data[..]);
let msg = VersionedXcm::<T::Call>::decode_all_with_depth_limit(
@@ -157,8 +157,8 @@ impl<T: Config> DmpMessageHandler for LimitAndDropDmpExecution<T> {
Ok(Err(())) => Pallet::<T>::deposit_event(Event::UnsupportedVersion(id)),
Ok(Ok(x)) => {
let weight_limit = limit.saturating_sub(used);
let outcome = T::XcmExecutor::execute_xcm(Parent, x, weight_limit);
used += outcome.weight_used();
let outcome = T::XcmExecutor::execute_xcm(Parent, x, weight_limit.ref_time());
used += Weight::from_ref_time(outcome.weight_used());
Pallet::<T>::deposit_event(Event::ExecutedDownward(id, outcome));
},
}
+1 -1
View File
@@ -22,7 +22,7 @@ use frame_system::RawOrigin;
benchmarks! {
set_config_with_u32 {}: update_resume_threshold(RawOrigin::Root, 100)
set_config_with_weight {}: update_weight_restrict_decay(RawOrigin::Root, 3_000_000 as Weight)
set_config_with_weight {}: update_weight_restrict_decay(RawOrigin::Root, Weight::from_ref_time(3_000_000))
}
impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test);
+39 -22
View File
@@ -130,7 +130,7 @@ pub mod pallet {
///
/// Events:
/// - `OverweightServiced`: On success.
#[pallet::weight((weight_limit.saturating_add(1_000_000), DispatchClass::Operational,))]
#[pallet::weight((weight_limit.saturating_add(Weight::from_ref_time(1_000_000)), DispatchClass::Operational,))]
pub fn service_overweight(
origin: OriginFor<T>,
index: OverweightIndex,
@@ -149,7 +149,7 @@ pub mod pallet {
.map_err(|_| Error::<T>::WeightOverLimit)?;
Overweight::<T>::remove(index);
Self::deposit_event(Event::OverweightServiced { index, used });
Ok(Some(used.saturating_add(1_000_000)).into())
Ok(Some(used.saturating_add(Weight::from_ref_time(1_000_000))).into())
}
/// Suspends all XCM executions for the XCMP queue, regardless of the sender's origin.
@@ -449,8 +449,8 @@ impl Default for QueueConfigData {
suspend_threshold: 2,
drop_threshold: 5,
resume_threshold: 1,
threshold_weight: 100_000,
weight_restrict_decay: 2,
threshold_weight: Weight::from_ref_time(100_000),
weight_restrict_decay: Weight::from_ref_time(2),
xcmp_max_individual_weight: 20 * WEIGHT_PER_MILLIS,
}
}
@@ -605,15 +605,28 @@ impl<T: Config> Pallet<T> {
Ok(xcm) => {
let location = (1, Parachain(sender.into()));
match T::XcmExecutor::execute_xcm(location, xcm, max_weight) {
Outcome::Error(e) =>
(Err(e), Event::Fail { message_hash: Some(hash), error: e, weight: 0 }),
Outcome::Complete(w) =>
(Ok(w), Event::Success { message_hash: Some(hash), weight: w }),
match T::XcmExecutor::execute_xcm(location, xcm, max_weight.ref_time()) {
Outcome::Error(e) => (
Err(e),
Event::Fail { message_hash: Some(hash), error: e, weight: Weight::zero() },
),
Outcome::Complete(w) => (
Ok(Weight::from_ref_time(w)),
Event::Success {
message_hash: Some(hash),
weight: Weight::from_ref_time(w),
},
),
// As far as the caller is concerned, this was dispatched without error, so
// we just report the weight used.
Outcome::Incomplete(w, e) =>
(Ok(w), Event::Fail { message_hash: Some(hash), error: e, weight: w }),
Outcome::Incomplete(w, e) => (
Ok(Weight::from_ref_time(w)),
Event::Fail {
message_hash: Some(hash),
error: e,
weight: Weight::from_ref_time(w),
},
),
}
},
Err(()) =>
@@ -632,7 +645,7 @@ impl<T: Config> Pallet<T> {
let data = <InboundXcmpMessages<T>>::get(sender, sent_at);
let mut last_remaining_fragments;
let mut remaining_fragments = &data[..];
let mut weight_used = 0;
let mut weight_used = Weight::zero();
match format {
XcmpMessageFormat::ConcatenatedVersionedXcm => {
while !remaining_fragments.is_empty() {
@@ -645,7 +658,7 @@ impl<T: Config> Pallet<T> {
match Self::handle_xcm_message(sender, sent_at, xcm, weight) {
Ok(used) => weight_used = weight_used.saturating_add(used),
Err(XcmError::WeightLimitReached(required))
if required > max_individual_weight =>
if required > max_individual_weight.ref_time() =>
{
// overweight - add to overweight queue and continue with message
// execution consuming the message.
@@ -654,12 +667,16 @@ impl<T: Config> Pallet<T> {
.saturating_sub(remaining_fragments.len());
let overweight_xcm = last_remaining_fragments[..msg_len].to_vec();
let index = Self::stash_overweight(sender, sent_at, overweight_xcm);
let e =
Event::OverweightEnqueued { sender, sent_at, index, required };
let e = Event::OverweightEnqueued {
sender,
sent_at,
index,
required: Weight::from_ref_time(required),
};
Self::deposit_event(e);
},
Err(XcmError::WeightLimitReached(required))
if required <= max_weight =>
if required <= max_weight.ref_time() =>
{
// That message didn't get processed this time because of being
// too heavy. We leave it around for next time and bail.
@@ -766,7 +783,7 @@ impl<T: Config> Pallet<T> {
let mut status = <InboundXcmpStatus<T>>::get(); // <- sorted.
if status.is_empty() {
return 0
return Weight::zero()
}
let QueueConfigData {
@@ -778,8 +795,8 @@ impl<T: Config> Pallet<T> {
} = <QueueConfig<T>>::get();
let mut shuffled = Self::create_shuffle(status.len());
let mut weight_used = 0;
let mut weight_available = 0;
let mut weight_used = Weight::new();
let mut weight_available = Weight::new();
// We don't want the possibility of a chain sending a series of really heavy messages and
// tying up the block's execution time from other chains. Therefore we execute any remaining
@@ -813,7 +830,7 @@ impl<T: Config> Pallet<T> {
// on the first round to unlocking everything, then we do so.
if shuffle_index < status.len() {
weight_available +=
(max_weight - weight_available) / (weight_restrict_decay + 1);
(max_weight - weight_available) / (weight_restrict_decay.ref_time() + 1);
if weight_available + threshold_weight > max_weight {
weight_available = max_weight;
}
@@ -824,7 +841,7 @@ impl<T: Config> Pallet<T> {
let weight_processed = if status[index].message_metadata.is_empty() {
debug_assert!(false, "channel exists in status; there must be messages; qed");
0
Weight::zero()
} else {
// Process up to one block's worth for now.
let weight_remaining = weight_available.saturating_sub(weight_used);
@@ -854,7 +871,7 @@ impl<T: Config> Pallet<T> {
// other channels a look in. If we've still not unlocked all weight, then we set them
// up for processing a second time anyway.
if !status[index].message_metadata.is_empty() &&
(weight_processed > 0 || weight_available != max_weight)
(weight_processed > Weight::zero() || weight_available != max_weight)
{
if shuffle_index + 1 == shuffled.len() {
// Only this queue left. Just run around this loop once more.
+6 -6
View File
@@ -25,7 +25,7 @@ pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);
/// Migrates the pallet storage to the most recent version, checking and setting the
/// `StorageVersion`.
pub fn migrate_to_latest<T: Config>() -> Weight {
let mut weight = 0;
let mut weight = Weight::new();
if StorageVersion::get::<Pallet<T>>() == 0 {
weight += migrate_to_v1::<T>();
@@ -54,8 +54,8 @@ mod v0 {
suspend_threshold: 2,
drop_threshold: 5,
resume_threshold: 1,
threshold_weight: 100_000,
weight_restrict_decay: 2,
threshold_weight: Weight::from_ref_time(100_000),
weight_restrict_decay: Weight::from_ref_time(2),
}
}
}
@@ -102,8 +102,8 @@ mod tests {
suspend_threshold: 5,
drop_threshold: 12,
resume_threshold: 3,
threshold_weight: 333_333,
weight_restrict_decay: 1,
threshold_weight: Weight::from_ref_time(333_333),
weight_restrict_decay: Weight::one(),
};
new_test_ext().execute_with(|| {
@@ -122,7 +122,7 @@ mod tests {
assert_eq!(v0.resume_threshold, v1.resume_threshold);
assert_eq!(v0.threshold_weight, v1.threshold_weight);
assert_eq!(v0.weight_restrict_decay, v1.weight_restrict_decay);
assert_eq!(v1.xcmp_max_individual_weight, 20_000_000_000);
assert_eq!(v1.xcmp_max_individual_weight, Weight::from_ref_time(20_000_000_000));
});
}
}
+1 -1
View File
@@ -116,7 +116,7 @@ impl cumulus_pallet_parachain_system::Config for Test {
parameter_types! {
pub const RelayChain: MultiLocation = MultiLocation::parent();
pub Ancestry: MultiLocation = X1(Parachain(1u32.into())).into();
pub UnitWeightCost: Weight = 1_000_000;
pub UnitWeightCost: u64 = 1_000_000;
pub const MaxInstructions: u32 = 100;
}
+49 -16
View File
@@ -26,7 +26,7 @@ fn one_message_does_not_panic() {
let messages = vec![(Default::default(), 1u32.into(), message_format.as_slice())];
// This shouldn't cause a panic
XcmpQueue::handle_xcmp_messages(messages.into_iter(), Weight::max_value());
XcmpQueue::handle_xcmp_messages(messages.into_iter(), Weight::MAX);
})
}
@@ -43,7 +43,12 @@ fn bad_message_is_handled() {
InboundXcmpMessages::<Test>::insert(ParaId::from(1000), 1, bad_data);
let format = XcmpMessageFormat::ConcatenatedEncodedBlob;
// This should exit with an error.
XcmpQueue::process_xcmp_message(1000.into(), (1, format), 10_000_000_000, 10_000_000_000);
XcmpQueue::process_xcmp_message(
1000.into(),
(1, format),
Weight::from_ref_time(10_000_000_000),
Weight::from_ref_time(10_000_000_000),
);
});
}
@@ -61,7 +66,12 @@ fn handle_blob_message() {
];
InboundXcmpMessages::<Test>::insert(ParaId::from(1000), 1, bad_data);
let format = XcmpMessageFormat::ConcatenatedEncodedBlob;
XcmpQueue::process_xcmp_message(1000.into(), (1, format), 10_000_000_000, 10_000_000_000);
XcmpQueue::process_xcmp_message(
1000.into(),
(1, format),
Weight::from_ref_time(10_000_000_000),
Weight::from_ref_time(10_000_000_000),
);
});
}
@@ -73,7 +83,12 @@ fn handle_invalid_data() {
let data = Xcm::<Test>(vec![]).encode();
InboundXcmpMessages::<Test>::insert(ParaId::from(1000), 1, data);
let format = XcmpMessageFormat::ConcatenatedVersionedXcm;
XcmpQueue::process_xcmp_message(1000.into(), (1, format), 10_000_000_000, 10_000_000_000);
XcmpQueue::process_xcmp_message(
1000.into(),
(1, format),
Weight::from_ref_time(10_000_000_000),
Weight::from_ref_time(10_000_000_000),
);
});
}
@@ -81,7 +96,7 @@ fn handle_invalid_data() {
fn service_overweight_unknown() {
new_test_ext().execute_with(|| {
assert_noop!(
XcmpQueue::service_overweight(Origin::root(), 0, 1000),
XcmpQueue::service_overweight(Origin::root(), 0, Weight::from_ref_time(1000)),
Error::<Test>::BadOverweightIndex,
);
});
@@ -93,7 +108,10 @@ fn service_overweight_bad_xcm_format() {
let bad_xcm = vec![255];
Overweight::<Test>::insert(0, (ParaId::from(1000), 0, bad_xcm));
assert_noop!(XcmpQueue::service_overweight(Origin::root(), 0, 1000), Error::<Test>::BadXcm);
assert_noop!(
XcmpQueue::service_overweight(Origin::root(), 0, Weight::from_ref_time(1000)),
Error::<Test>::BadXcm
);
});
}
@@ -108,7 +126,7 @@ fn suspend_xcm_execution_works() {
let messages = vec![(ParaId::from(999), 1u32.into(), message_format.as_slice())];
// This should have executed the incoming XCM, because it came from a system parachain
XcmpQueue::handle_xcmp_messages(messages.into_iter(), Weight::max_value());
XcmpQueue::handle_xcmp_messages(messages.into_iter(), Weight::MAX);
let queued_xcm = InboundXcmpMessages::<Test>::get(ParaId::from(999), 1u32);
assert!(queued_xcm.is_empty());
@@ -116,7 +134,7 @@ fn suspend_xcm_execution_works() {
let messages = vec![(ParaId::from(2000), 1u32.into(), message_format.as_slice())];
// This shouldn't have executed the incoming XCM
XcmpQueue::handle_xcmp_messages(messages.into_iter(), Weight::max_value());
XcmpQueue::handle_xcmp_messages(messages.into_iter(), Weight::MAX);
let queued_xcm = InboundXcmpMessages::<Test>::get(ParaId::from(2000), 1u32);
assert_eq!(queued_xcm, xcm);
@@ -166,12 +184,21 @@ fn update_resume_threshold_works() {
fn update_threshold_weight_works() {
new_test_ext().execute_with(|| {
let data: QueueConfigData = <QueueConfig<Test>>::get();
assert_eq!(data.threshold_weight, 100_000);
assert_ok!(XcmpQueue::update_threshold_weight(Origin::root(), 10_000));
assert_noop!(XcmpQueue::update_threshold_weight(Origin::signed(5), 10_000_000), BadOrigin);
assert_eq!(data.threshold_weight, Weight::from_ref_time(100_000));
assert_ok!(XcmpQueue::update_threshold_weight(
Origin::root(),
Weight::from_ref_time(10_000)
));
assert_noop!(
XcmpQueue::update_threshold_weight(
Origin::signed(5),
Weight::from_ref_time(10_000_000)
),
BadOrigin
);
let data: QueueConfigData = <QueueConfig<Test>>::get();
assert_eq!(data.threshold_weight, 10_000);
assert_eq!(data.threshold_weight, Weight::from_ref_time(10_000));
});
}
@@ -179,12 +206,18 @@ fn update_threshold_weight_works() {
fn update_weight_restrict_decay_works() {
new_test_ext().execute_with(|| {
let data: QueueConfigData = <QueueConfig<Test>>::get();
assert_eq!(data.weight_restrict_decay, 2);
assert_ok!(XcmpQueue::update_weight_restrict_decay(Origin::root(), 5));
assert_noop!(XcmpQueue::update_weight_restrict_decay(Origin::signed(6), 4), BadOrigin);
assert_eq!(data.weight_restrict_decay, Weight::from_ref_time(2));
assert_ok!(XcmpQueue::update_weight_restrict_decay(
Origin::root(),
Weight::from_ref_time(5)
));
assert_noop!(
XcmpQueue::update_weight_restrict_decay(Origin::signed(6), Weight::from_ref_time(4)),
BadOrigin
);
let data: QueueConfigData = <QueueConfig<Test>>::get();
assert_eq!(data.weight_restrict_decay, 5);
assert_eq!(data.weight_restrict_decay, Weight::from_ref_time(5));
});
}
+13 -13
View File
@@ -3,7 +3,7 @@
use frame_support::{
traits::Get,
weights::{constants::RocksDbWeight, Weight},
weights::{constants::RocksDbWeight, RefTimeWeight, Weight},
};
use sp_std::marker::PhantomData;
@@ -18,31 +18,31 @@ pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_u32() -> Weight {
(2_717_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(2_717_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_weight() -> Weight {
(2_717_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(2_717_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
}
impl WeightInfo for () {
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_u32() -> Weight {
(2_717_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
Weight::from_ref_time(2_717_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_weight() -> Weight {
(2_717_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
Weight::from_ref_time(2_717_000 as RefTimeWeight)
.saturating_add(RocksDbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(RocksDbWeight::get().writes(1 as RefTimeWeight))
}
}
@@ -67,7 +67,7 @@ pub mod pallet {
impl<T: Config> Pallet<T> {
/// An example dispatchable that takes a singles value as a parameter, writes the value to
/// storage and emits an event. This function must be dispatched by a signed extrinsic.
#[pallet::weight(10_000 + T::DbWeight::get().writes(1))]
#[pallet::weight(Weight::from_ref_time(10_000) + T::DbWeight::get().writes(1))]
pub fn do_something(origin: OriginFor<T>, something: u32) -> DispatchResultWithPostInfo {
// Check that the extrinsic was signed and get the signer.
// This function will return an error if the extrinsic is not signed.
@@ -84,7 +84,7 @@ pub mod pallet {
}
/// An example dispatchable that may throw a custom error.
#[pallet::weight(10_000 + T::DbWeight::get().reads_writes(1,1))]
#[pallet::weight(Weight::from_ref_time(10_000) + T::DbWeight::get().reads_writes(1,1))]
pub fn cause_error(origin: OriginFor<T>) -> DispatchResultWithPostInfo {
let _who = ensure_signed(origin)?;
+4 -4
View File
@@ -135,7 +135,7 @@ impl WeightToFeePolynomial for WeightToFee {
// in Rococo, extrinsic base weight (smallest non-zero weight) is mapped to 1 MILLIUNIT:
// in our template, we map to 1/10 of that, or 1/10 MILLIUNIT
let p = MILLIUNIT / 10;
let q = 100 * Balance::from(ExtrinsicBaseWeight::get());
let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time());
smallvec![WeightToFeeCoefficient {
degree: 1,
negative: false,
@@ -214,7 +214,7 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(5);
const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
/// We allow for 0.5 of a second of compute with a 12 second average block time.
const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2;
const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.scalar_div(2);
/// The version information used to identify this runtime when compiled natively.
#[cfg(feature = "std")]
@@ -363,8 +363,8 @@ impl pallet_transaction_payment::Config for Runtime {
}
parameter_types! {
pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4;
pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4;
pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4);
pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4);
}
impl cumulus_pallet_parachain_system::Config for Runtime {
@@ -23,7 +23,7 @@ pub mod constants {
parameter_types! {
/// Importing a block with 0 Extrinsics.
pub const BlockExecutionWeight: Weight = 5_000_000 * constants::WEIGHT_PER_NANOS;
pub const BlockExecutionWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(5_000_000);
}
#[cfg(test)]
@@ -23,7 +23,7 @@ pub mod constants {
parameter_types! {
/// Executing a NO-OP `System::remarks` Extrinsic.
pub const ExtrinsicBaseWeight: Weight = 125_000 * constants::WEIGHT_PER_NANOS;
pub const ExtrinsicBaseWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(125_000);
}
#[cfg(test)]
@@ -25,8 +25,8 @@ pub mod constants {
/// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights
/// are available for brave runtime engineers who may want to try this out as default.
pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 8_000 * constants::WEIGHT_PER_NANOS,
write: 50_000 * constants::WEIGHT_PER_NANOS,
read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(),
write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(),
};
}
@@ -25,8 +25,8 @@ pub mod constants {
/// By default, Substrate uses `RocksDB`, so this will be the weight used throughout
/// the runtime.
pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 25_000 * constants::WEIGHT_PER_NANOS,
write: 100_000 * constants::WEIGHT_PER_NANOS,
read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(),
write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(),
};
}
+6 -7
View File
@@ -6,12 +6,11 @@ use core::marker::PhantomData;
use frame_support::{
log, match_types, parameter_types,
traits::{Everything, Nothing},
weights::Weight,
};
use pallet_xcm::XcmPassthrough;
use polkadot_parachain::primitives::Sibling;
use polkadot_runtime_common::impls::ToAuthor;
use xcm::latest::prelude::*;
use xcm::latest::{prelude::*, Weight as XCMWeight};
use xcm_builder::{
AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter,
EnsureXcmOrigin, FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset, ParentIsPreset,
@@ -77,7 +76,7 @@ pub type XcmOriginToTransactDispatchOrigin = (
parameter_types! {
// One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate.
pub UnitWeightCost: Weight = 1_000_000_000;
pub UnitWeightCost: u64 = 1_000_000_000;
pub const MaxInstructions: u32 = 100;
}
@@ -104,8 +103,8 @@ where
fn should_execute<Call>(
origin: &MultiLocation,
message: &mut Xcm<Call>,
max_weight: Weight,
weight_credit: &mut Weight,
max_weight: XCMWeight,
weight_credit: &mut XCMWeight,
) -> Result<(), ()> {
Deny::should_execute(origin, message, max_weight, weight_credit)?;
Allow::should_execute(origin, message, max_weight, weight_credit)
@@ -118,8 +117,8 @@ impl ShouldExecute for DenyReserveTransferToRelayChain {
fn should_execute<Call>(
origin: &MultiLocation,
message: &mut Xcm<Call>,
_max_weight: Weight,
_weight_credit: &mut Weight,
_max_weight: XCMWeight,
_weight_credit: &mut XCMWeight,
) -> Result<(), ()> {
if message.0.iter().any(|inst| {
matches!(
+1 -1
View File
@@ -92,7 +92,7 @@ mod constants {
pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
/// We allow for 0.5 seconds of compute with a 6 second average block time.
pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2;
pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.scalar_div(2);
}
/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know
+5 -5
View File
@@ -6,7 +6,7 @@ use frame_support::{
weights::{Weight, WeightToFee, WeightToFeePolynomial},
};
use sp_runtime::traits::Get;
use xcm::latest::prelude::*;
use xcm::latest::{prelude::*, Weight as XCMWeight};
use xcm_executor::traits::{FilterAssetLocation, ShouldExecute};
//TODO: move DenyThenTry to polkadot's xcm module.
@@ -25,8 +25,8 @@ where
fn should_execute<Call>(
origin: &MultiLocation,
message: &mut Xcm<Call>,
max_weight: Weight,
weight_credit: &mut Weight,
max_weight: XCMWeight,
weight_credit: &mut XCMWeight,
) -> Result<(), ()> {
Deny::should_execute(origin, message, max_weight, weight_credit)?;
Allow::should_execute(origin, message, max_weight, weight_credit)
@@ -39,8 +39,8 @@ impl ShouldExecute for DenyReserveTransferToRelayChain {
fn should_execute<Call>(
origin: &MultiLocation,
message: &mut Xcm<Call>,
_max_weight: Weight,
_weight_credit: &mut Weight,
_max_weight: XCMWeight,
_weight_credit: &mut XCMWeight,
) -> Result<(), ()> {
if message.0.iter().any(|inst| {
matches!(
@@ -61,7 +61,7 @@ pub mod fee {
// in Kusama, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT:
// in Statemine, we map to 1/10 of that, or 1/100 CENT
let p = super::currency::CENTS;
let q = 100 * Balance::from(ExtrinsicBaseWeight::get());
let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time());
smallvec![WeightToFeeCoefficient {
degree: 1,
negative: false,
@@ -407,8 +407,8 @@ impl pallet_proxy::Config for Runtime {
}
parameter_types! {
pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4;
pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4;
pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4);
pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4);
}
impl cumulus_pallet_parachain_system::Config for Runtime {
@@ -23,7 +23,7 @@ pub mod constants {
parameter_types! {
/// Importing a block with 0 Extrinsics.
pub const BlockExecutionWeight: Weight = 5_000_000 * constants::WEIGHT_PER_NANOS;
pub const BlockExecutionWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(5_000_000);
}
#[cfg(test)]
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `cumulus_pallet_xcmp_queue`.
@@ -48,14 +48,14 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo<T> {
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_u32() -> Weight {
(5_634_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(5_634_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_weight() -> Weight {
(5_559_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(5_559_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
}
@@ -23,7 +23,7 @@ pub mod constants {
parameter_types! {
/// Executing a NO-OP `System::remarks` Extrinsic.
pub const ExtrinsicBaseWeight: Weight = 125_000 * constants::WEIGHT_PER_NANOS;
pub const ExtrinsicBaseWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(125_000);
}
#[cfg(test)]
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `frame_system`.
@@ -48,43 +48,43 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> {
/// The range of component `b` is `[0, 3932160]`.
fn remark(_b: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
}
/// The range of component `b` is `[0, 3932160]`.
fn remark_with_event(b: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
}
// Storage: System Digest (r:1 w:1)
// Storage: unknown [0x3a686561707061676573] (r:0 w:1)
fn set_heap_pages() -> Weight {
(5_461_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(5_461_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `i` is `[1, 1000]`.
fn set_storage(i: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((622_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
.saturating_add(Weight::from_ref_time(622_000 as RefTimeWeight).scalar_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)
/// The range of component `i` is `[1, 1000]`.
fn kill_storage(i: u32, ) -> Weight {
(351_000 as Weight)
Weight::from_ref_time(351_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((513_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
.saturating_add(Weight::from_ref_time(513_000 as RefTimeWeight).scalar_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)
/// The range of component `p` is `[1, 1000]`.
fn kill_prefix(p: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((1_054_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
.saturating_add(Weight::from_ref_time(1_054_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(p as RefTimeWeight)))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_assets`.
@@ -48,15 +48,15 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
// Storage: Assets Asset (r:1 w:1)
fn create() -> Weight {
(26_670_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(26_670_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
fn force_create() -> Weight {
(15_063_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(15_063_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:5002 w:5001)
@@ -67,165 +67,165 @@ impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
/// The range of component `s` is `[0, 5000]`.
/// The range of component `a` is `[0, 500]`.
fn destroy(c: u32, s: u32, a: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 46_000
.saturating_add((16_382_000 as Weight).saturating_mul(c as Weight))
.saturating_add(Weight::from_ref_time(16_382_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
// Standard Error: 46_000
.saturating_add((19_187_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(19_187_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 465_000
.saturating_add((16_818_000 as Weight).saturating_mul(a as Weight))
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight)))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight)))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(a as Weight)))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(c as Weight)))
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight)))
.saturating_add(Weight::from_ref_time(16_818_000 as RefTimeWeight).scalar_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)))
.saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight)))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:1 w:1)
fn mint() -> Weight {
(29_655_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(29_655_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:1 w:1)
fn burn() -> Weight {
(33_648_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(33_648_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer() -> Weight {
(47_414_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(47_414_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer_keep_alive() -> Weight {
(39_871_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(39_871_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn force_transfer() -> Weight {
(47_454_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(47_454_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Account (r:1 w:1)
fn freeze() -> Weight {
(20_827_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(20_827_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Account (r:1 w:1)
fn thaw() -> Weight {
(21_249_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(21_249_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
fn freeze_asset() -> Weight {
(17_775_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(17_775_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
fn thaw_asset() -> Weight {
(17_917_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(17_917_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Metadata (r:1 w:0)
fn transfer_ownership() -> Weight {
(18_724_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(18_724_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
fn set_team() -> Weight {
(17_448_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(17_448_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
/// The range of component `n` is `[0, 50]`.
/// The range of component `s` is `[0, 50]`.
fn set_metadata(_n: u32, _s: u32, ) -> Weight {
(31_859_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(31_859_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
fn clear_metadata() -> Weight {
(31_293_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(31_293_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
/// The range of component `n` is `[0, 50]`.
/// The range of component `s` is `[0, 50]`.
fn force_set_metadata(_n: u32, _s: u32, ) -> Weight {
(19_595_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(19_595_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
fn force_clear_metadata() -> Weight {
(31_366_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(31_366_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
fn force_asset_status() -> Weight {
(16_884_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(16_884_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Approvals (r:1 w:1)
fn approve_transfer() -> Weight {
(34_730_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(34_730_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Assets Approvals (r:1 w:1)
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer_approved() -> Weight {
(59_797_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
Weight::from_ref_time(59_797_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Approvals (r:1 w:1)
fn cancel_approval() -> Weight {
(35_178_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(35_178_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Approvals (r:1 w:1)
fn force_cancel_approval() -> Weight {
(36_840_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(36_840_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_balances`.
@@ -48,44 +48,44 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Storage: System Account (r:1 w:1)
fn transfer() -> Weight {
(41_804_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(41_804_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn transfer_keep_alive() -> Weight {
(31_899_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(31_899_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_creating() -> Weight {
(20_638_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(20_638_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_killing() -> Weight {
(24_081_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(24_081_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:2 w:2)
fn force_transfer() -> Weight {
(41_357_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(41_357_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn transfer_all() -> Weight {
(37_382_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(37_382_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn force_unreserve() -> Weight {
(18_476_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(18_476_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_collator_selection`.
@@ -50,21 +50,21 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
// Storage: CollatorSelection Invulnerables (r:0 w:1)
/// The range of component `b` is `[1, 100]`.
fn set_invulnerables(b: u32, ) -> Weight {
(8_196_000 as Weight)
Weight::from_ref_time(8_196_000 as RefTimeWeight)
// Standard Error: 3_000
.saturating_add((3_354_000 as Weight).saturating_mul(b as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(3_354_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(b as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: CollatorSelection DesiredCandidates (r:0 w:1)
fn set_desired_candidates() -> Weight {
(9_141_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(9_141_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: CollatorSelection CandidacyBond (r:0 w:1)
fn set_candidacy_bond() -> Weight {
(9_554_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(9_554_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: CollatorSelection Candidates (r:1 w:1)
// Storage: CollatorSelection DesiredCandidates (r:1 w:0)
@@ -74,29 +74,29 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1)
/// The range of component `c` is `[1, 1000]`.
fn register_as_candidate(c: u32, ) -> Weight {
(55_660_000 as Weight)
Weight::from_ref_time(55_660_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((103_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(103_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: CollatorSelection Candidates (r:1 w:1)
// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1)
/// The range of component `c` is `[6, 1000]`.
fn leave_intent(c: u32, ) -> Weight {
(56_380_000 as Weight)
Weight::from_ref_time(56_380_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((113_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(113_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: System Account (r:2 w:2)
// Storage: System BlockWeight (r:1 w:1)
// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1)
fn note_author() -> Weight {
(31_852_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(31_852_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: CollatorSelection Candidates (r:1 w:1)
// Storage: CollatorSelection LastAuthoredBlock (r:1000 w:1)
@@ -106,13 +106,13 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
/// The range of component `r` is `[1, 1000]`.
/// The range of component `c` is `[1, 1000]`.
fn new_session(r: u32, c: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 2_076_000
.saturating_add((10_780_000 as Weight).saturating_mul(r as Weight))
.saturating_add(Weight::from_ref_time(10_780_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
// Standard Error: 2_076_000
.saturating_add((55_238_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight)))
.saturating_add(Weight::from_ref_time(55_238_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_multisig`.
@@ -48,22 +48,22 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
/// The range of component `z` is `[0, 10000]`.
fn as_multi_threshold_1(z: u32, ) -> Weight {
(18_001_000 as Weight)
Weight::from_ref_time(18_001_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_create(s: u32, z: u32, ) -> Weight {
(35_223_000 as Weight)
Weight::from_ref_time(35_223_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((118_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(118_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
@@ -71,38 +71,38 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_create_store(s: u32, z: u32, ) -> Weight {
(39_275_000 as Weight)
Weight::from_ref_time(39_275_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((92_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(92_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
/// The range of component `s` is `[3, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
(24_703_000 as Weight)
Weight::from_ref_time(24_703_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((96_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(96_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
/// The range of component `s` is `[3, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_approve_store(s: u32, z: u32, ) -> Weight {
(38_375_000 as Weight)
Weight::from_ref_time(38_375_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((100_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(100_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
@@ -110,53 +110,53 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
(46_964_000 as Weight)
Weight::from_ref_time(46_964_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((143_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(143_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((3_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(3_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_create(s: u32, ) -> Weight {
(34_450_000 as Weight)
Weight::from_ref_time(34_450_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((117_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(117_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:0)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_approve(s: u32, ) -> Weight {
(22_051_000 as Weight)
Weight::from_ref_time(22_051_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((117_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(117_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_complete(s: u32, ) -> Weight {
(69_763_000 as Weight)
Weight::from_ref_time(69_763_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((162_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(162_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
/// The range of component `s` is `[2, 100]`.
fn cancel_as_multi(s: u32, ) -> Weight {
(53_182_000 as Weight)
Weight::from_ref_time(53_182_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((129_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(129_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_proxy`.
@@ -49,10 +49,10 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
// Storage: Proxy Proxies (r:1 w:0)
/// The range of component `p` is `[1, 31]`.
fn proxy(p: u32, ) -> Weight {
(18_075_000 as Weight)
Weight::from_ref_time(18_075_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((92_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(Weight::from_ref_time(92_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:0)
// Storage: Proxy Announcements (r:1 w:1)
@@ -60,39 +60,39 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn proxy_announced(a: u32, p: u32, ) -> Weight {
(35_722_000 as Weight)
Weight::from_ref_time(35_722_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((180_000 as Weight).saturating_mul(a as Weight))
.saturating_add(Weight::from_ref_time(180_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((85_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(85_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Proxy Announcements (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn remove_announcement(a: u32, p: u32, ) -> Weight {
(25_193_000 as Weight)
Weight::from_ref_time(25_193_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((185_000 as Weight).saturating_mul(a as Weight))
.saturating_add(Weight::from_ref_time(185_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight))
// Standard Error: 1_000
.saturating_add((23_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(23_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Proxy Announcements (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn reject_announcement(a: u32, p: u32, ) -> Weight {
(25_123_000 as Weight)
Weight::from_ref_time(25_123_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((190_000 as Weight).saturating_mul(a as Weight))
.saturating_add(Weight::from_ref_time(190_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight))
// Standard Error: 1_000
.saturating_add((21_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(21_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:0)
// Storage: Proxy Announcements (r:1 w:1)
@@ -100,58 +100,58 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn announce(a: u32, p: u32, ) -> Weight {
(32_582_000 as Weight)
Weight::from_ref_time(32_582_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((200_000 as Weight).saturating_mul(a as Weight))
.saturating_add(Weight::from_ref_time(200_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((93_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(93_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[1, 31]`.
fn add_proxy(p: u32, ) -> Weight {
(28_173_000 as Weight)
Weight::from_ref_time(28_173_000 as RefTimeWeight)
// Standard Error: 3_000
.saturating_add((112_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(112_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[1, 31]`.
fn remove_proxy(p: u32, ) -> Weight {
(28_247_000 as Weight)
Weight::from_ref_time(28_247_000 as RefTimeWeight)
// Standard Error: 3_000
.saturating_add((118_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(118_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[1, 31]`.
fn remove_proxies(p: u32, ) -> Weight {
(23_821_000 as Weight)
Weight::from_ref_time(23_821_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((85_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(85_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[1, 31]`.
fn anonymous(p: u32, ) -> Weight {
(31_472_000 as Weight)
Weight::from_ref_time(31_472_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((21_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(21_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[0, 30]`.
fn kill_anonymous(p: u32, ) -> Weight {
(24_620_000 as Weight)
Weight::from_ref_time(24_620_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((85_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(85_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_session`.
@@ -49,15 +49,15 @@ impl<T: frame_system::Config> pallet_session::WeightInfo for WeightInfo<T> {
// Storage: Session NextKeys (r:1 w:1)
// Storage: Session KeyOwner (r:1 w:1)
fn set_keys() -> Weight {
(16_555_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(16_555_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Session NextKeys (r:1 w:1)
// Storage: Session KeyOwner (r:0 w:1)
fn purge_keys() -> Weight {
(13_554_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(13_554_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_timestamp`.
@@ -48,11 +48,11 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_timestamp::WeightInfo for WeightInfo<T> {
// Storage: Timestamp Now (r:1 w:1)
fn set() -> Weight {
(6_818_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(6_818_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
fn on_finalize() -> Weight {
(2_431_000 as Weight)
Weight::from_ref_time(2_431_000 as RefTimeWeight)
}
}
@@ -43,7 +43,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_uniques`.
@@ -53,17 +53,17 @@ impl<T: frame_system::Config> pallet_uniques::WeightInfo for WeightInfo<T> {
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques ClassAccount (r:0 w:1)
fn create() -> Weight {
(28_358_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(28_358_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques NextCollectionId (r:1 w:1)
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques ClassAccount (r:0 w:1)
fn force_create() -> Weight {
(17_824_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(17_824_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques Asset (r:1 w:0)
@@ -77,191 +77,191 @@ impl<T: frame_system::Config> pallet_uniques::WeightInfo for WeightInfo<T> {
/// The range of component `m` is `[0, 1000]`.
/// The range of component `a` is `[0, 1000]`.
fn destroy(n: u32, m: u32, a: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 17_000
.saturating_add((10_592_000 as Weight).saturating_mul(n as Weight))
.saturating_add(Weight::from_ref_time(10_592_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight))
// Standard Error: 17_000
.saturating_add((1_658_000 as Weight).saturating_mul(m as Weight))
.saturating_add(Weight::from_ref_time(1_658_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
// Standard Error: 17_000
.saturating_add((1_593_000 as Weight).saturating_mul(a as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(n as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(m as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight)))
.saturating_add(Weight::from_ref_time(1_593_000 as RefTimeWeight).scalar_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))
.saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(n as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(m as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight)))
}
// Storage: Uniques Asset (r:1 w:1)
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques CollectionMaxSupply (r:1 w:0)
// Storage: Uniques Account (r:0 w:1)
fn mint() -> Weight {
(36_742_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
Weight::from_ref_time(36_742_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques Asset (r:1 w:1)
// Storage: Uniques Account (r:0 w:1)
// Storage: Uniques ItemPriceOf (r:0 w:1)
fn burn() -> Weight {
(37_124_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(37_124_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:0)
// Storage: Uniques Asset (r:1 w:1)
// Storage: Uniques Account (r:0 w:2)
// Storage: Uniques ItemPriceOf (r:0 w:1)
fn transfer() -> Weight {
(28_961_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(28_961_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques Asset (r:100 w:100)
/// The range of component `i` is `[0, 5000]`.
fn redeposit(i: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 15_000
.saturating_add((12_880_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(i as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
.saturating_add(Weight::from_ref_time(12_880_000 as RefTimeWeight).scalar_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))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight)))
}
// Storage: Uniques Asset (r:1 w:1)
// Storage: Uniques Class (r:1 w:0)
fn freeze() -> Weight {
(21_658_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(21_658_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Asset (r:1 w:1)
// Storage: Uniques Class (r:1 w:0)
fn thaw() -> Weight {
(21_980_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(21_980_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
fn freeze_collection() -> Weight {
(17_123_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(17_123_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
fn thaw_collection() -> Weight {
(17_398_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(17_398_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques OwnershipAcceptance (r:1 w:1)
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques ClassAccount (r:0 w:2)
fn transfer_ownership() -> Weight {
(25_473_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(25_473_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
fn set_team() -> Weight {
(17_970_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(17_970_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques ClassAccount (r:0 w:1)
fn force_item_status() -> Weight {
(20_781_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(20_781_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques InstanceMetadataOf (r:1 w:0)
// Storage: Uniques Attribute (r:1 w:1)
fn set_attribute() -> Weight {
(42_652_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(42_652_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques InstanceMetadataOf (r:1 w:0)
// Storage: Uniques Attribute (r:1 w:1)
fn clear_attribute() -> Weight {
(41_166_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(41_166_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques InstanceMetadataOf (r:1 w:1)
fn set_metadata() -> Weight {
(35_471_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(35_471_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques InstanceMetadataOf (r:1 w:1)
fn clear_metadata() -> Weight {
(35_110_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(35_110_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques ClassMetadataOf (r:1 w:1)
fn set_collection_metadata() -> Weight {
(33_536_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(33_536_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:0)
// Storage: Uniques ClassMetadataOf (r:1 w:1)
fn clear_collection_metadata() -> Weight {
(31_913_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(31_913_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:0)
// Storage: Uniques Asset (r:1 w:1)
fn approve_transfer() -> Weight {
(23_536_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(23_536_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:0)
// Storage: Uniques Asset (r:1 w:1)
fn cancel_approval() -> Weight {
(23_748_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(23_748_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques OwnershipAcceptance (r:1 w:1)
fn set_accept_ownership() -> Weight {
(20_712_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(20_712_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques CollectionMaxSupply (r:1 w:1)
// Storage: Uniques Class (r:1 w:0)
fn set_collection_max_supply() -> Weight {
(20_245_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(20_245_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Asset (r:1 w:0)
// Storage: Uniques ItemPriceOf (r:0 w:1)
fn set_price() -> Weight {
(20_065_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(20_065_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Asset (r:1 w:1)
// Storage: Uniques ItemPriceOf (r:1 w:1)
// Storage: Uniques Class (r:1 w:0)
// Storage: Uniques Account (r:0 w:2)
fn buy_item() -> Weight {
(40_638_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(40_638_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_utility`.
@@ -48,26 +48,26 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
/// The range of component `c` is `[0, 1000]`.
fn batch(c: u32, ) -> Weight {
(22_923_000 as Weight)
Weight::from_ref_time(22_923_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((3_526_000 as Weight).saturating_mul(c as Weight))
.saturating_add(Weight::from_ref_time(3_526_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
}
fn as_derivative() -> Weight {
(5_220_000 as Weight)
Weight::from_ref_time(5_220_000 as RefTimeWeight)
}
/// The range of component `c` is `[0, 1000]`.
fn batch_all(c: u32, ) -> Weight {
(20_953_000 as Weight)
Weight::from_ref_time(20_953_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((3_698_000 as Weight).saturating_mul(c as Weight))
.saturating_add(Weight::from_ref_time(3_698_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
}
fn dispatch_as() -> Weight {
(12_087_000 as Weight)
Weight::from_ref_time(12_087_000 as RefTimeWeight)
}
/// The range of component `c` is `[0, 1000]`.
fn force_batch(c: u32, ) -> Weight {
(10_076_000 as Weight)
Weight::from_ref_time(10_076_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((3_546_000 as Weight).saturating_mul(c as Weight))
.saturating_add(Weight::from_ref_time(3_546_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
}
}
@@ -25,8 +25,8 @@ pub mod constants {
/// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights
/// are available for brave runtime engineers who may want to try this out as default.
pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 8_000 * constants::WEIGHT_PER_NANOS,
write: 50_000 * constants::WEIGHT_PER_NANOS,
read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(),
write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(),
};
}
@@ -25,8 +25,8 @@ pub mod constants {
/// By default, Substrate uses `RocksDB`, so this will be the weight used throughout
/// the runtime.
pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 25_000 * constants::WEIGHT_PER_NANOS,
write: 100_000 * constants::WEIGHT_PER_NANOS,
read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(),
write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(),
};
}
@@ -20,7 +20,6 @@ use super::{
use frame_support::{
match_types, parameter_types,
traits::{Everything, Nothing, PalletInfoAccess},
weights::Weight,
};
use pallet_xcm::XcmPassthrough;
use parachains_common::{
@@ -130,7 +129,7 @@ pub type XcmOriginToTransactDispatchOrigin = (
parameter_types! {
// One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate.
pub UnitWeightCost: Weight = 1_000_000_000;
pub UnitWeightCost: u64 = 1_000_000_000;
pub const MaxInstructions: u32 = 100;
pub XcmAssetFeesReceiver: Option<AccountId> = Authorship::author();
}
@@ -1,6 +1,8 @@
use asset_test_utils::{ExtBuilder, RuntimeHelper};
use frame_support::{
assert_noop, assert_ok, traits::PalletInfo, weights::WeightToFee as WeightToFeeT,
assert_noop, assert_ok,
traits::PalletInfo,
weights::{Weight, WeightToFee as WeightToFeeT},
};
use parachains_common::{AccountId, AuraId};
pub use statemine_runtime::{
@@ -49,7 +51,7 @@ fn test_asset_xcm_trader() {
let bought = 4_000_000_000u64;
// lets calculate amount needed
let amount_needed = WeightToFee::weight_to_fee(&bought);
let amount_needed = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought));
let asset_multilocation = MultiLocation::new(
0,
@@ -130,7 +132,7 @@ fn test_asset_xcm_trader_with_refund() {
);
// lets calculate amount needed
let amount_bought = WeightToFee::weight_to_fee(&bought);
let amount_bought = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought));
let asset: MultiAsset = (asset_multilocation.clone(), amount_bought).into();
@@ -144,7 +146,8 @@ fn test_asset_xcm_trader_with_refund() {
let weight_used = bought / 2;
// Make sure refurnd works.
let amount_refunded = WeightToFee::weight_to_fee(&(bought - weight_used));
let amount_refunded =
WeightToFee::weight_to_fee(&Weight::from_ref_time(bought - weight_used));
assert_eq!(
trader.refund_weight(bought - weight_used),
@@ -155,7 +158,7 @@ fn test_asset_xcm_trader_with_refund() {
drop(trader);
// We only should have paid for half of the bought weight
let fees_paid = WeightToFee::weight_to_fee(&weight_used);
let fees_paid = WeightToFee::weight_to_fee(&Weight::from_ref_time(weight_used));
assert_eq!(
Assets::balance(1, AccountId::from(ALICE)),
@@ -207,7 +210,7 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() {
),
);
let amount_bought = WeightToFee::weight_to_fee(&bought);
let amount_bought = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought));
assert!(
amount_bought < ExistentialDeposit::get(),
@@ -267,7 +270,7 @@ fn test_that_buying_ed_refund_does_not_refund() {
),
);
let amount_bought = WeightToFee::weight_to_fee(&bought);
let amount_bought = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought));
assert!(
amount_bought < ExistentialDeposit::get(),
@@ -61,7 +61,7 @@ pub mod fee {
// in Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT:
// in Statemint, we map to 1/10 of that, or 1/100 CENT
let p = super::currency::CENTS;
let q = 100 * Balance::from(ExtrinsicBaseWeight::get());
let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time());
smallvec![WeightToFeeCoefficient {
degree: 1,
negative: false,
@@ -437,8 +437,8 @@ impl pallet_proxy::Config for Runtime {
}
parameter_types! {
pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4;
pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4;
pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4);
pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4);
}
impl cumulus_pallet_parachain_system::Config for Runtime {
@@ -23,7 +23,7 @@ pub mod constants {
parameter_types! {
/// Importing a block with 0 Extrinsics.
pub const BlockExecutionWeight: Weight = 5_000_000 * constants::WEIGHT_PER_NANOS;
pub const BlockExecutionWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(5_000_000);
}
#[cfg(test)]
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `cumulus_pallet_xcmp_queue`.
@@ -48,14 +48,14 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo<T> {
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_u32() -> Weight {
(5_192_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(5_192_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_weight() -> Weight {
(5_363_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(5_363_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
}
@@ -23,7 +23,7 @@ pub mod constants {
parameter_types! {
/// Executing a NO-OP `System::remarks` Extrinsic.
pub const ExtrinsicBaseWeight: Weight = 125_000 * constants::WEIGHT_PER_NANOS;
pub const ExtrinsicBaseWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(125_000);
}
#[cfg(test)]
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `frame_system`.
@@ -48,43 +48,43 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> {
/// The range of component `b` is `[0, 3932160]`.
fn remark(_b: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
}
/// The range of component `b` is `[0, 3932160]`.
fn remark_with_event(b: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
}
// Storage: System Digest (r:1 w:1)
// Storage: unknown [0x3a686561707061676573] (r:0 w:1)
fn set_heap_pages() -> Weight {
(5_446_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(5_446_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `i` is `[1, 1000]`.
fn set_storage(i: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((626_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
.saturating_add(Weight::from_ref_time(626_000 as RefTimeWeight).scalar_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)
/// The range of component `i` is `[1, 1000]`.
fn kill_storage(i: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((515_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
.saturating_add(Weight::from_ref_time(515_000 as RefTimeWeight).scalar_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)
/// The range of component `p` is `[1, 1000]`.
fn kill_prefix(p: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((1_052_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
.saturating_add(Weight::from_ref_time(1_052_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(p as RefTimeWeight)))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_assets`.
@@ -48,15 +48,15 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
// Storage: Assets Asset (r:1 w:1)
fn create() -> Weight {
(26_226_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(26_226_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
fn force_create() -> Weight {
(15_357_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(15_357_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:5002 w:5001)
@@ -67,171 +67,171 @@ impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
/// The range of component `s` is `[0, 5000]`.
/// The range of component `a` is `[0, 500]`.
fn destroy(c: u32, s: u32, a: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 45_000
.saturating_add((15_904_000 as Weight).saturating_mul(c as Weight))
.saturating_add(Weight::from_ref_time(15_904_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
// Standard Error: 45_000
.saturating_add((18_803_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(18_803_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 450_000
.saturating_add((17_017_000 as Weight).saturating_mul(a as Weight))
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight)))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight)))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(a as Weight)))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(c as Weight)))
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight)))
.saturating_add(Weight::from_ref_time(17_017_000 as RefTimeWeight).scalar_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)))
.saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight)))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:1 w:1)
fn mint() -> Weight {
(29_616_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(29_616_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:1 w:1)
fn burn() -> Weight {
(33_496_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(33_496_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer() -> Weight {
(46_790_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(46_790_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer_keep_alive() -> Weight {
(39_769_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(39_769_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn force_transfer() -> Weight {
(47_200_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(47_200_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Account (r:1 w:1)
fn freeze() -> Weight {
(20_873_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(20_873_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Account (r:1 w:1)
fn thaw() -> Weight {
(21_228_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(21_228_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
fn freeze_asset() -> Weight {
(17_685_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(17_685_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
fn thaw_asset() -> Weight {
(17_542_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(17_542_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Metadata (r:1 w:0)
fn transfer_ownership() -> Weight {
(18_639_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(18_639_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
fn set_team() -> Weight {
(17_135_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(17_135_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
/// The range of component `n` is `[0, 50]`.
/// The range of component `s` is `[0, 50]`.
fn set_metadata(n: u32, s: u32, ) -> Weight {
(31_324_000 as Weight)
Weight::from_ref_time(31_324_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(n as Weight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight))
// Standard Error: 0
.saturating_add((3_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(3_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
fn clear_metadata() -> Weight {
(31_340_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(31_340_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
/// The range of component `n` is `[0, 50]`.
/// The range of component `s` is `[0, 50]`.
fn force_set_metadata(_n: u32, s: u32, ) -> Weight {
(18_756_000 as Weight)
Weight::from_ref_time(18_756_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
fn force_clear_metadata() -> Weight {
(31_427_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(31_427_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
fn force_asset_status() -> Weight {
(16_930_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(16_930_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Approvals (r:1 w:1)
fn approve_transfer() -> Weight {
(34_492_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(34_492_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Assets Approvals (r:1 w:1)
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer_approved() -> Weight {
(60_098_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
Weight::from_ref_time(60_098_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Approvals (r:1 w:1)
fn cancel_approval() -> Weight {
(35_630_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(35_630_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Approvals (r:1 w:1)
fn force_cancel_approval() -> Weight {
(37_399_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(37_399_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_balances`.
@@ -48,44 +48,44 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Storage: System Account (r:1 w:1)
fn transfer() -> Weight {
(41_006_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(41_006_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn transfer_keep_alive() -> Weight {
(31_329_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(31_329_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_creating() -> Weight {
(21_075_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(21_075_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_killing() -> Weight {
(24_413_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(24_413_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:2 w:2)
fn force_transfer() -> Weight {
(41_434_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(41_434_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn transfer_all() -> Weight {
(37_653_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(37_653_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn force_unreserve() -> Weight {
(18_701_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(18_701_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_collator_selection`.
@@ -50,21 +50,21 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
// Storage: CollatorSelection Invulnerables (r:0 w:1)
/// The range of component `b` is `[1, 100]`.
fn set_invulnerables(b: u32, ) -> Weight {
(8_587_000 as Weight)
Weight::from_ref_time(8_587_000 as RefTimeWeight)
// Standard Error: 3_000
.saturating_add((3_304_000 as Weight).saturating_mul(b as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(3_304_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(b as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: CollatorSelection DesiredCandidates (r:0 w:1)
fn set_desired_candidates() -> Weight {
(9_027_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(9_027_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: CollatorSelection CandidacyBond (r:0 w:1)
fn set_candidacy_bond() -> Weight {
(9_244_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(9_244_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: CollatorSelection Candidates (r:1 w:1)
// Storage: CollatorSelection DesiredCandidates (r:1 w:0)
@@ -74,29 +74,29 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1)
/// The range of component `c` is `[1, 1000]`.
fn register_as_candidate(c: u32, ) -> Weight {
(60_984_000 as Weight)
Weight::from_ref_time(60_984_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((89_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(89_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: CollatorSelection Candidates (r:1 w:1)
// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1)
/// The range of component `c` is `[6, 1000]`.
fn leave_intent(c: u32, ) -> Weight {
(49_046_000 as Weight)
Weight::from_ref_time(49_046_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((118_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(118_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: System Account (r:2 w:2)
// Storage: System BlockWeight (r:1 w:1)
// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1)
fn note_author() -> Weight {
(32_269_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(32_269_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: CollatorSelection Candidates (r:1 w:1)
// Storage: CollatorSelection LastAuthoredBlock (r:1000 w:1)
@@ -106,13 +106,13 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
/// The range of component `r` is `[1, 1000]`.
/// The range of component `c` is `[1, 1000]`.
fn new_session(r: u32, c: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 1_992_000
.saturating_add((10_521_000 as Weight).saturating_mul(r as Weight))
.saturating_add(Weight::from_ref_time(10_521_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
// Standard Error: 1_992_000
.saturating_add((53_162_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight)))
.saturating_add(Weight::from_ref_time(53_162_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_multisig`.
@@ -48,22 +48,22 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
/// The range of component `z` is `[0, 10000]`.
fn as_multi_threshold_1(z: u32, ) -> Weight {
(17_175_000 as Weight)
Weight::from_ref_time(17_175_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_create(s: u32, z: u32, ) -> Weight {
(35_937_000 as Weight)
Weight::from_ref_time(35_937_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((97_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(97_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
@@ -71,38 +71,38 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_create_store(s: u32, z: u32, ) -> Weight {
(37_468_000 as Weight)
Weight::from_ref_time(37_468_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((89_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(89_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
/// The range of component `s` is `[3, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
(25_557_000 as Weight)
Weight::from_ref_time(25_557_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((83_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(83_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
/// The range of component `s` is `[3, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_approve_store(s: u32, z: u32, ) -> Weight {
(38_127_000 as Weight)
Weight::from_ref_time(38_127_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((88_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(88_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
@@ -110,53 +110,53 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
(47_383_000 as Weight)
Weight::from_ref_time(47_383_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((127_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(127_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((3_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(3_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_create(s: u32, ) -> Weight {
(33_472_000 as Weight)
Weight::from_ref_time(33_472_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((102_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(102_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:0)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_approve(s: u32, ) -> Weight {
(21_612_000 as Weight)
Weight::from_ref_time(21_612_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((119_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(119_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_complete(s: u32, ) -> Weight {
(68_168_000 as Weight)
Weight::from_ref_time(68_168_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((157_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(157_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
/// The range of component `s` is `[2, 100]`.
fn cancel_as_multi(s: u32, ) -> Weight {
(52_748_000 as Weight)
Weight::from_ref_time(52_748_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((117_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(117_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_proxy`.
@@ -49,10 +49,10 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
// Storage: Proxy Proxies (r:1 w:0)
/// The range of component `p` is `[1, 31]`.
fn proxy(p: u32, ) -> Weight {
(17_582_000 as Weight)
Weight::from_ref_time(17_582_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((77_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(Weight::from_ref_time(77_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:0)
// Storage: Proxy Announcements (r:1 w:1)
@@ -60,39 +60,39 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn proxy_announced(a: u32, p: u32, ) -> Weight {
(34_603_000 as Weight)
Weight::from_ref_time(34_603_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((169_000 as Weight).saturating_mul(a as Weight))
.saturating_add(Weight::from_ref_time(169_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((87_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(87_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Proxy Announcements (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn remove_announcement(a: u32, p: u32, ) -> Weight {
(24_496_000 as Weight)
Weight::from_ref_time(24_496_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((179_000 as Weight).saturating_mul(a as Weight))
.saturating_add(Weight::from_ref_time(179_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight))
// Standard Error: 1_000
.saturating_add((25_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(25_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Proxy Announcements (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn reject_announcement(a: u32, p: u32, ) -> Weight {
(24_237_000 as Weight)
Weight::from_ref_time(24_237_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((181_000 as Weight).saturating_mul(a as Weight))
.saturating_add(Weight::from_ref_time(181_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight))
// Standard Error: 1_000
.saturating_add((29_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(29_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:0)
// Storage: Proxy Announcements (r:1 w:1)
@@ -100,58 +100,58 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn announce(a: u32, p: u32, ) -> Weight {
(32_065_000 as Weight)
Weight::from_ref_time(32_065_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((166_000 as Weight).saturating_mul(a as Weight))
.saturating_add(Weight::from_ref_time(166_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((91_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(91_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[1, 31]`.
fn add_proxy(p: u32, ) -> Weight {
(27_168_000 as Weight)
Weight::from_ref_time(27_168_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((117_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(117_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[1, 31]`.
fn remove_proxy(p: u32, ) -> Weight {
(27_233_000 as Weight)
Weight::from_ref_time(27_233_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((121_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(121_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[1, 31]`.
fn remove_proxies(p: u32, ) -> Weight {
(23_010_000 as Weight)
Weight::from_ref_time(23_010_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((95_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(95_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[1, 31]`.
fn anonymous(p: u32, ) -> Weight {
(30_378_000 as Weight)
Weight::from_ref_time(30_378_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((16_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(16_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[0, 30]`.
fn kill_anonymous(p: u32, ) -> Weight {
(23_977_000 as Weight)
Weight::from_ref_time(23_977_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((76_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(76_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_session`.
@@ -49,15 +49,15 @@ impl<T: frame_system::Config> pallet_session::WeightInfo for WeightInfo<T> {
// Storage: Session NextKeys (r:1 w:1)
// Storage: Session KeyOwner (r:1 w:1)
fn set_keys() -> Weight {
(16_170_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(16_170_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Session NextKeys (r:1 w:1)
// Storage: Session KeyOwner (r:0 w:1)
fn purge_keys() -> Weight {
(13_246_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(13_246_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_timestamp`.
@@ -48,11 +48,11 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_timestamp::WeightInfo for WeightInfo<T> {
// Storage: Timestamp Now (r:1 w:1)
fn set() -> Weight {
(6_737_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(6_737_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
fn on_finalize() -> Weight {
(2_329_000 as Weight)
Weight::from_ref_time(2_329_000 as RefTimeWeight)
}
}
@@ -43,7 +43,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_uniques`.
@@ -53,17 +53,17 @@ impl<T: frame_system::Config> pallet_uniques::WeightInfo for WeightInfo<T> {
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques ClassAccount (r:0 w:1)
fn create() -> Weight {
(27_424_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(27_424_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques NextCollectionId (r:1 w:1)
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques ClassAccount (r:0 w:1)
fn force_create() -> Weight {
(17_098_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(17_098_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques Asset (r:1 w:0)
@@ -77,191 +77,191 @@ impl<T: frame_system::Config> pallet_uniques::WeightInfo for WeightInfo<T> {
/// The range of component `m` is `[0, 1000]`.
/// The range of component `a` is `[0, 1000]`.
fn destroy(n: u32, m: u32, a: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 18_000
.saturating_add((10_919_000 as Weight).saturating_mul(n as Weight))
.saturating_add(Weight::from_ref_time(10_919_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight))
// Standard Error: 18_000
.saturating_add((1_679_000 as Weight).saturating_mul(m as Weight))
.saturating_add(Weight::from_ref_time(1_679_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
// Standard Error: 18_000
.saturating_add((1_463_000 as Weight).saturating_mul(a as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(n as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(m as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight)))
.saturating_add(Weight::from_ref_time(1_463_000 as RefTimeWeight).scalar_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))
.saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(n as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(m as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight)))
}
// Storage: Uniques Asset (r:1 w:1)
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques CollectionMaxSupply (r:1 w:0)
// Storage: Uniques Account (r:0 w:1)
fn mint() -> Weight {
(36_329_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
Weight::from_ref_time(36_329_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques Asset (r:1 w:1)
// Storage: Uniques Account (r:0 w:1)
// Storage: Uniques ItemPriceOf (r:0 w:1)
fn burn() -> Weight {
(36_746_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(36_746_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:0)
// Storage: Uniques Asset (r:1 w:1)
// Storage: Uniques Account (r:0 w:2)
// Storage: Uniques ItemPriceOf (r:0 w:1)
fn transfer() -> Weight {
(28_916_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(28_916_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques Asset (r:100 w:100)
/// The range of component `i` is `[0, 5000]`.
fn redeposit(i: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 15_000
.saturating_add((12_745_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(i as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
.saturating_add(Weight::from_ref_time(12_745_000 as RefTimeWeight).scalar_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))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight)))
}
// Storage: Uniques Asset (r:1 w:1)
// Storage: Uniques Class (r:1 w:0)
fn freeze() -> Weight {
(21_813_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(21_813_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Asset (r:1 w:1)
// Storage: Uniques Class (r:1 w:0)
fn thaw() -> Weight {
(22_088_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(22_088_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
fn freeze_collection() -> Weight {
(17_184_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(17_184_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
fn thaw_collection() -> Weight {
(17_311_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(17_311_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques OwnershipAcceptance (r:1 w:1)
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques ClassAccount (r:0 w:2)
fn transfer_ownership() -> Weight {
(25_174_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(25_174_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
fn set_team() -> Weight {
(17_879_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(17_879_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques ClassAccount (r:0 w:1)
fn force_item_status() -> Weight {
(20_491_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(20_491_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques InstanceMetadataOf (r:1 w:0)
// Storage: Uniques Attribute (r:1 w:1)
fn set_attribute() -> Weight {
(42_444_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(42_444_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques InstanceMetadataOf (r:1 w:0)
// Storage: Uniques Attribute (r:1 w:1)
fn clear_attribute() -> Weight {
(41_217_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(41_217_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques InstanceMetadataOf (r:1 w:1)
fn set_metadata() -> Weight {
(34_559_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(34_559_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques InstanceMetadataOf (r:1 w:1)
fn clear_metadata() -> Weight {
(34_863_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(34_863_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques ClassMetadataOf (r:1 w:1)
fn set_collection_metadata() -> Weight {
(33_199_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(33_199_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:0)
// Storage: Uniques ClassMetadataOf (r:1 w:1)
fn clear_collection_metadata() -> Weight {
(31_472_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(31_472_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:0)
// Storage: Uniques Asset (r:1 w:1)
fn approve_transfer() -> Weight {
(23_618_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(23_618_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:0)
// Storage: Uniques Asset (r:1 w:1)
fn cancel_approval() -> Weight {
(23_507_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(23_507_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques OwnershipAcceptance (r:1 w:1)
fn set_accept_ownership() -> Weight {
(21_120_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(21_120_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques CollectionMaxSupply (r:1 w:1)
// Storage: Uniques Class (r:1 w:0)
fn set_collection_max_supply() -> Weight {
(20_664_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(20_664_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Asset (r:1 w:0)
// Storage: Uniques ItemPriceOf (r:0 w:1)
fn set_price() -> Weight {
(19_938_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(19_938_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Asset (r:1 w:1)
// Storage: Uniques ItemPriceOf (r:1 w:1)
// Storage: Uniques Class (r:1 w:0)
// Storage: Uniques Account (r:0 w:2)
fn buy_item() -> Weight {
(39_254_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(39_254_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_utility`.
@@ -48,26 +48,26 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
/// The range of component `c` is `[0, 1000]`.
fn batch(c: u32, ) -> Weight {
(30_959_000 as Weight)
Weight::from_ref_time(30_959_000 as RefTimeWeight)
// Standard Error: 6_000
.saturating_add((3_220_000 as Weight).saturating_mul(c as Weight))
.saturating_add(Weight::from_ref_time(3_220_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
}
fn as_derivative() -> Weight {
(4_732_000 as Weight)
Weight::from_ref_time(4_732_000 as RefTimeWeight)
}
/// The range of component `c` is `[0, 1000]`.
fn batch_all(c: u32, ) -> Weight {
(16_465_000 as Weight)
Weight::from_ref_time(16_465_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((3_364_000 as Weight).saturating_mul(c as Weight))
.saturating_add(Weight::from_ref_time(3_364_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
}
fn dispatch_as() -> Weight {
(11_903_000 as Weight)
Weight::from_ref_time(11_903_000 as RefTimeWeight)
}
/// The range of component `c` is `[0, 1000]`.
fn force_batch(c: u32, ) -> Weight {
(22_621_000 as Weight)
Weight::from_ref_time(22_621_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((3_147_000 as Weight).saturating_mul(c as Weight))
.saturating_add(Weight::from_ref_time(3_147_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
}
}
@@ -25,8 +25,8 @@ pub mod constants {
/// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights
/// are available for brave runtime engineers who may want to try this out as default.
pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 8_000 * constants::WEIGHT_PER_NANOS,
write: 50_000 * constants::WEIGHT_PER_NANOS,
read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(),
write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(),
};
}
@@ -25,8 +25,8 @@ pub mod constants {
/// By default, Substrate uses `RocksDB`, so this will be the weight used throughout
/// the runtime.
pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 25_000 * constants::WEIGHT_PER_NANOS,
write: 100_000 * constants::WEIGHT_PER_NANOS,
read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(),
write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(),
};
}
@@ -20,7 +20,6 @@ use super::{
use frame_support::{
match_types, parameter_types,
traits::{Everything, Nothing, PalletInfoAccess},
weights::Weight,
};
use pallet_xcm::XcmPassthrough;
use parachains_common::{
@@ -127,7 +126,7 @@ pub type XcmOriginToTransactDispatchOrigin = (
parameter_types! {
// One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate.
pub UnitWeightCost: Weight = 1_000_000_000;
pub UnitWeightCost: u64 = 1_000_000_000;
pub const MaxInstructions: u32 = 100;
pub XcmAssetFeesReceiver: Option<AccountId> = Authorship::author();
}
@@ -1,6 +1,8 @@
use asset_test_utils::{ExtBuilder, RuntimeHelper};
use frame_support::{
assert_noop, assert_ok, traits::PalletInfo, weights::WeightToFee as WeightToFeeT,
assert_noop, assert_ok,
traits::PalletInfo,
weights::{Weight, WeightToFee as WeightToFeeT},
};
use parachains_common::{AccountId, StatemintAuraId as AuraId};
pub use statemint_runtime::{
@@ -44,7 +46,7 @@ fn test_asset_xcm_trader_does_not_work_in_statemine() {
let bought = 400_000_000_000u64;
// lets calculate amount needed
let amount_needed = WeightToFee::weight_to_fee(&bought);
let amount_needed = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought));
let asset_multilocation = MultiLocation::new(
0,
@@ -61,7 +61,7 @@ pub mod fee {
// in Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT:
// in Statemint, we map to 1/10 of that, or 1/100 CENT
let p = super::currency::CENTS;
let q = 100 * Balance::from(ExtrinsicBaseWeight::get());
let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time());
smallvec![WeightToFeeCoefficient {
degree: 1,
negative: false,
@@ -402,8 +402,8 @@ impl pallet_proxy::Config for Runtime {
}
parameter_types! {
pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4;
pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4;
pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4);
pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4);
}
impl cumulus_pallet_parachain_system::Config for Runtime {
@@ -23,7 +23,7 @@ pub mod constants {
parameter_types! {
/// Importing a block with 0 Extrinsics.
pub const BlockExecutionWeight: Weight = 5_000_000 * constants::WEIGHT_PER_NANOS;
pub const BlockExecutionWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(5_000_000);
}
#[cfg(test)]
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `cumulus_pallet_xcmp_queue`.
@@ -48,14 +48,14 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo<T> {
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_u32() -> Weight {
(5_463_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(5_463_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_weight() -> Weight {
(5_221_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(5_221_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
}
@@ -23,7 +23,7 @@ pub mod constants {
parameter_types! {
/// Executing a NO-OP `System::remarks` Extrinsic.
pub const ExtrinsicBaseWeight: Weight = 125_000 * constants::WEIGHT_PER_NANOS;
pub const ExtrinsicBaseWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(125_000);
}
#[cfg(test)]
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `frame_system`.
@@ -48,43 +48,43 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> {
/// The range of component `b` is `[0, 3932160]`.
fn remark(_b: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
}
/// The range of component `b` is `[0, 3932160]`.
fn remark_with_event(b: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(b as Weight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
}
// Storage: System Digest (r:1 w:1)
// Storage: unknown [0x3a686561707061676573] (r:0 w:1)
fn set_heap_pages() -> Weight {
(5_726_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(5_726_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `i` is `[1, 1000]`.
fn set_storage(i: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((616_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
.saturating_add(Weight::from_ref_time(616_000 as RefTimeWeight).scalar_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)
/// The range of component `i` is `[1, 1000]`.
fn kill_storage(i: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((519_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
.saturating_add(Weight::from_ref_time(519_000 as RefTimeWeight).scalar_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)
/// The range of component `p` is `[1, 1000]`.
fn kill_prefix(p: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((1_067_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
.saturating_add(Weight::from_ref_time(1_067_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(p as RefTimeWeight)))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_assets`.
@@ -48,15 +48,15 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
// Storage: Assets Asset (r:1 w:1)
fn create() -> Weight {
(25_905_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(25_905_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
fn force_create() -> Weight {
(14_977_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(14_977_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:5002 w:5001)
@@ -67,169 +67,169 @@ impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
/// The range of component `s` is `[0, 5000]`.
/// The range of component `a` is `[0, 500]`.
fn destroy(c: u32, s: u32, a: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 46_000
.saturating_add((16_133_000 as Weight).saturating_mul(c as Weight))
.saturating_add(Weight::from_ref_time(16_133_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
// Standard Error: 46_000
.saturating_add((18_915_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(18_915_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 464_000
.saturating_add((16_795_000 as Weight).saturating_mul(a as Weight))
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight)))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight)))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(a as Weight)))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(c as Weight)))
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight)))
.saturating_add(Weight::from_ref_time(16_795_000 as RefTimeWeight).scalar_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)))
.saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(s as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight)))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:1 w:1)
fn mint() -> Weight {
(29_903_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(29_903_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:1 w:1)
fn burn() -> Weight {
(34_384_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(34_384_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer() -> Weight {
(48_218_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(48_218_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer_keep_alive() -> Weight {
(40_558_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(40_558_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn force_transfer() -> Weight {
(48_330_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(48_330_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Account (r:1 w:1)
fn freeze() -> Weight {
(21_218_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(21_218_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Account (r:1 w:1)
fn thaw() -> Weight {
(21_227_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(21_227_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
fn freeze_asset() -> Weight {
(17_906_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(17_906_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
fn thaw_asset() -> Weight {
(17_669_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(17_669_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Metadata (r:1 w:0)
fn transfer_ownership() -> Weight {
(18_756_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(18_756_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
fn set_team() -> Weight {
(17_203_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(17_203_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
/// The range of component `n` is `[0, 50]`.
/// The range of component `s` is `[0, 50]`.
fn set_metadata(_n: u32, s: u32, ) -> Weight {
(31_757_000 as Weight)
Weight::from_ref_time(31_757_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((3_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(3_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
fn clear_metadata() -> Weight {
(31_669_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(31_669_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
/// The range of component `n` is `[0, 50]`.
/// The range of component `s` is `[0, 50]`.
fn force_set_metadata(_n: u32, s: u32, ) -> Weight {
(18_566_000 as Weight)
Weight::from_ref_time(18_566_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:0)
// Storage: Assets Metadata (r:1 w:1)
fn force_clear_metadata() -> Weight {
(31_467_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(31_467_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
fn force_asset_status() -> Weight {
(16_275_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(16_275_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Approvals (r:1 w:1)
fn approve_transfer() -> Weight {
(34_436_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(34_436_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Assets Approvals (r:1 w:1)
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Account (r:2 w:2)
// Storage: System Account (r:1 w:1)
fn transfer_approved() -> Weight {
(60_445_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
Weight::from_ref_time(60_445_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Approvals (r:1 w:1)
fn cancel_approval() -> Weight {
(35_819_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(35_819_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Assets Asset (r:1 w:1)
// Storage: Assets Approvals (r:1 w:1)
fn force_cancel_approval() -> Weight {
(36_535_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(36_535_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_balances`.
@@ -48,44 +48,44 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Storage: System Account (r:1 w:1)
fn transfer() -> Weight {
(40_330_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(40_330_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn transfer_keep_alive() -> Weight {
(30_938_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(30_938_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_creating() -> Weight {
(20_284_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(20_284_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_killing() -> Weight {
(24_018_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(24_018_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:2 w:2)
fn force_transfer() -> Weight {
(40_970_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(40_970_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn transfer_all() -> Weight {
(36_243_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(36_243_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn force_unreserve() -> Weight {
(18_374_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(18_374_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_collator_selection`.
@@ -50,21 +50,21 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
// Storage: CollatorSelection Invulnerables (r:0 w:1)
/// The range of component `b` is `[1, 100]`.
fn set_invulnerables(b: u32, ) -> Weight {
(6_669_000 as Weight)
Weight::from_ref_time(6_669_000 as RefTimeWeight)
// Standard Error: 3_000
.saturating_add((3_218_000 as Weight).saturating_mul(b as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(3_218_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(b as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: CollatorSelection DesiredCandidates (r:0 w:1)
fn set_desired_candidates() -> Weight {
(8_348_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(8_348_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: CollatorSelection CandidacyBond (r:0 w:1)
fn set_candidacy_bond() -> Weight {
(8_592_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(8_592_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: CollatorSelection Candidates (r:1 w:1)
// Storage: CollatorSelection DesiredCandidates (r:1 w:0)
@@ -74,29 +74,29 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1)
/// The range of component `c` is `[1, 1000]`.
fn register_as_candidate(c: u32, ) -> Weight {
(55_542_000 as Weight)
Weight::from_ref_time(55_542_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((92_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(92_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: CollatorSelection Candidates (r:1 w:1)
// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1)
/// The range of component `c` is `[2, 1000]`.
fn leave_intent(c: u32, ) -> Weight {
(52_080_000 as Weight)
Weight::from_ref_time(52_080_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((109_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(109_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: System Account (r:2 w:2)
// Storage: System BlockWeight (r:1 w:1)
// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1)
fn note_author() -> Weight {
(31_546_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(31_546_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: CollatorSelection Candidates (r:1 w:1)
// Storage: CollatorSelection LastAuthoredBlock (r:1000 w:1)
@@ -106,13 +106,13 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
/// The range of component `r` is `[1, 1000]`.
/// The range of component `c` is `[1, 1000]`.
fn new_session(r: u32, c: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 1_895_000
.saturating_add((9_941_000 as Weight).saturating_mul(r as Weight))
.saturating_add(Weight::from_ref_time(9_941_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
// Standard Error: 1_895_000
.saturating_add((50_628_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight)))
.saturating_add(Weight::from_ref_time(50_628_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_multisig`.
@@ -48,22 +48,22 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
/// The range of component `z` is `[0, 10000]`.
fn as_multi_threshold_1(z: u32, ) -> Weight {
(17_854_000 as Weight)
Weight::from_ref_time(17_854_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_create(s: u32, z: u32, ) -> Weight {
(36_613_000 as Weight)
Weight::from_ref_time(36_613_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((96_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(96_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
@@ -71,38 +71,38 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_create_store(s: u32, z: u32, ) -> Weight {
(40_039_000 as Weight)
Weight::from_ref_time(40_039_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((72_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(72_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
/// The range of component `s` is `[3, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
(26_059_000 as Weight)
Weight::from_ref_time(26_059_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((82_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(82_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
/// The range of component `s` is `[3, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_approve_store(s: u32, z: u32, ) -> Weight {
(38_292_000 as Weight)
Weight::from_ref_time(38_292_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((90_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(90_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
@@ -110,53 +110,53 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
(47_468_000 as Weight)
Weight::from_ref_time(47_468_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((129_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(129_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_create(s: u32, ) -> Weight {
(33_492_000 as Weight)
Weight::from_ref_time(33_492_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((110_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(110_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:0)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_approve(s: u32, ) -> Weight {
(22_147_000 as Weight)
Weight::from_ref_time(22_147_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((113_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(113_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_complete(s: u32, ) -> Weight {
(66_106_000 as Weight)
Weight::from_ref_time(66_106_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((161_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(161_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
/// The range of component `s` is `[2, 100]`.
fn cancel_as_multi(s: u32, ) -> Weight {
(52_566_000 as Weight)
Weight::from_ref_time(52_566_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((117_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(117_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_proxy`.
@@ -49,10 +49,10 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
// Storage: Proxy Proxies (r:1 w:0)
/// The range of component `p` is `[1, 31]`.
fn proxy(p: u32, ) -> Weight {
(18_084_000 as Weight)
Weight::from_ref_time(18_084_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((83_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(Weight::from_ref_time(83_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:0)
// Storage: Proxy Announcements (r:1 w:1)
@@ -60,39 +60,39 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn proxy_announced(a: u32, p: u32, ) -> Weight {
(35_619_000 as Weight)
Weight::from_ref_time(35_619_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((172_000 as Weight).saturating_mul(a as Weight))
.saturating_add(Weight::from_ref_time(172_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((89_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(89_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Proxy Announcements (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn remove_announcement(a: u32, p: u32, ) -> Weight {
(24_774_000 as Weight)
Weight::from_ref_time(24_774_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((190_000 as Weight).saturating_mul(a as Weight))
.saturating_add(Weight::from_ref_time(190_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((33_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(33_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Proxy Announcements (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn reject_announcement(a: u32, p: u32, ) -> Weight {
(25_855_000 as Weight)
Weight::from_ref_time(25_855_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((160_000 as Weight).saturating_mul(a as Weight))
.saturating_add(Weight::from_ref_time(160_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight))
// Standard Error: 1_000
.saturating_add((15_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(15_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:0)
// Storage: Proxy Announcements (r:1 w:1)
@@ -100,58 +100,58 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn announce(a: u32, p: u32, ) -> Weight {
(32_874_000 as Weight)
Weight::from_ref_time(32_874_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((172_000 as Weight).saturating_mul(a as Weight))
.saturating_add(Weight::from_ref_time(172_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((97_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(97_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[1, 31]`.
fn add_proxy(p: u32, ) -> Weight {
(28_312_000 as Weight)
Weight::from_ref_time(28_312_000 as RefTimeWeight)
// Standard Error: 4_000
.saturating_add((105_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(105_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[1, 31]`.
fn remove_proxy(p: u32, ) -> Weight {
(28_197_000 as Weight)
Weight::from_ref_time(28_197_000 as RefTimeWeight)
// Standard Error: 4_000
.saturating_add((121_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(121_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[1, 31]`.
fn remove_proxies(p: u32, ) -> Weight {
(23_659_000 as Weight)
Weight::from_ref_time(23_659_000 as RefTimeWeight)
// Standard Error: 8_000
.saturating_add((106_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(106_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[1, 31]`.
fn anonymous(p: u32, ) -> Weight {
(31_575_000 as Weight)
Weight::from_ref_time(31_575_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((35_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(35_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[0, 30]`.
fn kill_anonymous(p: u32, ) -> Weight {
(24_640_000 as Weight)
Weight::from_ref_time(24_640_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((80_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(80_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_session`.
@@ -49,15 +49,15 @@ impl<T: frame_system::Config> pallet_session::WeightInfo for WeightInfo<T> {
// Storage: Session NextKeys (r:1 w:1)
// Storage: Session KeyOwner (r:1 w:1)
fn set_keys() -> Weight {
(16_457_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(16_457_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Session NextKeys (r:1 w:1)
// Storage: Session KeyOwner (r:0 w:1)
fn purge_keys() -> Weight {
(13_585_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(13_585_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_timestamp`.
@@ -48,11 +48,11 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_timestamp::WeightInfo for WeightInfo<T> {
// Storage: Timestamp Now (r:1 w:1)
fn set() -> Weight {
(6_762_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(6_762_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
fn on_finalize() -> Weight {
(2_387_000 as Weight)
Weight::from_ref_time(2_387_000 as RefTimeWeight)
}
}
@@ -43,7 +43,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_uniques`.
@@ -53,17 +53,17 @@ impl<T: frame_system::Config> pallet_uniques::WeightInfo for WeightInfo<T> {
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques ClassAccount (r:0 w:1)
fn create() -> Weight {
(27_462_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(27_462_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques NextCollectionId (r:1 w:1)
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques ClassAccount (r:0 w:1)
fn force_create() -> Weight {
(16_480_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(16_480_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques Asset (r:1 w:0)
@@ -77,191 +77,191 @@ impl<T: frame_system::Config> pallet_uniques::WeightInfo for WeightInfo<T> {
/// The range of component `m` is `[0, 1000]`.
/// The range of component `a` is `[0, 1000]`.
fn destroy(n: u32, m: u32, a: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 18_000
.saturating_add((10_956_000 as Weight).saturating_mul(n as Weight))
.saturating_add(Weight::from_ref_time(10_956_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight))
// Standard Error: 18_000
.saturating_add((1_654_000 as Weight).saturating_mul(m as Weight))
.saturating_add(Weight::from_ref_time(1_654_000 as RefTimeWeight).scalar_saturating_mul(m as RefTimeWeight))
// Standard Error: 18_000
.saturating_add((1_572_000 as Weight).saturating_mul(a as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(n as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(m as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight)))
.saturating_add(Weight::from_ref_time(1_572_000 as RefTimeWeight).scalar_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))
.saturating_add(T::DbWeight::get().writes((2 as RefTimeWeight).saturating_mul(n as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(m as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(a as RefTimeWeight)))
}
// Storage: Uniques Asset (r:1 w:1)
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques CollectionMaxSupply (r:1 w:0)
// Storage: Uniques Account (r:0 w:1)
fn mint() -> Weight {
(36_074_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
Weight::from_ref_time(36_074_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques Asset (r:1 w:1)
// Storage: Uniques Account (r:0 w:1)
// Storage: Uniques ItemPriceOf (r:0 w:1)
fn burn() -> Weight {
(37_583_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(37_583_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:0)
// Storage: Uniques Asset (r:1 w:1)
// Storage: Uniques Account (r:0 w:2)
// Storage: Uniques ItemPriceOf (r:0 w:1)
fn transfer() -> Weight {
(28_134_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(28_134_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques Asset (r:100 w:100)
/// The range of component `i` is `[0, 5000]`.
fn redeposit(i: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 16_000
.saturating_add((12_715_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(i as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
.saturating_add(Weight::from_ref_time(12_715_000 as RefTimeWeight).scalar_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))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(i as RefTimeWeight)))
}
// Storage: Uniques Asset (r:1 w:1)
// Storage: Uniques Class (r:1 w:0)
fn freeze() -> Weight {
(21_019_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(21_019_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Asset (r:1 w:1)
// Storage: Uniques Class (r:1 w:0)
fn thaw() -> Weight {
(21_907_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(21_907_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
fn freeze_collection() -> Weight {
(16_894_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(16_894_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
fn thaw_collection() -> Weight {
(16_650_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(16_650_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques OwnershipAcceptance (r:1 w:1)
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques ClassAccount (r:0 w:2)
fn transfer_ownership() -> Weight {
(25_095_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(25_095_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
fn set_team() -> Weight {
(17_428_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(17_428_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques ClassAccount (r:0 w:1)
fn force_item_status() -> Weight {
(20_018_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(20_018_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques InstanceMetadataOf (r:1 w:0)
// Storage: Uniques Attribute (r:1 w:1)
fn set_attribute() -> Weight {
(41_955_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(41_955_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques InstanceMetadataOf (r:1 w:0)
// Storage: Uniques Attribute (r:1 w:1)
fn clear_attribute() -> Weight {
(40_201_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(40_201_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques InstanceMetadataOf (r:1 w:1)
fn set_metadata() -> Weight {
(33_630_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(33_630_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques InstanceMetadataOf (r:1 w:1)
fn clear_metadata() -> Weight {
(34_054_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(34_054_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:1)
// Storage: Uniques ClassMetadataOf (r:1 w:1)
fn set_collection_metadata() -> Weight {
(33_283_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(33_283_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:0)
// Storage: Uniques ClassMetadataOf (r:1 w:1)
fn clear_collection_metadata() -> Weight {
(31_298_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(31_298_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:0)
// Storage: Uniques Asset (r:1 w:1)
fn approve_transfer() -> Weight {
(22_430_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(22_430_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Class (r:1 w:0)
// Storage: Uniques Asset (r:1 w:1)
fn cancel_approval() -> Weight {
(23_005_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(23_005_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques OwnershipAcceptance (r:1 w:1)
fn set_accept_ownership() -> Weight {
(20_468_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(20_468_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques CollectionMaxSupply (r:1 w:1)
// Storage: Uniques Class (r:1 w:0)
fn set_collection_max_supply() -> Weight {
(19_948_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(19_948_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Asset (r:1 w:0)
// Storage: Uniques ItemPriceOf (r:0 w:1)
fn set_price() -> Weight {
(19_487_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(19_487_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Uniques Asset (r:1 w:1)
// Storage: Uniques ItemPriceOf (r:1 w:1)
// Storage: Uniques Class (r:1 w:0)
// Storage: Uniques Account (r:0 w:2)
fn buy_item() -> Weight {
(39_973_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(39_973_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_utility`.
@@ -48,26 +48,26 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
/// The range of component `c` is `[0, 1000]`.
fn batch(c: u32, ) -> Weight {
(14_433_000 as Weight)
Weight::from_ref_time(14_433_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((3_315_000 as Weight).saturating_mul(c as Weight))
.saturating_add(Weight::from_ref_time(3_315_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
}
fn as_derivative() -> Weight {
(5_234_000 as Weight)
Weight::from_ref_time(5_234_000 as RefTimeWeight)
}
/// The range of component `c` is `[0, 1000]`.
fn batch_all(c: u32, ) -> Weight {
(16_023_000 as Weight)
Weight::from_ref_time(16_023_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((3_466_000 as Weight).saturating_mul(c as Weight))
.saturating_add(Weight::from_ref_time(3_466_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
}
fn dispatch_as() -> Weight {
(12_588_000 as Weight)
Weight::from_ref_time(12_588_000 as RefTimeWeight)
}
/// The range of component `c` is `[0, 1000]`.
fn force_batch(c: u32, ) -> Weight {
(16_094_000 as Weight)
Weight::from_ref_time(16_094_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((3_280_000 as Weight).saturating_mul(c as Weight))
.saturating_add(Weight::from_ref_time(3_280_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
}
}
@@ -25,8 +25,8 @@ pub mod constants {
/// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights
/// are available for brave runtime engineers who may want to try this out as default.
pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 8_000 * constants::WEIGHT_PER_NANOS,
write: 50_000 * constants::WEIGHT_PER_NANOS,
read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(),
write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(),
};
}
@@ -25,8 +25,8 @@ pub mod constants {
/// By default, Substrate uses `RocksDB`, so this will be the weight used throughout
/// the runtime.
pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 25_000 * constants::WEIGHT_PER_NANOS,
write: 100_000 * constants::WEIGHT_PER_NANOS,
read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(),
write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(),
};
}
@@ -20,7 +20,6 @@ use super::{
use frame_support::{
match_types, parameter_types,
traits::{Everything, PalletInfoAccess},
weights::Weight,
};
use pallet_xcm::XcmPassthrough;
use parachains_common::{
@@ -131,7 +130,7 @@ pub type XcmOriginToTransactDispatchOrigin = (
parameter_types! {
// One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate.
pub UnitWeightCost: Weight = 1_000_000_000;
pub UnitWeightCost: u64 = 1_000_000_000;
pub const MaxInstructions: u32 = 100;
pub XcmAssetFeesReceiver: Option<AccountId> = Authorship::author();
}
@@ -1,6 +1,8 @@
use asset_test_utils::{ExtBuilder, RuntimeHelper};
use frame_support::{
assert_noop, assert_ok, traits::PalletInfo, weights::WeightToFee as WeightToFeeT,
assert_noop, assert_ok,
traits::PalletInfo,
weights::{Weight, WeightToFee as WeightToFeeT},
};
use parachains_common::{AccountId, AuraId};
pub use westmint_runtime::{
@@ -50,7 +52,7 @@ fn test_asset_xcm_trader() {
let bought = 4_000_000_000u64;
// lets calculate amount needed
let amount_needed = WeightToFee::weight_to_fee(&bought);
let amount_needed = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought));
let asset_multilocation = MultiLocation::new(
0,
@@ -130,7 +132,7 @@ fn test_asset_xcm_trader_with_refund() {
);
// lets calculate amount needed
let amount_bought = WeightToFee::weight_to_fee(&bought);
let amount_bought = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought));
let asset: MultiAsset = (asset_multilocation.clone(), amount_bought).into();
@@ -144,7 +146,8 @@ fn test_asset_xcm_trader_with_refund() {
let weight_used = bought / 2;
// Make sure refurnd works.
let amount_refunded = WeightToFee::weight_to_fee(&(bought - weight_used));
let amount_refunded =
WeightToFee::weight_to_fee(&Weight::from_ref_time(bought - weight_used));
assert_eq!(
trader.refund_weight(bought - weight_used),
@@ -155,7 +158,7 @@ fn test_asset_xcm_trader_with_refund() {
drop(trader);
// We only should have paid for half of the bought weight
let fees_paid = WeightToFee::weight_to_fee(&weight_used);
let fees_paid = WeightToFee::weight_to_fee(&Weight::from_ref_time(weight_used));
assert_eq!(
Assets::balance(1, AccountId::from(ALICE)),
@@ -207,7 +210,7 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() {
),
);
let amount_bought = WeightToFee::weight_to_fee(&bought);
let amount_bought = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought));
assert!(
amount_bought < ExistentialDeposit::get(),
@@ -266,7 +269,7 @@ fn test_that_buying_ed_refund_does_not_refund() {
),
);
let amount_bought = WeightToFee::weight_to_fee(&bought);
let amount_bought = WeightToFee::weight_to_fee(&Weight::from_ref_time(bought));
assert!(
amount_bought < ExistentialDeposit::get(),
@@ -71,7 +71,7 @@ pub mod fee {
// in Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT:
// in a parachain, we map to 1/10 of that, or 1/100 CENT
let p = super::currency::CENTS;
let q = 100 * Balance::from(ExtrinsicBaseWeight::get());
let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time());
smallvec![WeightToFeeCoefficient {
degree: 1,
negative: false,
@@ -338,8 +338,8 @@ impl pallet_proxy::Config for Runtime {
}
parameter_types! {
pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4;
pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4;
pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4);
pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4);
}
impl cumulus_pallet_parachain_system::Config for Runtime {
@@ -23,7 +23,7 @@ pub mod constants {
parameter_types! {
/// Importing a block with 0 Extrinsics.
pub const BlockExecutionWeight: Weight = 5_000_000 * constants::WEIGHT_PER_NANOS;
pub const BlockExecutionWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(5_000_000);
}
#[cfg(test)]
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `cumulus_pallet_xcmp_queue`.
@@ -48,14 +48,14 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo<T> {
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_u32() -> Weight {
(5_294_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(5_294_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_weight() -> Weight {
(5_180_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(5_180_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
}
@@ -23,7 +23,7 @@ pub mod constants {
parameter_types! {
/// Executing a NO-OP `System::remarks` Extrinsic.
pub const ExtrinsicBaseWeight: Weight = 125_000 * constants::WEIGHT_PER_NANOS;
pub const ExtrinsicBaseWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(125_000);
}
#[cfg(test)]
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `frame_system`.
@@ -48,43 +48,43 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> {
/// The range of component `b` is `[0, 3932160]`.
fn remark(_b: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
}
/// The range of component `b` is `[0, 3932160]`.
fn remark_with_event(b: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(b as Weight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
}
// Storage: System Digest (r:1 w:1)
// Storage: unknown [0x3a686561707061676573] (r:0 w:1)
fn set_heap_pages() -> Weight {
(5_069_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(5_069_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `i` is `[1, 1000]`.
fn set_storage(i: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((624_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
.saturating_add(Weight::from_ref_time(624_000 as RefTimeWeight).scalar_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)
/// The range of component `i` is `[1, 1000]`.
fn kill_storage(i: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((530_000 as Weight).saturating_mul(i as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight)))
.saturating_add(Weight::from_ref_time(530_000 as RefTimeWeight).scalar_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)
/// The range of component `p` is `[1, 1000]`.
fn kill_prefix(p: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((1_059_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight)))
.saturating_add(Weight::from_ref_time(1_059_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(p as RefTimeWeight)))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_alliance`.
@@ -56,24 +56,24 @@ impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
/// The range of component `y` is `[0, 90]`.
/// The range of component `p` is `[1, 100]`.
fn propose_proposed(_b: u32, _x: u32, _y: u32, p: u32, ) -> Weight {
(53_023_000 as Weight)
Weight::from_ref_time(53_023_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((132_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
.saturating_add(Weight::from_ref_time(132_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Alliance Members (r:2 w:0)
// Storage: AllianceMotion Voting (r:1 w:1)
/// The range of component `x` is `[3, 10]`.
/// The range of component `y` is `[2, 90]`.
fn vote(x: u32, y: u32, ) -> Weight {
(33_003_000 as Weight)
Weight::from_ref_time(33_003_000 as RefTimeWeight)
// Standard Error: 106_000
.saturating_add((312_000 as Weight).saturating_mul(x as Weight))
.saturating_add(Weight::from_ref_time(312_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight))
// Standard Error: 4_000
.saturating_add((82_000 as Weight).saturating_mul(y as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(82_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion ProposalOf (r:1 w:1)
@@ -81,11 +81,11 @@ impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
// Storage: AllianceMotion Voting (r:0 w:1)
/// The range of component `p` is `[1, 100]`.
fn veto(p: u32, ) -> Weight {
(27_289_000 as Weight)
Weight::from_ref_time(27_289_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((131_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(131_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion Voting (r:1 w:1)
@@ -96,15 +96,15 @@ impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
/// The range of component `y` is `[2, 90]`.
/// The range of component `p` is `[1, 100]`.
fn close_early_disapproved(x: u32, y: u32, p: u32, ) -> Weight {
(31_884_000 as Weight)
Weight::from_ref_time(31_884_000 as RefTimeWeight)
// Standard Error: 72_000
.saturating_add((358_000 as Weight).saturating_mul(x as Weight))
.saturating_add(Weight::from_ref_time(358_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight))
// Standard Error: 3_000
.saturating_add((109_000 as Weight).saturating_mul(y as Weight))
.saturating_add(Weight::from_ref_time(109_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((109_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(109_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion Voting (r:1 w:1)
@@ -116,17 +116,17 @@ impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
/// The range of component `y` is `[2, 90]`.
/// The range of component `p` is `[1, 100]`.
fn close_early_approved(b: u32, x: u32, y: u32, p: u32, ) -> Weight {
(43_205_000 as Weight)
Weight::from_ref_time(43_205_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
// Standard Error: 73_000
.saturating_add((123_000 as Weight).saturating_mul(x as Weight))
.saturating_add(Weight::from_ref_time(123_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((91_000 as Weight).saturating_mul(y as Weight))
.saturating_add(Weight::from_ref_time(91_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((114_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(114_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion Voting (r:1 w:1)
@@ -139,15 +139,15 @@ impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
/// The range of component `y` is `[2, 90]`.
/// The range of component `p` is `[1, 100]`.
fn close_disapproved(x: u32, y: u32, p: u32, ) -> Weight {
(49_769_000 as Weight)
Weight::from_ref_time(49_769_000 as RefTimeWeight)
// Standard Error: 69_000
.saturating_add((352_000 as Weight).saturating_mul(x as Weight))
.saturating_add(Weight::from_ref_time(352_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((81_000 as Weight).saturating_mul(y as Weight))
.saturating_add(Weight::from_ref_time(81_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((100_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
.saturating_add(Weight::from_ref_time(100_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion Voting (r:1 w:1)
@@ -160,15 +160,15 @@ impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
/// The range of component `y` is `[2, 90]`.
/// The range of component `p` is `[1, 100]`.
fn close_approved(b: u32, _x: u32, y: u32, p: u32, ) -> Weight {
(40_901_000 as Weight)
Weight::from_ref_time(40_901_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((3_000 as Weight).saturating_mul(b as Weight))
.saturating_add(Weight::from_ref_time(3_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((79_000 as Weight).saturating_mul(y as Weight))
.saturating_add(Weight::from_ref_time(79_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((102_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(102_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Alliance Members (r:3 w:3)
// Storage: AllianceMotion Members (r:1 w:1)
@@ -176,55 +176,55 @@ impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
/// The range of component `y` is `[0, 90]`.
/// The range of component `z` is `[0, 100]`.
fn init_members(_x: u32, y: u32, z: u32, ) -> Weight {
(39_647_000 as Weight)
Weight::from_ref_time(39_647_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((123_000 as Weight).saturating_mul(y as Weight))
.saturating_add(Weight::from_ref_time(123_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((116_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
.saturating_add(Weight::from_ref_time(116_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Alliance Rule (r:0 w:1)
fn set_rule() -> Weight {
(14_689_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(14_689_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Alliance Announcements (r:1 w:1)
fn announce() -> Weight {
(15_988_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(15_988_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Alliance Announcements (r:1 w:1)
fn remove_announcement() -> Weight {
(16_823_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(16_823_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Alliance UnscrupulousAccounts (r:1 w:0)
// Storage: Alliance Members (r:4 w:1)
// Storage: System Account (r:1 w:1)
// Storage: Alliance DepositOf (r:0 w:1)
fn join_alliance() -> Weight {
(46_340_000 as Weight)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
Weight::from_ref_time(46_340_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Alliance Members (r:4 w:1)
// Storage: Alliance UnscrupulousAccounts (r:1 w:0)
fn nominate_ally() -> Weight {
(36_225_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(36_225_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Alliance Members (r:3 w:2)
// Storage: AllianceMotion Proposals (r:1 w:0)
// Storage: AllianceMotion Members (r:0 w:1)
// Storage: AllianceMotion Prime (r:0 w:1)
fn elevate_ally() -> Weight {
(30_236_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(30_236_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Alliance UpForKicking (r:1 w:0)
// Storage: Alliance Members (r:3 w:1)
@@ -234,9 +234,9 @@ impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
// Storage: AllianceMotion Members (r:0 w:1)
// Storage: AllianceMotion Prime (r:0 w:1)
fn retire() -> Weight {
(44_311_000 as Weight)
.saturating_add(T::DbWeight::get().reads(7 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
Weight::from_ref_time(44_311_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(7 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
}
// Storage: Alliance Members (r:3 w:1)
// Storage: AllianceMotion Proposals (r:1 w:0)
@@ -246,34 +246,34 @@ impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
// Storage: AllianceMotion Prime (r:0 w:1)
// Storage: Alliance UpForKicking (r:0 w:1)
fn kick_member() -> Weight {
(46_112_000 as Weight)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
Weight::from_ref_time(46_112_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(6 as RefTimeWeight))
}
// Storage: Alliance UnscrupulousAccounts (r:1 w:1)
// Storage: Alliance UnscrupulousWebsites (r:1 w:1)
/// The range of component `n` is `[1, 100]`.
/// The range of component `l` is `[1, 255]`.
fn add_unscrupulous_items(n: u32, l: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((1_300_000 as Weight).saturating_mul(n as Weight))
.saturating_add(Weight::from_ref_time(1_300_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight))
// Standard Error: 1_000
.saturating_add((125_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(125_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Alliance UnscrupulousAccounts (r:1 w:1)
// Storage: Alliance UnscrupulousWebsites (r:1 w:1)
/// The range of component `n` is `[1, 100]`.
/// The range of component `l` is `[1, 255]`.
fn remove_unscrupulous_items(n: u32, l: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 197_000
.saturating_add((34_156_000 as Weight).saturating_mul(n as Weight))
.saturating_add(Weight::from_ref_time(34_156_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight))
// Standard Error: 87_000
.saturating_add((7_042_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(7_042_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_balances`.
@@ -48,44 +48,44 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Storage: System Account (r:1 w:1)
fn transfer() -> Weight {
(39_576_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(39_576_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn transfer_keep_alive() -> Weight {
(30_212_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(30_212_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_creating() -> Weight {
(19_428_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(19_428_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn set_balance_killing() -> Weight {
(22_526_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(22_526_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:2 w:2)
fn force_transfer() -> Weight {
(38_737_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(38_737_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn transfer_all() -> Weight {
(35_648_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(35_648_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: System Account (r:1 w:1)
fn force_unreserve() -> Weight {
(17_197_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(17_197_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_collator_selection`.
@@ -50,21 +50,21 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
// Storage: CollatorSelection Invulnerables (r:0 w:1)
/// The range of component `b` is `[1, 100]`.
fn set_invulnerables(b: u32, ) -> Weight {
(7_128_000 as Weight)
Weight::from_ref_time(7_128_000 as RefTimeWeight)
// Standard Error: 4_000
.saturating_add((3_105_000 as Weight).saturating_mul(b as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(3_105_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(b as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: CollatorSelection DesiredCandidates (r:0 w:1)
fn set_desired_candidates() -> Weight {
(7_922_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(7_922_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: CollatorSelection CandidacyBond (r:0 w:1)
fn set_candidacy_bond() -> Weight {
(8_226_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(8_226_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: CollatorSelection Candidates (r:1 w:1)
// Storage: CollatorSelection DesiredCandidates (r:1 w:0)
@@ -74,29 +74,29 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1)
/// The range of component `c` is `[1, 1000]`.
fn register_as_candidate(c: u32, ) -> Weight {
(56_086_000 as Weight)
Weight::from_ref_time(56_086_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((93_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(93_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: CollatorSelection Candidates (r:1 w:1)
// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1)
/// The range of component `c` is `[6, 1000]`.
fn leave_intent(c: u32, ) -> Weight {
(58_436_000 as Weight)
Weight::from_ref_time(58_436_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((102_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(102_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: System Account (r:2 w:2)
// Storage: System BlockWeight (r:1 w:1)
// Storage: CollatorSelection LastAuthoredBlock (r:0 w:1)
fn note_author() -> Weight {
(29_654_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
Weight::from_ref_time(29_654_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: CollatorSelection Candidates (r:1 w:1)
// Storage: CollatorSelection LastAuthoredBlock (r:1000 w:1)
@@ -106,13 +106,13 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
/// The range of component `r` is `[1, 1000]`.
/// The range of component `c` is `[1, 1000]`.
fn new_session(r: u32, c: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 1_911_000
.saturating_add((9_907_000 as Weight).saturating_mul(r as Weight))
.saturating_add(Weight::from_ref_time(9_907_000 as RefTimeWeight).scalar_saturating_mul(r as RefTimeWeight))
// Standard Error: 1_911_000
.saturating_add((50_916_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight)))
.saturating_add(Weight::from_ref_time(50_916_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((2 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(r as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_multisig`.
@@ -48,22 +48,22 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
/// The range of component `z` is `[0, 10000]`.
fn as_multi_threshold_1(z: u32, ) -> Weight {
(17_905_000 as Weight)
Weight::from_ref_time(17_905_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_create(s: u32, z: u32, ) -> Weight {
(34_787_000 as Weight)
Weight::from_ref_time(34_787_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((105_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(105_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
@@ -71,38 +71,38 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_create_store(s: u32, z: u32, ) -> Weight {
(38_845_000 as Weight)
Weight::from_ref_time(38_845_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((75_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(75_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
/// The range of component `s` is `[3, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
(25_600_000 as Weight)
Weight::from_ref_time(25_600_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((76_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(76_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
/// The range of component `s` is `[3, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_approve_store(s: u32, z: u32, ) -> Weight {
(36_944_000 as Weight)
Weight::from_ref_time(36_944_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((95_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(95_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
@@ -110,53 +110,53 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
(46_014_000 as Weight)
Weight::from_ref_time(46_014_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((126_000 as Weight).saturating_mul(s as Weight))
.saturating_add(Weight::from_ref_time(126_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_create(s: u32, ) -> Weight {
(31_616_000 as Weight)
Weight::from_ref_time(31_616_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((117_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(117_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:0)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_approve(s: u32, ) -> Weight {
(20_862_000 as Weight)
Weight::from_ref_time(20_862_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((109_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(109_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_complete(s: u32, ) -> Weight {
(64_311_000 as Weight)
Weight::from_ref_time(64_311_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((164_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(164_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Multisig Multisigs (r:1 w:1)
// Storage: Multisig Calls (r:1 w:1)
/// The range of component `s` is `[2, 100]`.
fn cancel_as_multi(s: u32, ) -> Weight {
(51_181_000 as Weight)
Weight::from_ref_time(51_181_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((110_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(110_000 as RefTimeWeight).scalar_saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_proxy`.
@@ -49,10 +49,10 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
// Storage: Proxy Proxies (r:1 w:0)
/// The range of component `p` is `[1, 31]`.
fn proxy(p: u32, ) -> Weight {
(16_628_000 as Weight)
Weight::from_ref_time(16_628_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((90_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(Weight::from_ref_time(90_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:0)
// Storage: Proxy Announcements (r:1 w:1)
@@ -60,39 +60,39 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn proxy_announced(a: u32, p: u32, ) -> Weight {
(33_846_000 as Weight)
Weight::from_ref_time(33_846_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((175_000 as Weight).saturating_mul(a as Weight))
.saturating_add(Weight::from_ref_time(175_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight))
// Standard Error: 3_000
.saturating_add((88_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(88_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Proxy Announcements (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn remove_announcement(a: u32, p: u32, ) -> Weight {
(23_633_000 as Weight)
Weight::from_ref_time(23_633_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((184_000 as Weight).saturating_mul(a as Weight))
.saturating_add(Weight::from_ref_time(184_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((29_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(29_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Proxy Announcements (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn reject_announcement(a: u32, p: u32, ) -> Weight {
(24_121_000 as Weight)
Weight::from_ref_time(24_121_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((177_000 as Weight).saturating_mul(a as Weight))
.saturating_add(Weight::from_ref_time(177_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((15_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(15_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:0)
// Storage: Proxy Announcements (r:1 w:1)
@@ -100,58 +100,58 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
/// The range of component `a` is `[0, 31]`.
/// The range of component `p` is `[1, 31]`.
fn announce(a: u32, p: u32, ) -> Weight {
(31_509_000 as Weight)
Weight::from_ref_time(31_509_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((172_000 as Weight).saturating_mul(a as Weight))
.saturating_add(Weight::from_ref_time(172_000 as RefTimeWeight).scalar_saturating_mul(a as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((86_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(86_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[1, 31]`.
fn add_proxy(p: u32, ) -> Weight {
(26_168_000 as Weight)
Weight::from_ref_time(26_168_000 as RefTimeWeight)
// Standard Error: 4_000
.saturating_add((127_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(127_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[1, 31]`.
fn remove_proxy(p: u32, ) -> Weight {
(26_306_000 as Weight)
Weight::from_ref_time(26_306_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((131_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(131_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[1, 31]`.
fn remove_proxies(p: u32, ) -> Weight {
(22_287_000 as Weight)
Weight::from_ref_time(22_287_000 as RefTimeWeight)
// Standard Error: 3_000
.saturating_add((85_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(85_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0)
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[1, 31]`.
fn anonymous(p: u32, ) -> Weight {
(29_260_000 as Weight)
Weight::from_ref_time(29_260_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((38_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(38_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Proxy Proxies (r:1 w:1)
/// The range of component `p` is `[0, 30]`.
fn kill_anonymous(p: u32, ) -> Weight {
(23_012_000 as Weight)
Weight::from_ref_time(23_012_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((97_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
.saturating_add(Weight::from_ref_time(97_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_session`.
@@ -49,15 +49,15 @@ impl<T: frame_system::Config> pallet_session::WeightInfo for WeightInfo<T> {
// Storage: Session NextKeys (r:1 w:1)
// Storage: Session KeyOwner (r:1 w:1)
fn set_keys() -> Weight {
(15_802_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(15_802_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Session NextKeys (r:1 w:1)
// Storage: Session KeyOwner (r:0 w:1)
fn purge_keys() -> Weight {
(12_925_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
Weight::from_ref_time(12_925_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_timestamp`.
@@ -48,11 +48,11 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_timestamp::WeightInfo for WeightInfo<T> {
// Storage: Timestamp Now (r:1 w:1)
fn set() -> Weight {
(6_170_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(6_170_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
fn on_finalize() -> Weight {
(2_177_000 as Weight)
Weight::from_ref_time(2_177_000 as RefTimeWeight)
}
}
@@ -40,7 +40,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_utility`.
@@ -48,26 +48,26 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
/// The range of component `c` is `[0, 1000]`.
fn batch(c: u32, ) -> Weight {
(13_398_000 as Weight)
Weight::from_ref_time(13_398_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((3_159_000 as Weight).saturating_mul(c as Weight))
.saturating_add(Weight::from_ref_time(3_159_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
}
fn as_derivative() -> Weight {
(4_668_000 as Weight)
Weight::from_ref_time(4_668_000 as RefTimeWeight)
}
/// The range of component `c` is `[0, 1000]`.
fn batch_all(c: u32, ) -> Weight {
(10_742_000 as Weight)
Weight::from_ref_time(10_742_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((3_375_000 as Weight).saturating_mul(c as Weight))
.saturating_add(Weight::from_ref_time(3_375_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
}
fn dispatch_as() -> Weight {
(11_022_000 as Weight)
Weight::from_ref_time(11_022_000 as RefTimeWeight)
}
/// The range of component `c` is `[0, 1000]`.
fn force_batch(c: u32, ) -> Weight {
(14_280_000 as Weight)
Weight::from_ref_time(14_280_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((3_150_000 as Weight).saturating_mul(c as Weight))
.saturating_add(Weight::from_ref_time(3_150_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
}
}
@@ -25,8 +25,8 @@ pub mod constants {
/// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights
/// are available for brave runtime engineers who may want to try this out as default.
pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 8_000 * constants::WEIGHT_PER_NANOS,
write: 50_000 * constants::WEIGHT_PER_NANOS,
read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(),
write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(),
};
}
@@ -25,8 +25,8 @@ pub mod constants {
/// By default, Substrate uses `RocksDB`, so this will be the weight used throughout
/// the runtime.
pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 25_000 * constants::WEIGHT_PER_NANOS,
write: 100_000 * constants::WEIGHT_PER_NANOS,
read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(),
write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(),
};
}
@@ -20,7 +20,6 @@ use super::{
use frame_support::{
match_types, parameter_types,
traits::{Everything, Nothing},
weights::Weight,
};
use pallet_xcm::XcmPassthrough;
use parachains_common::{
@@ -100,7 +99,7 @@ pub type XcmOriginToTransactDispatchOrigin = (
parameter_types! {
// One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate.
pub UnitWeightCost: Weight = 1_000_000_000;
pub UnitWeightCost: u64 = 1_000_000_000;
pub const MaxInstructions: u32 = 100;
}
@@ -61,7 +61,7 @@ pub mod fee {
// in Kusama, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT:
// in Statemine, we map to 1/10 of that, or 1/100 CENT
let p = super::currency::CENTS;
let q = 100 * Balance::from(ExtrinsicBaseWeight::get());
let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time());
smallvec![WeightToFeeCoefficient {
degree: 1,
negative: false,
@@ -26,9 +26,9 @@ parameter_types! {
RuntimeBlockWeights::get().max_block;
// The weight needed for decoding the queue should be less or equal than a fifth
// of the overall weight dedicated to the lazy deletion.
pub DeletionQueueDepth: u32 = ((DeletionWeightLimit::get() / (
<Runtime as Config>::WeightInfo::on_initialize_per_queue_item(1) -
<Runtime as Config>::WeightInfo::on_initialize_per_queue_item(0)
pub DeletionQueueDepth: u32 = ((DeletionWeightLimit::get().ref_time() / (
<Runtime as Config>::WeightInfo::on_initialize_per_queue_item(1).ref_time() -
<Runtime as Config>::WeightInfo::on_initialize_per_queue_item(0).ref_time()
)) / 5) as u32;
pub MySchedule: Schedule<Runtime> = Default::default();
}
@@ -49,7 +49,7 @@ use constants::{currency::*, fee::WeightToFee};
use frame_support::{
construct_runtime, parameter_types,
traits::{ConstU128, ConstU16, ConstU32, ConstU64, ConstU8, Everything},
weights::{ConstantMultiplier, DispatchClass},
weights::{ConstantMultiplier, DispatchClass, Weight},
PalletId,
};
use frame_system::limits::{BlockLength, BlockWeights};
@@ -64,9 +64,6 @@ use xcm_config::CollatorSelectionUpdateOrigin;
#[cfg(any(feature = "std", test))]
pub use sp_runtime::BuildStorage;
#[cfg(feature = "try-runtime")]
use frame_support::weights::Weight;
// Polkadot imports
use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate};
@@ -245,15 +242,20 @@ impl pallet_utility::Config for Runtime {
type WeightInfo = pallet_utility::weights::SubstrateWeight<Runtime>;
}
parameter_types! {
pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4);
pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.scalar_div(4);
}
impl cumulus_pallet_parachain_system::Config for Runtime {
type Event = Event;
type OnSystemEvent = ();
type SelfParaId = parachain_info::Pallet<Runtime>;
type DmpMessageHandler = DmpQueue;
type ReservedDmpWeight = ConstU64<{ MAXIMUM_BLOCK_WEIGHT / 4 }>;
type ReservedDmpWeight = ReservedDmpWeight;
type OutboundXcmpMessageSource = XcmpQueue;
type XcmpMessageHandler = XcmpQueue;
type ReservedXcmpWeight = ConstU64<{ MAXIMUM_BLOCK_WEIGHT / 4 }>;
type ReservedXcmpWeight = ReservedXcmpWeight;
type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases;
}
@@ -515,7 +517,7 @@ impl pallet_contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, B
origin,
dest,
value,
gas_limit,
Weight::from_ref_time(gas_limit),
storage_deposit_limit,
input_data,
contracts::CONTRACTS_DEBUG_OUTPUT,
@@ -534,7 +536,7 @@ impl pallet_contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, B
Contracts::bare_instantiate(
origin,
value,
gas_limit,
Weight::from_ref_time(gas_limit),
storage_deposit_limit,
code,
data,

Some files were not shown because too many files have changed in this diff Show More