Migrate to Weight::from_parts (#6794)

* Migrate to from_parts

Have a look at https://github.com/ggwpez/substrate-scripts/blob/master/migrate-from-parts.py

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

* Adapt to master

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

* update lockfile for {"substrate"}

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: parity-processbot <>
This commit is contained in:
Oliver Tale-Yazdi
2023-03-03 00:32:30 +01:00
committed by GitHub
parent c5637bda91
commit 177bedc160
187 changed files with 4080 additions and 4088 deletions
@@ -58,8 +58,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `4831`
// Estimated: `23409`
// Minimum execution time: 34_876 nanoseconds.
Weight::from_ref_time(35_375_000)
.saturating_add(Weight::from_proof_size(23409))
Weight::from_parts(35_375_000, 0)
.saturating_add(Weight::from_parts(0, 23409))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
@@ -70,8 +70,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `3587`
// Estimated: `5705`
// Minimum execution time: 31_982 nanoseconds.
Weight::from_ref_time(32_412_000)
.saturating_add(Weight::from_proof_size(5705))
Weight::from_parts(32_412_000, 0)
.saturating_add(Weight::from_parts(0, 5705))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -86,8 +86,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `3532`
// Estimated: `12720`
// Minimum execution time: 46_525 nanoseconds.
Weight::from_ref_time(46_812_000)
.saturating_add(Weight::from_proof_size(12720))
Weight::from_parts(46_812_000, 0)
.saturating_add(Weight::from_parts(0, 12720))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
@@ -102,8 +102,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `3554`
// Estimated: `12720`
// Minimum execution time: 46_269 nanoseconds.
Weight::from_ref_time(46_629_000)
.saturating_add(Weight::from_proof_size(12720))
Weight::from_parts(46_629_000, 0)
.saturating_add(Weight::from_parts(0, 12720))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
@@ -118,8 +118,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `365`
// Estimated: `7712`
// Minimum execution time: 25_015 nanoseconds.
Weight::from_ref_time(25_351_000)
.saturating_add(Weight::from_proof_size(7712))
Weight::from_parts(25_351_000, 0)
.saturating_add(Weight::from_parts(0, 7712))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
@@ -142,8 +142,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `6003`
// Estimated: `36392`
// Minimum execution time: 90_150 nanoseconds.
Weight::from_ref_time(91_058_000)
.saturating_add(Weight::from_proof_size(36392))
Weight::from_parts(91_058_000, 0)
.saturating_add(Weight::from_parts(0, 36392))
.saturating_add(T::DbWeight::get().reads(8))
.saturating_add(T::DbWeight::get().writes(7))
}
@@ -156,8 +156,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `3415`
// Estimated: `6340`
// Minimum execution time: 12_616 nanoseconds.
Weight::from_ref_time(12_812_000)
.saturating_add(Weight::from_proof_size(6340))
Weight::from_parts(12_812_000, 0)
.saturating_add(Weight::from_parts(0, 6340))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -168,8 +168,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_172 nanoseconds.
Weight::from_ref_time(3_295_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(3_295_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: Democracy NextExternal (r:0 w:1)
@@ -179,8 +179,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_117 nanoseconds.
Weight::from_ref_time(3_288_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(3_288_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: Democracy NextExternal (r:1 w:1)
@@ -196,8 +196,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `253`
// Estimated: `3654`
// Minimum execution time: 26_675 nanoseconds.
Weight::from_ref_time(27_369_000)
.saturating_add(Weight::from_proof_size(3654))
Weight::from_parts(27_369_000, 0)
.saturating_add(Weight::from_parts(0, 3654))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(5))
}
@@ -212,8 +212,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `3518`
// Estimated: `8868`
// Minimum execution time: 31_174 nanoseconds.
Weight::from_ref_time(31_517_000)
.saturating_add(Weight::from_proof_size(8868))
Weight::from_parts(31_517_000, 0)
.saturating_add(Weight::from_parts(0, 8868))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
@@ -230,8 +230,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `5882`
// Estimated: `28033`
// Minimum execution time: 73_218 nanoseconds.
Weight::from_ref_time(74_394_000)
.saturating_add(Weight::from_proof_size(28033))
Weight::from_parts(74_394_000, 0)
.saturating_add(Weight::from_parts(0, 28033))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
@@ -244,8 +244,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `238`
// Estimated: `2528`
// Minimum execution time: 18_468 nanoseconds.
Weight::from_ref_time(18_870_000)
.saturating_add(Weight::from_proof_size(2528))
Weight::from_parts(18_870_000, 0)
.saturating_add(Weight::from_parts(0, 2528))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(2))
}
@@ -261,14 +261,14 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `211 + r * (117 ±0)`
// Estimated: `998 + r * (2676 ±0)`
// Minimum execution time: 6_237 nanoseconds.
Weight::from_ref_time(9_788_030)
.saturating_add(Weight::from_proof_size(998))
Weight::from_parts(9_788_030, 0)
.saturating_add(Weight::from_parts(0, 998))
// Standard Error: 5_493
.saturating_add(Weight::from_ref_time(2_774_064).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(2_774_064, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(Weight::from_proof_size(2676).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
}
/// Storage: Democracy LowestUnbaked (r:1 w:1)
/// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
@@ -288,14 +288,14 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `211 + r * (117 ±0)`
// Estimated: `19318 + r * (2676 ±0)`
// Minimum execution time: 9_370 nanoseconds.
Weight::from_ref_time(12_551_319)
.saturating_add(Weight::from_proof_size(19318))
Weight::from_parts(12_551_319, 0)
.saturating_add(Weight::from_parts(0, 19318))
// Standard Error: 5_735
.saturating_add(Weight::from_ref_time(2_771_452).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(2_771_452, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(1))
.saturating_add(Weight::from_proof_size(2676).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
}
/// Storage: Democracy VotingOf (r:3 w:3)
/// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen)
@@ -309,15 +309,15 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `925 + r * (139 ±0)`
// Estimated: `22584 + r * (2676 ±0)`
// Minimum execution time: 39_375 nanoseconds.
Weight::from_ref_time(42_351_696)
.saturating_add(Weight::from_proof_size(22584))
Weight::from_parts(42_351_696, 0)
.saturating_add(Weight::from_parts(0, 22584))
// Standard Error: 7_527
.saturating_add(Weight::from_ref_time(3_880_547).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(3_880_547, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(4))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_proof_size(2676).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
}
/// Storage: Democracy VotingOf (r:2 w:2)
/// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen)
@@ -329,15 +329,15 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `524 + r * (139 ±0)`
// Estimated: `12540 + r * (2676 ±0)`
// Minimum execution time: 20_672 nanoseconds.
Weight::from_ref_time(22_405_117)
.saturating_add(Weight::from_proof_size(12540))
Weight::from_parts(22_405_117, 0)
.saturating_add(Weight::from_parts(0, 12540))
// Standard Error: 7_623
.saturating_add(Weight::from_ref_time(3_830_380).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(3_830_380, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into())))
.saturating_add(T::DbWeight::get().writes(2))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into())))
.saturating_add(Weight::from_proof_size(2676).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into()))
}
/// Storage: Democracy PublicProps (r:0 w:1)
/// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen)
@@ -346,8 +346,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_083 nanoseconds.
Weight::from_ref_time(3_242_000)
.saturating_add(Weight::from_proof_size(0))
Weight::from_parts(3_242_000, 0)
.saturating_add(Weight::from_parts(0, 0))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: Democracy VotingOf (r:1 w:1)
@@ -362,10 +362,10 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `594`
// Estimated: `12647`
// Minimum execution time: 20_374 nanoseconds.
Weight::from_ref_time(25_944_613)
.saturating_add(Weight::from_proof_size(12647))
Weight::from_parts(25_944_613, 0)
.saturating_add(Weight::from_parts(0, 12647))
// Standard Error: 1_258
.saturating_add(Weight::from_ref_time(19_696).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(19_696, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
@@ -381,10 +381,10 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `595 + r * (22 ±0)`
// Estimated: `12647`
// Minimum execution time: 24_535 nanoseconds.
Weight::from_ref_time(25_495_740)
.saturating_add(Weight::from_proof_size(12647))
Weight::from_parts(25_495_740, 0)
.saturating_add(Weight::from_parts(0, 12647))
// Standard Error: 551
.saturating_add(Weight::from_ref_time(60_441).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(60_441, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(3))
}
@@ -398,10 +398,10 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `758 + r * (26 ±0)`
// Estimated: `8946`
// Minimum execution time: 14_979 nanoseconds.
Weight::from_ref_time(17_266_413)
.saturating_add(Weight::from_proof_size(8946))
Weight::from_parts(17_266_413, 0)
.saturating_add(Weight::from_parts(0, 8946))
// Standard Error: 1_973
.saturating_add(Weight::from_ref_time(87_619).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(87_619, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
@@ -415,10 +415,10 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `758 + r * (26 ±0)`
// Estimated: `8946`
// Minimum execution time: 15_169 nanoseconds.
Weight::from_ref_time(17_559_094)
.saturating_add(Weight::from_proof_size(8946))
Weight::from_parts(17_559_094, 0)
.saturating_add(Weight::from_parts(0, 8946))
// Standard Error: 2_076
.saturating_add(Weight::from_ref_time(88_471).saturating_mul(r.into()))
.saturating_add(Weight::from_parts(88_471, 0).saturating_mul(r.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
@@ -433,8 +433,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `323`
// Estimated: `3193`
// Minimum execution time: 17_984 nanoseconds.
Weight::from_ref_time(18_599_000)
.saturating_add(Weight::from_proof_size(3193))
Weight::from_parts(18_599_000, 0)
.saturating_add(Weight::from_parts(0, 3193))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -447,8 +447,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `253`
// Estimated: `3155`
// Minimum execution time: 16_277 nanoseconds.
Weight::from_ref_time(16_581_000)
.saturating_add(Weight::from_proof_size(3155))
Weight::from_parts(16_581_000, 0)
.saturating_add(Weight::from_parts(0, 3155))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -463,8 +463,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `4886`
// Estimated: `19763`
// Minimum execution time: 33_325 nanoseconds.
Weight::from_ref_time(33_908_000)
.saturating_add(Weight::from_proof_size(19763))
Weight::from_parts(33_908_000, 0)
.saturating_add(Weight::from_parts(0, 19763))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -477,8 +477,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `4820`
// Estimated: `19725`
// Minimum execution time: 30_899 nanoseconds.
Weight::from_ref_time(31_309_000)
.saturating_add(Weight::from_proof_size(19725))
Weight::from_parts(31_309_000, 0)
.saturating_add(Weight::from_parts(0, 19725))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -491,8 +491,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `144`
// Estimated: `2566`
// Minimum execution time: 14_007 nanoseconds.
Weight::from_ref_time(14_342_000)
.saturating_add(Weight::from_proof_size(2566))
Weight::from_parts(14_342_000, 0)
.saturating_add(Weight::from_parts(0, 2566))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
@@ -505,8 +505,8 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Measured: `269`
// Estimated: `5204`
// Minimum execution time: 17_978 nanoseconds.
Weight::from_ref_time(18_262_000)
.saturating_add(Weight::from_proof_size(5204))
Weight::from_parts(18_262_000, 0)
.saturating_add(Weight::from_parts(0, 5204))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}