From 885bc80afbccce73a58d6138d351dea89e87970b Mon Sep 17 00:00:00 2001 From: emostov <32168567+emostov@users.noreply.github.com> Date: Sun, 4 Jul 2021 18:59:19 -0700 Subject: [PATCH 01/14] substrate #9202 companion: Multiple vesting schedules --- runtime/kusama/src/lib.rs | 2 + runtime/kusama/src/weights/pallet_vesting.rs | 88 +++++++++++++----- runtime/polkadot/src/lib.rs | 2 + .../polkadot/src/weights/pallet_vesting.rs | 89 +++++++++++++----- runtime/westend/src/lib.rs | 2 + runtime/westend/src/weights/pallet_vesting.rs | 92 +++++++++++++------ 6 files changed, 201 insertions(+), 74 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 33e7b3697fe8..2b19ee11cc3d 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -949,6 +949,7 @@ impl pallet_society::Config for Runtime { parameter_types! { pub const MinVestedTransfer: Balance = 100 * CENTS; + pub const MaxVestingSchedules: u32 = 24; } impl pallet_vesting::Config for Runtime { @@ -957,6 +958,7 @@ impl pallet_vesting::Config for Runtime { type BlockNumberToBalance = ConvertInto; type MinVestedTransfer = MinVestedTransfer; type WeightInfo = weights::pallet_vesting::WeightInfo; + type MaxVestingSchedules = MaxVestingSchedules; } parameter_types! { diff --git a/runtime/kusama/src/weights/pallet_vesting.rs b/runtime/kusama/src/weights/pallet_vesting.rs index acf043b67e20..35bc78bb3c90 100644 --- a/runtime/kusama/src/weights/pallet_vesting.rs +++ b/runtime/kusama/src/weights/pallet_vesting.rs @@ -43,46 +43,86 @@ use sp_std::marker::PhantomData; /// Weight functions for pallet_vesting. pub struct WeightInfo(PhantomData); impl pallet_vesting::WeightInfo for WeightInfo { - fn vest_locked(l: u32, ) -> Weight { - (41_675_000 as Weight) - // Standard Error: 7_000 - .saturating_add((159_000 as Weight).saturating_mul(l as Weight)) + fn vest_locked(l: u32, s: u32, ) -> Weight { + (58_117_000 as Weight) + // Standard Error: 3_000 + .saturating_add((136_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 12_000 + .saturating_add((177_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(T::DbWeight::get().writes(2 as Weight)) } - fn vest_unlocked(l: u32, ) -> Weight { - (44_454_000 as Weight) - // Standard Error: 4_000 - .saturating_add((129_000 as Weight).saturating_mul(l as Weight)) + fn vest_unlocked(l: u32, s: u32, ) -> Weight { + (57_903_000 as Weight) + // Standard Error: 2_000 + .saturating_add((126_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 6_000 + .saturating_add((51_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)) } - fn vest_other_locked(l: u32, ) -> Weight { - (41_313_000 as Weight) - // Standard Error: 7_000 - .saturating_add((161_000 as Weight).saturating_mul(l as Weight)) + fn vest_other_locked(l: u32, s: u32, ) -> Weight { + (57_736_000 as Weight) + // Standard Error: 1_000 + .saturating_add((140_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 4_000 + .saturating_add((159_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) } - fn vest_other_unlocked(l: u32, ) -> Weight { - (44_088_000 as Weight) - // Standard Error: 4_000 + fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { + (57_278_000 as Weight) + // Standard Error: 1_000 .saturating_add((131_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 5_000 + .saturating_add((68_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)) } - fn vested_transfer(l: u32, ) -> Weight { - (95_360_000 as Weight) - // Standard Error: 6_000 - .saturating_add((152_000 as Weight).saturating_mul(l as Weight)) + fn last_vested_transfer(l: u32, _s: u32, ) -> Weight { + (101_019_000 as Weight) + // Standard Error: 5_000 + .saturating_add((135_000 as Weight).saturating_mul(l as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + fn first_vested_transfer(l: u32, ) -> Weight { + (118_733_000 as Weight) + // Standard Error: 5_000 + .saturating_add((138_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } - fn force_vested_transfer(l: u32, ) -> Weight { - (94_577_000 as Weight) + fn first_force_vested_transfer(l: u32, ) -> Weight { + (117_482_000 as Weight) + // Standard Error: 3_000 + .saturating_add((146_000 as Weight).saturating_mul(l as Weight)) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + fn last_force_vested_transfer(l: u32, _s: u32, ) -> Weight { + (100_191_000 as Weight) // Standard Error: 6_000 - .saturating_add((149_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((144_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } + fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { + (71_299_000 as Weight) + // Standard Error: 1_000 + .saturating_add((115_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 6_000 + .saturating_add((101_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)) + } + fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { + (70_606_000 as Weight) + // Standard Error: 1_000 + .saturating_add((151_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 6_000 + .saturating_add((91_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)) + } } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index a0bb4f1dc485..9f35f41945a0 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -831,6 +831,7 @@ impl claims::Config for Runtime { parameter_types! { pub const MinVestedTransfer: Balance = 1 * DOLLARS; + pub const MaxVestingSchedules: u32 = 24; } impl pallet_vesting::Config for Runtime { @@ -839,6 +840,7 @@ impl pallet_vesting::Config for Runtime { type BlockNumberToBalance = ConvertInto; type MinVestedTransfer = MinVestedTransfer; type WeightInfo = weights::pallet_vesting::WeightInfo; + type MaxVestingSchedules = MaxVestingSchedules; } impl pallet_utility::Config for Runtime { diff --git a/runtime/polkadot/src/weights/pallet_vesting.rs b/runtime/polkadot/src/weights/pallet_vesting.rs index bfef0b12684d..39b57adafe7c 100644 --- a/runtime/polkadot/src/weights/pallet_vesting.rs +++ b/runtime/polkadot/src/weights/pallet_vesting.rs @@ -43,46 +43,87 @@ use sp_std::marker::PhantomData; /// Weight functions for pallet_vesting. pub struct WeightInfo(PhantomData); impl pallet_vesting::WeightInfo for WeightInfo { - fn vest_locked(l: u32, ) -> Weight { - (40_549_000 as Weight) - // Standard Error: 7_000 - .saturating_add((162_000 as Weight).saturating_mul(l as Weight)) + fn vest_locked(l: u32, s: u32, ) -> Weight { + (58_117_000 as Weight) + // Standard Error: 3_000 + .saturating_add((136_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 12_000 + .saturating_add((177_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(T::DbWeight::get().writes(2 as Weight)) } - fn vest_unlocked(l: u32, ) -> Weight { - (43_713_000 as Weight) - // Standard Error: 4_000 - .saturating_add((129_000 as Weight).saturating_mul(l as Weight)) + fn vest_unlocked(l: u32, s: u32, ) -> Weight { + (57_903_000 as Weight) + // Standard Error: 2_000 + .saturating_add((126_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 6_000 + .saturating_add((51_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)) } - fn vest_other_locked(l: u32, ) -> Weight { - (40_331_000 as Weight) - // Standard Error: 7_000 - .saturating_add((154_000 as Weight).saturating_mul(l as Weight)) + fn vest_other_locked(l: u32, s: u32, ) -> Weight { + (57_736_000 as Weight) + // Standard Error: 1_000 + .saturating_add((140_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 4_000 + .saturating_add((159_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) } - fn vest_other_unlocked(l: u32, ) -> Weight { - (43_179_000 as Weight) - // Standard Error: 4_000 - .saturating_add((130_000 as Weight).saturating_mul(l as Weight)) + fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { + (57_278_000 as Weight) + // Standard Error: 1_000 + .saturating_add((131_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 5_000 + .saturating_add((68_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)) } - fn vested_transfer(l: u32, ) -> Weight { - (92_890_000 as Weight) + fn last_vested_transfer(l: u32, _s: u32, ) -> Weight { + (101_019_000 as Weight) // Standard Error: 5_000 - .saturating_add((156_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((135_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } - fn force_vested_transfer(l: u32, ) -> Weight { - (92_001_000 as Weight) + fn first_vested_transfer(l: u32, ) -> Weight { + (118_733_000 as Weight) // Standard Error: 5_000 - .saturating_add((155_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((138_000 as Weight).saturating_mul(l as Weight)) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + fn first_force_vested_transfer(l: u32, ) -> Weight { + (117_482_000 as Weight) + // Standard Error: 3_000 + .saturating_add((146_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } + fn last_force_vested_transfer(l: u32, _s: u32, ) -> Weight { + (100_191_000 as Weight) + // Standard Error: 6_000 + .saturating_add((144_000 as Weight).saturating_mul(l as Weight)) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { + (71_299_000 as Weight) + // Standard Error: 1_000 + .saturating_add((115_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 6_000 + .saturating_add((101_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)) + } + fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { + (70_606_000 as Weight) + // Standard Error: 1_000 + .saturating_add((151_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 6_000 + .saturating_add((91_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)) + } } + diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 499825520ddf..0e9a32571b4d 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -632,6 +632,7 @@ impl pallet_recovery::Config for Runtime { parameter_types! { pub const MinVestedTransfer: Balance = 100 * CENTS; + pub const MaxVestingSchedules: u32 = 24; } impl pallet_vesting::Config for Runtime { @@ -640,6 +641,7 @@ impl pallet_vesting::Config for Runtime { type BlockNumberToBalance = ConvertInto; type MinVestedTransfer = MinVestedTransfer; type WeightInfo = weights::pallet_vesting::WeightInfo; + type MaxVestingSchedules = MaxVestingSchedules; } impl pallet_sudo::Config for Runtime { diff --git a/runtime/westend/src/weights/pallet_vesting.rs b/runtime/westend/src/weights/pallet_vesting.rs index c0fa7850babd..ac1f479a045a 100644 --- a/runtime/westend/src/weights/pallet_vesting.rs +++ b/runtime/westend/src/weights/pallet_vesting.rs @@ -43,46 +43,86 @@ use sp_std::marker::PhantomData; /// Weight functions for pallet_vesting. pub struct WeightInfo(PhantomData); impl pallet_vesting::WeightInfo for WeightInfo { - fn vest_locked(l: u32, ) -> Weight { - (40_663_000 as Weight) - // Standard Error: 20_000 - .saturating_add((232_000 as Weight).saturating_mul(l as Weight)) + fn vest_locked(l: u32, s: u32, ) -> Weight { + (58_117_000 as Weight) + // Standard Error: 3_000 + .saturating_add((136_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 12_000 + .saturating_add((177_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(T::DbWeight::get().writes(2 as Weight)) } - fn vest_unlocked(l: u32, ) -> Weight { - (44_310_000 as Weight) - // Standard Error: 11_000 - .saturating_add((172_000 as Weight).saturating_mul(l as Weight)) + fn vest_unlocked(l: u32, s: u32, ) -> Weight { + (57_903_000 as Weight) + // Standard Error: 2_000 + .saturating_add((126_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 6_000 + .saturating_add((51_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)) } - fn vest_other_locked(l: u32, ) -> Weight { - (40_981_000 as Weight) - // Standard Error: 19_000 - .saturating_add((218_000 as Weight).saturating_mul(l as Weight)) + fn vest_other_locked(l: u32, s: u32, ) -> Weight { + (57_736_000 as Weight) + // Standard Error: 1_000 + .saturating_add((140_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 4_000 + .saturating_add((159_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) + } + fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { + (57_278_000 as Weight) + // Standard Error: 1_000 + .saturating_add((131_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 5_000 + .saturating_add((68_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)) } - fn vest_other_unlocked(l: u32, ) -> Weight { - (43_731_000 as Weight) - // Standard Error: 16_000 - .saturating_add((194_000 as Weight).saturating_mul(l as Weight)) + fn last_vested_transfer(l: u32, _s: u32, ) -> Weight { + (101_019_000 as Weight) + // Standard Error: 5_000 + .saturating_add((135_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } - fn vested_transfer(l: u32, ) -> Weight { - (96_952_000 as Weight) - // Standard Error: 15_000 - .saturating_add((206_000 as Weight).saturating_mul(l as Weight)) + fn first_vested_transfer(l: u32, ) -> Weight { + (118_733_000 as Weight) + // Standard Error: 5_000 + .saturating_add((138_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } - fn force_vested_transfer(l: u32, ) -> Weight { - (96_519_000 as Weight) - // Standard Error: 15_000 - .saturating_add((204_000 as Weight).saturating_mul(l as Weight)) + fn first_force_vested_transfer(l: u32, ) -> Weight { + (117_482_000 as Weight) + // Standard Error: 3_000 + .saturating_add((146_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } + fn last_force_vested_transfer(l: u32, _s: u32, ) -> Weight { + (100_191_000 as Weight) + // Standard Error: 6_000 + .saturating_add((144_000 as Weight).saturating_mul(l as Weight)) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { + (71_299_000 as Weight) + // Standard Error: 1_000 + .saturating_add((115_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 6_000 + .saturating_add((101_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)) + } + fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { + (70_606_000 as Weight) + // Standard Error: 1_000 + .saturating_add((151_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 6_000 + .saturating_add((91_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)) + } } From 28582bcc95c73a7b0df3cfc605b65ea25b1ede0e Mon Sep 17 00:00:00 2001 From: emostov <32168567+emostov@users.noreply.github.com> Date: Mon, 5 Jul 2021 11:46:52 -0700 Subject: [PATCH 02/14] Update weights inline with substrate updates --- runtime/kusama/src/weights/pallet_vesting.rs | 90 ++++++++----------- .../polkadot/src/weights/pallet_vesting.rs | 90 ++++++++----------- runtime/westend/src/weights/pallet_vesting.rs | 90 ++++++++----------- 3 files changed, 111 insertions(+), 159 deletions(-) diff --git a/runtime/kusama/src/weights/pallet_vesting.rs b/runtime/kusama/src/weights/pallet_vesting.rs index 35bc78bb3c90..b675ae93fc52 100644 --- a/runtime/kusama/src/weights/pallet_vesting.rs +++ b/runtime/kusama/src/weights/pallet_vesting.rs @@ -44,84 +44,68 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_vesting::WeightInfo for WeightInfo { fn vest_locked(l: u32, s: u32, ) -> Weight { - (58_117_000 as Weight) - // Standard Error: 3_000 - .saturating_add((136_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 12_000 - .saturating_add((177_000 as Weight).saturating_mul(s as Weight)) + (93_789_000 as Weight) + // Standard Error: 70_000 + .saturating_add((41_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 182_000 + .saturating_add((211_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)) } - fn vest_unlocked(l: u32, s: u32, ) -> Weight { - (57_903_000 as Weight) - // Standard Error: 2_000 - .saturating_add((126_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 6_000 - .saturating_add((51_000 as Weight).saturating_mul(s as Weight)) + fn vest_unlocked(_l: u32, s: u32, ) -> Weight { + (90_737_000 as Weight) + // Standard Error: 0 + .saturating_add((263_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)) } fn vest_other_locked(l: u32, s: u32, ) -> Weight { - (57_736_000 as Weight) - // Standard Error: 1_000 - .saturating_add((140_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 4_000 - .saturating_add((159_000 as Weight).saturating_mul(s as Weight)) + (85_211_000 as Weight) + // Standard Error: 17_000 + .saturating_add((153_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 45_000 + .saturating_add((289_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)) } fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { - (57_278_000 as Weight) - // Standard Error: 1_000 - .saturating_add((131_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 5_000 - .saturating_add((68_000 as Weight).saturating_mul(s as Weight)) + (90_368_000 as Weight) + // Standard Error: 17_000 + .saturating_add((31_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 45_000 + .saturating_add((132_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)) } - fn last_vested_transfer(l: u32, _s: u32, ) -> Weight { - (101_019_000 as Weight) - // Standard Error: 5_000 - .saturating_add((135_000 as Weight).saturating_mul(l as Weight)) + fn vested_transfer(l: u32, _s: u32, ) -> Weight { + (167_500_000 as Weight) + // Standard Error: 194_000 + .saturating_add((255_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } - fn first_vested_transfer(l: u32, ) -> Weight { - (118_733_000 as Weight) - // Standard Error: 5_000 - .saturating_add((138_000 as Weight).saturating_mul(l as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - fn first_force_vested_transfer(l: u32, ) -> Weight { - (117_482_000 as Weight) - // Standard Error: 3_000 - .saturating_add((146_000 as Weight).saturating_mul(l as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - fn last_force_vested_transfer(l: u32, _s: u32, ) -> Weight { - (100_191_000 as Weight) - // Standard Error: 6_000 - .saturating_add((144_000 as Weight).saturating_mul(l as Weight)) + fn force_vested_transfer(l: u32, _s: u32, ) -> Weight { + (174_000_000 as Weight) + // Standard Error: 70_000 + .saturating_add((143_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - (71_299_000 as Weight) - // Standard Error: 1_000 - .saturating_add((115_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 6_000 - .saturating_add((101_000 as Weight).saturating_mul(s as Weight)) + (101_778_000 as Weight) + // Standard Error: 17_000 + .saturating_add((194_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 48_000 + .saturating_add((361_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)) } fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - (70_606_000 as Weight) - // Standard Error: 1_000 - .saturating_add((151_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 6_000 - .saturating_add((91_000 as Weight).saturating_mul(s as Weight)) + (104_111_000 as Weight) + // Standard Error: 88_000 + .saturating_add((276_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 240_000 + .saturating_add((194_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)) } diff --git a/runtime/polkadot/src/weights/pallet_vesting.rs b/runtime/polkadot/src/weights/pallet_vesting.rs index 39b57adafe7c..6d7555d03afe 100644 --- a/runtime/polkadot/src/weights/pallet_vesting.rs +++ b/runtime/polkadot/src/weights/pallet_vesting.rs @@ -44,84 +44,68 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_vesting::WeightInfo for WeightInfo { fn vest_locked(l: u32, s: u32, ) -> Weight { - (58_117_000 as Weight) - // Standard Error: 3_000 - .saturating_add((136_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 12_000 - .saturating_add((177_000 as Weight).saturating_mul(s as Weight)) + (93_789_000 as Weight) + // Standard Error: 70_000 + .saturating_add((41_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 182_000 + .saturating_add((211_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)) } - fn vest_unlocked(l: u32, s: u32, ) -> Weight { - (57_903_000 as Weight) - // Standard Error: 2_000 - .saturating_add((126_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 6_000 - .saturating_add((51_000 as Weight).saturating_mul(s as Weight)) + fn vest_unlocked(_l: u32, s: u32, ) -> Weight { + (90_737_000 as Weight) + // Standard Error: 0 + .saturating_add((263_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)) } fn vest_other_locked(l: u32, s: u32, ) -> Weight { - (57_736_000 as Weight) - // Standard Error: 1_000 - .saturating_add((140_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 4_000 - .saturating_add((159_000 as Weight).saturating_mul(s as Weight)) + (85_211_000 as Weight) + // Standard Error: 17_000 + .saturating_add((153_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 45_000 + .saturating_add((289_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)) } fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { - (57_278_000 as Weight) - // Standard Error: 1_000 - .saturating_add((131_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 5_000 - .saturating_add((68_000 as Weight).saturating_mul(s as Weight)) + (90_368_000 as Weight) + // Standard Error: 17_000 + .saturating_add((31_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 45_000 + .saturating_add((132_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)) } - fn last_vested_transfer(l: u32, _s: u32, ) -> Weight { - (101_019_000 as Weight) - // Standard Error: 5_000 - .saturating_add((135_000 as Weight).saturating_mul(l as Weight)) + fn vested_transfer(l: u32, _s: u32, ) -> Weight { + (167_500_000 as Weight) + // Standard Error: 194_000 + .saturating_add((255_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } - fn first_vested_transfer(l: u32, ) -> Weight { - (118_733_000 as Weight) - // Standard Error: 5_000 - .saturating_add((138_000 as Weight).saturating_mul(l as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - fn first_force_vested_transfer(l: u32, ) -> Weight { - (117_482_000 as Weight) - // Standard Error: 3_000 - .saturating_add((146_000 as Weight).saturating_mul(l as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - fn last_force_vested_transfer(l: u32, _s: u32, ) -> Weight { - (100_191_000 as Weight) - // Standard Error: 6_000 - .saturating_add((144_000 as Weight).saturating_mul(l as Weight)) + fn force_vested_transfer(l: u32, _s: u32, ) -> Weight { + (174_000_000 as Weight) + // Standard Error: 70_000 + .saturating_add((143_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - (71_299_000 as Weight) - // Standard Error: 1_000 - .saturating_add((115_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 6_000 - .saturating_add((101_000 as Weight).saturating_mul(s as Weight)) + (101_778_000 as Weight) + // Standard Error: 17_000 + .saturating_add((194_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 48_000 + .saturating_add((361_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)) } fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - (70_606_000 as Weight) - // Standard Error: 1_000 - .saturating_add((151_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 6_000 - .saturating_add((91_000 as Weight).saturating_mul(s as Weight)) + (104_111_000 as Weight) + // Standard Error: 88_000 + .saturating_add((276_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 240_000 + .saturating_add((194_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)) } diff --git a/runtime/westend/src/weights/pallet_vesting.rs b/runtime/westend/src/weights/pallet_vesting.rs index ac1f479a045a..2d1142b4f220 100644 --- a/runtime/westend/src/weights/pallet_vesting.rs +++ b/runtime/westend/src/weights/pallet_vesting.rs @@ -44,84 +44,68 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_vesting::WeightInfo for WeightInfo { fn vest_locked(l: u32, s: u32, ) -> Weight { - (58_117_000 as Weight) - // Standard Error: 3_000 - .saturating_add((136_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 12_000 - .saturating_add((177_000 as Weight).saturating_mul(s as Weight)) + (93_789_000 as Weight) + // Standard Error: 70_000 + .saturating_add((41_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 182_000 + .saturating_add((211_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)) } - fn vest_unlocked(l: u32, s: u32, ) -> Weight { - (57_903_000 as Weight) - // Standard Error: 2_000 - .saturating_add((126_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 6_000 - .saturating_add((51_000 as Weight).saturating_mul(s as Weight)) + fn vest_unlocked(_l: u32, s: u32, ) -> Weight { + (90_737_000 as Weight) + // Standard Error: 0 + .saturating_add((263_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)) } fn vest_other_locked(l: u32, s: u32, ) -> Weight { - (57_736_000 as Weight) - // Standard Error: 1_000 - .saturating_add((140_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 4_000 - .saturating_add((159_000 as Weight).saturating_mul(s as Weight)) + (85_211_000 as Weight) + // Standard Error: 17_000 + .saturating_add((153_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 45_000 + .saturating_add((289_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)) } fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { - (57_278_000 as Weight) - // Standard Error: 1_000 - .saturating_add((131_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 5_000 - .saturating_add((68_000 as Weight).saturating_mul(s as Weight)) + (90_368_000 as Weight) + // Standard Error: 17_000 + .saturating_add((31_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 45_000 + .saturating_add((132_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)) } - fn last_vested_transfer(l: u32, _s: u32, ) -> Weight { - (101_019_000 as Weight) - // Standard Error: 5_000 - .saturating_add((135_000 as Weight).saturating_mul(l as Weight)) + fn vested_transfer(l: u32, _s: u32, ) -> Weight { + (167_500_000 as Weight) + // Standard Error: 194_000 + .saturating_add((255_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } - fn first_vested_transfer(l: u32, ) -> Weight { - (118_733_000 as Weight) - // Standard Error: 5_000 - .saturating_add((138_000 as Weight).saturating_mul(l as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - fn first_force_vested_transfer(l: u32, ) -> Weight { - (117_482_000 as Weight) - // Standard Error: 3_000 - .saturating_add((146_000 as Weight).saturating_mul(l as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - fn last_force_vested_transfer(l: u32, _s: u32, ) -> Weight { - (100_191_000 as Weight) - // Standard Error: 6_000 - .saturating_add((144_000 as Weight).saturating_mul(l as Weight)) + fn force_vested_transfer(l: u32, _s: u32, ) -> Weight { + (174_000_000 as Weight) + // Standard Error: 70_000 + .saturating_add((143_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn not_unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - (71_299_000 as Weight) - // Standard Error: 1_000 - .saturating_add((115_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 6_000 - .saturating_add((101_000 as Weight).saturating_mul(s as Weight)) + (101_778_000 as Weight) + // Standard Error: 17_000 + .saturating_add((194_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 48_000 + .saturating_add((361_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)) } fn unlocking_merge_schedules(l: u32, s: u32, ) -> Weight { - (70_606_000 as Weight) - // Standard Error: 1_000 - .saturating_add((151_000 as Weight).saturating_mul(l as Weight)) - // Standard Error: 6_000 - .saturating_add((91_000 as Weight).saturating_mul(s as Weight)) + (104_111_000 as Weight) + // Standard Error: 88_000 + .saturating_add((276_000 as Weight).saturating_mul(l as Weight)) + // Standard Error: 240_000 + .saturating_add((194_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)) } From c29c285067e92e3875e4c1e46e450e8136dcb0fb Mon Sep 17 00:00:00 2001 From: emostov <32168567+emostov@users.noreply.github.com> Date: Mon, 5 Jul 2021 17:24:28 -0700 Subject: [PATCH 03/14] Use 28 vesting schedules --- runtime/kusama/src/lib.rs | 2 +- runtime/polkadot/src/lib.rs | 16 +++++++++++++++- runtime/westend/src/lib.rs | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 107335147413..dce47b8f1b79 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -949,7 +949,7 @@ impl pallet_society::Config for Runtime { parameter_types! { pub const MinVestedTransfer: Balance = 100 * CENTS; - pub const MaxVestingSchedules: u32 = 24; + pub const MaxVestingSchedules: u32 = 28; } impl pallet_vesting::Config for Runtime { diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index a025a9e97c00..f6626878f442 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -831,7 +831,7 @@ impl claims::Config for Runtime { parameter_types! { pub const MinVestedTransfer: Balance = 1 * DOLLARS; - pub const MaxVestingSchedules: u32 = 24; + pub const MaxVestingSchedules: u32 = 28; } impl pallet_vesting::Config for Runtime { @@ -1594,4 +1594,18 @@ mod test_fees { println!("can support {} nominators to yield a weight of {}", active, weight_with(active)); assert!(active > target_voters, "we need to reevaluate the weight of the election system"); } + + #[test] + fn vesting_schedules_encoded_use_correct_space() { + use pallet_vesting::vesting_info::VestingInfo; + use frame_support::BoundedVec; + use parity_scale_codec::MaxEncodedLen; + + let sched_len = VestingInfo::::max_encoded_len(); + let vec_len = BoundedVec::, MaxVestingSchedules>::max_encoded_len(); + + println!("Vesting schedules max encoded len: {} ({}).", vec_len, sched_len); + assert_eq!(sched_len, 36); + assert_eq!(vec_len, 1009); + } } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index d43d91e79efe..1358d07b780c 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -632,7 +632,7 @@ impl pallet_recovery::Config for Runtime { parameter_types! { pub const MinVestedTransfer: Balance = 100 * CENTS; - pub const MaxVestingSchedules: u32 = 24; + pub const MaxVestingSchedules: u32 = 28; } impl pallet_vesting::Config for Runtime { From 064b7081303d74e3deec8bd873e2f9379cde3dd3 Mon Sep 17 00:00:00 2001 From: emostov <32168567+emostov@users.noreply.github.com> Date: Mon, 5 Jul 2021 23:52:22 -0700 Subject: [PATCH 04/14] Add MaxSchedulesParam everywhere --- runtime/common/src/claims.rs | 2 ++ runtime/common/src/purchase.rs | 2 ++ runtime/polkadot/src/lib.rs | 2 +- runtime/test-runtime/src/lib.rs | 19 +++++++++++-------- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/runtime/common/src/claims.rs b/runtime/common/src/claims.rs index 46f7d57288e1..d157f99d1266 100644 --- a/runtime/common/src/claims.rs +++ b/runtime/common/src/claims.rs @@ -726,6 +726,7 @@ mod tests { parameter_types! { pub const MinVestedTransfer: u64 = 0; + pub const MinVestedTransfer: u32 = 28; } impl pallet_vesting::Config for Test { @@ -734,6 +735,7 @@ mod tests { type BlockNumberToBalance = Identity; type MinVestedTransfer = MinVestedTransfer; type WeightInfo = (); + type MaxVestingSchedules = MaxVestingSchedules; } parameter_types!{ diff --git a/runtime/common/src/purchase.rs b/runtime/common/src/purchase.rs index 35f86ec6c1ff..a6af3d1bf81e 100644 --- a/runtime/common/src/purchase.rs +++ b/runtime/common/src/purchase.rs @@ -500,6 +500,7 @@ mod tests { parameter_types! { pub const MinVestedTransfer: u64 = 0; + pub const MaxVestingSchedules: u32 = 28; } impl pallet_vesting::Config for Test { @@ -508,6 +509,7 @@ mod tests { type BlockNumberToBalance = Identity; type MinVestedTransfer = MinVestedTransfer; type WeightInfo = (); + type MaxVestingSchedules = MaxVestingSchedules; } parameter_types! { diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index f6626878f442..b285f3e40fdf 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1597,7 +1597,7 @@ mod test_fees { #[test] fn vesting_schedules_encoded_use_correct_space() { - use pallet_vesting::vesting_info::VestingInfo; + use pallet_vesting::VestingInfo; use frame_support::BoundedVec; use parity_scale_codec::MaxEncodedLen; diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index a1d9a76cffc5..712353fe94f0 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -434,15 +434,18 @@ impl claims::Config for Runtime { parameter_types! { pub storage MinVestedTransfer: Balance = 100 * DOLLARS; -} + pub const MaxVestingSchedules: u32 = 28; + } + + impl pallet_vesting::Config for Test { + type Event = Event; + type Currency = Balances; + type BlockNumberToBalance = Identity; + type MinVestedTransfer = MinVestedTransfer; + type WeightInfo = (); + type MaxVestingSchedules = MaxVestingSchedules; + } -impl pallet_vesting::Config for Runtime { - type Event = Event; - type Currency = Balances; - type BlockNumberToBalance = ConvertInto; - type MinVestedTransfer = MinVestedTransfer; - type WeightInfo = (); -} impl pallet_sudo::Config for Runtime { type Event = Event; From 93554b38f0d0dcdc20c047672013c9bdd57e6ba0 Mon Sep 17 00:00:00 2001 From: emostov <32168567+emostov@users.noreply.github.com> Date: Tue, 6 Jul 2021 14:44:04 -0700 Subject: [PATCH 05/14] Fix var name errors --- runtime/common/src/claims.rs | 2 +- runtime/polkadot/src/lib.rs | 14 -------------- runtime/test-runtime/src/lib.rs | 21 ++++++++++----------- 3 files changed, 11 insertions(+), 26 deletions(-) diff --git a/runtime/common/src/claims.rs b/runtime/common/src/claims.rs index d157f99d1266..d3f1dfb3f90c 100644 --- a/runtime/common/src/claims.rs +++ b/runtime/common/src/claims.rs @@ -726,7 +726,7 @@ mod tests { parameter_types! { pub const MinVestedTransfer: u64 = 0; - pub const MinVestedTransfer: u32 = 28; + pub const MaxVestingSchedules: u32 = 28; } impl pallet_vesting::Config for Test { diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index b285f3e40fdf..75e96d582c16 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1594,18 +1594,4 @@ mod test_fees { println!("can support {} nominators to yield a weight of {}", active, weight_with(active)); assert!(active > target_voters, "we need to reevaluate the weight of the election system"); } - - #[test] - fn vesting_schedules_encoded_use_correct_space() { - use pallet_vesting::VestingInfo; - use frame_support::BoundedVec; - use parity_scale_codec::MaxEncodedLen; - - let sched_len = VestingInfo::::max_encoded_len(); - let vec_len = BoundedVec::, MaxVestingSchedules>::max_encoded_len(); - - println!("Vesting schedules max encoded len: {} ({}).", vec_len, sched_len); - assert_eq!(sched_len, 36); - assert_eq!(vec_len, 1009); - } } diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index 712353fe94f0..4b46b624d589 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -434,18 +434,17 @@ impl claims::Config for Runtime { parameter_types! { pub storage MinVestedTransfer: Balance = 100 * DOLLARS; - pub const MaxVestingSchedules: u32 = 28; - } - - impl pallet_vesting::Config for Test { - type Event = Event; - type Currency = Balances; - type BlockNumberToBalance = Identity; - type MinVestedTransfer = MinVestedTransfer; - type WeightInfo = (); - type MaxVestingSchedules = MaxVestingSchedules; - } + pub const MaxVestingSchedules: u32 = 28; +} +impl pallet_vesting::Config for Test { + type Event = Event; + type Currency = Balances; + type BlockNumberToBalance = Identity; + type MinVestedTransfer = MinVestedTransfer; + type WeightInfo = (); + type MaxVestingSchedules = MaxVestingSchedules; +} impl pallet_sudo::Config for Runtime { type Event = Event; From 5a0716ecc66f103681800a5a3c8ecb4d003e8e5b Mon Sep 17 00:00:00 2001 From: emostov <32168567+emostov@users.noreply.github.com> Date: Tue, 6 Jul 2021 15:06:18 -0700 Subject: [PATCH 06/14] rever accidental changes to test-runtime --- runtime/test-runtime/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index 4b46b624d589..8064c5c5b4fb 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -437,10 +437,10 @@ parameter_types! { pub const MaxVestingSchedules: u32 = 28; } -impl pallet_vesting::Config for Test { +impl pallet_vesting::Config for Runtime { type Event = Event; type Currency = Balances; - type BlockNumberToBalance = Identity; + type BlockNumberToBalance = ConvertInto; type MinVestedTransfer = MinVestedTransfer; type WeightInfo = (); type MaxVestingSchedules = MaxVestingSchedules; From 398d65d1ac6fad1112f94de3d8c351bcf33aa5a0 Mon Sep 17 00:00:00 2001 From: Zeke Mostov <32168567+emostov@users.noreply.github.com> Date: Tue, 6 Jul 2021 15:37:30 -0700 Subject: [PATCH 07/14] try merge origin master --- .../approval-voting/src/approval_db/v1/mod.rs | 19 +- .../src/approval_db/v1/tests.rs | 6 +- node/core/approval-voting/src/import.rs | 19 +- node/core/approval-voting/src/lib.rs | 7 +- node/core/approval-voting/src/tests.rs | 21 +- node/core/chain-selection/Cargo.toml | 2 + .../chain-selection/src/db_backend/mod.rs | 19 + .../core/chain-selection/src/db_backend/v1.rs | 668 ++++++++++++++++++ node/core/chain-selection/src/lib.rs | 290 +++++--- node/core/chain-selection/src/tests.rs | 445 +++++++++++- node/core/chain-selection/src/tree.rs | 7 +- node/service/src/chain_spec.rs | 18 +- runtime/common/src/integration_tests.rs | 2 +- runtime/common/src/paras_registrar.rs | 2 +- runtime/kusama/src/lib.rs | 2 +- runtime/kusama/src/weights/pallet_balances.rs | 14 +- runtime/kusama/src/weights/pallet_bounties.rs | 24 +- .../kusama/src/weights/pallet_collective.rs | 60 +- .../kusama/src/weights/pallet_democracy.rs | 84 +-- runtime/kusama/src/weights/pallet_gilt.rs | 28 +- runtime/kusama/src/weights/pallet_identity.rs | 96 +-- .../kusama/src/weights/pallet_im_online.rs | 8 +- runtime/kusama/src/weights/pallet_indices.rs | 12 +- .../kusama/src/weights/pallet_membership.rs | 34 +- runtime/kusama/src/weights/pallet_multisig.rs | 44 +- runtime/kusama/src/weights/pallet_proxy.rs | 48 +- .../kusama/src/weights/pallet_scheduler.rs | 18 +- runtime/kusama/src/weights/pallet_session.rs | 6 +- runtime/kusama/src/weights/pallet_staking.rs | 108 +-- .../kusama/src/weights/pallet_timestamp.rs | 6 +- runtime/kusama/src/weights/pallet_tips.rs | 20 +- runtime/kusama/src/weights/pallet_treasury.rs | 14 +- runtime/kusama/src/weights/pallet_utility.rs | 12 +- runtime/kusama/src/weights/pallet_vesting.rs | 2 +- .../src/weights/runtime_common_auctions.rs | 12 +- .../src/weights/runtime_common_claims.rs | 12 +- .../src/weights/runtime_common_crowdloan.rs | 26 +- .../weights/runtime_common_paras_registrar.rs | 14 +- .../src/weights/runtime_common_slots.rs | 18 +- runtime/parachains/src/hrmp.rs | 10 +- runtime/parachains/src/inclusion.rs | 8 +- runtime/parachains/src/initializer.rs | 6 +- runtime/parachains/src/lib.rs | 8 +- runtime/parachains/src/mock.rs | 7 +- runtime/parachains/src/paras.rs | 445 +++++++----- runtime/parachains/src/runtime_api_impl/v1.rs | 6 +- runtime/parachains/src/scheduler.rs | 16 +- runtime/parachains/src/util.rs | 2 +- .../polkadot/src/weights/pallet_balances.rs | 14 +- .../polkadot/src/weights/pallet_bounties.rs | 24 +- .../polkadot/src/weights/pallet_collective.rs | 60 +- .../polkadot/src/weights/pallet_democracy.rs | 82 +-- .../src/weights/pallet_elections_phragmen.rs | 52 +- .../polkadot/src/weights/pallet_identity.rs | 98 +-- .../polkadot/src/weights/pallet_im_online.rs | 10 +- .../polkadot/src/weights/pallet_indices.rs | 12 +- .../polkadot/src/weights/pallet_membership.rs | 30 +- .../polkadot/src/weights/pallet_multisig.rs | 42 +- runtime/polkadot/src/weights/pallet_proxy.rs | 50 +- .../polkadot/src/weights/pallet_scheduler.rs | 18 +- .../polkadot/src/weights/pallet_session.rs | 6 +- .../polkadot/src/weights/pallet_staking.rs | 112 +-- .../polkadot/src/weights/pallet_timestamp.rs | 6 +- runtime/polkadot/src/weights/pallet_tips.rs | 24 +- .../polkadot/src/weights/pallet_treasury.rs | 14 +- .../polkadot/src/weights/pallet_utility.rs | 12 +- .../polkadot/src/weights/pallet_vesting.rs | 2 +- .../src/weights/runtime_common_claims.rs | 12 +- runtime/rococo/Cargo.toml | 10 + runtime/rococo/src/bridge_messages.rs | 410 +++++++++++ runtime/rococo/src/lib.rs | 227 +++++- runtime/westend/src/lib.rs | 2 +- .../westend/src/weights/pallet_balances.rs | 14 +- .../westend/src/weights/pallet_identity.rs | 96 +-- .../westend/src/weights/pallet_im_online.rs | 8 +- runtime/westend/src/weights/pallet_indices.rs | 12 +- .../westend/src/weights/pallet_multisig.rs | 40 +- runtime/westend/src/weights/pallet_proxy.rs | 56 +- .../westend/src/weights/pallet_scheduler.rs | 18 +- runtime/westend/src/weights/pallet_session.rs | 6 +- runtime/westend/src/weights/pallet_staking.rs | 116 +-- .../westend/src/weights/pallet_timestamp.rs | 4 +- runtime/westend/src/weights/pallet_utility.rs | 12 +- runtime/westend/src/weights/pallet_vesting.rs | 2 +- .../src/weights/runtime_common_auctions.rs | 12 +- .../src/weights/runtime_common_crowdloan.rs | 26 +- .../weights/runtime_common_paras_registrar.rs | 14 +- .../src/weights/runtime_common_slots.rs | 18 +- scripts/run_all_benches.sh | 22 + 89 files changed, 3251 insertions(+), 1309 deletions(-) create mode 100644 node/core/chain-selection/src/db_backend/mod.rs create mode 100644 node/core/chain-selection/src/db_backend/v1.rs create mode 100644 runtime/rococo/src/bridge_messages.rs create mode 100755 scripts/run_all_benches.sh diff --git a/node/core/approval-voting/src/approval_db/v1/mod.rs b/node/core/approval-voting/src/approval_db/v1/mod.rs index 27960eb29211..f6307a8b5a1e 100644 --- a/node/core/approval-voting/src/approval_db/v1/mod.rs +++ b/node/core/approval-voting/src/approval_db/v1/mod.rs @@ -423,17 +423,21 @@ pub(crate) fn add_block_entry( /// Forcibly approve all candidates included at up to the given relay-chain height in the indicated /// chain. +/// +/// Returns a list of block hashes that were not approved and are now. pub fn force_approve( store: &dyn KeyValueDB, db_config: Config, chain_head: Hash, up_to: BlockNumber, -) -> Result<()> { +) -> Result> { enum State { WalkTo, Approving, } + let mut approved_hashes = Vec::new(); + let mut cur_hash = chain_head; let mut state = State::WalkTo; @@ -452,13 +456,20 @@ pub fn force_approve( match state { State::WalkTo => {}, State::Approving => { - entry.approved_bitfield.iter_mut().for_each(|mut b| *b = true); - tx.put_block_entry(entry); + let is_approved = entry.approved_bitfield.count_ones() + == entry.approved_bitfield.len(); + + if !is_approved { + entry.approved_bitfield.iter_mut().for_each(|mut b| *b = true); + approved_hashes.push(entry.block_hash); + tx.put_block_entry(entry); + } } } } - tx.write(store) + tx.write(store)?; + Ok(approved_hashes) } /// Return all blocks which have entries in the DB, ascending, by height. diff --git a/node/core/approval-voting/src/approval_db/v1/tests.rs b/node/core/approval-voting/src/approval_db/v1/tests.rs index 71c4d3c47e29..d0056cd98d9e 100644 --- a/node/core/approval-voting/src/approval_db/v1/tests.rs +++ b/node/core/approval-voting/src/approval_db/v1/tests.rs @@ -534,7 +534,7 @@ fn force_approve_works() { ).unwrap(); } - force_approve(&store, TEST_CONFIG, block_hash_d, 2).unwrap(); + let approved_hashes = force_approve(&store, TEST_CONFIG, block_hash_d, 2).unwrap(); assert!(load_block_entry( &store, @@ -556,6 +556,10 @@ fn force_approve_works() { &TEST_CONFIG, &block_hash_d, ).unwrap().unwrap().approved_bitfield.not_any()); + assert_eq!( + approved_hashes, + vec![block_hash_b, block_hash_a], + ); } #[test] diff --git a/node/core/approval-voting/src/import.rs b/node/core/approval-voting/src/import.rs index bcb59f6ba7b0..6cdbfe8550ab 100644 --- a/node/core/approval-voting/src/import.rs +++ b/node/core/approval-voting/src/import.rs @@ -31,6 +31,7 @@ use polkadot_node_subsystem::{ messages::{ RuntimeApiMessage, RuntimeApiRequest, ChainApiMessage, ApprovalDistributionMessage, + ChainSelectionMessage, }, SubsystemContext, SubsystemError, SubsystemResult, }; @@ -462,10 +463,16 @@ pub(crate) async fn handle_new_head( result.len(), ); } + result } }; + // If all bits are already set, then send an approve message. + if approved_bitfield.count_ones() == approved_bitfield.len() { + ctx.send_message(ChainSelectionMessage::Approved(block_hash).into()).await; + } + let block_entry = approval_db::v1::BlockEntry { block_hash, parent_hash: block_header.parent_hash, @@ -487,8 +494,18 @@ pub(crate) async fn handle_new_head( "Enacting force-approve", ); - approval_db::v1::force_approve(db_writer, db_config, block_hash, up_to) + let approved_hashes = approval_db::v1::force_approve( + db_writer, + db_config, + block_hash, + up_to, + ) .map_err(|e| SubsystemError::with_origin("approval-voting", e))?; + + // Notify chain-selection of all approved hashes. + for hash in approved_hashes { + ctx.send_message(ChainSelectionMessage::Approved(hash).into()).await; + } } tracing::trace!( diff --git a/node/core/approval-voting/src/lib.rs b/node/core/approval-voting/src/lib.rs index 54943c40b660..28cc1ca6a709 100644 --- a/node/core/approval-voting/src/lib.rs +++ b/node/core/approval-voting/src/lib.rs @@ -26,7 +26,7 @@ use polkadot_node_subsystem::{ AssignmentCheckError, AssignmentCheckResult, ApprovalCheckError, ApprovalCheckResult, ApprovalVotingMessage, RuntimeApiMessage, RuntimeApiRequest, ChainApiMessage, ApprovalDistributionMessage, CandidateValidationMessage, - AvailabilityRecoveryMessage, + AvailabilityRecoveryMessage, ChainSelectionMessage, }, errors::RecoveryError, Subsystem, SubsystemContext, SubsystemError, SubsystemResult, SpawnedSubsystem, @@ -717,6 +717,7 @@ enum Action { candidate: CandidateReceipt, backing_group: GroupIndex, }, + NoteApprovedInChainSelection(Hash), IssueApproval(CandidateHash, ApprovalVoteRequest), BecomeActive, Conclude, @@ -962,6 +963,9 @@ async fn handle_actions( Some(_) => {}, } } + Action::NoteApprovedInChainSelection(block_hash) => { + ctx.send_message(ChainSelectionMessage::Approved(block_hash).into()).await; + } Action::BecomeActive => { *mode = Mode::Active; @@ -1805,6 +1809,7 @@ fn import_checked_approval( if is_block_approved && !was_block_approved { metrics.on_block_approved(status.tranche_now as _); + actions.push(Action::NoteApprovedInChainSelection(block_hash)); } actions.push(Action::WriteBlockEntry(block_entry)); diff --git a/node/core/approval-voting/src/tests.rs b/node/core/approval-voting/src/tests.rs index 5603c362fd24..84006478bd85 100644 --- a/node/core/approval-voting/src/tests.rs +++ b/node/core/approval-voting/src/tests.rs @@ -850,6 +850,14 @@ fn import_checked_approval_updates_entries_and_schedules() { assert_matches!( actions.get(0).unwrap(), + Action::NoteApprovedInChainSelection(h) => { + assert_eq!(h, &block_hash); + } + ); + + + assert_matches!( + actions.get(1).unwrap(), Action::WriteBlockEntry(b_entry) => { assert_eq!(b_entry.block_hash(), block_hash); assert!(b_entry.is_fully_approved()); @@ -857,7 +865,7 @@ fn import_checked_approval_updates_entries_and_schedules() { } ); assert_matches!( - actions.get_mut(1).unwrap(), + actions.get_mut(2).unwrap(), Action::WriteCandidateEntry(c_hash, ref mut c_entry) => { assert_eq!(c_hash, &candidate_hash); assert!(c_entry.approval_entry(&block_hash).unwrap().is_approved()); @@ -1391,9 +1399,16 @@ fn import_checked_approval_sets_one_block_bit_at_a_time() { ApprovalSource::Remote(validator_index_b), ); - assert_eq!(actions.len(), 2); + assert_eq!(actions.len(), 3); assert_matches!( actions.get(0).unwrap(), + Action::NoteApprovedInChainSelection(h) => { + assert_eq!(h, &block_hash); + } + ); + + assert_matches!( + actions.get(1).unwrap(), Action::WriteBlockEntry(b_entry) => { assert_eq!(b_entry.block_hash(), block_hash); assert!(b_entry.is_fully_approved()); @@ -1403,7 +1418,7 @@ fn import_checked_approval_sets_one_block_bit_at_a_time() { ); assert_matches!( - actions.get(1).unwrap(), + actions.get(2).unwrap(), Action::WriteCandidateEntry(c_h, c_entry) => { assert_eq!(c_h, &candidate_hash_2); assert!(c_entry.approval_entry(&block_hash).unwrap().is_approved()); diff --git a/node/core/chain-selection/Cargo.toml b/node/core/chain-selection/Cargo.toml index 53e74cf883a1..f6b42a2bec47 100644 --- a/node/core/chain-selection/Cargo.toml +++ b/node/core/chain-selection/Cargo.toml @@ -7,6 +7,7 @@ edition = "2018" [dependencies] futures = "0.3.15" +futures-timer = "3" tracing = "0.1.26" polkadot-primitives = { path = "../../../primitives" } polkadot-node-primitives = { path = "../../primitives" } @@ -21,3 +22,4 @@ polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } parking_lot = "0.11" assert_matches = "1" +kvdb-memorydb = "0.10.0" diff --git a/node/core/chain-selection/src/db_backend/mod.rs b/node/core/chain-selection/src/db_backend/mod.rs new file mode 100644 index 000000000000..66e61426b738 --- /dev/null +++ b/node/core/chain-selection/src/db_backend/mod.rs @@ -0,0 +1,19 @@ +// Copyright 2021 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! A database [`Backend`][crate::backend::Backend] for the chain selection subsystem. + +pub(super) mod v1; diff --git a/node/core/chain-selection/src/db_backend/v1.rs b/node/core/chain-selection/src/db_backend/v1.rs new file mode 100644 index 000000000000..6aea4af8c136 --- /dev/null +++ b/node/core/chain-selection/src/db_backend/v1.rs @@ -0,0 +1,668 @@ +// Copyright 2021 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! A database [`Backend`][crate::backend::Backend] for the chain selection subsystem. +//! +//! This stores the following schema: +//! +//! ```ignore +//! ("CS_block_entry", Hash) -> BlockEntry; +//! ("CS_block_height", BigEndianBlockNumber) -> Vec; +//! ("CS_stagnant_at", BigEndianTimestamp) -> Vec; +//! ("CS_leaves") -> LeafEntrySet; +//! ``` +//! +//! The big-endian encoding is used for creating iterators over the key-value DB which are +//! accessible by prefix, to find the earlist block number stored as well as the all stagnant +//! blocks. +//! +//! The `Vec`s stored are always non-empty. Empty `Vec`s are not stored on disk so there is no +//! semantic difference between `None` and an empty `Vec`. + +use crate::backend::{Backend, BackendWriteOp}; +use crate::Error; + +use polkadot_primitives::v1::{BlockNumber, Hash}; +use polkadot_node_primitives::BlockWeight; + +use kvdb::{DBTransaction, KeyValueDB}; +use parity_scale_codec::{Encode, Decode}; + +use std::sync::Arc; + +const BLOCK_ENTRY_PREFIX: &[u8; 14] = b"CS_block_entry"; +const BLOCK_HEIGHT_PREFIX: &[u8; 15] = b"CS_block_height"; +const STAGNANT_AT_PREFIX: &[u8; 14] = b"CS_stagnant_at"; +const LEAVES_KEY: &[u8; 9] = b"CS_leaves"; + +type Timestamp = u64; + +#[derive(Debug, Encode, Decode, Clone, PartialEq)] +enum Approval { + #[codec(index = 0)] + Approved, + #[codec(index = 1)] + Unapproved, + #[codec(index = 2)] + Stagnant, +} + +impl From for Approval { + fn from(x: crate::Approval) -> Self { + match x { + crate::Approval::Approved => Approval::Approved, + crate::Approval::Unapproved => Approval::Unapproved, + crate::Approval::Stagnant => Approval::Stagnant, + } + } +} + +impl From for crate::Approval { + fn from(x: Approval) -> crate::Approval { + match x { + Approval::Approved => crate::Approval::Approved, + Approval::Unapproved => crate::Approval::Unapproved, + Approval::Stagnant => crate::Approval::Stagnant, + } + } +} + +#[derive(Debug, Encode, Decode, Clone, PartialEq)] +struct ViabilityCriteria { + explicitly_reverted: bool, + approval: Approval, + earliest_unviable_ancestor: Option, +} + +impl From for ViabilityCriteria { + fn from(x: crate::ViabilityCriteria) -> Self { + ViabilityCriteria { + explicitly_reverted: x.explicitly_reverted, + approval: x.approval.into(), + earliest_unviable_ancestor: x.earliest_unviable_ancestor, + } + } +} + +impl From for crate::ViabilityCriteria { + fn from(x: ViabilityCriteria) -> crate::ViabilityCriteria { + crate::ViabilityCriteria { + explicitly_reverted: x.explicitly_reverted, + approval: x.approval.into(), + earliest_unviable_ancestor: x.earliest_unviable_ancestor, + } + } +} + +#[derive(Encode, Decode)] +struct LeafEntry { + weight: BlockWeight, + block_number: BlockNumber, + block_hash: Hash, +} + +impl From for LeafEntry { + fn from(x: crate::LeafEntry) -> Self { + LeafEntry { + weight: x.weight, + block_number: x.block_number, + block_hash: x.block_hash, + } + } +} + +impl From for crate::LeafEntry { + fn from(x: LeafEntry) -> crate::LeafEntry { + crate::LeafEntry { + weight: x.weight, + block_number: x.block_number, + block_hash: x.block_hash, + } + } +} + +#[derive(Encode, Decode)] +struct LeafEntrySet { + inner: Vec, +} + +impl From for LeafEntrySet { + fn from(x: crate::LeafEntrySet) -> Self { + LeafEntrySet { + inner: x.inner.into_iter().map(Into::into).collect(), + } + } +} + +impl From for crate::LeafEntrySet { + fn from(x: LeafEntrySet) -> crate::LeafEntrySet { + crate::LeafEntrySet { + inner: x.inner.into_iter().map(Into::into).collect(), + } + } +} + +#[derive(Debug, Encode, Decode, Clone, PartialEq)] +struct BlockEntry { + block_hash: Hash, + block_number: BlockNumber, + parent_hash: Hash, + children: Vec, + viability: ViabilityCriteria, + weight: BlockWeight, +} + +impl From for BlockEntry { + fn from(x: crate::BlockEntry) -> Self { + BlockEntry { + block_hash: x.block_hash, + block_number: x.block_number, + parent_hash: x.parent_hash, + children: x.children, + viability: x.viability.into(), + weight: x.weight, + } + } +} + +impl From for crate::BlockEntry { + fn from(x: BlockEntry) -> crate::BlockEntry { + crate::BlockEntry { + block_hash: x.block_hash, + block_number: x.block_number, + parent_hash: x.parent_hash, + children: x.children, + viability: x.viability.into(), + weight: x.weight, + } + } +} + +/// Configuration for the database backend. +#[derive(Debug, Clone, Copy)] +pub struct Config { + /// The column where block metadata is stored. + pub col_data: u32, +} + +/// The database backend. +pub struct DbBackend { + inner: Arc, + config: Config, +} + +impl DbBackend { + /// Create a new [`DbBackend`] with the supplied key-value store and + /// config. + pub fn new(db: Arc, config: Config) -> Self { + DbBackend { + inner: db, + config, + } + } +} + +impl Backend for DbBackend { + fn load_block_entry(&self, hash: &Hash) -> Result, Error> { + load_decode::( + &*self.inner, + self.config.col_data, + &block_entry_key(hash), + ).map(|o| o.map(Into::into)) + } + + fn load_leaves(&self) -> Result { + load_decode::( + &*self.inner, + self.config.col_data, + LEAVES_KEY, + ).map(|o| o.map(Into::into).unwrap_or_default()) + } + + fn load_stagnant_at(&self, timestamp: crate::Timestamp) -> Result, Error> { + load_decode::>( + &*self.inner, + self.config.col_data, + &stagnant_at_key(timestamp.into()), + ).map(|o| o.unwrap_or_default()) + } + + fn load_stagnant_at_up_to(&self, up_to: crate::Timestamp) + -> Result)>, Error> + { + let stagnant_at_iter = self.inner.iter_with_prefix( + self.config.col_data, + &STAGNANT_AT_PREFIX[..], + ); + + let val = stagnant_at_iter + .filter_map(|(k, v)| { + match (decode_stagnant_at_key(&mut &k[..]), >::decode(&mut &v[..]).ok()) { + (Some(at), Some(stagnant_at)) => Some((at, stagnant_at)), + _ => None, + } + }) + .take_while(|(at, _)| *at <= up_to.into()) + .collect::>(); + + Ok(val) + } + + fn load_first_block_number(&self) -> Result, Error> { + let blocks_at_height_iter = self.inner.iter_with_prefix( + self.config.col_data, + &BLOCK_HEIGHT_PREFIX[..], + ); + + let val = blocks_at_height_iter + .filter_map(|(k, _)| decode_block_height_key(&k[..])) + .next(); + + Ok(val) + } + + fn load_blocks_by_number(&self, number: BlockNumber) -> Result, Error> { + load_decode::>( + &*self.inner, + self.config.col_data, + &block_height_key(number), + ).map(|o| o.unwrap_or_default()) + } + + /// Atomically write the list of operations, with later operations taking precedence over prior. + fn write(&mut self, ops: I) -> Result<(), Error> + where I: IntoIterator + { + let mut tx = DBTransaction::new(); + for op in ops { + match op { + BackendWriteOp::WriteBlockEntry(block_entry) => { + let block_entry: BlockEntry = block_entry.into(); + tx.put_vec( + self.config.col_data, + &block_entry_key(&block_entry.block_hash), + block_entry.encode(), + ); + } + BackendWriteOp::WriteBlocksByNumber(block_number, v) => { + if v.is_empty() { + tx.delete( + self.config.col_data, + &block_height_key(block_number), + ); + } else { + tx.put_vec( + self.config.col_data, + &block_height_key(block_number), + v.encode(), + ); + } + } + BackendWriteOp::WriteViableLeaves(leaves) => { + let leaves: LeafEntrySet = leaves.into(); + if leaves.inner.is_empty() { + tx.delete( + self.config.col_data, + &LEAVES_KEY[..], + ); + } else { + tx.put_vec( + self.config.col_data, + &LEAVES_KEY[..], + leaves.encode(), + ); + } + } + BackendWriteOp::WriteStagnantAt(timestamp, stagnant_at) => { + let timestamp: Timestamp = timestamp.into(); + if stagnant_at.is_empty() { + tx.delete( + self.config.col_data, + &stagnant_at_key(timestamp), + ); + } else { + tx.put_vec( + self.config.col_data, + &stagnant_at_key(timestamp), + stagnant_at.encode(), + ); + } + } + BackendWriteOp::DeleteBlocksByNumber(block_number) => { + tx.delete( + self.config.col_data, + &block_height_key(block_number), + ); + } + BackendWriteOp::DeleteBlockEntry(hash) => { + tx.delete( + self.config.col_data, + &block_entry_key(&hash), + ); + } + BackendWriteOp::DeleteStagnantAt(timestamp) => { + let timestamp: Timestamp = timestamp.into(); + tx.delete( + self.config.col_data, + &stagnant_at_key(timestamp), + ); + } + } + } + + self.inner.write(tx).map_err(Into::into) + } +} + +fn load_decode( + db: &dyn KeyValueDB, + col_data: u32, + key: &[u8], +) -> Result, Error> { + match db.get(col_data, key)? { + None => Ok(None), + Some(raw) => D::decode(&mut &raw[..]) + .map(Some) + .map_err(Into::into), + } +} + +fn block_entry_key(hash: &Hash) -> [u8; 14 + 32] { + let mut key = [0; 14 + 32]; + key[..14].copy_from_slice(BLOCK_ENTRY_PREFIX); + hash.using_encoded(|s| key[14..].copy_from_slice(s)); + key +} + +fn block_height_key(number: BlockNumber) -> [u8; 15 + 4] { + let mut key = [0; 15 + 4]; + key[..15].copy_from_slice(BLOCK_HEIGHT_PREFIX); + key[15..].copy_from_slice(&number.to_be_bytes()); + key +} + +fn stagnant_at_key(timestamp: Timestamp) -> [u8; 14 + 8] { + let mut key = [0; 14 + 8]; + key[..14].copy_from_slice(STAGNANT_AT_PREFIX); + key[14..].copy_from_slice(×tamp.to_be_bytes()); + key +} + +fn decode_block_height_key(key: &[u8]) -> Option { + if key.len() != 15 + 4 { return None } + if !key.starts_with(BLOCK_HEIGHT_PREFIX) { return None } + + let mut bytes = [0; 4]; + bytes.copy_from_slice(&key[15..]); + Some(BlockNumber::from_be_bytes(bytes)) +} + +fn decode_stagnant_at_key(key: &[u8]) -> Option { + if key.len() != 14 + 8 { return None } + if !key.starts_with(STAGNANT_AT_PREFIX) { return None } + + let mut bytes = [0; 8]; + bytes.copy_from_slice(&key[14..]); + Some(Timestamp::from_be_bytes(bytes)) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn block_height_key_decodes() { + let key = block_height_key(5); + assert_eq!(decode_block_height_key(&key), Some(5)); + } + + #[test] + fn stagnant_at_key_decodes() { + let key = stagnant_at_key(5); + assert_eq!(decode_stagnant_at_key(&key), Some(5)); + } + + #[test] + fn lower_block_height_key_lesser() { + for i in 0..256 { + for j in 1..=256 { + let key_a = block_height_key(i); + let key_b = block_height_key(i + j); + + assert!(key_a < key_b); + } + } + } + + #[test] + fn lower_stagnant_at_key_lesser() { + for i in 0..256 { + for j in 1..=256 { + let key_a = stagnant_at_key(i); + let key_b = stagnant_at_key(i + j); + + assert!(key_a < key_b); + } + } + } + + #[test] + fn write_read_block_entry() { + let db = Arc::new(kvdb_memorydb::create(1)); + let config = Config { col_data: 0 }; + + let mut backend = DbBackend::new(db, config); + + let block_entry = BlockEntry { + block_hash: Hash::repeat_byte(1), + block_number: 1, + parent_hash: Hash::repeat_byte(0), + children: vec![], + viability: ViabilityCriteria { + earliest_unviable_ancestor: None, + explicitly_reverted: false, + approval: Approval::Unapproved, + }, + weight: 100, + }; + + backend.write(vec![ + BackendWriteOp::WriteBlockEntry(block_entry.clone().into()) + ]).unwrap(); + + assert_eq!( + backend.load_block_entry(&block_entry.block_hash).unwrap().map(BlockEntry::from), + Some(block_entry), + ); + } + + #[test] + fn delete_block_entry() { + let db = Arc::new(kvdb_memorydb::create(1)); + let config = Config { col_data: 0 }; + + let mut backend = DbBackend::new(db, config); + + let block_entry = BlockEntry { + block_hash: Hash::repeat_byte(1), + block_number: 1, + parent_hash: Hash::repeat_byte(0), + children: vec![], + viability: ViabilityCriteria { + earliest_unviable_ancestor: None, + explicitly_reverted: false, + approval: Approval::Unapproved, + }, + weight: 100, + }; + + backend.write(vec![ + BackendWriteOp::WriteBlockEntry(block_entry.clone().into()) + ]).unwrap(); + + backend.write(vec![ + BackendWriteOp::DeleteBlockEntry(block_entry.block_hash), + ]).unwrap(); + + assert!( + backend.load_block_entry(&block_entry.block_hash).unwrap().is_none(), + ); + } + + #[test] + fn earliest_block_number() { + let db = Arc::new(kvdb_memorydb::create(1)); + let config = Config { col_data: 0 }; + + let mut backend = DbBackend::new(db, config); + + assert!( + backend.load_first_block_number().unwrap().is_none(), + ); + + backend.write(vec![ + BackendWriteOp::WriteBlocksByNumber(2, vec![Hash::repeat_byte(0)]), + BackendWriteOp::WriteBlocksByNumber(5, vec![Hash::repeat_byte(0)]), + BackendWriteOp::WriteBlocksByNumber(10, vec![Hash::repeat_byte(0)]), + ]).unwrap(); + + assert_eq!( + backend.load_first_block_number().unwrap(), + Some(2), + ); + + backend.write(vec![ + BackendWriteOp::WriteBlocksByNumber(2, vec![]), + BackendWriteOp::DeleteBlocksByNumber(5), + ]).unwrap(); + + assert_eq!( + backend.load_first_block_number().unwrap(), + Some(10), + ); + } + + #[test] + fn stagnant_at_up_to() { + let db = Arc::new(kvdb_memorydb::create(1)); + let config = Config { col_data: 0 }; + + let mut backend = DbBackend::new(db, config); + + // Prove that it's cheap + assert!( + backend.load_stagnant_at_up_to(Timestamp::max_value()).unwrap().is_empty(), + ); + + backend.write(vec![ + BackendWriteOp::WriteStagnantAt(2, vec![Hash::repeat_byte(1)]), + BackendWriteOp::WriteStagnantAt(5, vec![Hash::repeat_byte(2)]), + BackendWriteOp::WriteStagnantAt(10, vec![Hash::repeat_byte(3)]), + ]).unwrap(); + + assert_eq!( + backend.load_stagnant_at_up_to(Timestamp::max_value()).unwrap(), + vec![ + (2, vec![Hash::repeat_byte(1)]), + (5, vec![Hash::repeat_byte(2)]), + (10, vec![Hash::repeat_byte(3)]), + ] + ); + + assert_eq!( + backend.load_stagnant_at_up_to(10).unwrap(), + vec![ + (2, vec![Hash::repeat_byte(1)]), + (5, vec![Hash::repeat_byte(2)]), + (10, vec![Hash::repeat_byte(3)]), + ] + ); + + assert_eq!( + backend.load_stagnant_at_up_to(9).unwrap(), + vec![ + (2, vec![Hash::repeat_byte(1)]), + (5, vec![Hash::repeat_byte(2)]), + ] + ); + + backend.write(vec![ + BackendWriteOp::DeleteStagnantAt(2), + ]).unwrap(); + + assert_eq!( + backend.load_stagnant_at_up_to(5).unwrap(), + vec![ + (5, vec![Hash::repeat_byte(2)]), + ] + ); + + backend.write(vec![ + BackendWriteOp::WriteStagnantAt(5, vec![]), + ]).unwrap(); + + assert_eq!( + backend.load_stagnant_at_up_to(10).unwrap(), + vec![ + (10, vec![Hash::repeat_byte(3)]), + ] + ); + } + + #[test] + fn write_read_blocks_at_height() { + let db = Arc::new(kvdb_memorydb::create(1)); + let config = Config { col_data: 0 }; + + let mut backend = DbBackend::new(db, config); + + backend.write(vec![ + BackendWriteOp::WriteBlocksByNumber(2, vec![Hash::repeat_byte(1)]), + BackendWriteOp::WriteBlocksByNumber(5, vec![Hash::repeat_byte(2)]), + BackendWriteOp::WriteBlocksByNumber(10, vec![Hash::repeat_byte(3)]), + ]).unwrap(); + + assert_eq!( + backend.load_blocks_by_number(2).unwrap(), + vec![Hash::repeat_byte(1)], + ); + + assert_eq!( + backend.load_blocks_by_number(3).unwrap(), + vec![], + ); + + backend.write(vec![ + BackendWriteOp::WriteBlocksByNumber(2, vec![]), + BackendWriteOp::DeleteBlocksByNumber(5), + ]).unwrap(); + + assert_eq!( + backend.load_blocks_by_number(2).unwrap(), + vec![], + ); + + assert_eq!( + backend.load_blocks_by_number(5).unwrap(), + vec![], + ); + + assert_eq!( + backend.load_blocks_by_number(10).unwrap(), + vec![Hash::repeat_byte(3)], + ); + } +} diff --git a/node/core/chain-selection/src/lib.rs b/node/core/chain-selection/src/lib.rs index dddfc2590d33..39d416eb22b2 100644 --- a/node/core/chain-selection/src/lib.rs +++ b/node/core/chain-selection/src/lib.rs @@ -25,15 +25,18 @@ use polkadot_subsystem::{ errors::ChainApiError, }; +use kvdb::KeyValueDB; use parity_scale_codec::Error as CodecError; use futures::channel::oneshot; use futures::prelude::*; -use std::time::{UNIX_EPOCH, SystemTime}; +use std::time::{UNIX_EPOCH, Duration,SystemTime}; +use std::sync::Arc; use crate::backend::{Backend, OverlayedBackend, BackendWriteOp}; mod backend; +mod db_backend; mod tree; #[cfg(test)] @@ -43,6 +46,10 @@ const LOG_TARGET: &str = "parachain::chain-selection"; /// Timestamp based on the 1 Jan 1970 UNIX base, which is persistent across node restarts and OS reboots. type Timestamp = u64; +// If a block isn't approved in 120 seconds, nodes will abandon it +// and begin building on another chain. +const STAGNANT_TIMEOUT: Timestamp = 120; + #[derive(Debug, Clone)] enum Approval { // Approved @@ -202,96 +209,143 @@ impl Error { } } -fn timestamp_now() -> Timestamp { - // `SystemTime` is notoriously non-monotonic, so our timers might not work - // exactly as expected. Regardless, stagnation is detected on the order of minutes, - // and slippage of a few seconds in either direction won't cause any major harm. - // - // The exact time that a block becomes stagnant in the local node is always expected - // to differ from other nodes due to network asynchrony and delays in block propagation. - // Non-monotonicity exarcerbates that somewhat, but not meaningfully. - - match SystemTime::now().duration_since(UNIX_EPOCH) { - Ok(d) => d.as_secs(), - Err(e) => { - tracing::warn!( - target: LOG_TARGET, - err = ?e, - "Current time is before unix epoch. Validation will not work correctly." - ); - - 0 - } - } +/// A clock used for fetching the current timestamp. +pub trait Clock { + /// Get the current timestamp. + fn timestamp_now(&self) -> Timestamp; } -fn stagnant_timeout_from_now() -> Timestamp { - // If a block isn't approved in 120 seconds, nodes will abandon it - // and begin building on another chain. - const STAGNANT_TIMEOUT: Timestamp = 120; +struct SystemClock; - timestamp_now() + STAGNANT_TIMEOUT -} +impl Clock for SystemClock { + fn timestamp_now(&self) -> Timestamp { + // `SystemTime` is notoriously non-monotonic, so our timers might not work + // exactly as expected. Regardless, stagnation is detected on the order of minutes, + // and slippage of a few seconds in either direction won't cause any major harm. + // + // The exact time that a block becomes stagnant in the local node is always expected + // to differ from other nodes due to network asynchrony and delays in block propagation. + // Non-monotonicity exarcerbates that somewhat, but not meaningfully. -// TODO https://github.com/paritytech/polkadot/issues/3293: -// -// This is used just so we can have a public function that calls -// `run` and eliminates all the unused errors. -// -// Should be removed when the real implementation is done. -struct VoidBackend; + match SystemTime::now().duration_since(UNIX_EPOCH) { + Ok(d) => d.as_secs(), + Err(e) => { + tracing::warn!( + target: LOG_TARGET, + err = ?e, + "Current time is before unix epoch. Validation will not work correctly." + ); -impl Backend for VoidBackend { - fn load_block_entry(&self, _: &Hash) -> Result, Error> { - Ok(None) - } - fn load_leaves(&self) -> Result { - Ok(LeafEntrySet::default()) - } - fn load_stagnant_at(&self, _: Timestamp) -> Result, Error> { - Ok(Vec::new()) - } - fn load_stagnant_at_up_to(&self, _: Timestamp) - -> Result)>, Error> - { - Ok(Vec::new()) + 0 + } + } } - fn load_first_block_number(&self) -> Result, Error> { - Ok(None) +} + +/// The interval, in seconds to check for stagnant blocks. +#[derive(Debug, Clone)] +pub struct StagnantCheckInterval(Duration); + +impl Default for StagnantCheckInterval { + fn default() -> Self { + // 5 seconds is a reasonable balance between avoiding DB reads and + // ensuring validators are generally in agreement on stagnant blocks. + // + // Assuming a network delay of D, the longest difference in view possible + // between 2 validators is D + 5s. + const DEFAULT_STAGNANT_CHECK_INTERVAL: Duration = Duration::from_secs(5); + + StagnantCheckInterval(DEFAULT_STAGNANT_CHECK_INTERVAL) } - fn load_blocks_by_number(&self, _: BlockNumber) -> Result, Error> { - Ok(Vec::new()) +} + +impl StagnantCheckInterval { + /// Create a new stagnant-check interval wrapping the given duration. + pub fn new(interval: Duration) -> Self { + StagnantCheckInterval(interval) } - fn write(&mut self, _: I) -> Result<(), Error> - where I: IntoIterator - { - Ok(()) + fn timeout_stream(&self) -> impl Stream { + let interval = self.0; + let mut delay = futures_timer::Delay::new(interval); + + futures::stream::poll_fn(move |cx| { + let poll = delay.poll_unpin(cx); + if poll.is_ready() { + delay.reset(interval) + } + + poll.map(Some) + }) } } +/// Configuration for the chain selection subsystem. +#[derive(Debug, Clone)] +pub struct Config { + /// The column in the database that the storage should use. + pub col_data: u32, + /// How often to check for stagnant blocks. + pub stagnant_check_interval: StagnantCheckInterval, +} + /// The chain selection subsystem. -pub struct ChainSelectionSubsystem; +pub struct ChainSelectionSubsystem { + config: Config, + db: Arc, +} + +impl ChainSelectionSubsystem { + /// Create a new instance of the subsystem with the given config + /// and key-value store. + pub fn new(config: Config, db: Arc) -> Self { + ChainSelectionSubsystem { + config, + db, + } + } +} impl Subsystem for ChainSelectionSubsystem where Context: SubsystemContext { fn start(self, ctx: Context) -> SpawnedSubsystem { - let backend = VoidBackend; + let backend = crate::db_backend::v1::DbBackend::new( + self.db, + crate::db_backend::v1::Config { col_data: self.config.col_data }, + ); + SpawnedSubsystem { - future: run(ctx, backend).map(|()| Ok(())).boxed(), + future: run( + ctx, + backend, + self.config.stagnant_check_interval, + Box::new(SystemClock), + ) + .map(Ok) + .boxed(), name: "chain-selection-subsystem", } } } -async fn run(mut ctx: Context, mut backend: B) +async fn run( + mut ctx: Context, + mut backend: B, + stagnant_check_interval: StagnantCheckInterval, + clock: Box, +) where Context: SubsystemContext, B: Backend, { loop { - let res = run_iteration(&mut ctx, &mut backend).await; + let res = run_iteration( + &mut ctx, + &mut backend, + &stagnant_check_interval, + &*clock, + ).await; match res { Err(e) => { e.trace(); @@ -313,55 +367,69 @@ async fn run(mut ctx: Context, mut backend: B) // // A return value of `Ok` indicates that an exit should be made, while non-fatal errors // lead to another call to this function. -async fn run_iteration(ctx: &mut Context, backend: &mut B) +async fn run_iteration( + ctx: &mut Context, + backend: &mut B, + stagnant_check_interval: &StagnantCheckInterval, + clock: &(dyn Clock + Sync), +) -> Result<(), Error> where Context: SubsystemContext, B: Backend, { - // TODO https://github.com/paritytech/polkadot/issues/3293: Add stagnant checking timer loop. + let mut stagnant_check_stream = stagnant_check_interval.timeout_stream(); loop { - match ctx.recv().await? { - FromOverseer::Signal(OverseerSignal::Conclude) => { - return Ok(()) - } - FromOverseer::Signal(OverseerSignal::ActiveLeaves(update)) => { - for leaf in update.activated { - let write_ops = handle_active_leaf( - ctx, - &*backend, - leaf.hash, - ).await?; - - backend.write(write_ops)?; + futures::select! { + msg = ctx.recv().fuse() => { + let msg = msg?; + match msg { + FromOverseer::Signal(OverseerSignal::Conclude) => { + return Ok(()) + } + FromOverseer::Signal(OverseerSignal::ActiveLeaves(update)) => { + for leaf in update.activated { + let write_ops = handle_active_leaf( + ctx, + &*backend, + clock.timestamp_now() + STAGNANT_TIMEOUT, + leaf.hash, + ).await?; + + backend.write(write_ops)?; + } + } + FromOverseer::Signal(OverseerSignal::BlockFinalized(h, n)) => { + handle_finalized_block(backend, h, n)? + } + FromOverseer::Communication { msg } => match msg { + ChainSelectionMessage::Approved(hash) => { + handle_approved_block(backend, hash)? + } + ChainSelectionMessage::Leaves(tx) => { + let leaves = load_leaves(ctx, &*backend).await?; + let _ = tx.send(leaves); + } + ChainSelectionMessage::BestLeafContaining(required, tx) => { + let best_containing = crate::backend::find_best_leaf_containing( + &*backend, + required, + )?; + + // note - this may be none if the finalized block is + // a leaf. this is fine according to the expected usage of the + // function. `None` responses should just `unwrap_or(required)`, + // so if the required block is the finalized block, then voilá. + + let _ = tx.send(best_containing); + } + } } } - FromOverseer::Signal(OverseerSignal::BlockFinalized(h, n)) => { - handle_finalized_block(backend, h, n)? - } - FromOverseer::Communication { msg } => match msg { - ChainSelectionMessage::Approved(hash) => { - handle_approved_block(backend, hash)? - } - ChainSelectionMessage::Leaves(tx) => { - let leaves = load_leaves(ctx, &*backend).await?; - let _ = tx.send(leaves); - } - ChainSelectionMessage::BestLeafContaining(required, tx) => { - let best_containing = crate::backend::find_best_leaf_containing( - &*backend, - required, - )?; - - // note - this may be none if the finalized block is - // a leaf. this is fine according to the expected usage of the - // function. `None` responses should just `unwrap_or(required)`, - // so if the required block is the finalized block, then voilá. - - let _ = tx.send(best_containing); - } + _ = stagnant_check_stream.next().fuse() => { + detect_stagnant(backend, clock.timestamp_now())?; } - }; + } } } @@ -415,6 +483,7 @@ async fn fetch_block_weight( async fn handle_active_leaf( ctx: &mut impl SubsystemContext, backend: &impl Backend, + stagnant_at: Timestamp, hash: Hash, ) -> Result, Error> { let lower_bound = match backend.load_first_block_number()? { @@ -475,6 +544,7 @@ async fn handle_active_leaf( header.parent_hash, reversion_logs, weight, + stagnant_at, )?; } @@ -556,6 +626,22 @@ fn handle_approved_block( backend.write(ops) } +fn detect_stagnant( + backend: &mut impl Backend, + now: Timestamp, +) -> Result<(), Error> { + let ops = { + let overlay = crate::tree::detect_stagnant( + &*backend, + now, + )?; + + overlay.into_write_ops() + }; + + backend.write(ops) +} + // Load the leaves from the backend. If there are no leaves, then return // the finalized block. async fn load_leaves( diff --git a/node/core/chain-selection/src/tests.rs b/node/core/chain-selection/src/tests.rs index 945578a47e6e..1449fae3f5dd 100644 --- a/node/core/chain-selection/src/tests.rs +++ b/node/core/chain-selection/src/tests.rs @@ -22,7 +22,7 @@ use super::*; use std::collections::{HashMap, HashSet, BTreeMap}; -use std::sync::Arc; +use std::sync::{atomic::{Ordering as AtomicOrdering, AtomicU64}, Arc}; use futures::channel::oneshot; use parity_scale_codec::Encode; @@ -103,6 +103,21 @@ impl TestBackend { } } } + + fn assert_stagnant_at_state( + &self, + stagnant_at: Vec<(Timestamp, Vec)>, + ) { + let inner = self.inner.lock(); + assert_eq!(inner.stagnant_at.len(), stagnant_at.len()); + for (at, hashes) in stagnant_at { + let stored_hashes = inner.stagnant_at.get(&at).unwrap(); + assert_eq!(hashes.len(), stored_hashes.len()); + for hash in hashes { + assert!(stored_hashes.contains(&hash)); + } + } + } } impl Default for TestBackend { @@ -173,18 +188,45 @@ impl Backend for TestBackend { } } +#[derive(Clone)] +pub struct TestClock(Arc); + +impl TestClock { + fn new(initial: u64) -> Self { + TestClock(Arc::new(AtomicU64::new(initial))) + } + + fn inc_by(&self, duration: u64) { + self.0.fetch_add(duration, AtomicOrdering::Relaxed); + } +} + +impl Clock for TestClock { + fn timestamp_now(&self) -> Timestamp { + self.0.load(AtomicOrdering::Relaxed) + } +} + +const TEST_STAGNANT_INTERVAL: Duration = Duration::from_millis(20); + type VirtualOverseer = test_helpers::TestSubsystemContextHandle; fn test_harness>( - test: impl FnOnce(TestBackend, VirtualOverseer) -> T + test: impl FnOnce(TestBackend, TestClock, VirtualOverseer) -> T ) { let pool = TaskExecutor::new(); let (context, virtual_overseer) = test_helpers::make_subsystem_context(pool); let backend = TestBackend::default(); - let subsystem = crate::run(context, backend.clone()); + let clock = TestClock::new(0); + let subsystem = crate::run( + context, + backend.clone(), + StagnantCheckInterval::new(TEST_STAGNANT_INTERVAL), + Box::new(clock.clone()), + ); - let test_fut = test(backend, virtual_overseer); + let test_fut = test(backend, clock, virtual_overseer); let test_and_conclude = async move { let mut virtual_overseer = test_fut.await; virtual_overseer.send(OverseerSignal::Conclude.into()).await; @@ -582,12 +624,12 @@ async fn approve_block( #[test] fn no_op_subsystem_run() { - test_harness(|_, virtual_overseer| async move { virtual_overseer }); + test_harness(|_, _, virtual_overseer| async move { virtual_overseer }); } #[test] fn import_direct_child_of_finalized_on_empty() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -614,7 +656,7 @@ fn import_direct_child_of_finalized_on_empty() { #[test] fn import_chain_on_finalized_incrementally() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -643,7 +685,7 @@ fn import_chain_on_finalized_incrementally() { #[test] fn import_two_subtrees_on_finalized() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -687,7 +729,7 @@ fn import_two_subtrees_on_finalized() { #[test] fn import_two_subtrees_on_nonzero_finalized() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 100; let finalized_hash = Hash::repeat_byte(0); @@ -731,7 +773,7 @@ fn import_two_subtrees_on_nonzero_finalized() { #[test] fn leaves_ordered_by_weight_and_then_number() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -784,7 +826,7 @@ fn leaves_ordered_by_weight_and_then_number() { #[test] fn subtrees_imported_even_with_gaps() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -835,7 +877,7 @@ fn subtrees_imported_even_with_gaps() { #[test] fn reversion_removes_viability_of_chain() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -871,7 +913,7 @@ fn reversion_removes_viability_of_chain() { #[test] fn reversion_removes_viability_and_finds_ancestor_as_leaf() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -905,7 +947,7 @@ fn reversion_removes_viability_and_finds_ancestor_as_leaf() { #[test] fn ancestor_of_unviable_is_not_leaf_if_has_children() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -974,7 +1016,7 @@ fn ancestor_of_unviable_is_not_leaf_if_has_children() { #[test] fn self_and_future_reversions_are_ignored() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1006,7 +1048,7 @@ fn self_and_future_reversions_are_ignored() { #[test] fn revert_finalized_is_ignored() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 10; let finalized_hash = Hash::repeat_byte(0); @@ -1038,7 +1080,7 @@ fn revert_finalized_is_ignored() { #[test] fn reversion_affects_viability_of_all_subtrees() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1096,7 +1138,7 @@ fn reversion_affects_viability_of_all_subtrees() { #[test] fn finalize_viable_prunes_subtrees() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1204,7 +1246,7 @@ fn finalize_viable_prunes_subtrees() { #[test] fn finalization_does_not_clobber_unviability() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1258,7 +1300,7 @@ fn finalization_does_not_clobber_unviability() { #[test] fn finalization_erases_unviable() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1322,7 +1364,7 @@ fn finalization_erases_unviable() { #[test] fn finalize_erases_unviable_but_keeps_later_unviability() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1390,7 +1432,7 @@ fn finalize_erases_unviable_but_keeps_later_unviability() { #[test] fn finalize_erases_unviable_from_one_but_not_all_reverts() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1450,7 +1492,7 @@ fn finalize_erases_unviable_from_one_but_not_all_reverts() { #[test] fn finalize_triggers_viability_search() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1522,7 +1564,7 @@ fn finalize_triggers_viability_search() { #[test] fn best_leaf_none_with_empty_db() { - test_harness(|_backend, mut virtual_overseer| async move { + test_harness(|_backend, _, mut virtual_overseer| async move { let required = Hash::repeat_byte(1); let best_leaf = best_leaf_containing(&mut virtual_overseer, required).await; assert!(best_leaf.is_none()); @@ -1533,7 +1575,7 @@ fn best_leaf_none_with_empty_db() { #[test] fn best_leaf_none_with_no_viable_leaves() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1575,7 +1617,7 @@ fn best_leaf_none_with_no_viable_leaves() { #[test] fn best_leaf_none_with_unknown_required() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1609,7 +1651,7 @@ fn best_leaf_none_with_unknown_required() { #[test] fn best_leaf_none_with_unviable_required() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1661,7 +1703,7 @@ fn best_leaf_none_with_unviable_required() { #[test] fn best_leaf_with_finalized_required() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1705,7 +1747,7 @@ fn best_leaf_with_finalized_required() { #[test] fn best_leaf_with_unfinalized_required() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1751,7 +1793,7 @@ fn best_leaf_with_unfinalized_required() { #[test] fn best_leaf_ancestor_of_all_leaves() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1809,7 +1851,7 @@ fn best_leaf_ancestor_of_all_leaves() { #[test] fn approve_message_approves_block_entry() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1859,7 +1901,7 @@ fn approve_message_approves_block_entry() { #[test] fn approve_nonexistent_has_no_effect() { - test_harness(|backend, mut virtual_overseer| async move { + test_harness(|backend, _, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1907,3 +1949,342 @@ fn approve_nonexistent_has_no_effect() { virtual_overseer }) } + +#[test] +fn block_has_correct_stagnant_at() { + test_harness(|backend, clock, mut virtual_overseer| async move { + let finalized_number = 0; + let finalized_hash = Hash::repeat_byte(0); + + // F <- A1 <- A2 + + let (a1_hash, chain_a) = construct_chain_on_base( + vec![1], + finalized_number, + finalized_hash, + |h| { + salt_header(h, b"a"); + } + ); + + let (a2_hash, chain_a_ext) = construct_chain_on_base( + vec![1], + 1, + a1_hash, + |h| { + salt_header(h, b"a"); + } + ); + + import_chains_into_empty( + &mut virtual_overseer, + &backend, + finalized_number, + finalized_hash, + vec![chain_a.clone()], + ).await; + + clock.inc_by(1); + + import_blocks_into( + &mut virtual_overseer, + &backend, + None, + chain_a_ext.clone(), + ).await; + + backend.assert_stagnant_at_state(vec![ + (STAGNANT_TIMEOUT, vec![a1_hash]), + (STAGNANT_TIMEOUT + 1, vec![a2_hash]), + ]); + + virtual_overseer + }) +} + +#[test] +fn detects_stagnant() { + test_harness(|backend, clock, mut virtual_overseer| async move { + let finalized_number = 0; + let finalized_hash = Hash::repeat_byte(0); + + // F <- A1 + + let (a1_hash, chain_a) = construct_chain_on_base( + vec![1], + finalized_number, + finalized_hash, + |h| { + salt_header(h, b"a"); + } + ); + + import_chains_into_empty( + &mut virtual_overseer, + &backend, + finalized_number, + finalized_hash, + vec![chain_a.clone()], + ).await; + + { + let (_, write_rx) = backend.await_next_write(); + clock.inc_by(STAGNANT_TIMEOUT); + + write_rx.await.unwrap(); + } + + backend.assert_stagnant_at_state(vec![]); + + assert_matches!( + backend.load_block_entry(&a1_hash).unwrap().unwrap().viability.approval, + Approval::Stagnant + ); + + assert_leaves(&backend, vec![]); + + virtual_overseer + }) +} + +#[test] +fn finalize_stagnant_unlocks_subtree() { + test_harness(|backend, clock, mut virtual_overseer| async move { + let finalized_number = 0; + let finalized_hash = Hash::repeat_byte(0); + + // F <- A1 <- A2 + + let (a1_hash, chain_a) = construct_chain_on_base( + vec![1], + finalized_number, + finalized_hash, + |h| { + salt_header(h, b"a"); + } + ); + + let (a2_hash, chain_a_ext) = construct_chain_on_base( + vec![1], + 1, + a1_hash, + |h| { + salt_header(h, b"a"); + } + ); + + import_chains_into_empty( + &mut virtual_overseer, + &backend, + finalized_number, + finalized_hash, + vec![chain_a.clone()], + ).await; + + clock.inc_by(1); + + import_blocks_into( + &mut virtual_overseer, + &backend, + None, + chain_a_ext.clone(), + ).await; + + { + let (_, write_rx) = backend.await_next_write(); + clock.inc_by(STAGNANT_TIMEOUT - 1); + + write_rx.await.unwrap(); + } + + backend.assert_stagnant_at_state(vec![(STAGNANT_TIMEOUT + 1, vec![a2_hash])]); + + assert_matches!( + backend.load_block_entry(&a1_hash).unwrap().unwrap().viability.approval, + Approval::Stagnant + ); + + assert_leaves(&backend, vec![]); + + finalize_block( + &mut virtual_overseer, + &backend, + 1, + a1_hash, + ).await; + + assert_leaves(&backend, vec![a2_hash]); + + virtual_overseer + }) +} + +#[test] +fn approval_undoes_stagnant_unlocking_subtree() { + test_harness(|backend, clock, mut virtual_overseer| async move { + let finalized_number = 0; + let finalized_hash = Hash::repeat_byte(0); + + // F <- A1 <- A2 + + let (a1_hash, chain_a) = construct_chain_on_base( + vec![1], + finalized_number, + finalized_hash, + |h| { + salt_header(h, b"a"); + } + ); + + let (a2_hash, chain_a_ext) = construct_chain_on_base( + vec![1], + 1, + a1_hash, + |h| { + salt_header(h, b"a"); + } + ); + + import_chains_into_empty( + &mut virtual_overseer, + &backend, + finalized_number, + finalized_hash, + vec![chain_a.clone()], + ).await; + + clock.inc_by(1); + + import_blocks_into( + &mut virtual_overseer, + &backend, + None, + chain_a_ext.clone(), + ).await; + + { + let (_, write_rx) = backend.await_next_write(); + clock.inc_by(STAGNANT_TIMEOUT - 1); + + write_rx.await.unwrap(); + } + + backend.assert_stagnant_at_state(vec![(STAGNANT_TIMEOUT + 1, vec![a2_hash])]); + + approve_block( + &mut virtual_overseer, + &backend, + a1_hash, + ).await; + + assert_matches!( + backend.load_block_entry(&a1_hash).unwrap().unwrap().viability.approval, + Approval::Approved + ); + + assert_leaves(&backend, vec![a2_hash]); + + virtual_overseer + }) +} + +#[test] +fn stagnant_preserves_parents_children() { + test_harness(|backend, clock, mut virtual_overseer| async move { + let finalized_number = 0; + let finalized_hash = Hash::repeat_byte(0); + + // F <- A1 <- A2 + // A1 <- B2 + + let (a2_hash, chain_a) = construct_chain_on_base( + vec![1, 2], + finalized_number, + finalized_hash, + |h| { + salt_header(h, b"a"); + } + ); + + let (_, a1_hash, _) = extract_info_from_chain(0, &chain_a); + + let (b2_hash, chain_b) = construct_chain_on_base( + vec![1], + 1, + a1_hash, + |h| { + salt_header(h, b"b"); + } + ); + + import_chains_into_empty( + &mut virtual_overseer, + &backend, + finalized_number, + finalized_hash, + vec![chain_a.clone(), chain_b.clone()], + ).await; + + approve_block(&mut virtual_overseer, &backend, a1_hash).await; + approve_block(&mut virtual_overseer, &backend, b2_hash).await; + + assert_leaves(&backend, vec![a2_hash, b2_hash]); + + { + let (_, write_rx) = backend.await_next_write(); + clock.inc_by(STAGNANT_TIMEOUT); + + write_rx.await.unwrap(); + } + + backend.assert_stagnant_at_state(vec![]); + assert_leaves(&backend, vec![b2_hash]); + + virtual_overseer + }) +} + +#[test] +fn stagnant_makes_childless_parent_leaf() { + test_harness(|backend, clock, mut virtual_overseer| async move { + let finalized_number = 0; + let finalized_hash = Hash::repeat_byte(0); + + // F <- A1 <- A2 + + let (a2_hash, chain_a) = construct_chain_on_base( + vec![1, 2], + finalized_number, + finalized_hash, + |h| { + salt_header(h, b"a"); + } + ); + + let (_, a1_hash, _) = extract_info_from_chain(0, &chain_a); + + import_chains_into_empty( + &mut virtual_overseer, + &backend, + finalized_number, + finalized_hash, + vec![chain_a.clone()], + ).await; + + approve_block(&mut virtual_overseer, &backend, a1_hash).await; + + assert_leaves(&backend, vec![a2_hash]); + + { + let (_, write_rx) = backend.await_next_write(); + clock.inc_by(STAGNANT_TIMEOUT); + + write_rx.await.unwrap(); + } + + backend.assert_stagnant_at_state(vec![]); + assert_leaves(&backend, vec![a1_hash]); + + virtual_overseer + }) +} diff --git a/node/core/chain-selection/src/tree.rs b/node/core/chain-selection/src/tree.rs index a10f0d0c5ad5..ff3db9e9e4a3 100644 --- a/node/core/chain-selection/src/tree.rs +++ b/node/core/chain-selection/src/tree.rs @@ -251,8 +251,9 @@ pub(crate) fn import_block( parent_hash: Hash, reversion_logs: Vec, weight: BlockWeight, + stagnant_at: Timestamp, ) -> Result<(), Error> { - add_block(backend, block_hash, block_number, parent_hash, weight)?; + add_block(backend, block_hash, block_number, parent_hash, weight, stagnant_at)?; apply_reversions( backend, block_hash, @@ -308,6 +309,7 @@ fn add_block( block_number: BlockNumber, parent_hash: Hash, weight: BlockWeight, + stagnant_at: Timestamp, ) -> Result<(), Error> { let mut leaves = backend.load_leaves()?; let parent_entry = backend.load_block_entry(&parent_hash)?; @@ -350,7 +352,6 @@ fn add_block( backend.write_blocks_by_number(block_number, blocks_by_number); // 5. Add stagnation timeout. - let stagnant_at = crate::stagnant_timeout_from_now(); let mut stagnant_at_list = backend.load_stagnant_at(stagnant_at)?; stagnant_at_list.push(block_hash); backend.write_stagnant_at(stagnant_at, stagnant_at_list); @@ -549,8 +550,6 @@ pub(super) fn approve_block( /// /// This accepts a fresh backend and returns an overlay on top of it representing /// all changes made. -// TODO https://github.com/paritytech/polkadot/issues/3293:: remove allow -#[allow(unused)] pub(super) fn detect_stagnant<'a, B: 'a + Backend>( backend: &'a B, up_to: Timestamp, diff --git a/node/service/src/chain_spec.rs b/node/service/src/chain_spec.rs index 2eee6b5f4cea..57e07b2bf0f7 100644 --- a/node/service/src/chain_spec.rs +++ b/node/service/src/chain_spec.rs @@ -975,7 +975,6 @@ fn rococo_staging_testnet_config_genesis(wasm_binary: &[u8]) -> rococo_runtime:: }, paras: rococo_runtime::ParasConfig { paras: vec![], - _phdata: Default::default(), }, hrmp: Default::default(), parachains_configuration: rococo_runtime::ParachainsConfigurationConfig { @@ -989,6 +988,14 @@ fn rococo_staging_testnet_config_genesis(wasm_binary: &[u8]) -> rococo_runtime:: owner: Some(endowed_accounts[0].clone()), ..Default::default() }, + bridge_rococo_messages: rococo_runtime::BridgeRococoMessagesConfig { + owner: Some(endowed_accounts[0].clone()), + ..Default::default() + }, + bridge_wococo_messages: rococo_runtime::BridgeWococoMessagesConfig { + owner: Some(endowed_accounts[0].clone()), + ..Default::default() + }, } } @@ -1516,7 +1523,6 @@ pub fn rococo_testnet_genesis( hrmp: Default::default(), paras: rococo_runtime::ParasConfig { paras: vec![], - _phdata: Default::default(), }, bridge_rococo_grandpa: rococo_runtime::BridgeRococoGrandpaConfig { owner: Some(root_key.clone()), @@ -1526,6 +1532,14 @@ pub fn rococo_testnet_genesis( owner: Some(root_key.clone()), ..Default::default() }, + bridge_rococo_messages: rococo_runtime::BridgeRococoMessagesConfig { + owner: Some(root_key.clone()), + ..Default::default() + }, + bridge_wococo_messages: rococo_runtime::BridgeWococoMessagesConfig { + owner: Some(root_key.clone()), + ..Default::default() + }, } } diff --git a/runtime/common/src/integration_tests.rs b/runtime/common/src/integration_tests.rs index dfca5f5cbc7f..0fb3b7ea1bf4 100644 --- a/runtime/common/src/integration_tests.rs +++ b/runtime/common/src/integration_tests.rs @@ -65,7 +65,7 @@ frame_support::construct_runtime!( // Parachains Runtime Configuration: configuration::{Pallet, Call, Storage, Config}, - Paras: paras::{Pallet, Origin, Call, Storage, Event, Config}, + Paras: paras::{Pallet, Origin, Call, Storage, Event, Config}, // Para Onboarding Pallets Registrar: paras_registrar::{Pallet, Call, Storage, Event}, diff --git a/runtime/common/src/paras_registrar.rs b/runtime/common/src/paras_registrar.rs index 26c3ce20d26b..30a97bf76942 100644 --- a/runtime/common/src/paras_registrar.rs +++ b/runtime/common/src/paras_registrar.rs @@ -572,7 +572,7 @@ mod tests { System: frame_system::{Pallet, Call, Config, Storage, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, ParachainsConfiguration: configuration::{Pallet, Call, Storage, Config}, - Parachains: paras::{Pallet, Origin, Call, Storage, Config, Event}, + Parachains: paras::{Pallet, Origin, Call, Storage, Config, Event}, Registrar: paras_registrar::{Pallet, Call, Storage, Event}, } ); diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index dce47b8f1b79..8361b5b97452 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1488,7 +1488,7 @@ construct_runtime! { ParasInclusion: parachains_inclusion::{Pallet, Call, Storage, Event} = 53, ParasInherent: parachains_paras_inherent::{Pallet, Call, Storage, Inherent} = 54, ParasScheduler: parachains_scheduler::{Pallet, Call, Storage} = 55, - Paras: parachains_paras::{Pallet, Call, Storage, Event, Config} = 56, + Paras: parachains_paras::{Pallet, Call, Storage, Event, Config} = 56, ParasInitializer: parachains_initializer::{Pallet, Call, Storage} = 57, ParasDmp: parachains_dmp::{Pallet, Call, Storage} = 58, ParasUmp: parachains_ump::{Pallet, Call, Storage, Event} = 59, diff --git a/runtime/kusama/src/weights/pallet_balances.rs b/runtime/kusama/src/weights/pallet_balances.rs index c030c3dcafee..747863a737a6 100644 --- a/runtime/kusama/src/weights/pallet_balances.rs +++ b/runtime/kusama/src/weights/pallet_balances.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_balances //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,32 +44,32 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { fn transfer() -> Weight { - (72_443_000 as Weight) + (73_559_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn transfer_keep_alive() -> Weight { - (52_788_000 as Weight) + (54_667_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_balance_creating() -> Weight { - (28_510_000 as Weight) + (29_203_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_balance_killing() -> Weight { - (34_621_000 as Weight) + (35_128_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_transfer() -> Weight { - (70_962_000 as Weight) + (72_833_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn transfer_all() -> Weight { - (66_162_000 as Weight) + (67_554_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_bounties.rs b/runtime/kusama/src/weights/pallet_bounties.rs index c8d37d90a3fd..5ca7c519b871 100644 --- a/runtime/kusama/src/weights/pallet_bounties.rs +++ b/runtime/kusama/src/weights/pallet_bounties.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_bounties //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,49 +44,49 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_bounties::WeightInfo for WeightInfo { fn propose_bounty(d: u32, ) -> Weight { - (42_863_000 as Weight) + (43_276_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn approve_bounty() -> Weight { - (11_260_000 as Weight) + (11_557_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn propose_curator() -> Weight { - (8_487_000 as Weight) + (8_693_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn unassign_curator() -> Weight { - (52_302_000 as Weight) + (53_028_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn accept_curator() -> Weight { - (36_396_000 as Weight) + (36_603_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn award_bounty() -> Weight { - (24_492_000 as Weight) + (24_706_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn claim_bounty() -> Weight { - (124_315_000 as Weight) + (126_167_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } fn close_bounty_proposed() -> Weight { - (51_443_000 as Weight) + (51_788_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn close_bounty_active() -> Weight { - (82_325_000 as Weight) + (83_343_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -97,8 +97,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { } fn spend_funds(b: u32, ) -> Weight { (0 as Weight) - // Standard Error: 12_000 - .saturating_add((59_403_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 14_000 + .saturating_add((60_142_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(b as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) diff --git a/runtime/kusama/src/weights/pallet_collective.rs b/runtime/kusama/src/weights/pallet_collective.rs index aeac3eaea6d5..8fc3e1c564ea 100644 --- a/runtime/kusama/src/weights/pallet_collective.rs +++ b/runtime/kusama/src/weights/pallet_collective.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_collective //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -46,94 +46,94 @@ impl pallet_collective::WeightInfo for WeightInfo { fn set_members(m: u32, n: u32, p: u32, ) -> Weight { (0 as Weight) // Standard Error: 4_000 - .saturating_add((14_300_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((14_115_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 4_000 - .saturating_add((95_000 as Weight).saturating_mul(n as Weight)) + .saturating_add((60_000 as Weight).saturating_mul(n as Weight)) // Standard Error: 4_000 - .saturating_add((19_625_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((19_459_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(p as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) } fn execute(b: u32, m: u32, ) -> Weight { - (23_351_000 as Weight) + (23_670_000 as Weight) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((87_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((83_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } fn propose_execute(b: u32, m: u32, ) -> Weight { - (28_075_000 as Weight) + (28_523_000 as Weight) // Standard Error: 0 .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((175_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((163_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) } fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (43_983_000 as Weight) + (44_252_000 as Weight) // Standard Error: 0 .saturating_add((4_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((94_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((91_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((365_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((399_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)) } fn vote(m: u32, ) -> Weight { - (32_626_000 as Weight) + (32_883_000 as Weight) // Standard Error: 0 - .saturating_add((206_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((214_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (42_402_000 as Weight) + (42_090_000 as Weight) // Standard Error: 0 - .saturating_add((174_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((166_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((339_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((374_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)) } fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (62_616_000 as Weight) + (62_491_000 as Weight) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((175_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((169_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((343_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((380_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)) } fn close_disapproved(m: u32, p: u32, ) -> Weight { - (46_908_000 as Weight) + (46_976_000 as Weight) // Standard Error: 0 - .saturating_add((177_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((168_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((341_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((374_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)) } fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (66_697_000 as Weight) + (66_976_000 as Weight) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((176_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((169_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((345_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((378_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)) } fn disapprove_proposal(p: u32, ) -> Weight { - (25_921_000 as Weight) + (26_129_000 as Weight) // Standard Error: 0 - .saturating_add((346_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((379_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_democracy.rs b/runtime/kusama/src/weights/pallet_democracy.rs index 56373855862e..36bff259cb60 100644 --- a/runtime/kusama/src/weights/pallet_democracy.rs +++ b/runtime/kusama/src/weights/pallet_democracy.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_democracy //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,163 +44,163 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_democracy::WeightInfo for WeightInfo { fn propose() -> Weight { - (57_057_000 as Weight) + (58_488_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn second(s: u32, ) -> Weight { - (38_340_000 as Weight) + (39_011_000 as Weight) // Standard Error: 0 - .saturating_add((139_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((157_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)) } fn vote_new(r: u32, ) -> Weight { - (43_376_000 as Weight) + (43_998_000 as Weight) // Standard Error: 0 - .saturating_add((182_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((211_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn vote_existing(r: u32, ) -> Weight { - (43_661_000 as Weight) + (44_219_000 as Weight) // Standard Error: 0 - .saturating_add((173_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((206_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn emergency_cancel() -> Weight { - (28_302_000 as Weight) + (28_974_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn blacklist(p: u32, ) -> Weight { - (76_895_000 as Weight) + (77_299_000 as Weight) // Standard Error: 4_000 - .saturating_add((467_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((541_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } fn external_propose(v: u32, ) -> Weight { - (13_005_000 as Weight) + (13_334_000 as Weight) // Standard Error: 0 - .saturating_add((84_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((80_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn external_propose_majority() -> Weight { - (2_734_000 as Weight) + (2_650_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn external_propose_default() -> Weight { - (2_716_000 as Weight) + (2_667_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn fast_track() -> Weight { - (27_335_000 as Weight) + (27_908_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn veto_external(v: u32, ) -> Weight { - (27_918_000 as Weight) + (28_446_000 as Weight) // Standard Error: 0 - .saturating_add((119_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((134_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn cancel_proposal(p: u32, ) -> Weight { - (50_828_000 as Weight) + (51_004_000 as Weight) // Standard Error: 0 - .saturating_add((440_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((512_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)) } fn cancel_referendum() -> Weight { - (17_244_000 as Weight) + (17_377_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn cancel_queued(r: u32, ) -> Weight { - (33_078_000 as Weight) + (33_882_000 as Weight) // Standard Error: 15_000 - .saturating_add((4_660_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((6_070_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn on_initialize_base(r: u32, ) -> Weight { - (7_135_000 as Weight) + (7_295_000 as Weight) // Standard Error: 4_000 - .saturating_add((5_086_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((5_093_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) } fn delegate(r: u32, ) -> Weight { - (53_113_000 as Weight) + (54_128_000 as Weight) // Standard Error: 5_000 - .saturating_add((7_074_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((7_209_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) } fn undelegate(r: u32, ) -> Weight { - (23_010_000 as Weight) - // Standard Error: 5_000 - .saturating_add((7_048_000 as Weight).saturating_mul(r as Weight)) + (23_613_000 as Weight) + // Standard Error: 4_000 + .saturating_add((7_196_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) } fn clear_public_proposals() -> Weight { - (2_640_000 as Weight) + (2_607_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn note_preimage(b: u32, ) -> Weight { - (41_512_000 as Weight) + (42_847_000 as Weight) // Standard Error: 0 .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn note_imminent_preimage(b: u32, ) -> Weight { - (26_759_000 as Weight) + (27_699_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn reap_preimage(b: u32, ) -> Weight { - (37_154_000 as Weight) + (38_171_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn unlock_remove(r: u32, ) -> Weight { - (37_083_000 as Weight) + (37_418_000 as Weight) // Standard Error: 0 - .saturating_add((49_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((55_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn unlock_set(r: u32, ) -> Weight { - (34_821_000 as Weight) + (35_077_000 as Weight) // Standard Error: 0 - .saturating_add((159_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((197_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn remove_vote(r: u32, ) -> Weight { - (19_491_000 as Weight) + (19_476_000 as Weight) // Standard Error: 0 - .saturating_add((148_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((183_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn remove_other_vote(r: u32, ) -> Weight { - (19_498_000 as Weight) + (19_518_000 as Weight) // Standard Error: 0 - .saturating_add((148_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((186_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_gilt.rs b/runtime/kusama/src/weights/pallet_gilt.rs index 969957f64f20..41bbd987e622 100644 --- a/runtime/kusama/src/weights/pallet_gilt.rs +++ b/runtime/kusama/src/weights/pallet_gilt.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_gilt //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,50 +44,50 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_gilt::WeightInfo for WeightInfo { fn place_bid(l: u32, ) -> Weight { - (51_257_000 as Weight) + (57_179_000 as Weight) // Standard Error: 0 - .saturating_add((171_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((195_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)) } fn place_bid_max() -> Weight { - (196_161_000 as Weight) + (226_003_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn retract_bid(l: u32, ) -> Weight { - (51_317_000 as Weight) + (57_082_000 as Weight) // Standard Error: 0 - .saturating_add((144_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((166_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)) } fn set_target() -> Weight { - (5_785_000 as Weight) + (5_948_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn thaw() -> Weight { - (68_092_000 as Weight) + (70_070_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn pursue_target_noop() -> Weight { - (3_242_000 as Weight) + (3_347_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } fn pursue_target_per_item(b: u32, ) -> Weight { - (52_205_000 as Weight) + (56_853_000 as Weight) // Standard Error: 1_000 - .saturating_add((9_944_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((10_238_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(b as Weight))) } fn pursue_target_per_queue(q: u32, ) -> Weight { - (16_887_000 as Weight) - // Standard Error: 6_000 - .saturating_add((16_321_000 as Weight).saturating_mul(q as Weight)) + (23_272_000 as Weight) + // Standard Error: 5_000 + .saturating_add((16_821_000 as Weight).saturating_mul(q as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(q as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) diff --git a/runtime/kusama/src/weights/pallet_identity.rs b/runtime/kusama/src/weights/pallet_identity.rs index 8d93e14be4c7..bef743c77a4f 100644 --- a/runtime/kusama/src/weights/pallet_identity.rs +++ b/runtime/kusama/src/weights/pallet_identity.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_identity //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,135 +44,135 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_identity::WeightInfo for WeightInfo { fn add_registrar(r: u32, ) -> Weight { - (21_467_000 as Weight) + (21_339_000 as Weight) // Standard Error: 2_000 - .saturating_add((200_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((236_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_identity(r: u32, x: u32, ) -> Weight { - (52_103_000 as Weight) - // Standard Error: 15_000 - .saturating_add((201_000 as Weight).saturating_mul(r as Weight)) + (50_839_000 as Weight) + // Standard Error: 14_000 + .saturating_add((223_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 1_000 - .saturating_add((932_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((954_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_subs_new(s: u32, ) -> Weight { - (40_048_000 as Weight) + (40_807_000 as Weight) // Standard Error: 1_000 - .saturating_add((6_295_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((6_374_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn set_subs_old(p: u32, ) -> Weight { - (40_539_000 as Weight) + (40_924_000 as Weight) // Standard Error: 0 - .saturating_add((1_996_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((2_059_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(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) } fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - (49_774_000 as Weight) - // Standard Error: 5_000 - .saturating_add((139_000 as Weight).saturating_mul(r as Weight)) + (51_123_000 as Weight) + // Standard Error: 7_000 + .saturating_add((110_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((1_985_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_042_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 - .saturating_add((602_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((595_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn request_judgement(r: u32, x: u32, ) -> Weight { - (53_847_000 as Weight) - // Standard Error: 4_000 - .saturating_add((235_000 as Weight).saturating_mul(r as Weight)) + (53_230_000 as Weight) + // Standard Error: 5_000 + .saturating_add((223_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((1_156_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((1_169_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn cancel_request(r: u32, x: u32, ) -> Weight { - (49_428_000 as Weight) + (48_425_000 as Weight) // Standard Error: 6_000 - .saturating_add((147_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((161_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((1_142_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((1_161_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_fee(r: u32, ) -> Weight { - (7_739_000 as Weight) - // Standard Error: 1_000 - .saturating_add((168_000 as Weight).saturating_mul(r as Weight)) + (8_028_000 as Weight) + // Standard Error: 0 + .saturating_add((202_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_account_id(r: u32, ) -> Weight { - (8_326_000 as Weight) - // Standard Error: 0 - .saturating_add((175_000 as Weight).saturating_mul(r as Weight)) + (8_682_000 as Weight) + // Standard Error: 1_000 + .saturating_add((203_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_fields(r: u32, ) -> Weight { - (7_725_000 as Weight) - // Standard Error: 1_000 - .saturating_add((170_000 as Weight).saturating_mul(r as Weight)) + (8_010_000 as Weight) + // Standard Error: 0 + .saturating_add((203_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn provide_judgement(r: u32, x: u32, ) -> Weight { - (35_272_000 as Weight) - // Standard Error: 4_000 - .saturating_add((188_000 as Weight).saturating_mul(r as Weight)) + (34_291_000 as Weight) + // Standard Error: 5_000 + .saturating_add((203_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((1_147_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((1_164_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { - (63_036_000 as Weight) - // Standard Error: 5_000 - .saturating_add((88_000 as Weight).saturating_mul(r as Weight)) + (62_644_000 as Weight) + // Standard Error: 6_000 + .saturating_add((111_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((1_987_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_048_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 - .saturating_add((10_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((3_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn add_sub(s: u32, ) -> Weight { - (53_817_000 as Weight) + (54_234_000 as Weight) // Standard Error: 0 - .saturating_add((145_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((154_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn rename_sub(s: u32, ) -> Weight { - (16_130_000 as Weight) + (16_622_000 as Weight) // Standard Error: 0 .saturating_add((21_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)) } fn remove_sub(s: u32, ) -> Weight { - (54_744_000 as Weight) + (55_325_000 as Weight) // Standard Error: 0 - .saturating_add((127_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((138_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn quit_sub(s: u32, ) -> Weight { - (33_675_000 as Weight) + (34_002_000 as Weight) // Standard Error: 0 - .saturating_add((123_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((138_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)) } diff --git a/runtime/kusama/src/weights/pallet_im_online.rs b/runtime/kusama/src/weights/pallet_im_online.rs index f226108c7287..481009d3d756 100644 --- a/runtime/kusama/src/weights/pallet_im_online.rs +++ b/runtime/kusama/src/weights/pallet_im_online.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_im_online //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,11 +44,11 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_im_online::WeightInfo for WeightInfo { fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { - (87_465_000 as Weight) + (86_872_000 as Weight) // Standard Error: 0 - .saturating_add((169_000 as Weight).saturating_mul(k as Weight)) + .saturating_add((158_000 as Weight).saturating_mul(k as Weight)) // Standard Error: 1_000 - .saturating_add((335_000 as Weight).saturating_mul(e as Weight)) + .saturating_add((347_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_indices.rs b/runtime/kusama/src/weights/pallet_indices.rs index d37264f7facd..213620648940 100644 --- a/runtime/kusama/src/weights/pallet_indices.rs +++ b/runtime/kusama/src/weights/pallet_indices.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_indices //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,27 +44,27 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_indices::WeightInfo for WeightInfo { fn claim() -> Weight { - (39_903_000 as Weight) + (40_340_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn transfer() -> Weight { - (48_162_000 as Weight) + (48_814_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn free() -> Weight { - (39_958_000 as Weight) + (40_153_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_transfer() -> Weight { - (40_459_000 as Weight) + (40_676_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn freeze() -> Weight { - (37_761_000 as Weight) + (37_742_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_membership.rs b/runtime/kusama/src/weights/pallet_membership.rs index 7878243a203b..29cad36612f6 100644 --- a/runtime/kusama/src/weights/pallet_membership.rs +++ b/runtime/kusama/src/weights/pallet_membership.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_membership //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,51 +44,49 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_membership::WeightInfo for WeightInfo { fn add_member(m: u32, ) -> Weight { - (23_510_000 as Weight) - // Standard Error: 1_000 - .saturating_add((126_000 as Weight).saturating_mul(m as Weight)) + (23_736_000 as Weight) + // Standard Error: 3_000 + .saturating_add((166_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn remove_member(m: u32, ) -> Weight { - (28_576_000 as Weight) + (28_609_000 as Weight) // Standard Error: 0 - .saturating_add((102_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((137_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn swap_member(m: u32, ) -> Weight { - (28_826_000 as Weight) + (28_935_000 as Weight) // Standard Error: 0 - .saturating_add((117_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((150_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn reset_member(m: u32, ) -> Weight { - (29_556_000 as Weight) + (29_621_000 as Weight) // Standard Error: 0 - .saturating_add((271_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((304_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn change_key(m: u32, ) -> Weight { - (30_300_000 as Weight) + (30_393_000 as Weight) // Standard Error: 0 - .saturating_add((113_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((145_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn set_prime(m: u32, ) -> Weight { - (7_436_000 as Weight) + (7_534_000 as Weight) // Standard Error: 0 - .saturating_add((84_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((79_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - fn clear_prime(m: u32, ) -> Weight { - (2_947_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(m as Weight)) + fn clear_prime(_m: u32, ) -> Weight { + (2_755_000 as Weight) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/kusama/src/weights/pallet_multisig.rs b/runtime/kusama/src/weights/pallet_multisig.rs index 2d05d2d877dd..c2ac465aaada 100644 --- a/runtime/kusama/src/weights/pallet_multisig.rs +++ b/runtime/kusama/src/weights/pallet_multisig.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_multisig //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,78 +44,78 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { fn as_multi_threshold_1(_z: u32, ) -> Weight { - (10_273_000 as Weight) + (12_153_000 as Weight) } fn as_multi_create(s: u32, z: u32, ) -> Weight { - (50_795_000 as Weight) + (50_455_000 as Weight) // Standard Error: 0 - .saturating_add((85_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((103_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (56_223_000 as Weight) + (56_117_000 as Weight) // Standard Error: 0 - .saturating_add((91_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((106_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (29_190_000 as Weight) + (29_486_000 as Weight) // Standard Error: 0 - .saturating_add((86_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((103_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (53_138_000 as Weight) + (53_516_000 as Weight) // Standard Error: 0 - .saturating_add((98_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((118_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (73_267_000 as Weight) - // Standard Error: 2_000 - .saturating_add((195_000 as Weight).saturating_mul(s as Weight)) + (70_795_000 as Weight) // Standard Error: 0 - .saturating_add((4_000 as Weight).saturating_mul(z as Weight)) + .saturating_add((205_000 as Weight).saturating_mul(s as Weight)) + // 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)) } fn approve_as_multi_create(s: u32, ) -> Weight { - (50_201_000 as Weight) + (50_128_000 as Weight) // Standard Error: 0 - .saturating_add((83_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((104_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)) } fn approve_as_multi_approve(s: u32, ) -> Weight { - (28_525_000 as Weight) + (28_902_000 as Weight) // Standard Error: 0 - .saturating_add((88_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((105_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)) } fn approve_as_multi_complete(s: u32, ) -> Weight { - (120_751_000 as Weight) + (112_716_000 as Weight) // Standard Error: 0 - .saturating_add((196_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((210_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)) } fn cancel_as_multi(s: u32, ) -> Weight { - (86_776_000 as Weight) + (84_205_000 as Weight) // Standard Error: 0 - .saturating_add((86_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((101_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)) } diff --git a/runtime/kusama/src/weights/pallet_proxy.rs b/runtime/kusama/src/weights/pallet_proxy.rs index 195a8613a601..8b0b2801beda 100644 --- a/runtime/kusama/src/weights/pallet_proxy.rs +++ b/runtime/kusama/src/weights/pallet_proxy.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_proxy //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,75 +44,75 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_proxy::WeightInfo for WeightInfo { fn proxy(p: u32, ) -> Weight { - (24_270_000 as Weight) - // Standard Error: 1_000 - .saturating_add((130_000 as Weight).saturating_mul(p as Weight)) + (24_892_000 as Weight) + // Standard Error: 0 + .saturating_add((122_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } fn proxy_announced(a: u32, p: u32, ) -> Weight { - (54_046_000 as Weight) + (55_405_000 as Weight) // Standard Error: 1_000 - .saturating_add((503_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((563_000 as Weight).saturating_mul(a as Weight)) // Standard Error: 1_000 - .saturating_add((107_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((106_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)) } fn remove_announcement(a: u32, _p: u32, ) -> Weight { - (36_894_000 as Weight) + (37_762_000 as Weight) // Standard Error: 1_000 - .saturating_add((489_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((554_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn reject_announcement(a: u32, _p: u32, ) -> Weight { - (36_533_000 as Weight) + (37_826_000 as Weight) // Standard Error: 1_000 - .saturating_add((497_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((554_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn announce(a: u32, p: u32, ) -> Weight { - (49_934_000 as Weight) + (51_131_000 as Weight) // Standard Error: 1_000 - .saturating_add((495_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((562_000 as Weight).saturating_mul(a as Weight)) // Standard Error: 1_000 - .saturating_add((111_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((109_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)) } fn add_proxy(p: u32, ) -> Weight { - (34_641_000 as Weight) + (36_114_000 as Weight) // Standard Error: 1_000 - .saturating_add((190_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((223_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)) } fn remove_proxy(p: u32, ) -> Weight { - (34_496_000 as Weight) + (35_456_000 as Weight) // Standard Error: 2_000 - .saturating_add((213_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((246_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)) } fn remove_proxies(p: u32, ) -> Weight { - (33_022_000 as Weight) + (33_748_000 as Weight) // Standard Error: 1_000 - .saturating_add((139_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((136_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)) } fn anonymous(p: u32, ) -> Weight { - (47_629_000 as Weight) + (48_409_000 as Weight) // Standard Error: 1_000 - .saturating_add((33_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((31_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)) } fn kill_anonymous(p: u32, ) -> Weight { - (34_875_000 as Weight) + (35_515_000 as Weight) // Standard Error: 1_000 - .saturating_add((135_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((134_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)) } diff --git a/runtime/kusama/src/weights/pallet_scheduler.rs b/runtime/kusama/src/weights/pallet_scheduler.rs index 4b00baa217fd..a89f745c7a1e 100644 --- a/runtime/kusama/src/weights/pallet_scheduler.rs +++ b/runtime/kusama/src/weights/pallet_scheduler.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_scheduler //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,30 +44,30 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { fn schedule(s: u32, ) -> Weight { - (28_189_000 as Weight) + (28_202_000 as Weight) // Standard Error: 0 .saturating_add((42_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)) } fn cancel(s: u32, ) -> Weight { - (27_165_000 as Weight) + (27_640_000 as Weight) // Standard Error: 14_000 - .saturating_add((4_332_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((5_699_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn schedule_named(s: u32, ) -> Weight { - (33_852_000 as Weight) + (34_298_000 as Weight) // Standard Error: 1_000 - .saturating_add((62_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((56_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)) } fn cancel_named(s: u32, ) -> Weight { - (29_352_000 as Weight) - // Standard Error: 14_000 - .saturating_add((4_346_000 as Weight).saturating_mul(s as Weight)) + (29_004_000 as Weight) + // Standard Error: 15_000 + .saturating_add((5_720_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)) } diff --git a/runtime/kusama/src/weights/pallet_session.rs b/runtime/kusama/src/weights/pallet_session.rs index 92bbfe9443ad..4c9a9fe8e5b0 100644 --- a/runtime/kusama/src/weights/pallet_session.rs +++ b/runtime/kusama/src/weights/pallet_session.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_session //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,12 +44,12 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_session::WeightInfo for WeightInfo { fn set_keys() -> Weight { - (70_343_000 as Weight) + (72_025_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } fn purge_keys() -> Weight { - (40_249_000 as Weight) + (39_838_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_staking.rs b/runtime/kusama/src/weights/pallet_staking.rs index a078fe8fc8c0..c517d84c6ed4 100644 --- a/runtime/kusama/src/weights/pallet_staking.rs +++ b/runtime/kusama/src/weights/pallet_staking.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,154 +44,154 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_staking::WeightInfo for WeightInfo { fn bond() -> Weight { - (68_483_000 as Weight) + (70_648_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn bond_extra() -> Weight { - (52_724_000 as Weight) + (54_235_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn unbond() -> Weight { - (56_614_000 as Weight) + (57_950_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn withdraw_unbonded_update(s: u32, ) -> Weight { - (48_650_000 as Weight) + (49_532_000 as Weight) // Standard Error: 0 - .saturating_add((28_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((29_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn withdraw_unbonded_kill(s: u32, ) -> Weight { - (79_902_000 as Weight) + (81_722_000 as Weight) // Standard Error: 1_000 - .saturating_add((2_200_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_331_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn validate() -> Weight { - (29_119_000 as Weight) + (31_838_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn kick(k: u32, ) -> Weight { - (10_981_000 as Weight) + (10_120_000 as Weight) // Standard Error: 6_000 - .saturating_add((17_518_000 as Weight).saturating_mul(k as Weight)) + .saturating_add((18_142_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight))) } fn nominate(n: u32, ) -> Weight { - (35_585_000 as Weight) + (37_716_000 as Weight) // Standard Error: 6_000 - .saturating_add((5_106_000 as Weight).saturating_mul(n as Weight)) + .saturating_add((5_240_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn chill() -> Weight { - (16_193_000 as Weight) + (16_594_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) } fn set_payee() -> Weight { - (10_861_000 as Weight) + (11_260_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_controller() -> Weight { - (23_628_000 as Weight) + (24_156_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_validator_count() -> Weight { - (2_081_000 as Weight) + (2_123_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_no_eras() -> Weight { - (2_358_000 as Weight) + (2_458_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_new_era() -> Weight { - (2_338_000 as Weight) + (2_428_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_new_era_always() -> Weight { - (2_312_000 as Weight) + (2_435_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_invulnerables(v: u32, ) -> Weight { - (2_285_000 as Weight) + (2_524_000 as Weight) // Standard Error: 0 - .saturating_add((5_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((23_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_unstake(s: u32, ) -> Weight { - (55_848_000 as Weight) + (57_861_000 as Weight) // Standard Error: 1_000 - .saturating_add((2_197_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_315_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn cancel_deferred_slash(s: u32, ) -> Weight { - (3_386_960_000 as Weight) + (3_460_645_000 as Weight) // Standard Error: 221_000 - .saturating_add((19_794_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((19_673_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)) } fn payout_stakers_dead_controller(n: u32, ) -> Weight { - (109_960_000 as Weight) - // Standard Error: 16_000 - .saturating_add((47_064_000 as Weight).saturating_mul(n as Weight)) + (108_055_000 as Weight) + // Standard Error: 15_000 + .saturating_add((47_913_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(n as Weight))) } fn payout_stakers_alive_staked(n: u32, ) -> Weight { - (145_438_000 as Weight) - // Standard Error: 24_000 - .saturating_add((59_384_000 as Weight).saturating_mul(n as Weight)) + (122_624_000 as Weight) + // Standard Error: 22_000 + .saturating_add((60_815_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(11 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight))) } fn rebond(l: u32, ) -> Weight { - (45_646_000 as Weight) + (46_725_000 as Weight) // Standard Error: 1_000 - .saturating_add((72_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((62_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_history_depth(e: u32, ) -> Weight { (0 as Weight) - // Standard Error: 70_000 - .saturating_add((32_189_000 as Weight).saturating_mul(e as Weight)) + // Standard Error: 68_000 + .saturating_add((32_190_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight))) } fn reap_stash(s: u32, ) -> Weight { - (66_554_000 as Weight) + (68_887_000 as Weight) // Standard Error: 0 - .saturating_add((2_198_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_318_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn new_era(v: u32, n: u32, ) -> Weight { (0 as Weight) - // Standard Error: 749_000 - .saturating_add((299_115_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 37_000 - .saturating_add((46_619_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 734_000 + .saturating_add((296_342_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 36_000 + .saturating_add((46_481_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) @@ -200,12 +200,12 @@ impl pallet_staking::WeightInfo for WeightInfo { } fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight { (0 as Weight) - // Standard Error: 97_000 - .saturating_add((24_261_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 97_000 - .saturating_add((27_765_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 3_310_000 - .saturating_add((22_891_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 92_000 + .saturating_add((24_187_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 92_000 + .saturating_add((27_771_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 3_152_000 + .saturating_add((40_493_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) @@ -213,18 +213,18 @@ impl pallet_staking::WeightInfo for WeightInfo { } fn get_npos_targets(v: u32, ) -> Weight { (0 as Weight) - // Standard Error: 31_000 - .saturating_add((10_297_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 27_000 + .saturating_add((10_233_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight))) } fn set_staking_limits() -> Weight { - (4_799_000 as Weight) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + (5_708_000 as Weight) + .saturating_add(T::DbWeight::get().writes(5 as Weight)) } fn chill_other() -> Weight { - (31_294_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) + (39_559_000 as Weight) + .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/kusama/src/weights/pallet_timestamp.rs b/runtime/kusama/src/weights/pallet_timestamp.rs index 094e394eb420..cb9098577a61 100644 --- a/runtime/kusama/src/weights/pallet_timestamp.rs +++ b/runtime/kusama/src/weights/pallet_timestamp.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,11 +44,11 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { fn set() -> Weight { - (10_330_000 as Weight) + (9_872_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn on_finalize() -> Weight { - (4_458_000 as Weight) + (4_405_000 as Weight) } } diff --git a/runtime/kusama/src/weights/pallet_tips.rs b/runtime/kusama/src/weights/pallet_tips.rs index 370c01ef395d..bf358e3b80ef 100644 --- a/runtime/kusama/src/weights/pallet_tips.rs +++ b/runtime/kusama/src/weights/pallet_tips.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_tips //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,42 +44,42 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_tips::WeightInfo for WeightInfo { fn report_awesome(r: u32, ) -> Weight { - (50_649_000 as Weight) + (49_516_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn retract_tip() -> Weight { - (45_588_000 as Weight) + (45_151_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn tip_new(r: u32, t: u32, ) -> Weight { - (29_606_000 as Weight) + (30_538_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((124_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((116_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn tip(t: u32, ) -> Weight { - (18_751_000 as Weight) + (18_895_000 as Weight) // Standard Error: 0 - .saturating_add((567_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((558_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn close_tip(t: u32, ) -> Weight { - (81_517_000 as Weight) + (82_263_000 as Weight) // Standard Error: 0 - .saturating_add((318_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((290_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn slash_tip(t: u32, ) -> Weight { - (24_467_000 as Weight) + (24_307_000 as Weight) // Standard Error: 0 .saturating_add((7_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) diff --git a/runtime/kusama/src/weights/pallet_treasury.rs b/runtime/kusama/src/weights/pallet_treasury.rs index 24c2c1c36a0e..80e169edc7db 100644 --- a/runtime/kusama/src/weights/pallet_treasury.rs +++ b/runtime/kusama/src/weights/pallet_treasury.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_treasury //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,26 +44,26 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_treasury::WeightInfo for WeightInfo { fn propose_spend() -> Weight { - (40_599_000 as Weight) + (41_175_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn reject_proposal() -> Weight { - (49_321_000 as Weight) + (50_148_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn approve_proposal(p: u32, ) -> Weight { - (12_230_000 as Weight) + (12_321_000 as Weight) // Standard Error: 0 .saturating_add((34_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)) } fn on_initialize_proposals(p: u32, ) -> Weight { - (75_382_000 as Weight) - // Standard Error: 16_000 - .saturating_add((59_314_000 as Weight).saturating_mul(p as Weight)) + (76_361_000 as Weight) + // Standard Error: 17_000 + .saturating_add((60_132_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) diff --git a/runtime/kusama/src/weights/pallet_utility.rs b/runtime/kusama/src/weights/pallet_utility.rs index 02dda1721835..66f9857c00ec 100644 --- a/runtime/kusama/src/weights/pallet_utility.rs +++ b/runtime/kusama/src/weights/pallet_utility.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_utility //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,16 +44,16 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { fn batch(c: u32, ) -> Weight { - (14_911_000 as Weight) + (15_334_000 as Weight) // Standard Error: 0 - .saturating_add((2_456_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((2_478_000 as Weight).saturating_mul(c as Weight)) } fn as_derivative() -> Weight { - (5_087_000 as Weight) + (5_220_000 as Weight) } fn batch_all(c: u32, ) -> Weight { - (16_211_000 as Weight) + (16_791_000 as Weight) // Standard Error: 0 - .saturating_add((3_296_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((3_292_000 as Weight).saturating_mul(c as Weight)) } } diff --git a/runtime/kusama/src/weights/pallet_vesting.rs b/runtime/kusama/src/weights/pallet_vesting.rs index b675ae93fc52..a6469b2917be 100644 --- a/runtime/kusama/src/weights/pallet_vesting.rs +++ b/runtime/kusama/src/weights/pallet_vesting.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_vesting //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: diff --git a/runtime/kusama/src/weights/runtime_common_auctions.rs b/runtime/kusama/src/weights/runtime_common_auctions.rs index f33b909ae1d2..f3fd08ec3ae5 100644 --- a/runtime/kusama/src/weights/runtime_common_auctions.rs +++ b/runtime/kusama/src/weights/runtime_common_auctions.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::auctions //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-24, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -31,7 +31,7 @@ // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt -// --output=./runtime/kusama/src/weights/runtime_common_auctions.rs +// --output=./runtime/kusama/src/weights/ #![allow(unused_parens)] @@ -44,22 +44,22 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::auctions::WeightInfo for WeightInfo { fn new_auction() -> Weight { - (29_554_000 as Weight) + (24_436_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn bid() -> Weight { - (154_464_000 as Weight) + (137_499_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn on_initialize() -> Weight { - (33_239_172_000 as Weight) + (23_555_687_000 as Weight) .saturating_add(T::DbWeight::get().reads(3688 as Weight)) .saturating_add(T::DbWeight::get().writes(3683 as Weight)) } fn cancel_auction() -> Weight { - (7_021_314_000 as Weight) + (5_007_594_000 as Weight) .saturating_add(T::DbWeight::get().reads(73 as Weight)) .saturating_add(T::DbWeight::get().writes(3673 as Weight)) } diff --git a/runtime/kusama/src/weights/runtime_common_claims.rs b/runtime/kusama/src/weights/runtime_common_claims.rs index 0277b96f3f9e..94a4bd36f9e0 100644 --- a/runtime/kusama/src/weights/runtime_common_claims.rs +++ b/runtime/kusama/src/weights/runtime_common_claims.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::claims //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,27 +44,27 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::claims::WeightInfo for WeightInfo { fn claim() -> Weight { - (443_398_000 as Weight) + (438_457_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } fn mint_claim() -> Weight { - (12_397_000 as Weight) + (13_035_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn claim_attest() -> Weight { - (444_202_000 as Weight) + (439_894_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } fn attest() -> Weight { - (130_109_000 as Weight) + (132_760_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } fn move_claim() -> Weight { - (27_762_000 as Weight) + (28_459_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } diff --git a/runtime/kusama/src/weights/runtime_common_crowdloan.rs b/runtime/kusama/src/weights/runtime_common_crowdloan.rs index 0f4382bb1a16..d269b826db36 100644 --- a/runtime/kusama/src/weights/runtime_common_crowdloan.rs +++ b/runtime/kusama/src/weights/runtime_common_crowdloan.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::crowdloan //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-24, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -31,7 +31,7 @@ // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt -// --output=./runtime/kusama/src/weights/runtime_common_crowdloan.rs +// --output=./runtime/kusama/src/weights/ #![allow(unused_parens)] @@ -44,53 +44,53 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::crowdloan::WeightInfo for WeightInfo { fn create() -> Weight { - (93_538_000 as Weight) + (83_561_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn contribute() -> Weight { - (581_495_000 as Weight) + (306_719_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn withdraw() -> Weight { - (127_588_000 as Weight) + (110_824_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn refund(k: u32, ) -> Weight { (0 as Weight) - // Standard Error: 52_000 - .saturating_add((56_719_000 as Weight).saturating_mul(k as Weight)) + // Standard Error: 21_000 + .saturating_add((45_890_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(k as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(k as Weight))) } fn dissolve() -> Weight { - (68_758_000 as Weight) + (62_162_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn edit() -> Weight { - (42_049_000 as Weight) + (37_555_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn add_memo() -> Weight { - (65_306_000 as Weight) + (55_817_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn poke() -> Weight { - (51_610_000 as Weight) + (43_448_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn on_initialize(n: u32, ) -> Weight { (0 as Weight) - // Standard Error: 32_000 - .saturating_add((131_978_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 19_000 + .saturating_add((110_004_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) diff --git a/runtime/kusama/src/weights/runtime_common_paras_registrar.rs b/runtime/kusama/src/weights/runtime_common_paras_registrar.rs index a10b1215f48f..666e1edffffe 100644 --- a/runtime/kusama/src/weights/runtime_common_paras_registrar.rs +++ b/runtime/kusama/src/weights/runtime_common_paras_registrar.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::paras_registrar //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-21, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -31,7 +31,7 @@ // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt -// --output=./runtime/kusama/src/weights/runtime_common_paras_registrar.rs +// --output=./runtime/kusama/src/weights/ #![allow(unused_parens)] @@ -44,27 +44,27 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::paras_registrar::WeightInfo for WeightInfo { fn reserve() -> Weight { - (59_279_000 as Weight) + (48_931_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn register() -> Weight { - (4_148_907_000 as Weight) + (4_193_117_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn force_register() -> Weight { - (4_144_844_000 as Weight) + (4_174_902_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn deregister() -> Weight { - (90_495_000 as Weight) + (81_324_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn swap() -> Weight { - (80_604_000 as Weight) + (69_717_000 as Weight) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) } diff --git a/runtime/kusama/src/weights/runtime_common_slots.rs b/runtime/kusama/src/weights/runtime_common_slots.rs index 0762ded1a116..b1867c175c8c 100644 --- a/runtime/kusama/src/weights/runtime_common_slots.rs +++ b/runtime/kusama/src/weights/runtime_common_slots.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::slots //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-25, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -31,7 +31,7 @@ // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt -// --output=./runtime/kusama/src/weights/runtime_common_slots.rs +// --output=./runtime/kusama/src/weights/ #![allow(unused_parens)] @@ -44,16 +44,16 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::slots::WeightInfo for WeightInfo { fn force_lease() -> Weight { - (54_624_000 as Weight) + (92_502_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn manage_lease_period_start(c: u32, t: u32, ) -> Weight { (0 as Weight) - // Standard Error: 36_000 - .saturating_add((19_526_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 36_000 - .saturating_add((42_887_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 17_000 + .saturating_add((16_401_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 17_000 + .saturating_add((34_480_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(t as Weight))) @@ -62,12 +62,12 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - (230_377_000 as Weight) + (194_756_000 as Weight) .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(9 as Weight)) } fn trigger_onboard() -> Weight { - (45_884_000 as Weight) + (41_785_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } diff --git a/runtime/parachains/src/hrmp.rs b/runtime/parachains/src/hrmp.rs index a04fd465dd6e..e1d7d3d57c08 100644 --- a/runtime/parachains/src/hrmp.rs +++ b/runtime/parachains/src/hrmp.rs @@ -573,8 +573,8 @@ impl Module { ); if request.confirmed { - if >::is_valid_para(channel_id.sender) - && >::is_valid_para(channel_id.recipient) + if >::is_valid_para(channel_id.sender) + && >::is_valid_para(channel_id.recipient) { ::HrmpChannels::insert( &channel_id, @@ -972,7 +972,7 @@ impl Module { ) -> DispatchResult { ensure!(origin != recipient, Error::::OpenHrmpChannelToSelf); ensure!( - >::is_valid_para(recipient), + >::is_valid_para(recipient), Error::::OpenHrmpChannelInvalidRecipient, ); @@ -1010,7 +1010,7 @@ impl Module { let egress_cnt = ::HrmpEgressChannelsIndex::decode_len(&origin).unwrap_or(0) as u32; let open_req_cnt = ::HrmpOpenChannelRequestCount::get(&origin); - let channel_num_limit = if >::is_parathread(origin) { + let channel_num_limit = if >::is_parathread(origin) { config.hrmp_max_parathread_outbound_channels } else { config.hrmp_max_parachain_outbound_channels @@ -1080,7 +1080,7 @@ impl Module { // check if by accepting this open channel request, this parachain would exceed the // number of inbound channels. let config = >::config(); - let channel_num_limit = if >::is_parathread(origin) { + let channel_num_limit = if >::is_parathread(origin) { config.hrmp_max_parathread_inbound_channels } else { config.hrmp_max_parachain_inbound_channels diff --git a/runtime/parachains/src/inclusion.rs b/runtime/parachains/src/inclusion.rs index 79b682a4d192..eb58f315a0fa 100644 --- a/runtime/parachains/src/inclusion.rs +++ b/runtime/parachains/src/inclusion.rs @@ -453,7 +453,7 @@ impl Module { ); let validation_code_hash = - >::validation_code_hash_at(para_id, now, None) + >::validation_code_hash_at(para_id, now, None) // A candidate for a parachain without current validation code is not scheduled. .ok_or_else(|| Error::::UnscheduledCandidate)?; ensure!( @@ -679,7 +679,7 @@ impl Module { // initial weight is config read. let mut weight = T::DbWeight::get().reads_writes(1, 0); if let Some(new_code) = commitments.new_validation_code { - weight += >::schedule_code_upgrade( + weight += >::schedule_code_upgrade( receipt.descriptor.para_id, new_code, relay_parent_number + config.validation_upgrade_delay, @@ -708,7 +708,7 @@ impl Module { Event::::CandidateIncluded(plain, commitments.head_data.clone(), core_index, backing_group) ); - weight + >::note_new_head( + weight + >::note_new_head( receipt.descriptor.para_id, commitments.head_data, relay_parent_number, @@ -869,7 +869,7 @@ impl CandidateCheckContext { // if any, the code upgrade attempt is allowed. if let Some(new_validation_code) = new_validation_code { - let valid_upgrade_attempt = >::last_code_upgrade(para_id, true) + let valid_upgrade_attempt = >::last_code_upgrade(para_id, true) .map_or(true, |last| { last <= self.relay_parent_number && self.relay_parent_number.saturating_sub(last) diff --git a/runtime/parachains/src/initializer.rs b/runtime/parachains/src/initializer.rs index 9eb441fd8c12..12e404575b80 100644 --- a/runtime/parachains/src/initializer.rs +++ b/runtime/parachains/src/initializer.rs @@ -131,7 +131,7 @@ decl_module! { // - HRMP let total_weight = configuration::Module::::initializer_initialize(now) + shared::Module::::initializer_initialize(now) + - paras::Module::::initializer_initialize(now) + + paras::Pallet::::initializer_initialize(now) + scheduler::Module::::initializer_initialize(now) + inclusion::Module::::initializer_initialize(now) + session_info::Module::::initializer_initialize(now) + @@ -152,7 +152,7 @@ decl_module! { session_info::Module::::initializer_finalize(); inclusion::Module::::initializer_finalize(); scheduler::Module::::initializer_finalize(); - paras::Module::::initializer_finalize(); + paras::Pallet::::initializer_finalize(); shared::Module::::initializer_finalize(); configuration::Module::::initializer_finalize(); @@ -224,7 +224,7 @@ impl Module { session_index, }; - let outgoing_paras = paras::Module::::initializer_on_new_session(¬ification); + let outgoing_paras = paras::Pallet::::initializer_on_new_session(¬ification); scheduler::Module::::initializer_on_new_session(¬ification); inclusion::Module::::initializer_on_new_session(¬ification); session_info::Module::::initializer_on_new_session(¬ification); diff --git a/runtime/parachains/src/lib.rs b/runtime/parachains/src/lib.rs index b486d82958ac..98014340f21e 100644 --- a/runtime/parachains/src/lib.rs +++ b/runtime/parachains/src/lib.rs @@ -52,20 +52,20 @@ pub fn schedule_para_initialize( id: ParaId, genesis: paras::ParaGenesisArgs, ) -> Result<(), ()> { - >::schedule_para_initialize(id, genesis).map_err(|_| ()) + >::schedule_para_initialize(id, genesis).map_err(|_| ()) } /// Schedule a para to be cleaned up at the start of the next session. pub fn schedule_para_cleanup(id: primitives::v1::Id) -> Result<(), ()> { - >::schedule_para_cleanup(id).map_err(|_| ()) + >::schedule_para_cleanup(id).map_err(|_| ()) } /// Schedule a parathread to be upgraded to a parachain. pub fn schedule_parathread_upgrade(id: ParaId) -> Result<(), ()> { - paras::Module::::schedule_parathread_upgrade(id).map_err(|_| ()) + paras::Pallet::::schedule_parathread_upgrade(id).map_err(|_| ()) } /// Schedule a parachain to be downgraded to a parathread. pub fn schedule_parachain_downgrade(id: ParaId) -> Result<(), ()> { - paras::Module::::schedule_parachain_downgrade(id).map_err(|_| ()) + paras::Pallet::::schedule_parachain_downgrade(id).map_err(|_| ()) } diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 82d17a9e0b9d..ccf25104ee0e 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -23,6 +23,7 @@ use sp_runtime::traits::{ }; use primitives::v1::{AuthorityDiscoveryId, Balance, BlockNumber, Header, ValidatorIndex}; use frame_support::parameter_types; +use frame_support::traits::GenesisBuild; use frame_support_test::TestRandomness; use std::cell::RefCell; use std::collections::HashMap; @@ -42,7 +43,7 @@ frame_support::construct_runtime!( { System: frame_system::{Pallet, Call, Config, Storage, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Paras: paras::{Pallet, Origin, Call, Storage, Event, Config}, + Paras: paras::{Pallet, Origin, Call, Storage, Event, Config}, Configuration: configuration::{Pallet, Call, Storage, Config}, Shared: shared::{Pallet, Call, Storage}, Inclusion: inclusion::{Pallet, Call, Storage, Event}, @@ -208,7 +209,7 @@ pub fn new_test_ext(state: MockGenesisConfig) -> TestExternalities { let mut t = state.system.build_storage::().unwrap(); state.configuration.assimilate_storage(&mut t).unwrap(); - state.paras.assimilate_storage(&mut t).unwrap(); + GenesisBuild::::assimilate_storage(&state.paras, &mut t).unwrap(); t.into() } @@ -217,5 +218,5 @@ pub fn new_test_ext(state: MockGenesisConfig) -> TestExternalities { pub struct MockGenesisConfig { pub system: frame_system::GenesisConfig, pub configuration: crate::configuration::GenesisConfig, - pub paras: crate::paras::GenesisConfig, + pub paras: crate::paras::GenesisConfig, } diff --git a/runtime/parachains/src/paras.rs b/runtime/parachains/src/paras.rs index 2d64721b833c..ce407963fc39 100644 --- a/runtime/parachains/src/paras.rs +++ b/runtime/parachains/src/paras.rs @@ -14,29 +14,23 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -//! The paras module is responsible for storing data on parachains and parathreads. +//! The paras pallet is responsible for storing data on parachains and parathreads. //! //! It tracks which paras are parachains, what their current head data is in //! this fork of the relay chain, what their validation code is, and what their past and upcoming //! validation code is. //! -//! A para is not considered live until it is registered and activated in this module. Activation can +//! A para is not considered live until it is registered and activated in this pallet. Activation can //! only occur at session boundaries. use sp_std::prelude::*; use sp_std::result; -#[cfg(feature = "std")] -use sp_std::marker::PhantomData; use primitives::v1::{ Id as ParaId, ValidationCode, ValidationCodeHash, HeadData, SessionIndex, ConsensusLog, }; use sp_runtime::{traits::One, DispatchResult, SaturatedConversion}; -use frame_system::ensure_root; -use frame_support::{ - decl_storage, decl_module, decl_error, decl_event, ensure, - traits::Get, - weights::Weight, -}; +use frame_system::pallet_prelude::*; +use frame_support::pallet_prelude::*; use parity_scale_codec::{Encode, Decode}; use crate::{configuration, shared, initializer::SessionChangeNotification}; use sp_core::RuntimeDebug; @@ -44,20 +38,9 @@ use sp_core::RuntimeDebug; #[cfg(feature = "std")] use serde::{Serialize, Deserialize}; -pub use crate::Origin; +pub use crate::Origin as ParachainOrigin; -pub trait Config: - frame_system::Config + - configuration::Config + - shared::Config -{ - /// The outer origin type. - type Origin: From - + From<::Origin> - + Into::Origin>>; - - type Event: From + Into<::Event>; -} +pub use pallet::*; // the two key times necessary to track for every code replacement. #[derive(Default, Encode, Decode)] @@ -279,91 +262,45 @@ pub struct ParaGenesisArgs { pub parachain: bool, } -decl_storage! { - trait Store for Module as Paras { - /// All parachains. Ordered ascending by ParaId. Parathreads are not included. - Parachains get(fn parachains): Vec; - /// The current lifecycle of a all known Para IDs. - ParaLifecycles: map hasher(twox_64_concat) ParaId => Option; - /// The head-data of every registered para. - Heads get(fn para_head): map hasher(twox_64_concat) ParaId => Option; - /// The validation code hash of every live para. - /// - /// Corresponding code can be retrieved with [`CodeByHash`]. - CurrentCodeHash: map hasher(twox_64_concat) ParaId => Option; - /// Actual past code hash, indicated by the para id as well as the block number at which it - /// became outdated. - /// - /// Corresponding code can be retrieved with [`CodeByHash`]. - PastCodeHash: map hasher(twox_64_concat) (ParaId, T::BlockNumber) => Option; - /// Past code of parachains. The parachains themselves may not be registered anymore, - /// but we also keep their code on-chain for the same amount of time as outdated code - /// to keep it available for secondary checkers. - PastCodeMeta get(fn past_code_meta): - map hasher(twox_64_concat) ParaId => ParaPastCodeMeta; - /// Which paras have past code that needs pruning and the relay-chain block at which the code was replaced. - /// Note that this is the actual height of the included block, not the expected height at which the - /// code upgrade would be applied, although they may be equal. - /// This is to ensure the entire acceptance period is covered, not an offset acceptance period starting - /// from the time at which the parachain perceives a code upgrade as having occurred. - /// Multiple entries for a single para are permitted. Ordered ascending by block number. - PastCodePruning: Vec<(ParaId, T::BlockNumber)>; - /// The block number at which the planned code change is expected for a para. - /// The change will be applied after the first parablock for this ID included which executes - /// in the context of a relay chain block with a number >= `expected_at`. - FutureCodeUpgrades get(fn future_code_upgrade_at): map hasher(twox_64_concat) ParaId => Option; - /// The actual future code hash of a para. - /// - /// Corresponding code can be retrieved with [`CodeByHash`]. - FutureCodeHash: map hasher(twox_64_concat) ParaId => Option; - /// The actions to perform during the start of a specific session index. - ActionsQueue get(fn actions_queue): map hasher(twox_64_concat) SessionIndex => Vec; - /// Upcoming paras instantiation arguments. - UpcomingParasGenesis: map hasher(twox_64_concat) ParaId => Option; - /// The number of reference on the validation code in [`CodeByHash`] storage. - CodeByHashRefs: map hasher(identity) ValidationCodeHash => u32; - /// Validation code stored by its hash. - /// - /// This storage is consistent with [`FutureCodeHash`], [`CurrentCodeHash`] and - /// [`PastCodeHash`]. - CodeByHash get(fn code_by_hash): map hasher(identity) ValidationCodeHash => Option; - } - add_extra_genesis { - config(paras): Vec<(ParaId, ParaGenesisArgs)>; - config(_phdata): PhantomData; - build(build::); +#[frame_support::pallet] +pub mod pallet { + use super::*; + + #[pallet::pallet] + #[pallet::generate_store(pub(super) trait Store)] + pub struct Pallet(_); + + #[pallet::config] + pub trait Config: + frame_system::Config + + configuration::Config + + shared::Config + { + /// The outer origin type. + type Origin: From + + From<::Origin> + + Into::Origin>>; + + type Event: From + IsType<::Event>; } -} -#[cfg(feature = "std")] -fn build(config: &GenesisConfig) { - let mut parachains: Vec<_> = config.paras - .iter() - .filter(|(_, args)| args.parachain) - .map(|&(ref id, _)| id) - .cloned() - .collect(); - - parachains.sort(); - parachains.dedup(); - - Parachains::put(¶chains); - - for (id, genesis_args) in &config.paras { - let code_hash = genesis_args.validation_code.hash(); - >::increase_code_ref(&code_hash, &genesis_args.validation_code); - as Store>::CurrentCodeHash::insert(&id, &code_hash); - as Store>::Heads::insert(&id, &genesis_args.genesis_head); - if genesis_args.parachain { - ParaLifecycles::insert(&id, ParaLifecycle::Parachain); - } else { - ParaLifecycles::insert(&id, ParaLifecycle::Parathread); - } + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event { + /// Current code has been updated for a Para. \[para_id\] + CurrentCodeUpdated(ParaId), + /// Current head has been updated for a Para. \[para_id\] + CurrentHeadUpdated(ParaId), + /// A code upgrade has been scheduled for a Para. \[para_id\] + CodeUpgradeScheduled(ParaId), + /// A new head has been noted for a Para. \[para_id\] + NewHeadNoted(ParaId), + /// A para has been queued to execute pending actions. \[para_id\] + ActionQueued(ParaId, SessionIndex), } -} -decl_error! { - pub enum Error for Module { + #[pallet::error] + pub enum Error { /// Para is not registered in our system. NotRegistered, /// Para cannot be onboarded because it is already tracked by our system. @@ -375,33 +312,146 @@ decl_error! { /// Para cannot be downgraded to a parathread. CannotDowngrade, } -} -decl_event! { - pub enum Event { - /// Current code has been updated for a Para. \[para_id\] - CurrentCodeUpdated(ParaId), - /// Current head has been updated for a Para. \[para_id\] - CurrentHeadUpdated(ParaId), - /// A code upgrade has been scheduled for a Para. \[para_id\] - CodeUpgradeScheduled(ParaId), - /// A new head has been noted for a Para. \[para_id\] - NewHeadNoted(ParaId), - /// A para has been queued to execute pending actions. \[para_id\] - ActionQueued(ParaId, SessionIndex), + /// All parachains. Ordered ascending by ParaId. Parathreads are not included. + #[pallet::storage] + #[pallet::getter(fn parachains)] + pub(super) type Parachains = StorageValue<_, Vec, ValueQuery>; + + /// The current lifecycle of a all known Para IDs. + #[pallet::storage] + pub(super) type ParaLifecycles = StorageMap<_, Twox64Concat, ParaId, ParaLifecycle>; + + /// The head-data of every registered para. + #[pallet::storage] + #[pallet::getter(fn para_head)] + pub(super) type Heads = StorageMap<_, Twox64Concat, ParaId, HeadData>; + + /// The validation code hash of every live para. + /// + /// Corresponding code can be retrieved with [`CodeByHash`]. + #[pallet::storage] + pub(super) type CurrentCodeHash = StorageMap<_, Twox64Concat, ParaId, ValidationCodeHash>; + + /// Actual past code hash, indicated by the para id as well as the block number at which it + /// became outdated. + /// + /// Corresponding code can be retrieved with [`CodeByHash`]. + #[pallet::storage] + pub(super) type PastCodeHash = StorageMap< + _, + Twox64Concat, + (ParaId, T::BlockNumber), + ValidationCodeHash + >; + + /// Past code of parachains. The parachains themselves may not be registered anymore, + /// but we also keep their code on-chain for the same amount of time as outdated code + /// to keep it available for secondary checkers. + #[pallet::storage] + #[pallet::getter(fn past_code_meta)] + pub(super) type PastCodeMeta = StorageMap< + _, + Twox64Concat, + ParaId, + ParaPastCodeMeta, + ValueQuery + >; + + /// Which paras have past code that needs pruning and the relay-chain block at which the code was replaced. + /// Note that this is the actual height of the included block, not the expected height at which the + /// code upgrade would be applied, although they may be equal. + /// This is to ensure the entire acceptance period is covered, not an offset acceptance period starting + /// from the time at which the parachain perceives a code upgrade as having occurred. + /// Multiple entries for a single para are permitted. Ordered ascending by block number. + #[pallet::storage] + pub(super) type PastCodePruning = StorageValue<_, Vec<(ParaId, T::BlockNumber)>, ValueQuery>; + + /// The block number at which the planned code change is expected for a para. + /// The change will be applied after the first parablock for this ID included which executes + /// in the context of a relay chain block with a number >= `expected_at`. + #[pallet::storage] + #[pallet::getter(fn future_code_upgrade_at)] + pub(super) type FutureCodeUpgrades = StorageMap<_, Twox64Concat, ParaId, T::BlockNumber>; + + /// The actual future code hash of a para. + /// + /// Corresponding code can be retrieved with [`CodeByHash`]. + #[pallet::storage] + pub(super) type FutureCodeHash = StorageMap<_, Twox64Concat, ParaId, ValidationCodeHash>; + + /// The actions to perform during the start of a specific session index. + #[pallet::storage] + #[pallet::getter(fn actions_queue)] + pub(super) type ActionsQueue = StorageMap<_, Twox64Concat, SessionIndex, Vec, ValueQuery>; + + /// Upcoming paras instantiation arguments. + #[pallet::storage] + pub(super) type UpcomingParasGenesis = StorageMap<_, Twox64Concat, ParaId, ParaGenesisArgs>; + + /// The number of reference on the validation code in [`CodeByHash`] storage. + #[pallet::storage] + pub(super) type CodeByHashRefs = StorageMap<_, Identity, ValidationCodeHash, u32, ValueQuery>; + + /// Validation code stored by its hash. + /// + /// This storage is consistent with [`FutureCodeHash`], [`CurrentCodeHash`] and + /// [`PastCodeHash`]. + #[pallet::storage] + #[pallet::getter(fn code_by_hash)] + pub(super) type CodeByHash = StorageMap<_, Identity, ValidationCodeHash, ValidationCode>; + + #[pallet::genesis_config] + pub struct GenesisConfig { + pub paras: Vec<(ParaId, ParaGenesisArgs)>, + } + + #[cfg(feature = "std")] + impl Default for GenesisConfig { + fn default() -> Self { + GenesisConfig { + paras: Default::default(), + } + } } -} -decl_module! { - /// The parachains configuration module. - pub struct Module for enum Call where origin: ::Origin { - type Error = Error; + #[pallet::genesis_build] + impl GenesisBuild for GenesisConfig { + fn build(&self) { + let mut parachains: Vec<_> = self.paras + .iter() + .filter(|(_, args)| args.parachain) + .map(|&(ref id, _)| id) + .cloned() + .collect(); + + parachains.sort(); + parachains.dedup(); + + Parachains::::put(¶chains); + + for (id, genesis_args) in &self.paras { + let code_hash = genesis_args.validation_code.hash(); + >::increase_code_ref(&code_hash, &genesis_args.validation_code); + as Store>::CurrentCodeHash::insert(&id, &code_hash); + as Store>::Heads::insert(&id, &genesis_args.genesis_head); + if genesis_args.parachain { + ParaLifecycles::::insert(&id, ParaLifecycle::Parachain); + } else { + ParaLifecycles::::insert(&id, ParaLifecycle::Parathread); + } + } + } + } - fn deposit_event() = default; + #[pallet::origin] + pub type Origin = ParachainOrigin; + #[pallet::call] + impl Pallet { /// Set the storage for the parachain validation code immediately. - #[weight = 0] - fn force_set_current_code(origin, para: ParaId, new_code: ValidationCode) { + #[pallet::weight(0)] + pub fn force_set_current_code(origin: OriginFor, para: ParaId, new_code: ValidationCode) -> DispatchResult { ensure_root(origin)?; let prior_code_hash = ::CurrentCodeHash::get(¶).unwrap_or_default(); let new_code_hash = new_code.hash(); @@ -411,57 +461,67 @@ decl_module! { let now = frame_system::Pallet::::block_number(); Self::note_past_code(para, now, now, prior_code_hash); Self::deposit_event(Event::CurrentCodeUpdated(para)); + Ok(()) } /// Set the storage for the current parachain head data immediately. - #[weight = 0] - fn force_set_current_head(origin, para: ParaId, new_head: HeadData) { + #[pallet::weight(0)] + pub fn force_set_current_head(origin: OriginFor, para: ParaId, new_head: HeadData) -> DispatchResult { ensure_root(origin)?; ::Heads::insert(¶, new_head); Self::deposit_event(Event::CurrentHeadUpdated(para)); + Ok(()) } /// Schedule a code upgrade for block `expected_at`. - #[weight = 0] - fn force_schedule_code_upgrade(origin, para: ParaId, new_code: ValidationCode, expected_at: T::BlockNumber) { + #[pallet::weight(0)] + pub fn force_schedule_code_upgrade( + origin: OriginFor, + para: ParaId, + new_code: ValidationCode, + expected_at: T::BlockNumber + ) -> DispatchResult { ensure_root(origin)?; Self::schedule_code_upgrade(para, new_code, expected_at); Self::deposit_event(Event::CodeUpgradeScheduled(para)); + Ok(()) } /// Note a new block head for para within the context of the current block. - #[weight = 0] - fn force_note_new_head(origin, para: ParaId, new_head: HeadData) { + #[pallet::weight(0)] + pub fn force_note_new_head(origin: OriginFor, para: ParaId, new_head: HeadData) -> DispatchResult { ensure_root(origin)?; let now = frame_system::Pallet::::block_number(); Self::note_new_head(para, new_head, now); Self::deposit_event(Event::NewHeadNoted(para)); + Ok(()) } /// Put a parachain directly into the next session's action queue. /// We can't queue it any sooner than this without going into the /// initializer... - #[weight = 0] - fn force_queue_action(origin, para: ParaId) { + #[pallet::weight(0)] + pub fn force_queue_action(origin: OriginFor, para: ParaId) -> DispatchResult { ensure_root(origin)?; - let next_session = shared::Module::::session_index().saturating_add(One::one()); - ActionsQueue::mutate(next_session, |v| { + let next_session = shared::Pallet::::session_index().saturating_add(One::one()); + ActionsQueue::::mutate(next_session, |v| { if let Err(i) = v.binary_search(¶) { v.insert(i, para); } }); Self::deposit_event(Event::ActionQueued(para, next_session)); + Ok(()) } } } -impl Module { - /// Called by the initializer to initialize the configuration module. +impl Pallet { + /// Called by the initializer to initialize the configuration pallet. pub(crate) fn initializer_initialize(now: T::BlockNumber) -> Weight { Self::prune_old_code(now) } - /// Called by the initializer to finalize the configuration module. + /// Called by the initializer to finalize the configuration pallet. pub(crate) fn initializer_finalize() { } /// Called by the initializer to note that a new session has started. @@ -474,8 +534,8 @@ impl Module { /// The validation code of live para. pub(crate) fn current_code(para_id: &ParaId) -> Option { - CurrentCodeHash::get(para_id).and_then(|code_hash| { - let code = CodeByHash::get(&code_hash); + CurrentCodeHash::::get(para_id).and_then(|code_hash| { + let code = CodeByHash::::get(&code_hash); if code.is_none() { log::error!( "Pallet paras storage is inconsistent, code not found for hash {}", @@ -496,13 +556,13 @@ impl Module { // // Returns the list of outgoing paras from the actions queue. fn apply_actions_queue(session: SessionIndex) -> Vec { - let actions = ActionsQueue::take(session); + let actions = ActionsQueue::::take(session); let mut parachains = ::Parachains::get(); let now = >::block_number(); let mut outgoing = Vec::new(); for para in actions { - let lifecycle = ParaLifecycles::get(¶); + let lifecycle = ParaLifecycles::::get(¶); match lifecycle { None | Some(ParaLifecycle::Parathread) | Some(ParaLifecycle::Parachain) => { /* Nothing to do... */ }, // Onboard a new parathread or parachain. @@ -512,9 +572,9 @@ impl Module { if let Err(i) = parachains.binary_search(¶) { parachains.insert(i, para); } - ParaLifecycles::insert(¶, ParaLifecycle::Parachain); + ParaLifecycles::::insert(¶, ParaLifecycle::Parachain); } else { - ParaLifecycles::insert(¶, ParaLifecycle::Parathread); + ParaLifecycles::::insert(¶, ParaLifecycle::Parathread); } let code_hash = genesis_data.validation_code.hash(); @@ -528,14 +588,14 @@ impl Module { if let Err(i) = parachains.binary_search(¶) { parachains.insert(i, para); } - ParaLifecycles::insert(¶, ParaLifecycle::Parachain); + ParaLifecycles::::insert(¶, ParaLifecycle::Parachain); }, // Downgrade a parachain to a parathread Some(ParaLifecycle::DowngradingParachain) => { if let Ok(i) = parachains.binary_search(¶) { parachains.remove(i); } - ParaLifecycles::insert(¶, ParaLifecycle::Parathread); + ParaLifecycles::::insert(¶, ParaLifecycle::Parathread); }, // Offboard a parathread or parachain from the system Some(ParaLifecycle::OffboardingParachain) | Some(ParaLifecycle::OffboardingParathread) => { @@ -545,7 +605,7 @@ impl Module { ::Heads::remove(¶); ::FutureCodeUpgrades::remove(¶); - ParaLifecycles::remove(¶); + ParaLifecycles::::remove(¶); let removed_future_code_hash = ::FutureCodeHash::take(¶); if let Some(removed_future_code_hash) = removed_future_code_hash { Self::decrease_code_ref(&removed_future_code_hash); @@ -599,7 +659,7 @@ impl Module { // looks at old code metadata, compares them to the current acceptance window, and prunes those // that are too old. fn prune_old_code(now: T::BlockNumber) -> Weight { - let config = configuration::Module::::config(); + let config = configuration::Pallet::::config(); let code_retention_period = config.code_retention_period; if now <= code_retention_period { let weight = T::DbWeight::get().reads_writes(1, 0); @@ -658,7 +718,7 @@ impl Module { /// /// Returns false if para is already registered in the system. pub fn can_schedule_para_initialize(id: &ParaId, _: &ParaGenesisArgs) -> bool { - let lifecycle = ParaLifecycles::get(id); + let lifecycle = ParaLifecycles::::get(id); lifecycle.is_none() } @@ -671,9 +731,9 @@ impl Module { // Make sure parachain isn't already in our system. ensure!(Self::can_schedule_para_initialize(&id, &genesis), Error::::CannotOnboard); - ParaLifecycles::insert(&id, ParaLifecycle::Onboarding); - UpcomingParasGenesis::insert(&id, genesis); - ActionsQueue::mutate(scheduled_session, |v| { + ParaLifecycles::::insert(&id, ParaLifecycle::Onboarding); + UpcomingParasGenesis::::insert(&id, genesis); + ActionsQueue::::mutate(scheduled_session, |v| { if let Err(i) = v.binary_search(&id) { v.insert(i, id); } @@ -688,23 +748,23 @@ impl Module { /// /// No-op if para is not registered at all. pub(crate) fn schedule_para_cleanup(id: ParaId) -> DispatchResult { - let lifecycle = ParaLifecycles::get(&id); + let lifecycle = ParaLifecycles::::get(&id); match lifecycle { // If para is not registered, nothing to do! None => { return Ok(()) }, Some(ParaLifecycle::Parathread) => { - ParaLifecycles::insert(&id, ParaLifecycle::OffboardingParathread); + ParaLifecycles::::insert(&id, ParaLifecycle::OffboardingParathread); }, Some(ParaLifecycle::Parachain) => { - ParaLifecycles::insert(&id, ParaLifecycle::OffboardingParachain); + ParaLifecycles::::insert(&id, ParaLifecycle::OffboardingParachain); }, _ => return Err(Error::::CannotOffboard)?, } let scheduled_session = Self::scheduled_session(); - ActionsQueue::mutate(scheduled_session, |v| { + ActionsQueue::::mutate(scheduled_session, |v| { if let Err(i) = v.binary_search(&id) { v.insert(i, id); } @@ -718,12 +778,12 @@ impl Module { /// Will return error if `ParaLifecycle` is not `Parathread`. pub(crate) fn schedule_parathread_upgrade(id: ParaId) -> DispatchResult { let scheduled_session = Self::scheduled_session(); - let lifecycle = ParaLifecycles::get(&id).ok_or(Error::::NotRegistered)?; + let lifecycle = ParaLifecycles::::get(&id).ok_or(Error::::NotRegistered)?; ensure!(lifecycle == ParaLifecycle::Parathread, Error::::CannotUpgrade); - ParaLifecycles::insert(&id, ParaLifecycle::UpgradingParathread); - ActionsQueue::mutate(scheduled_session, |v| { + ParaLifecycles::::insert(&id, ParaLifecycle::UpgradingParathread); + ActionsQueue::::mutate(scheduled_session, |v| { if let Err(i) = v.binary_search(&id) { v.insert(i, id); } @@ -737,12 +797,12 @@ impl Module { /// Noop if `ParaLifecycle` is not `Parachain`. pub(crate) fn schedule_parachain_downgrade(id: ParaId) -> DispatchResult { let scheduled_session = Self::scheduled_session(); - let lifecycle = ParaLifecycles::get(&id).ok_or(Error::::NotRegistered)?; + let lifecycle = ParaLifecycles::::get(&id).ok_or(Error::::NotRegistered)?; ensure!(lifecycle == ParaLifecycle::Parachain, Error::::CannotDowngrade); - ParaLifecycles::insert(&id, ParaLifecycle::DowngradingParachain); - ActionsQueue::mutate(scheduled_session, |v| { + ParaLifecycles::::insert(&id, ParaLifecycle::DowngradingParachain); + ActionsQueue::::mutate(scheduled_session, |v| { if let Err(i) = v.binary_search(&id) { v.insert(i, id); } @@ -773,7 +833,7 @@ impl Module { >::deposit_log(log.into()); let (reads, writes) = Self::increase_code_ref(&new_code_hash, &new_code); - FutureCodeHash::insert(&id, new_code_hash); + FutureCodeHash::::insert(&id, new_code_hash); T::DbWeight::get().reads_writes(1 + reads, 2 + writes) } }) @@ -787,16 +847,16 @@ impl Module { new_head: HeadData, execution_context: T::BlockNumber, ) -> Weight { - Heads::insert(&id, new_head); + Heads::::insert(&id, new_head); if let Some(expected_at) = ::FutureCodeUpgrades::get(&id) { if expected_at <= execution_context { ::FutureCodeUpgrades::remove(&id); // Both should always be `Some` in this case, since a code upgrade is scheduled. - let new_code_hash = FutureCodeHash::take(&id).unwrap_or_default(); - let prior_code_hash = CurrentCodeHash::get(&id).unwrap_or_default(); - CurrentCodeHash::insert(&id, &new_code_hash); + let new_code_hash = FutureCodeHash::::take(&id).unwrap_or_default(); + let prior_code_hash = CurrentCodeHash::::get(&id).unwrap_or_default(); + CurrentCodeHash::::insert(&id, &new_code_hash); let log = ConsensusLog::ParaUpgradeCode(id, new_code_hash); >::deposit_log(log.into()); @@ -847,11 +907,11 @@ impl Module { }; if upgrade_applied_intermediate { - FutureCodeHash::get(&id) + FutureCodeHash::::get(&id) } else { match Self::past_code_meta(&id).code_at(at) { None => None, - Some(UseCodeAt::Current) => CurrentCodeHash::get(&id), + Some(UseCodeAt::Current) => CurrentCodeHash::::get(&id), Some(UseCodeAt::ReplacedAt(replaced)) => ::PastCodeHash::get(&(id, replaced)), } } @@ -859,14 +919,14 @@ impl Module { /// Returns the current lifecycle state of the para. pub fn lifecycle(id: ParaId) -> Option { - ParaLifecycles::get(&id) + ParaLifecycles::::get(&id) } /// Returns whether the given ID refers to a valid para. /// /// Paras that are onboarding or offboarding are not included. pub fn is_valid_para(id: ParaId) -> bool { - if let Some(state) = ParaLifecycles::get(&id) { + if let Some(state) = ParaLifecycles::::get(&id) { !state.is_onboarding() && !state.is_offboarding() } else { false @@ -877,7 +937,7 @@ impl Module { /// /// Includes parachains which will downgrade to a parathread in the future. pub fn is_parachain(id: ParaId) -> bool { - if let Some(state) = ParaLifecycles::get(&id) { + if let Some(state) = ParaLifecycles::::get(&id) { state.is_parachain() } else { false @@ -888,7 +948,7 @@ impl Module { /// /// Includes parathreads which will upgrade to parachains in the future. pub fn is_parathread(id: ParaId) -> bool { - if let Some(state) = ParaLifecycles::get(&id) { + if let Some(state) = ParaLifecycles::::get(&id) { state.is_parathread() } else { false @@ -909,7 +969,7 @@ impl Module { /// Return the session index that should be used for any future scheduled changes. fn scheduled_session() -> SessionIndex { - shared::Module::::scheduled_session() + shared::Pallet::::scheduled_session() } /// Store the validation code if not already stored, and increase the number of reference. @@ -944,7 +1004,7 @@ impl Module { #[cfg(any(feature = "std", feature = "runtime-benchmarks", test))] pub fn test_on_new_session() { Self::initializer_on_new_session(&SessionChangeNotification { - session_index: shared::Module::::session_index(), + session_index: shared::Pallet::::session_index(), ..Default::default() }); } @@ -954,10 +1014,7 @@ impl Module { mod tests { use super::*; use primitives::v1::BlockNumber; - use frame_support::{ - assert_ok, - traits::{OnFinalize, OnInitialize} - }; + use frame_support::assert_ok; use crate::mock::{new_test_ext, Paras, Shared, System, MockGenesisConfig}; use crate::configuration::HostConfiguration; @@ -1613,9 +1670,9 @@ mod tests { ); // Lifecycle is tracked correctly - assert_eq!(ParaLifecycles::get(&a), Some(ParaLifecycle::Onboarding)); - assert_eq!(ParaLifecycles::get(&b), Some(ParaLifecycle::Onboarding)); - assert_eq!(ParaLifecycles::get(&c), Some(ParaLifecycle::Onboarding)); + assert_eq!(::ParaLifecycles::get(&a), Some(ParaLifecycle::Onboarding)); + assert_eq!(::ParaLifecycles::get(&b), Some(ParaLifecycle::Onboarding)); + assert_eq!(::ParaLifecycles::get(&c), Some(ParaLifecycle::Onboarding)); // run to block without session change. run_to_block(2, None); @@ -1627,9 +1684,9 @@ mod tests { ); // Lifecycle is tracked correctly - assert_eq!(ParaLifecycles::get(&a), Some(ParaLifecycle::Onboarding)); - assert_eq!(ParaLifecycles::get(&b), Some(ParaLifecycle::Onboarding)); - assert_eq!(ParaLifecycles::get(&c), Some(ParaLifecycle::Onboarding)); + assert_eq!(::ParaLifecycles::get(&a), Some(ParaLifecycle::Onboarding)); + assert_eq!(::ParaLifecycles::get(&b), Some(ParaLifecycle::Onboarding)); + assert_eq!(::ParaLifecycles::get(&c), Some(ParaLifecycle::Onboarding)); // Two sessions pass, so action queue is triggered @@ -1639,9 +1696,9 @@ mod tests { assert_eq!(::ActionsQueue::get(Paras::scheduled_session()), Vec::new()); // Lifecycle is tracked correctly - assert_eq!(ParaLifecycles::get(&a), Some(ParaLifecycle::Parathread)); - assert_eq!(ParaLifecycles::get(&b), Some(ParaLifecycle::Parachain)); - assert_eq!(ParaLifecycles::get(&c), Some(ParaLifecycle::Parachain)); + assert_eq!(::ParaLifecycles::get(&a), Some(ParaLifecycle::Parathread)); + assert_eq!(::ParaLifecycles::get(&b), Some(ParaLifecycle::Parachain)); + assert_eq!(::ParaLifecycles::get(&c), Some(ParaLifecycle::Parachain)); assert_eq!(Paras::current_code(&a), Some(vec![2].into())); assert_eq!(Paras::current_code(&b), Some(vec![1].into())); @@ -1777,18 +1834,18 @@ mod tests { Paras::increase_code_ref(&code.hash(), &code); Paras::increase_code_ref(&code.hash(), &code); - assert!(CodeByHash::contains_key(code.hash())); - assert_eq!(CodeByHashRefs::get(code.hash()), 2); + assert!(::CodeByHash::contains_key(code.hash())); + assert_eq!(::CodeByHashRefs::get(code.hash()), 2); Paras::decrease_code_ref(&code.hash()); - assert!(CodeByHash::contains_key(code.hash())); - assert_eq!(CodeByHashRefs::get(code.hash()), 1); + assert!(::CodeByHash::contains_key(code.hash())); + assert_eq!(::CodeByHashRefs::get(code.hash()), 1); Paras::decrease_code_ref(&code.hash()); - assert!(!CodeByHash::contains_key(code.hash())); - assert!(!CodeByHashRefs::contains_key(code.hash())); + assert!(!::CodeByHash::contains_key(code.hash())); + assert!(!::CodeByHashRefs::contains_key(code.hash())); }); } } diff --git a/runtime/parachains/src/runtime_api_impl/v1.rs b/runtime/parachains/src/runtime_api_impl/v1.rs index c91095a77547..d51e980c933a 100644 --- a/runtime/parachains/src/runtime_api_impl/v1.rs +++ b/runtime/parachains/src/runtime_api_impl/v1.rs @@ -51,7 +51,7 @@ pub fn validator_groups() -> ( /// Implementation for the `availability_cores` function of the runtime API. pub fn availability_cores() -> Vec> { let cores = >::availability_cores(); - let parachains = >::parachains(); + let parachains = >::parachains(); let config = >::config(); let now = >::block_number() + One::one(); @@ -270,7 +270,7 @@ pub fn validation_code( with_assumption::( para_id, assumption, - || >::current_code(¶_id), + || >::current_code(¶_id), ) } @@ -327,5 +327,5 @@ pub fn inbound_hrmp_channels_contents( pub fn validation_code_by_hash( hash: ValidationCodeHash, ) -> Option { - >::code_by_hash(hash) + >::code_by_hash(hash) } diff --git a/runtime/parachains/src/scheduler.rs b/runtime/parachains/src/scheduler.rs index 32c7e169e735..44e03b701681 100644 --- a/runtime/parachains/src/scheduler.rs +++ b/runtime/parachains/src/scheduler.rs @@ -228,7 +228,7 @@ impl Module { let config = new_config; let mut thread_queue = ParathreadQueue::get(); - let n_parachains = >::parachains().len() as u32; + let n_parachains = >::parachains().len() as u32; let n_cores = core::cmp::max( n_parachains + config.parathread_cores, match config.max_validators_per_core { @@ -297,7 +297,7 @@ impl Module { // prune out all entries beyond retry or that no longer correspond to live parathread. thread_queue.queue.retain(|queued| { let will_keep = queued.claim.retries <= config.parathread_retries - && >::is_parathread(queued.claim.claim.0); + && >::is_parathread(queued.claim.claim.0); if !will_keep { let claim_para = queued.claim.claim.0; @@ -333,7 +333,7 @@ impl Module { /// Fails if the claim does not correspond to any live parathread. #[allow(unused)] pub fn add_parathread_claim(claim: ParathreadClaim) { - if !>::is_parathread(claim.0) { return } + if !>::is_parathread(claim.0) { return } let config = >::config(); let queue_max_size = config.parathread_cores * config.scheduling_lookahead; @@ -399,7 +399,7 @@ impl Module { } } - let parachains = >::parachains(); + let parachains = >::parachains(); let mut scheduled = Scheduled::get(); let mut parathread_queue = ParathreadQueue::get(); @@ -537,7 +537,7 @@ impl Module { match cores.get(core_index.0 as usize).and_then(|c| c.as_ref()) { None => None, Some(CoreOccupied::Parachain) => { - let parachains = >::parachains(); + let parachains = >::parachains(); Some(parachains[core_index.0 as usize]) } Some(CoreOccupied::Parathread(ref entry)) => Some(entry.claim.0), @@ -647,7 +647,7 @@ impl Module { /// For parathreads, this is based on the next item in the ParathreadQueue assigned to that /// core, and is None if there isn't one. pub(crate) fn next_up_on_available(core: CoreIndex) -> Option { - let parachains = >::parachains(); + let parachains = >::parachains(); if (core.0 as usize) < parachains.len() { Some(ScheduledCore { para_id: parachains[core.0 as usize], @@ -671,7 +671,7 @@ impl Module { /// core, or if there isn't one, the claim that is currently occupying the core, as long /// as the claim's retries would not exceed the limit. Otherwise None. pub(crate) fn next_up_on_time_out(core: CoreIndex) -> Option { - let parachains = >::parachains(); + let parachains = >::parachains(); if (core.0 as usize) < parachains.len() { Some(ScheduledCore { para_id: parachains[core.0 as usize], @@ -712,7 +712,7 @@ impl Module { ParathreadQueue::mutate(|queue| { for core_assignment in Scheduled::take() { if let AssignmentKind::Parathread(collator, retries) = core_assignment.kind { - if !>::is_parathread(core_assignment.para_id) { continue } + if !>::is_parathread(core_assignment.para_id) { continue } let entry = ParathreadEntry { claim: ParathreadClaim(core_assignment.para_id, collator), diff --git a/runtime/parachains/src/util.rs b/runtime/parachains/src/util.rs index 6cada4dd65ab..45b578166897 100644 --- a/runtime/parachains/src/util.rs +++ b/runtime/parachains/src/util.rs @@ -34,7 +34,7 @@ pub fn make_persisted_validation_data( let config = >::config(); Some(PersistedValidationData { - parent_head: >::para_head(¶_id)?, + parent_head: >::para_head(¶_id)?, relay_parent_number, relay_parent_storage_root, max_pov_size: config.max_pov_size, diff --git a/runtime/polkadot/src/weights/pallet_balances.rs b/runtime/polkadot/src/weights/pallet_balances.rs index fd39857ec655..19ebf60963e3 100644 --- a/runtime/polkadot/src/weights/pallet_balances.rs +++ b/runtime/polkadot/src/weights/pallet_balances.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_balances //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,32 +44,32 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { fn transfer() -> Weight { - (68_987_000 as Weight) + (68_885_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn transfer_keep_alive() -> Weight { - (50_696_000 as Weight) + (51_441_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_balance_creating() -> Weight { - (27_340_000 as Weight) + (27_736_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_balance_killing() -> Weight { - (33_128_000 as Weight) + (32_999_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_transfer() -> Weight { - (67_909_000 as Weight) + (67_451_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn transfer_all() -> Weight { - (63_138_000 as Weight) + (63_359_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_bounties.rs b/runtime/polkadot/src/weights/pallet_bounties.rs index 08a7b17b8801..05e2d438d6dd 100644 --- a/runtime/polkadot/src/weights/pallet_bounties.rs +++ b/runtime/polkadot/src/weights/pallet_bounties.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_bounties //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,61 +44,61 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_bounties::WeightInfo for WeightInfo { fn propose_bounty(d: u32, ) -> Weight { - (41_122_000 as Weight) + (41_618_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn approve_bounty() -> Weight { - (10_042_000 as Weight) + (10_450_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn propose_curator() -> Weight { - (7_654_000 as Weight) + (8_111_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn unassign_curator() -> Weight { - (50_121_000 as Weight) + (51_324_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn accept_curator() -> Weight { - (34_663_000 as Weight) + (35_558_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn award_bounty() -> Weight { - (23_054_000 as Weight) + (23_099_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn claim_bounty() -> Weight { - (120_265_000 as Weight) + (122_233_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } fn close_bounty_proposed() -> Weight { - (49_587_000 as Weight) + (50_418_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn close_bounty_active() -> Weight { - (79_774_000 as Weight) + (80_662_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn extend_bounty_expiry() -> Weight { - (22_533_000 as Weight) + (22_554_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn spend_funds(b: u32, ) -> Weight { (0 as Weight) // Standard Error: 14_000 - .saturating_add((57_405_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((58_304_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(b as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) diff --git a/runtime/polkadot/src/weights/pallet_collective.rs b/runtime/polkadot/src/weights/pallet_collective.rs index 6e41d192c1e7..dca397766b7b 100644 --- a/runtime/polkadot/src/weights/pallet_collective.rs +++ b/runtime/polkadot/src/weights/pallet_collective.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_collective //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -46,94 +46,94 @@ impl pallet_collective::WeightInfo for WeightInfo { fn set_members(m: u32, n: u32, p: u32, ) -> Weight { (0 as Weight) // Standard Error: 4_000 - .saturating_add((14_001_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((14_051_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 4_000 - .saturating_add((106_000 as Weight).saturating_mul(n as Weight)) + .saturating_add((57_000 as Weight).saturating_mul(n as Weight)) // Standard Error: 4_000 - .saturating_add((19_318_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((19_434_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(p as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) } fn execute(b: u32, m: u32, ) -> Weight { - (20_878_000 as Weight) + (20_424_000 as Weight) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((83_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((82_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } fn propose_execute(b: u32, m: u32, ) -> Weight { - (25_662_000 as Weight) + (24_961_000 as Weight) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((162_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((160_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) } fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (42_102_000 as Weight) + (41_826_000 as Weight) // Standard Error: 0 .saturating_add((4_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((89_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((90_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((364_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((405_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)) } fn vote(m: u32, ) -> Weight { - (31_866_000 as Weight) + (31_640_000 as Weight) // Standard Error: 0 - .saturating_add((196_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((216_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (40_751_000 as Weight) + (40_355_000 as Weight) // Standard Error: 0 - .saturating_add((167_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((165_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((333_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((376_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)) } fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (56_534_000 as Weight) + (55_837_000 as Weight) // Standard Error: 0 .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((166_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((170_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((347_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((382_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)) } fn close_disapproved(m: u32, p: u32, ) -> Weight { - (45_673_000 as Weight) + (44_700_000 as Weight) // Standard Error: 0 - .saturating_add((167_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((169_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((336_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((380_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)) } fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (61_152_000 as Weight) + (60_051_000 as Weight) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((167_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((169_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((340_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((385_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)) } fn disapprove_proposal(p: u32, ) -> Weight { - (25_103_000 as Weight) + (24_750_000 as Weight) // Standard Error: 0 - .saturating_add((346_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((380_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_democracy.rs b/runtime/polkadot/src/weights/pallet_democracy.rs index 6dcdf6a97371..b970e12d1711 100644 --- a/runtime/polkadot/src/weights/pallet_democracy.rs +++ b/runtime/polkadot/src/weights/pallet_democracy.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_democracy //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,163 +44,163 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_democracy::WeightInfo for WeightInfo { fn propose() -> Weight { - (55_166_000 as Weight) + (56_840_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn second(s: u32, ) -> Weight { - (36_768_000 as Weight) + (37_688_000 as Weight) // Standard Error: 0 - .saturating_add((143_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((154_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)) } fn vote_new(r: u32, ) -> Weight { - (42_144_000 as Weight) + (43_654_000 as Weight) // Standard Error: 0 - .saturating_add((183_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((208_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn vote_existing(r: u32, ) -> Weight { - (42_316_000 as Weight) + (43_543_000 as Weight) // Standard Error: 0 - .saturating_add((174_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((207_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn emergency_cancel() -> Weight { - (26_501_000 as Weight) + (26_829_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn blacklist(p: u32, ) -> Weight { - (73_883_000 as Weight) + (74_916_000 as Weight) // Standard Error: 4_000 - .saturating_add((460_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((536_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } fn external_propose(v: u32, ) -> Weight { - (12_461_000 as Weight) + (12_632_000 as Weight) // Standard Error: 0 - .saturating_add((78_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((79_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn external_propose_majority() -> Weight { - (2_393_000 as Weight) + (2_396_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn external_propose_default() -> Weight { - (2_401_000 as Weight) + (2_450_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn fast_track() -> Weight { - (25_767_000 as Weight) + (25_867_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn veto_external(v: u32, ) -> Weight { - (26_834_000 as Weight) + (26_789_000 as Weight) // Standard Error: 0 - .saturating_add((116_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((133_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn cancel_proposal(p: u32, ) -> Weight { - (49_339_000 as Weight) + (49_939_000 as Weight) // Standard Error: 0 - .saturating_add((436_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((511_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)) } fn cancel_referendum() -> Weight { - (15_793_000 as Weight) + (15_902_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn cancel_queued(r: u32, ) -> Weight { - (27_553_000 as Weight) + (27_621_000 as Weight) // Standard Error: 1_000 - .saturating_add((1_614_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((2_163_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn on_initialize_base(r: u32, ) -> Weight { - (6_724_000 as Weight) + (7_728_000 as Weight) // Standard Error: 4_000 - .saturating_add((5_014_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((5_099_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) } fn delegate(r: u32, ) -> Weight { - (50_940_000 as Weight) + (53_667_000 as Weight) // Standard Error: 4_000 - .saturating_add((7_009_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((7_194_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) } fn undelegate(r: u32, ) -> Weight { - (22_520_000 as Weight) + (23_077_000 as Weight) // Standard Error: 5_000 - .saturating_add((6_964_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((7_164_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) } fn clear_public_proposals() -> Weight { - (2_251_000 as Weight) + (2_195_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn note_preimage(b: u32, ) -> Weight { - (40_109_000 as Weight) + (41_252_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn note_imminent_preimage(b: u32, ) -> Weight { - (25_678_000 as Weight) + (26_149_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn reap_preimage(b: u32, ) -> Weight { - (36_132_000 as Weight) + (36_669_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn unlock_remove(r: u32, ) -> Weight { - (36_160_000 as Weight) + (37_226_000 as Weight) // Standard Error: 0 - .saturating_add((51_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((53_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn unlock_set(r: u32, ) -> Weight { - (33_706_000 as Weight) + (34_663_000 as Weight) // Standard Error: 0 - .saturating_add((165_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((199_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn remove_vote(r: u32, ) -> Weight { - (18_398_000 as Weight) + (19_247_000 as Weight) // Standard Error: 0 - .saturating_add((149_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((182_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn remove_other_vote(r: u32, ) -> Weight { - (18_520_000 as Weight) + (19_335_000 as Weight) // Standard Error: 0 - .saturating_add((151_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((184_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_elections_phragmen.rs b/runtime/polkadot/src/weights/pallet_elections_phragmen.rs index 52ae5f90b91d..06155383261f 100644 --- a/runtime/polkadot/src/weights/pallet_elections_phragmen.rs +++ b/runtime/polkadot/src/weights/pallet_elections_phragmen.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_elections_phragmen //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,82 +44,80 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_elections_phragmen::WeightInfo for WeightInfo { fn vote_equal(v: u32, ) -> Weight { - (40_098_000 as Weight) + (40_509_000 as Weight) // Standard Error: 3_000 - .saturating_add((251_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((254_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn vote_more(v: u32, ) -> Weight { - (62_907_000 as Weight) + (63_177_000 as Weight) // Standard Error: 5_000 - .saturating_add((244_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((246_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn vote_less(v: u32, ) -> Weight { - (62_646_000 as Weight) + (62_878_000 as Weight) // Standard Error: 5_000 - .saturating_add((275_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((269_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn remove_voter() -> Weight { - (57_669_000 as Weight) + (58_025_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn submit_candidacy(c: u32, ) -> Weight { - (51_325_000 as Weight) + (51_250_000 as Weight) // Standard Error: 0 - .saturating_add((246_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((272_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn renounce_candidacy_candidate(c: u32, ) -> Weight { - (42_877_000 as Weight) + (42_742_000 as Weight) // Standard Error: 0 - .saturating_add((129_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((156_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn renounce_candidacy_members() -> Weight { - (65_943_000 as Weight) + (66_974_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn renounce_candidacy_runners_up() -> Weight { - (45_901_000 as Weight) + (46_343_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn remove_member_with_replacement() -> Weight { - (84_434_000 as Weight) + (85_130_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } fn remove_member_wrong_refund() -> Weight { - (6_294_000 as Weight) + (6_347_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } - fn clean_defunct_voters(v: u32, d: u32, ) -> Weight { + fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight { (0 as Weight) - // Standard Error: 34_000 - .saturating_add((106_858_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 32_000 - .saturating_add((212_000 as Weight).saturating_mul(d as Weight)) + // Standard Error: 43_000 + .saturating_add((107_372_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(v as Weight))) } fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight { (0 as Weight) - // Standard Error: 2_605_000 - .saturating_add((122_952_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 1_083_000 - .saturating_add((102_007_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 74_000 - .saturating_add((6_719_000 as Weight).saturating_mul(e as Weight)) + // Standard Error: 2_739_000 + .saturating_add((126_782_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 1_139_000 + .saturating_add((105_285_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 77_000 + .saturating_add((6_966_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) diff --git a/runtime/polkadot/src/weights/pallet_identity.rs b/runtime/polkadot/src/weights/pallet_identity.rs index e30e902f7137..a037e0b6737a 100644 --- a/runtime/polkadot/src/weights/pallet_identity.rs +++ b/runtime/polkadot/src/weights/pallet_identity.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_identity //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,135 +44,135 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_identity::WeightInfo for WeightInfo { fn add_registrar(r: u32, ) -> Weight { - (20_387_000 as Weight) + (20_345_000 as Weight) // Standard Error: 2_000 - .saturating_add((201_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((233_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_identity(r: u32, x: u32, ) -> Weight { - (50_833_000 as Weight) + (50_253_000 as Weight) // Standard Error: 14_000 - .saturating_add((180_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((196_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 1_000 - .saturating_add((936_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((942_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_subs_new(s: u32, ) -> Weight { - (38_886_000 as Weight) - // Standard Error: 2_000 - .saturating_add((6_241_000 as Weight).saturating_mul(s as Weight)) + (39_222_000 as Weight) + // Standard Error: 1_000 + .saturating_add((6_369_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn set_subs_old(p: u32, ) -> Weight { - (39_842_000 as Weight) + (39_661_000 as Weight) // Standard Error: 0 - .saturating_add((2_003_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((2_102_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(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) } fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - (48_868_000 as Weight) - // Standard Error: 11_000 - .saturating_add((159_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 1_000 - .saturating_add((2_003_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 1_000 - .saturating_add((597_000 as Weight).saturating_mul(x as Weight)) + (48_967_000 as Weight) + // Standard Error: 7_000 + .saturating_add((135_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 0 + .saturating_add((2_108_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 0 + .saturating_add((594_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn request_judgement(r: u32, x: u32, ) -> Weight { - (52_307_000 as Weight) - // Standard Error: 5_000 - .saturating_add((221_000 as Weight).saturating_mul(r as Weight)) + (52_197_000 as Weight) + // Standard Error: 4_000 + .saturating_add((218_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((1_168_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((1_151_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn cancel_request(r: u32, x: u32, ) -> Weight { - (47_911_000 as Weight) - // Standard Error: 7_000 - .saturating_add((163_000 as Weight).saturating_mul(r as Weight)) + (48_022_000 as Weight) + // Standard Error: 6_000 + .saturating_add((141_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((1_130_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((1_146_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_fee(r: u32, ) -> Weight { - (7_595_000 as Weight) + (7_590_000 as Weight) // Standard Error: 1_000 - .saturating_add((159_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((203_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_account_id(r: u32, ) -> Weight { - (8_265_000 as Weight) + (8_422_000 as Weight) // Standard Error: 1_000 - .saturating_add((161_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((210_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_fields(r: u32, ) -> Weight { - (7_644_000 as Weight) - // Standard Error: 1_000 - .saturating_add((157_000 as Weight).saturating_mul(r as Weight)) + (7_561_000 as Weight) + // Standard Error: 0 + .saturating_add((207_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn provide_judgement(r: u32, x: u32, ) -> Weight { - (33_454_000 as Weight) - // Standard Error: 5_000 - .saturating_add((202_000 as Weight).saturating_mul(r as Weight)) + (33_330_000 as Weight) + // Standard Error: 4_000 + .saturating_add((196_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((1_143_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((1_147_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { - (63_116_000 as Weight) + (61_538_000 as Weight) // Standard Error: 4_000 - .saturating_add((54_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((106_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((2_003_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_105_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((2_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn add_sub(s: u32, ) -> Weight { - (52_871_000 as Weight) + (52_704_000 as Weight) // Standard Error: 0 - .saturating_add((141_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((156_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn rename_sub(s: u32, ) -> Weight { - (16_359_000 as Weight) + (16_279_000 as Weight) // Standard Error: 0 - .saturating_add((21_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((22_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)) } fn remove_sub(s: u32, ) -> Weight { - (54_147_000 as Weight) + (53_681_000 as Weight) // Standard Error: 0 - .saturating_add((122_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((138_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn quit_sub(s: u32, ) -> Weight { - (33_116_000 as Weight) + (32_963_000 as Weight) // Standard Error: 0 - .saturating_add((122_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((136_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)) } diff --git a/runtime/polkadot/src/weights/pallet_im_online.rs b/runtime/polkadot/src/weights/pallet_im_online.rs index 803a81972316..620ea6c42643 100644 --- a/runtime/polkadot/src/weights/pallet_im_online.rs +++ b/runtime/polkadot/src/weights/pallet_im_online.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_im_online //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,11 +44,11 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_im_online::WeightInfo for WeightInfo { fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { - (88_108_000 as Weight) + (88_006_000 as Weight) // Standard Error: 0 - .saturating_add((162_000 as Weight).saturating_mul(k as Weight)) - // Standard Error: 2_000 - .saturating_add((314_000 as Weight).saturating_mul(e as Weight)) + .saturating_add((157_000 as Weight).saturating_mul(k as Weight)) + // Standard Error: 1_000 + .saturating_add((328_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_indices.rs b/runtime/polkadot/src/weights/pallet_indices.rs index 4b799601b1a0..0b590d27adc4 100644 --- a/runtime/polkadot/src/weights/pallet_indices.rs +++ b/runtime/polkadot/src/weights/pallet_indices.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_indices //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,27 +44,27 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_indices::WeightInfo for WeightInfo { fn claim() -> Weight { - (38_147_000 as Weight) + (38_148_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn transfer() -> Weight { - (46_258_000 as Weight) + (46_185_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn free() -> Weight { - (38_012_000 as Weight) + (38_031_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_transfer() -> Weight { - (38_762_000 as Weight) + (38_125_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn freeze() -> Weight { - (36_160_000 as Weight) + (36_300_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_membership.rs b/runtime/polkadot/src/weights/pallet_membership.rs index b4892d3d66bc..fbc04feb62d4 100644 --- a/runtime/polkadot/src/weights/pallet_membership.rs +++ b/runtime/polkadot/src/weights/pallet_membership.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_membership //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,49 +44,49 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_membership::WeightInfo for WeightInfo { fn add_member(m: u32, ) -> Weight { - (22_281_000 as Weight) - // Standard Error: 1_000 - .saturating_add((121_000 as Weight).saturating_mul(m as Weight)) + (22_415_000 as Weight) + // Standard Error: 3_000 + .saturating_add((169_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn remove_member(m: u32, ) -> Weight { - (27_105_000 as Weight) + (27_436_000 as Weight) // Standard Error: 0 - .saturating_add((96_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((135_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn swap_member(m: u32, ) -> Weight { - (27_225_000 as Weight) + (27_577_000 as Weight) // Standard Error: 0 - .saturating_add((110_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((149_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn reset_member(m: u32, ) -> Weight { - (27_835_000 as Weight) + (28_417_000 as Weight) // Standard Error: 0 - .saturating_add((264_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((305_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn change_key(m: u32, ) -> Weight { - (28_699_000 as Weight) + (29_217_000 as Weight) // Standard Error: 0 - .saturating_add((108_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((145_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn set_prime(m: u32, ) -> Weight { - (6_983_000 as Weight) + (7_017_000 as Weight) // Standard Error: 0 - .saturating_add((78_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((80_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn clear_prime(_m: u32, ) -> Weight { - (2_735_000 as Weight) + (2_742_000 as Weight) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/polkadot/src/weights/pallet_multisig.rs b/runtime/polkadot/src/weights/pallet_multisig.rs index 52d90bc6427f..4e7eca209113 100644 --- a/runtime/polkadot/src/weights/pallet_multisig.rs +++ b/runtime/polkadot/src/weights/pallet_multisig.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_multisig //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,78 +44,78 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { fn as_multi_threshold_1(_z: u32, ) -> Weight { - (8_469_000 as Weight) + (10_355_000 as Weight) } fn as_multi_create(s: u32, z: u32, ) -> Weight { - (48_033_000 as Weight) + (48_627_000 as Weight) // Standard Error: 0 - .saturating_add((87_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((106_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (53_076_000 as Weight) + (54_885_000 as Weight) // Standard Error: 0 - .saturating_add((91_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((108_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (27_924_000 as Weight) + (28_368_000 as Weight) // Standard Error: 0 - .saturating_add((87_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((103_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (50_732_000 as Weight) + (52_085_000 as Weight) // Standard Error: 0 - .saturating_add((102_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((116_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (64_066_000 as Weight) + (66_094_000 as Weight) // Standard Error: 0 - .saturating_add((196_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((206_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 - .saturating_add((4_000 as Weight).saturating_mul(z as Weight)) + .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)) } fn approve_as_multi_create(s: u32, ) -> Weight { - (47_877_000 as Weight) + (48_354_000 as Weight) // Standard Error: 0 - .saturating_add((86_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((105_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)) } fn approve_as_multi_approve(s: u32, ) -> Weight { - (27_217_000 as Weight) + (27_780_000 as Weight) // Standard Error: 0 - .saturating_add((87_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((103_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)) } fn approve_as_multi_complete(s: u32, ) -> Weight { - (108_186_000 as Weight) + (108_496_000 as Weight) // Standard Error: 0 - .saturating_add((196_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((211_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)) } fn cancel_as_multi(s: u32, ) -> Weight { - (80_428_000 as Weight) + (81_062_000 as Weight) // Standard Error: 0 - .saturating_add((83_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((103_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)) } diff --git a/runtime/polkadot/src/weights/pallet_proxy.rs b/runtime/polkadot/src/weights/pallet_proxy.rs index bfb932c3a939..cd44de29fec9 100644 --- a/runtime/polkadot/src/weights/pallet_proxy.rs +++ b/runtime/polkadot/src/weights/pallet_proxy.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_proxy //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,75 +44,75 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_proxy::WeightInfo for WeightInfo { fn proxy(p: u32, ) -> Weight { - (21_441_000 as Weight) - // Standard Error: 1_000 - .saturating_add((124_000 as Weight).saturating_mul(p as Weight)) + (21_368_000 as Weight) + // Standard Error: 0 + .saturating_add((123_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } fn proxy_announced(a: u32, p: u32, ) -> Weight { - (50_942_000 as Weight) + (51_019_000 as Weight) // Standard Error: 1_000 - .saturating_add((495_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 2_000 - .saturating_add((100_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((562_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 1_000 + .saturating_add((108_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)) } fn remove_announcement(a: u32, _p: u32, ) -> Weight { - (35_895_000 as Weight) + (36_491_000 as Weight) // Standard Error: 1_000 - .saturating_add((485_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((556_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn reject_announcement(a: u32, _p: u32, ) -> Weight { - (35_800_000 as Weight) + (36_142_000 as Weight) // Standard Error: 1_000 - .saturating_add((488_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((564_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn announce(a: u32, p: u32, ) -> Weight { - (48_613_000 as Weight) + (48_515_000 as Weight) // Standard Error: 2_000 - .saturating_add((498_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((562_000 as Weight).saturating_mul(a as Weight)) // Standard Error: 2_000 - .saturating_add((106_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((110_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)) } fn add_proxy(p: u32, ) -> Weight { - (34_308_000 as Weight) + (34_650_000 as Weight) // Standard Error: 1_000 - .saturating_add((176_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((212_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)) } fn remove_proxy(p: u32, ) -> Weight { - (33_775_000 as Weight) + (34_378_000 as Weight) // Standard Error: 2_000 - .saturating_add((206_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((240_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)) } fn remove_proxies(p: u32, ) -> Weight { - (32_306_000 as Weight) + (32_543_000 as Weight) // Standard Error: 1_000 - .saturating_add((130_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((134_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)) } fn anonymous(p: u32, ) -> Weight { - (45_964_000 as Weight) + (46_410_000 as Weight) // Standard Error: 1_000 - .saturating_add((31_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((32_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)) } fn kill_anonymous(p: u32, ) -> Weight { - (33_990_000 as Weight) + (34_483_000 as Weight) // Standard Error: 1_000 - .saturating_add((132_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((133_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)) } diff --git a/runtime/polkadot/src/weights/pallet_scheduler.rs b/runtime/polkadot/src/weights/pallet_scheduler.rs index 17564ec684e4..d071d389024d 100644 --- a/runtime/polkadot/src/weights/pallet_scheduler.rs +++ b/runtime/polkadot/src/weights/pallet_scheduler.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_scheduler //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,30 +44,30 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { fn schedule(s: u32, ) -> Weight { - (22_755_000 as Weight) + (23_340_000 as Weight) // Standard Error: 0 - .saturating_add((47_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((39_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)) } fn cancel(s: u32, ) -> Weight { - (22_112_000 as Weight) + (22_347_000 as Weight) // Standard Error: 4_000 - .saturating_add((1_354_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((1_864_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn schedule_named(s: u32, ) -> Weight { - (29_156_000 as Weight) + (29_626_000 as Weight) // Standard Error: 1_000 - .saturating_add((64_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((58_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)) } fn cancel_named(s: u32, ) -> Weight { - (24_505_000 as Weight) + (25_024_000 as Weight) // Standard Error: 4_000 - .saturating_add((1_376_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((1_882_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)) } diff --git a/runtime/polkadot/src/weights/pallet_session.rs b/runtime/polkadot/src/weights/pallet_session.rs index cd2aa1395343..b873df595f08 100644 --- a/runtime/polkadot/src/weights/pallet_session.rs +++ b/runtime/polkadot/src/weights/pallet_session.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_session //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,12 +44,12 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_session::WeightInfo for WeightInfo { fn set_keys() -> Weight { - (68_529_000 as Weight) + (71_592_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } fn purge_keys() -> Weight { - (38_184_000 as Weight) + (40_063_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_staking.rs b/runtime/polkadot/src/weights/pallet_staking.rs index 85cde7e6fe2a..101956ffe9ab 100644 --- a/runtime/polkadot/src/weights/pallet_staking.rs +++ b/runtime/polkadot/src/weights/pallet_staking.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,154 +44,154 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_staking::WeightInfo for WeightInfo { fn bond() -> Weight { - (66_434_000 as Weight) + (70_259_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn bond_extra() -> Weight { - (51_531_000 as Weight) + (53_621_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn unbond() -> Weight { - (54_336_000 as Weight) + (57_038_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn withdraw_unbonded_update(s: u32, ) -> Weight { - (47_505_000 as Weight) + (49_182_000 as Weight) // Standard Error: 0 - .saturating_add((24_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((31_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn withdraw_unbonded_kill(s: u32, ) -> Weight { - (77_865_000 as Weight) + (81_006_000 as Weight) // Standard Error: 1_000 - .saturating_add((2_194_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_333_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn validate() -> Weight { - (28_555_000 as Weight) + (31_525_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn kick(k: u32, ) -> Weight { - (10_886_000 as Weight) - // Standard Error: 6_000 - .saturating_add((15_538_000 as Weight).saturating_mul(k as Weight)) + (10_487_000 as Weight) + // Standard Error: 7_000 + .saturating_add((16_334_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight))) } fn nominate(n: u32, ) -> Weight { - (34_708_000 as Weight) - // Standard Error: 9_000 - .saturating_add((5_034_000 as Weight).saturating_mul(n as Weight)) + (38_083_000 as Weight) + // Standard Error: 10_000 + .saturating_add((5_185_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn chill() -> Weight { - (15_837_000 as Weight) + (16_783_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) } fn set_payee() -> Weight { - (10_696_000 as Weight) + (11_391_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_controller() -> Weight { - (23_482_000 as Weight) + (24_470_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_validator_count() -> Weight { - (1_815_000 as Weight) + (1_879_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_no_eras() -> Weight { - (2_048_000 as Weight) + (2_139_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_new_era() -> Weight { - (2_052_000 as Weight) + (2_096_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_new_era_always() -> Weight { - (2_047_000 as Weight) + (2_089_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_invulnerables(v: u32, ) -> Weight { - (1_969_000 as Weight) + (2_143_000 as Weight) // Standard Error: 0 - .saturating_add((5_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((23_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_unstake(s: u32, ) -> Weight { - (54_672_000 as Weight) + (58_264_000 as Weight) // Standard Error: 1_000 - .saturating_add((2_189_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_309_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn cancel_deferred_slash(s: u32, ) -> Weight { - (3_374_694_000 as Weight) - // Standard Error: 221_000 - .saturating_add((19_788_000 as Weight).saturating_mul(s as Weight)) + (3_444_385_000 as Weight) + // Standard Error: 224_000 + .saturating_add((19_743_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)) } fn payout_stakers_dead_controller(n: u32, ) -> Weight { - (95_732_000 as Weight) - // Standard Error: 17_000 - .saturating_add((45_189_000 as Weight).saturating_mul(n as Weight)) + (106_496_000 as Weight) + // Standard Error: 13_000 + .saturating_add((46_186_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(n as Weight))) } fn payout_stakers_alive_staked(n: u32, ) -> Weight { - (123_745_000 as Weight) - // Standard Error: 22_000 - .saturating_add((58_409_000 as Weight).saturating_mul(n as Weight)) + (131_706_000 as Weight) + // Standard Error: 20_000 + .saturating_add((60_519_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(11 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight))) } fn rebond(l: u32, ) -> Weight { - (44_585_000 as Weight) + (46_089_000 as Weight) // Standard Error: 1_000 - .saturating_add((63_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((64_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_history_depth(e: u32, ) -> Weight { (0 as Weight) - // Standard Error: 69_000 - .saturating_add((31_931_000 as Weight).saturating_mul(e as Weight)) + // Standard Error: 67_000 + .saturating_add((32_486_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight))) } fn reap_stash(s: u32, ) -> Weight { - (65_438_000 as Weight) + (69_019_000 as Weight) // Standard Error: 0 - .saturating_add((2_182_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_317_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn new_era(v: u32, n: u32, ) -> Weight { (0 as Weight) - // Standard Error: 786_000 - .saturating_add((286_767_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 39_000 - .saturating_add((46_380_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 666_000 + .saturating_add((306_698_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 33_000 + .saturating_add((47_483_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) @@ -200,12 +200,12 @@ impl pallet_staking::WeightInfo for WeightInfo { } fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight { (0 as Weight) - // Standard Error: 93_000 - .saturating_add((23_941_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 93_000 - .saturating_add((26_505_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 3_172_000 - .saturating_add((25_012_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 97_000 + .saturating_add((25_109_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 97_000 + .saturating_add((27_162_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 3_332_000 + .saturating_add((50_488_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) @@ -214,17 +214,17 @@ impl pallet_staking::WeightInfo for WeightInfo { fn get_npos_targets(v: u32, ) -> Weight { (0 as Weight) // Standard Error: 31_000 - .saturating_add((10_079_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((10_220_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight))) } fn set_staking_limits() -> Weight { - (4_524_000 as Weight) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + (5_584_000 as Weight) + .saturating_add(T::DbWeight::get().writes(5 as Weight)) } fn chill_other() -> Weight { - (30_191_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) + (39_524_000 as Weight) + .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/polkadot/src/weights/pallet_timestamp.rs b/runtime/polkadot/src/weights/pallet_timestamp.rs index 53a369db2f70..f3078196b93e 100644 --- a/runtime/polkadot/src/weights/pallet_timestamp.rs +++ b/runtime/polkadot/src/weights/pallet_timestamp.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,11 +44,11 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { fn set() -> Weight { - (9_868_000 as Weight) + (9_886_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn on_finalize() -> Weight { - (4_337_000 as Weight) + (4_386_000 as Weight) } } diff --git a/runtime/polkadot/src/weights/pallet_tips.rs b/runtime/polkadot/src/weights/pallet_tips.rs index 157148b26101..c3315cc0f250 100644 --- a/runtime/polkadot/src/weights/pallet_tips.rs +++ b/runtime/polkadot/src/weights/pallet_tips.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_tips //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,44 +44,44 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_tips::WeightInfo for WeightInfo { fn report_awesome(r: u32, ) -> Weight { - (45_075_000 as Weight) + (46_460_000 as Weight) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((2_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn retract_tip() -> Weight { - (42_197_000 as Weight) + (42_798_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn tip_new(r: u32, t: u32, ) -> Weight { - (27_673_000 as Weight) + (27_685_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((117_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((115_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn tip(t: u32, ) -> Weight { - (17_648_000 as Weight) + (18_081_000 as Weight) // Standard Error: 0 - .saturating_add((536_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((565_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn close_tip(t: u32, ) -> Weight { - (77_210_000 as Weight) + (77_929_000 as Weight) // Standard Error: 0 - .saturating_add((301_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((299_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn slash_tip(t: u32, ) -> Weight { - (22_593_000 as Weight) + (22_710_000 as Weight) // Standard Error: 0 - .saturating_add((6_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((7_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_treasury.rs b/runtime/polkadot/src/weights/pallet_treasury.rs index 3b37e873709f..058cf2d845b9 100644 --- a/runtime/polkadot/src/weights/pallet_treasury.rs +++ b/runtime/polkadot/src/weights/pallet_treasury.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_treasury //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,26 +44,26 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_treasury::WeightInfo for WeightInfo { fn propose_spend() -> Weight { - (37_918_000 as Weight) + (39_374_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn reject_proposal() -> Weight { - (47_245_000 as Weight) + (48_264_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn approve_proposal(p: u32, ) -> Weight { - (11_005_000 as Weight) + (11_245_000 as Weight) // Standard Error: 0 - .saturating_add((35_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((32_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)) } fn on_initialize_proposals(p: u32, ) -> Weight { - (38_570_000 as Weight) + (40_847_000 as Weight) // Standard Error: 15_000 - .saturating_add((56_410_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((56_748_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) diff --git a/runtime/polkadot/src/weights/pallet_utility.rs b/runtime/polkadot/src/weights/pallet_utility.rs index 7c81ce2a7a6e..e760a508f063 100644 --- a/runtime/polkadot/src/weights/pallet_utility.rs +++ b/runtime/polkadot/src/weights/pallet_utility.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_utility //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,16 +44,16 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { fn batch(c: u32, ) -> Weight { - (13_742_000 as Weight) + (13_489_000 as Weight) // Standard Error: 0 - .saturating_add((607_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((605_000 as Weight).saturating_mul(c as Weight)) } fn as_derivative() -> Weight { - (3_045_000 as Weight) + (3_230_000 as Weight) } fn batch_all(c: u32, ) -> Weight { - (13_513_000 as Weight) + (13_266_000 as Weight) // Standard Error: 0 - .saturating_add((1_026_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((1_014_000 as Weight).saturating_mul(c as Weight)) } } diff --git a/runtime/polkadot/src/weights/pallet_vesting.rs b/runtime/polkadot/src/weights/pallet_vesting.rs index 6d7555d03afe..8b9cd15637ac 100644 --- a/runtime/polkadot/src/weights/pallet_vesting.rs +++ b/runtime/polkadot/src/weights/pallet_vesting.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_vesting //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: diff --git a/runtime/polkadot/src/weights/runtime_common_claims.rs b/runtime/polkadot/src/weights/runtime_common_claims.rs index 3b5047ea9473..42d2b2f6d8eb 100644 --- a/runtime/polkadot/src/weights/runtime_common_claims.rs +++ b/runtime/polkadot/src/weights/runtime_common_claims.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::claims //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,27 +44,27 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::claims::WeightInfo for WeightInfo { fn claim() -> Weight { - (435_155_000 as Weight) + (447_705_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } fn mint_claim() -> Weight { - (11_642_000 as Weight) + (11_995_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn claim_attest() -> Weight { - (437_198_000 as Weight) + (439_703_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } fn attest() -> Weight { - (124_628_000 as Weight) + (128_588_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } fn move_claim() -> Weight { - (25_441_000 as Weight) + (26_297_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } diff --git a/runtime/rococo/Cargo.toml b/runtime/rococo/Cargo.toml index f9cd04c7decf..d59aac3a0834 100644 --- a/runtime/rococo/Cargo.toml +++ b/runtime/rococo/Cargo.toml @@ -69,9 +69,14 @@ xcm-builder = { package = "xcm-builder", path = "../../xcm/xcm-builder", default pallet-xcm = { path = "../../xcm/pallet-xcm", default-features = false } # Bridge Dependencies +bp-messages = { path = "../../bridges/primitives/messages", default-features = false } bp-rococo = { path = "../../bridges/primitives/chain-rococo", default-features = false } +bp-runtime = { path = "../../bridges/primitives/runtime", default-features = false } bp-wococo = { path = "../../bridges/primitives/chain-wococo", default-features = false } +bridge-runtime-common = { path = "../../bridges/bin/runtime-common", default-features = false } +pallet-bridge-dispatch = { path = "../../bridges/modules/dispatch", default-features = false } pallet-bridge-grandpa = { path = "../../bridges/modules/grandpa", default-features = false } +pallet-bridge-messages = { path = "../../bridges/modules/messages", default-features = false } [build-dependencies] substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -82,8 +87,11 @@ no_std = [] std = [ "authority-discovery-primitives/std", "babe-primitives/std", + "bp-messages/std", "bp-rococo/std", + "bp-runtime/std", "bp-wococo/std", + "bridge-runtime-common/std", "parity-scale-codec/std", "frame-executive/std", "pallet-authority-discovery/std", @@ -91,7 +99,9 @@ std = [ "pallet-babe/std", "beefy-primitives/std", "pallet-balances/std", + "pallet-bridge-dispatch/std", "pallet-bridge-grandpa/std", + "pallet-bridge-messages/std", "pallet-collective/std", "pallet-beefy/std", "pallet-grandpa/std", diff --git a/runtime/rococo/src/bridge_messages.rs b/runtime/rococo/src/bridge_messages.rs new file mode 100644 index 000000000000..93e7314c737d --- /dev/null +++ b/runtime/rococo/src/bridge_messages.rs @@ -0,0 +1,410 @@ +// Copyright 2020 Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Over-bridge messaging support for Rococo <> Wococo bridge. + +pub use self::{at_rococo::*, at_wococo::*}; + +use bp_messages::{ + source_chain::TargetHeaderChain, + target_chain::{ProvedMessages, SourceHeaderChain}, + InboundLaneData, LaneId, Message, MessageNonce, +}; +use bp_rococo::{EXTRA_STORAGE_PROOF_SIZE, MAXIMAL_ENCODED_ACCOUNT_ID_SIZE, max_extrinsic_size, max_extrinsic_weight}; +use bp_runtime::{ROCOCO_CHAIN_ID, WOCOCO_CHAIN_ID, ChainId}; +use bridge_runtime_common::messages::{ + BridgedChainWithMessages, ChainWithMessages, MessageBridge, MessageTransaction, ThisChainWithMessages, + source as messages_source, target as messages_target, +}; +use frame_support::{traits::Get, weights::{Weight, WeightToFeePolynomial}, RuntimeDebug}; +use sp_std::{convert::TryFrom, marker::PhantomData, ops::RangeInclusive}; + +/// Maximal number of pending outbound messages. +const MAXIMAL_PENDING_MESSAGES_AT_OUTBOUND_LANE: MessageNonce = bp_rococo::MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE; +/// Maximal weight of single message delivery confirmation transaction on Rococo/Wococo chain. +/// +/// This value is a result of `pallet_bridge_messages::Pallet::receive_messages_delivery_proof` weight formula +/// computation for the case when single message is confirmed. The result then must be rounded up to account +/// possible future runtime upgrades. +const MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT: Weight = 2_000_000_000; +/// Increase of delivery transaction weight on Rococo/Wococo chain with every additional message byte. +/// +/// This value is a result of `pallet_bridge_messages::WeightInfoExt::storage_proof_size_overhead(1)` call. The +/// result then must be rounded up to account possible future runtime upgrades. +const ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT: Weight = 25_000; +/// Weight of single regular message delivery transaction on Rococo/Wococo chain. +/// +/// This value is a result of `pallet_bridge_messages::Pallet::receive_messages_proof_weight()` call +/// for the case when single message of `pallet_bridge_messages::EXPECTED_DEFAULT_MESSAGE_LENGTH` bytes is delivered. +/// The message must have dispatch weight set to zero. The result then must be rounded up to account +/// possible future runtime upgrades. +const DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT: Weight = 1_500_000_000; +/// Weight of pay-dispatch-fee operation for inbound messages at Rococo/Wococo chain. +/// +/// This value corresponds to the result of `pallet_bridge_messages::WeightInfoExt::pay_inbound_dispatch_fee_overhead()` +/// call for your chain. Don't put too much reserve there, because it is used to **decrease** +/// `DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT` cost. So putting large reserve would make delivery transactions cheaper. +const PAY_INBOUND_DISPATCH_FEE_WEIGHT: Weight = 600_000_000; +/// Number of bytes, included in the signed Rococo/Wococo transaction apart from the encoded call itself. +/// +/// Can be computed by subtracting encoded call size from raw transaction size. +const TX_EXTRA_BYTES: u32 = 130; + +/// Rococo chain as it is seen at Rococo. +pub type RococoAtRococo = RococoLikeChain; + +/// Rococo chain as it is seen at Wococo. +pub type RococoAtWococo = RococoLikeChain; + +/// Wococo chain as it is seen at Wococo. +pub type WococoAtWococo = RococoLikeChain; + +/// Wococo chain as it is seen at Rococo. +pub type WococoAtRococo = RococoLikeChain; + +/// Rococo/Wococo chain from message lane point of view. +#[derive(RuntimeDebug, Clone, Copy)] +pub struct RococoLikeChain { + _bridge_definition: PhantomData, + _at_this_chain_grandpa_pallet_instance: PhantomData, +} + +impl ChainWithMessages for RococoLikeChain { + type Hash = crate::Hash; + type AccountId = crate::AccountId; + type Signer = primitives::v1::AccountPublic; + type Signature = crate::Signature; + type Weight = Weight; + type Balance = crate::Balance; +} + +impl ThisChainWithMessages for RococoLikeChain { + type Call = crate::Call; + + fn is_outbound_lane_enabled(lane: &LaneId) -> bool { + *lane == [0, 0, 0, 0] + } + + fn maximal_pending_messages_at_outbound_lane() -> MessageNonce { + MAXIMAL_PENDING_MESSAGES_AT_OUTBOUND_LANE + } + + fn estimate_delivery_confirmation_transaction() -> MessageTransaction { + let inbound_data_size = InboundLaneData::::encoded_size_hint( + MAXIMAL_ENCODED_ACCOUNT_ID_SIZE, + 1, + 1, + ) + .unwrap_or(u32::MAX); + + MessageTransaction { + dispatch_weight: MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT, + size: inbound_data_size + .saturating_add(EXTRA_STORAGE_PROOF_SIZE) + .saturating_add(TX_EXTRA_BYTES), + } + } + + fn transaction_payment(transaction: MessageTransaction) -> crate::Balance { + // current fee multiplier is used here + bridge_runtime_common::messages::transaction_payment( + crate::BlockWeights::get().get(frame_support::weights::DispatchClass::Normal).base_extrinsic, + crate::TransactionByteFee::get(), + pallet_transaction_payment::Pallet::::next_fee_multiplier(), + |weight| crate::constants::fee::WeightToFee::calc(&weight), + transaction, + ) + } +} + +impl BridgedChainWithMessages for RococoLikeChain { + fn maximal_extrinsic_size() -> u32 { + max_extrinsic_size() + } + + fn message_weight_limits(_message_payload: &[u8]) -> RangeInclusive { + // we don't want to relay too large messages + keep reserve for future upgrades + let upper_limit = messages_target::maximal_incoming_message_dispatch_weight(max_extrinsic_weight()); + + // we're charging for payload bytes in `With(Wococo | Rococo)MessageBridge::transaction_payment` function + // + // this bridge may be used to deliver all kind of messages, so we're not making any assumptions about + // minimal dispatch weight here + + 0..=upper_limit + } + + fn estimate_delivery_transaction( + message_payload: &[u8], + include_pay_dispatch_fee_cost: bool, + message_dispatch_weight: Weight, + ) -> MessageTransaction { + let message_payload_len = u32::try_from(message_payload.len()).unwrap_or(u32::MAX); + let extra_bytes_in_payload = Weight::from(message_payload_len) + .saturating_sub(pallet_bridge_messages::EXPECTED_DEFAULT_MESSAGE_LENGTH.into()); + + MessageTransaction { + dispatch_weight: extra_bytes_in_payload + .saturating_mul(ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT) + .saturating_add(DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT) + .saturating_sub(if include_pay_dispatch_fee_cost { + 0 + } else { + PAY_INBOUND_DISPATCH_FEE_WEIGHT + }) + .saturating_add(message_dispatch_weight), + size: message_payload_len + .saturating_add(EXTRA_STORAGE_PROOF_SIZE) + .saturating_add(TX_EXTRA_BYTES), + } + } + + fn transaction_payment(transaction: MessageTransaction) -> crate::Balance { + // current fee multiplier is used here + bridge_runtime_common::messages::transaction_payment( + crate::BlockWeights::get().get(frame_support::weights::DispatchClass::Normal).base_extrinsic, + crate::TransactionByteFee::get(), + pallet_transaction_payment::Pallet::::next_fee_multiplier(), + |weight| crate::constants::fee::WeightToFee::calc(&weight), + transaction, + ) + } +} + +impl TargetHeaderChain, crate::AccountId> + for RococoLikeChain +where + B: MessageBridge, + B::ThisChain: ChainWithMessages, + B::BridgedChain: ChainWithMessages, + GI: 'static, + crate::Runtime: pallet_bridge_grandpa::Config + pallet_bridge_messages::Config, + <>::BridgedChain as bp_runtime::Chain>::Hash: From, +{ + type Error = &'static str; + type MessagesDeliveryProof = messages_source::FromBridgedChainMessagesDeliveryProof; + + fn verify_message(payload: &messages_source::FromThisChainMessagePayload) -> Result<(), Self::Error> { + messages_source::verify_chain_message::(payload) + } + + fn verify_messages_delivery_proof( + proof: Self::MessagesDeliveryProof, + ) -> Result<(LaneId, InboundLaneData), Self::Error> { + messages_source::verify_messages_delivery_proof::(proof) + } +} + +impl SourceHeaderChain for RococoLikeChain +where + B: MessageBridge, + B::BridgedChain: ChainWithMessages, + GI: 'static, + crate::Runtime: pallet_bridge_grandpa::Config + pallet_bridge_messages::Config, + <>::BridgedChain as bp_runtime::Chain>::Hash: From, +{ + type Error = &'static str; + type MessagesProof = messages_target::FromBridgedChainMessagesProof; + + fn verify_messages_proof( + proof: Self::MessagesProof, + messages_count: u32, + ) -> Result>, Self::Error> { + messages_target::verify_messages_proof::(proof, messages_count) + } +} + +/// The cost of delivery confirmation transaction. +pub struct GetDeliveryConfirmationTransactionFee; + +impl Get for GetDeliveryConfirmationTransactionFee { + fn get() -> crate::Balance { + ::transaction_payment( + RococoAtRococo::estimate_delivery_confirmation_transaction() + ) + } +} + +/// This module contains definitions that are used by the messages pallet instance, 'deployed' at Rococo. +mod at_rococo { + use super::*; + + /// Message bridge that is 'deployed' at Rococo chain and connecting it to Wococo chain. + #[derive(RuntimeDebug, Clone, Copy)] + pub struct AtRococoWithWococoMessageBridge; + + impl MessageBridge for AtRococoWithWococoMessageBridge { + const THIS_CHAIN_ID: ChainId = ROCOCO_CHAIN_ID; + const BRIDGED_CHAIN_ID: ChainId = WOCOCO_CHAIN_ID; + const RELAYER_FEE_PERCENT: u32 = 10; + + type ThisChain = RococoAtRococo; + type BridgedChain = WococoAtRococo; + type BridgedMessagesInstance = crate::AtWococoWithRococoMessagesInstance; + + fn bridged_balance_to_this_balance(bridged_balance: bp_wococo::Balance) -> bp_rococo::Balance { + bridged_balance + } + } + + /// Message payload for Rococo -> Wococo messages as it is seen at the Rococo. + pub type ToWococoMessagePayload = messages_source::FromThisChainMessagePayload; + + /// Message verifier for Rococo -> Wococo messages at Rococo. + pub type ToWococoMessageVerifier = messages_source::FromThisChainMessageVerifier; + + /// Message payload for Wococo -> Rococo messages as it is seen at Rococo. + pub type FromWococoMessagePayload = messages_target::FromBridgedChainMessagePayload< + AtRococoWithWococoMessageBridge + >; + + /// Encoded Rococo Call as it comes from Wococo. + pub type FromWococoEncodedCall = messages_target::FromBridgedChainEncodedMessageCall; + + /// Call-dispatch based message dispatch for Wococo -> Rococo messages. + pub type FromWococoMessageDispatch = messages_target::FromBridgedChainMessageDispatch< + AtRococoWithWococoMessageBridge, + crate::Runtime, + pallet_balances::Pallet, + crate::AtRococoFromWococoMessagesDispatch, + >; +} + +/// This module contains definitions that are used by the messages pallet instance, 'deployed' at Wococo. +mod at_wococo { + use super::*; + + /// Message bridge that is 'deployed' at Wococo chain and connecting it to Rococo chain. + #[derive(RuntimeDebug, Clone, Copy)] + pub struct AtWococoWithRococoMessageBridge; + + impl MessageBridge for AtWococoWithRococoMessageBridge { + const THIS_CHAIN_ID: ChainId = WOCOCO_CHAIN_ID; + const BRIDGED_CHAIN_ID: ChainId = ROCOCO_CHAIN_ID; + const RELAYER_FEE_PERCENT: u32 = 10; + + type ThisChain = WococoAtWococo; + type BridgedChain = RococoAtWococo; + type BridgedMessagesInstance = crate::AtRococoWithWococoMessagesInstance; + + fn bridged_balance_to_this_balance(bridged_balance: bp_rococo::Balance) -> bp_wococo::Balance { + bridged_balance + } + } + + /// Message payload for Wococo -> Rococo messages as it is seen at the Wococo. + pub type ToRococoMessagePayload = messages_source::FromThisChainMessagePayload; + + /// Message verifier for Wococo -> Rococo messages at Wococo. + pub type ToRococoMessageVerifier = messages_source::FromThisChainMessageVerifier; + + /// Message payload for Rococo -> Wococo messages as it is seen at Wococo. + pub type FromRococoMessagePayload = messages_target::FromBridgedChainMessagePayload< + AtWococoWithRococoMessageBridge, + >; + + /// Encoded Wococo Call as it comes from Rococo. + pub type FromRococoEncodedCall = messages_target::FromBridgedChainEncodedMessageCall; + + /// Call-dispatch based message dispatch for Rococo -> Wococo messages. + pub type FromRococoMessageDispatch = messages_target::FromBridgedChainMessageDispatch< + AtWococoWithRococoMessageBridge, + crate::Runtime, + pallet_balances::Pallet, + crate::AtWococoFromRococoMessagesDispatch, + >; +} + +#[cfg(test)] +mod tests { + use bridge_runtime_common::messages; + use parity_scale_codec::Encode; + use super::*; + + #[test] + fn ensure_rococo_messages_weights_are_correct() { + // **NOTE**: the main purpose of this test is to be sure that any message that is sumbitted + // to (any) inbound lane in Rococo<>Wococo bridge can be delivered to the bridged chain. + // Since we deal with testnets here, in case of failure + urgency: + // + // 1) ping bridges team about this failure (see the CODEOWNERS file if you're unsure who to ping); + // 2) comment/#[ignore] the test. + + // we don't have any knowledge of messages-at-Rococo weights, so we'll be using + // weights of one of our testnets, which should be accurate enough + type Weights = pallet_bridge_messages::weights::RialtoWeight; + + pallet_bridge_messages::ensure_weights_are_correct::( + DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT, + ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT, + MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT, + PAY_INBOUND_DISPATCH_FEE_WEIGHT, + ); + + let max_incoming_message_proof_size = bp_rococo::EXTRA_STORAGE_PROOF_SIZE.saturating_add( + messages::target::maximal_incoming_message_size(bp_rococo::max_extrinsic_size()), + ); + pallet_bridge_messages::ensure_able_to_receive_message::( + bp_rococo::max_extrinsic_size(), + bp_rococo::max_extrinsic_weight(), + max_incoming_message_proof_size, + messages::target::maximal_incoming_message_dispatch_weight(bp_rococo::max_extrinsic_weight()), + ); + + let max_incoming_inbound_lane_data_proof_size = bp_messages::InboundLaneData::<()>::encoded_size_hint( + bp_rococo::MAXIMAL_ENCODED_ACCOUNT_ID_SIZE, + bp_rococo::MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE as _, + bp_rococo::MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE as _, + ) + .unwrap_or(u32::MAX); + pallet_bridge_messages::ensure_able_to_receive_confirmation::( + bp_rococo::max_extrinsic_size(), + bp_rococo::max_extrinsic_weight(), + max_incoming_inbound_lane_data_proof_size, + bp_rococo::MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE, + bp_rococo::MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE, + ); + } + + #[test] + fn ensure_rococo_tx_extra_bytes_constant_is_correct() { + // **NOTE**: this test checks that we're computing transaction fee (for bridged chain, which, in + // case of Rococo<>Wococo, means any chain) on-chain properly. If this assert fails: + // + // 1) just fix the `TX_EXTRA_BYTES` constant to actual (or sightly rounded up) value; + // 2) (only if it has changed significantly (> x2 times)) ping the bridges team (see the CODEOWNERS + // file if you're unsure who to ping) + + let signed_extra: crate::SignedExtra = ( + frame_system::CheckSpecVersion::new(), + frame_system::CheckTxVersion::new(), + frame_system::CheckGenesis::new(), + frame_system::CheckMortality::from(sp_runtime::generic::Era::mortal(u64::MAX, u64::MAX)), + frame_system::CheckNonce::from(primitives::v1::Nonce::MAX), + frame_system::CheckWeight::new(), + pallet_transaction_payment::ChargeTransactionPayment::from(primitives::v1::Balance::MAX), + ); + let extra_bytes_in_transaction = crate::Address::default().encoded_size() + + crate::Signature::default().encoded_size() + + signed_extra.encoded_size(); + assert!( + TX_EXTRA_BYTES as usize >= extra_bytes_in_transaction, + "Hardcoded number of extra bytes in Rococo transaction {} is lower than actual value: {}", + TX_EXTRA_BYTES, + extra_bytes_in_transaction, + ); + } +} diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 7b48f2c0336b..a68123efea23 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -82,6 +82,8 @@ use runtime_parachains::ump as parachains_ump; use runtime_parachains::hrmp as parachains_hrmp; use runtime_parachains::scheduler as parachains_scheduler; +use bridge_runtime_common::messages::{MessageBridge, source::estimate_message_dispatch_and_delivery_fee}; + pub use pallet_balances::Call as BalancesCall; use polkadot_parachain::primitives::Id as ParaId; @@ -99,6 +101,7 @@ use frame_support::traits::InstanceFilter; /// Constant values used within the runtime. pub mod constants; +mod bridge_messages; mod validator_manager; // Make the WASM binary available. @@ -214,7 +217,7 @@ construct_runtime! { Inclusion: parachains_inclusion::{Pallet, Call, Storage, Event}, ParasInherent: parachains_paras_inherent::{Pallet, Call, Storage, Inherent}, Scheduler: parachains_scheduler::{Pallet, Call, Storage}, - Paras: parachains_paras::{Pallet, Call, Storage, Event, Config}, + Paras: parachains_paras::{Pallet, Call, Storage, Event, Config}, Initializer: parachains_initializer::{Pallet, Call, Storage}, Dmp: parachains_dmp::{Pallet, Call, Storage}, Ump: parachains_ump::{Pallet, Call, Storage, Event}, @@ -245,6 +248,13 @@ construct_runtime! { // Validator Manager pallet. ValidatorManager: validator_manager::{Pallet, Call, Storage, Event}, + // Bridge messages support. The same story as with the bridge grandpa pallet above ^^^ - when we're + // running as Rococo we only use `BridgeWococoMessages`/`BridgeWococoMessagesDispatch`, and vice versa. + BridgeRococoMessages: pallet_bridge_messages::{Pallet, Call, Storage, Event, Config} = 43, + BridgeWococoMessages: pallet_bridge_messages::::{Pallet, Call, Storage, Event, Config} = 44, + BridgeRococoMessagesDispatch: pallet_bridge_dispatch::{Pallet, Event} = 45, + BridgeWococoMessagesDispatch: pallet_bridge_dispatch::::{Pallet, Event} = 46, + // A "council" Collective: pallet_collective::{Pallet, Call, Storage, Origin, Event, Config} = 80, Membership: pallet_membership::{Pallet, Call, Storage, Event, Config} = 81, @@ -857,6 +867,111 @@ impl pallet_bridge_grandpa::Config for Runtime { type WeightInfo = pallet_bridge_grandpa::weights::RialtoWeight; } +// Instance that is 'deployed' at Wococo chain. Responsible for dispatching Rococo -> Wococo messages. +pub type AtWococoFromRococoMessagesDispatch = pallet_bridge_dispatch::DefaultInstance; +impl pallet_bridge_dispatch::Config for Runtime { + type Event = Event; + type MessageId = (bp_messages::LaneId, bp_messages::MessageNonce); + type Call = Call; + type CallFilter = (); + type EncodedCall = bridge_messages::FromRococoEncodedCall; + type SourceChainAccountId = bp_wococo::AccountId; + type TargetChainAccountPublic = sp_runtime::MultiSigner; + type TargetChainSignature = sp_runtime::MultiSignature; + type AccountIdConverter = bp_rococo::AccountIdConverter; +} + +// Instance that is 'deployed' at Rococo chain. Responsible for dispatching Wococo -> Rococo messages. +pub type AtRococoFromWococoMessagesDispatch = pallet_bridge_dispatch::Instance1; +impl pallet_bridge_dispatch::Config for Runtime { + type Event = Event; + type MessageId = (bp_messages::LaneId, bp_messages::MessageNonce); + type Call = Call; + type CallFilter = (); + type EncodedCall = bridge_messages::FromWococoEncodedCall; + type SourceChainAccountId = bp_rococo::AccountId; + type TargetChainAccountPublic = sp_runtime::MultiSigner; + type TargetChainSignature = sp_runtime::MultiSignature; + type AccountIdConverter = bp_wococo::AccountIdConverter; +} + +parameter_types! { + pub const MaxMessagesToPruneAtOnce: bp_messages::MessageNonce = 8; + pub const MaxUnrewardedRelayerEntriesAtInboundLane: bp_messages::MessageNonce = + bp_rococo::MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE; + pub const MaxUnconfirmedMessagesAtInboundLane: bp_messages::MessageNonce = + bp_rococo::MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE; + pub const RootAccountForPayments: Option = None; +} + +// Instance that is 'deployed' at Wococo chain. Responsible for sending Wococo -> Rococo messages +// and receiving Rococo -> Wococo messages. +pub type AtWococoWithRococoMessagesInstance = pallet_bridge_messages::DefaultInstance; +impl pallet_bridge_messages::Config for Runtime { + type Event = Event; + type WeightInfo = pallet_bridge_messages::weights::RialtoWeight; + type Parameter = (); + type MaxMessagesToPruneAtOnce = MaxMessagesToPruneAtOnce; + type MaxUnrewardedRelayerEntriesAtInboundLane = MaxUnrewardedRelayerEntriesAtInboundLane; + type MaxUnconfirmedMessagesAtInboundLane = MaxUnconfirmedMessagesAtInboundLane; + + type OutboundPayload = crate::bridge_messages::ToRococoMessagePayload; + type OutboundMessageFee = bp_wococo::Balance; + + type InboundPayload = crate::bridge_messages::FromRococoMessagePayload; + type InboundMessageFee = bp_rococo::Balance; + type InboundRelayer = bp_rococo::AccountId; + + type AccountIdConverter = bp_wococo::AccountIdConverter; + + type TargetHeaderChain = crate::bridge_messages::RococoAtWococo; + type LaneMessageVerifier = crate::bridge_messages::ToRococoMessageVerifier; + type MessageDeliveryAndDispatchPayment = pallet_bridge_messages::instant_payments::InstantCurrencyPayments< + Runtime, + pallet_balances::Pallet, + crate::bridge_messages::GetDeliveryConfirmationTransactionFee, + RootAccountForPayments, + >; + type OnDeliveryConfirmed = (); + + type SourceHeaderChain = crate::bridge_messages::RococoAtWococo; + type MessageDispatch = crate::bridge_messages::FromRococoMessageDispatch; +} + +// Instance that is 'deployed' at Rococo chain. Responsible for sending Rococo -> Wococo messages +// and receiving Wococo -> Rococo messages. +pub type AtRococoWithWococoMessagesInstance = pallet_bridge_messages::Instance1; +impl pallet_bridge_messages::Config for Runtime { + type Event = Event; + type WeightInfo = pallet_bridge_messages::weights::RialtoWeight; + type Parameter = (); + type MaxMessagesToPruneAtOnce = MaxMessagesToPruneAtOnce; + type MaxUnrewardedRelayerEntriesAtInboundLane = MaxUnrewardedRelayerEntriesAtInboundLane; + type MaxUnconfirmedMessagesAtInboundLane = MaxUnconfirmedMessagesAtInboundLane; + + type OutboundPayload = crate::bridge_messages::ToWococoMessagePayload; + type OutboundMessageFee = bp_rococo::Balance; + + type InboundPayload = crate::bridge_messages::FromWococoMessagePayload; + type InboundMessageFee = bp_wococo::Balance; + type InboundRelayer = bp_wococo::AccountId; + + type AccountIdConverter = bp_rococo::AccountIdConverter; + + type TargetHeaderChain = crate::bridge_messages::WococoAtRococo; + type LaneMessageVerifier = crate::bridge_messages::ToWococoMessageVerifier; + type MessageDeliveryAndDispatchPayment = pallet_bridge_messages::instant_payments::InstantCurrencyPayments< + Runtime, + pallet_balances::Pallet, + crate::bridge_messages::GetDeliveryConfirmationTransactionFee, + RootAccountForPayments, + >; + type OnDeliveryConfirmed = (); + + type SourceHeaderChain = crate::bridge_messages::WococoAtRococo; + type MessageDispatch = crate::bridge_messages::FromWococoMessageDispatch; +} + impl Randomness for ParentHashRandomness { fn random(subject: &[u8]) -> (Hash, BlockNumber) { ( @@ -1302,6 +1417,116 @@ sp_api::impl_runtime_apis! { } } + impl bp_rococo::ToRococoOutboundLaneApi for Runtime { + fn estimate_message_delivery_and_dispatch_fee( + _lane_id: bp_messages::LaneId, + payload: bridge_messages::ToWococoMessagePayload, + ) -> Option { + estimate_message_dispatch_and_delivery_fee::( + &payload, + bridge_messages::AtWococoWithRococoMessageBridge::RELAYER_FEE_PERCENT, + ).ok() + } + + fn message_details( + lane: bp_messages::LaneId, + begin: bp_messages::MessageNonce, + end: bp_messages::MessageNonce, + ) -> Vec> { + (begin..=end).filter_map(|nonce| { + let message_data = BridgeRococoMessages::outbound_message_data(lane, nonce)?; + let decoded_payload = bridge_messages::ToRococoMessagePayload::decode( + &mut &message_data.payload[..] + ).ok()?; + Some(bp_messages::MessageDetails { + nonce, + dispatch_weight: decoded_payload.weight, + size: message_data.payload.len() as _, + delivery_and_dispatch_fee: message_data.fee, + dispatch_fee_payment: decoded_payload.dispatch_fee_payment, + }) + }) + .collect() + } + + fn latest_received_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce { + BridgeRococoMessages::outbound_latest_received_nonce(lane) + } + + fn latest_generated_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce { + BridgeRococoMessages::outbound_latest_generated_nonce(lane) + } + } + + impl bp_rococo::FromRococoInboundLaneApi for Runtime { + fn latest_received_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce { + BridgeRococoMessages::inbound_latest_received_nonce(lane) + } + + fn latest_confirmed_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce { + BridgeRococoMessages::inbound_latest_confirmed_nonce(lane) + } + + fn unrewarded_relayers_state(lane: bp_messages::LaneId) -> bp_messages::UnrewardedRelayersState { + BridgeRococoMessages::inbound_unrewarded_relayers_state(lane) + } + } + + impl bp_wococo::ToWococoOutboundLaneApi for Runtime { + fn estimate_message_delivery_and_dispatch_fee( + _lane_id: bp_messages::LaneId, + payload: bridge_messages::ToWococoMessagePayload, + ) -> Option { + estimate_message_dispatch_and_delivery_fee::( + &payload, + bridge_messages::AtRococoWithWococoMessageBridge::RELAYER_FEE_PERCENT, + ).ok() + } + + fn message_details( + lane: bp_messages::LaneId, + begin: bp_messages::MessageNonce, + end: bp_messages::MessageNonce, + ) -> Vec> { + (begin..=end).filter_map(|nonce| { + let message_data = BridgeWococoMessages::outbound_message_data(lane, nonce)?; + let decoded_payload = bridge_messages::ToWococoMessagePayload::decode( + &mut &message_data.payload[..] + ).ok()?; + Some(bp_messages::MessageDetails { + nonce, + dispatch_weight: decoded_payload.weight, + size: message_data.payload.len() as _, + delivery_and_dispatch_fee: message_data.fee, + dispatch_fee_payment: decoded_payload.dispatch_fee_payment, + }) + }) + .collect() + } + + fn latest_received_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce { + BridgeWococoMessages::outbound_latest_received_nonce(lane) + } + + fn latest_generated_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce { + BridgeWococoMessages::outbound_latest_generated_nonce(lane) + } + } + + impl bp_wococo::FromWococoInboundLaneApi for Runtime { + fn latest_received_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce { + BridgeWococoMessages::inbound_latest_received_nonce(lane) + } + + fn latest_confirmed_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce { + BridgeWococoMessages::inbound_latest_confirmed_nonce(lane) + } + + fn unrewarded_relayers_state(lane: bp_messages::LaneId) -> bp_messages::UnrewardedRelayersState { + BridgeWococoMessages::inbound_unrewarded_relayers_state(lane) + } + } + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { fn account_nonce(account: AccountId) -> Nonce { System::account_nonce(account) diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 1358d07b780c..04f3c509dac8 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1079,7 +1079,7 @@ construct_runtime! { ParasInclusion: parachains_inclusion::{Pallet, Call, Storage, Event} = 44, ParasInherent: parachains_paras_inherent::{Pallet, Call, Storage, Inherent} = 45, ParasScheduler: parachains_scheduler::{Pallet, Call, Storage} = 46, - Paras: parachains_paras::{Pallet, Call, Storage, Event, Config} = 47, + Paras: parachains_paras::{Pallet, Call, Storage, Event, Config} = 47, ParasInitializer: parachains_initializer::{Pallet, Call, Storage} = 48, ParasDmp: parachains_dmp::{Pallet, Call, Storage} = 49, ParasUmp: parachains_ump::{Pallet, Call, Storage, Event} = 50, diff --git a/runtime/westend/src/weights/pallet_balances.rs b/runtime/westend/src/weights/pallet_balances.rs index 1fdbb034d67d..86f2121b4732 100644 --- a/runtime/westend/src/weights/pallet_balances.rs +++ b/runtime/westend/src/weights/pallet_balances.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_balances //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,32 +44,32 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { fn transfer() -> Weight { - (72_675_000 as Weight) + (73_094_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn transfer_keep_alive() -> Weight { - (53_454_000 as Weight) + (54_347_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_balance_creating() -> Weight { - (28_750_000 as Weight) + (29_223_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_balance_killing() -> Weight { - (35_013_000 as Weight) + (35_007_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_transfer() -> Weight { - (72_130_000 as Weight) + (72_492_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn transfer_all() -> Weight { - (66_281_000 as Weight) + (67_276_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_identity.rs b/runtime/westend/src/weights/pallet_identity.rs index 229eee38a0cb..1ca5dabd6ff2 100644 --- a/runtime/westend/src/weights/pallet_identity.rs +++ b/runtime/westend/src/weights/pallet_identity.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_identity //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,133 +44,133 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_identity::WeightInfo for WeightInfo { fn add_registrar(r: u32, ) -> Weight { - (20_868_000 as Weight) + (20_852_000 as Weight) // Standard Error: 2_000 - .saturating_add((228_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((249_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_identity(r: u32, x: u32, ) -> Weight { - (50_889_000 as Weight) + (50_867_000 as Weight) // Standard Error: 14_000 - .saturating_add((193_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((216_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 1_000 - .saturating_add((934_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((948_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_subs_new(s: u32, ) -> Weight { - (39_392_000 as Weight) + (39_701_000 as Weight) // Standard Error: 1_000 - .saturating_add((6_164_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((6_376_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn set_subs_old(p: u32, ) -> Weight { - (40_206_000 as Weight) + (40_181_000 as Weight) // Standard Error: 0 - .saturating_add((2_006_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((2_045_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(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) } fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - (49_355_000 as Weight) - // Standard Error: 10_000 - .saturating_add((89_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 1_000 - .saturating_add((1_997_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 1_000 - .saturating_add((605_000 as Weight).saturating_mul(x as Weight)) + (48_884_000 as Weight) + // Standard Error: 6_000 + .saturating_add((140_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 0 + .saturating_add((2_052_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 0 + .saturating_add((607_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn request_judgement(r: u32, x: u32, ) -> Weight { - (51_505_000 as Weight) - // Standard Error: 10_000 - .saturating_add((290_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 1_000 - .saturating_add((1_159_000 as Weight).saturating_mul(x as Weight)) + (52_661_000 as Weight) + // Standard Error: 5_000 + .saturating_add((250_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 0 + .saturating_add((1_172_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn cancel_request(r: u32, x: u32, ) -> Weight { - (48_609_000 as Weight) + (48_072_000 as Weight) // Standard Error: 7_000 - .saturating_add((132_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 1_000 - .saturating_add((1_141_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((173_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 0 + .saturating_add((1_165_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_fee(r: u32, ) -> Weight { - (7_565_000 as Weight) - // Standard Error: 0 - .saturating_add((190_000 as Weight).saturating_mul(r as Weight)) + (7_817_000 as Weight) + // Standard Error: 1_000 + .saturating_add((220_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_account_id(r: u32, ) -> Weight { - (8_260_000 as Weight) + (8_397_000 as Weight) // Standard Error: 1_000 - .saturating_add((190_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((223_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_fields(r: u32, ) -> Weight { - (7_681_000 as Weight) + (7_854_000 as Weight) // Standard Error: 1_000 - .saturating_add((190_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((216_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn provide_judgement(r: u32, x: u32, ) -> Weight { - (33_891_000 as Weight) + (33_563_000 as Weight) // Standard Error: 5_000 - .saturating_add((230_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((232_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((1_139_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((1_168_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn kill_identity(r: u32, s: u32, _x: u32, ) -> Weight { - (50_289_000 as Weight) - // Standard Error: 6_000 - .saturating_add((63_000 as Weight).saturating_mul(r as Weight)) + (49_152_000 as Weight) + // Standard Error: 3_000 + .saturating_add((72_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((1_985_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_043_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(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn add_sub(s: u32, ) -> Weight { - (52_741_000 as Weight) + (53_373_000 as Weight) // Standard Error: 0 - .saturating_add((144_000 as Weight).saturating_mul(s as Weight)) + .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(2 as Weight)) } fn rename_sub(s: u32, ) -> Weight { - (15_775_000 as Weight) + (16_191_000 as Weight) // Standard Error: 0 - .saturating_add((22_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((19_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)) } fn remove_sub(s: u32, ) -> Weight { - (54_310_000 as Weight) + (54_328_000 as Weight) // Standard Error: 0 - .saturating_add((126_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((143_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn quit_sub(s: u32, ) -> Weight { - (33_162_000 as Weight) + (32_901_000 as Weight) // Standard Error: 0 - .saturating_add((125_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((145_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)) } diff --git a/runtime/westend/src/weights/pallet_im_online.rs b/runtime/westend/src/weights/pallet_im_online.rs index 862f896a5ffb..fc7cf81a9d40 100644 --- a/runtime/westend/src/weights/pallet_im_online.rs +++ b/runtime/westend/src/weights/pallet_im_online.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_im_online //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,11 +44,11 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_im_online::WeightInfo for WeightInfo { fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { - (88_602_000 as Weight) + (88_980_000 as Weight) // Standard Error: 0 - .saturating_add((169_000 as Weight).saturating_mul(k as Weight)) + .saturating_add((167_000 as Weight).saturating_mul(k as Weight)) // Standard Error: 1_000 - .saturating_add((325_000 as Weight).saturating_mul(e as Weight)) + .saturating_add((332_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_indices.rs b/runtime/westend/src/weights/pallet_indices.rs index ebab9cdc1950..8bb176f7ce2d 100644 --- a/runtime/westend/src/weights/pallet_indices.rs +++ b/runtime/westend/src/weights/pallet_indices.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_indices //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,27 +44,27 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_indices::WeightInfo for WeightInfo { fn claim() -> Weight { - (38_980_000 as Weight) + (40_414_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn transfer() -> Weight { - (46_875_000 as Weight) + (48_770_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn free() -> Weight { - (38_813_000 as Weight) + (40_357_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_transfer() -> Weight { - (38_848_000 as Weight) + (40_846_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn freeze() -> Weight { - (36_403_000 as Weight) + (38_084_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_multisig.rs b/runtime/westend/src/weights/pallet_multisig.rs index c79ff762dab1..8dc861b508a8 100644 --- a/runtime/westend/src/weights/pallet_multisig.rs +++ b/runtime/westend/src/weights/pallet_multisig.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_multisig //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,78 +44,78 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { fn as_multi_threshold_1(_z: u32, ) -> Weight { - (10_239_000 as Weight) + (12_189_000 as Weight) } fn as_multi_create(s: u32, z: u32, ) -> Weight { - (50_062_000 as Weight) + (50_768_000 as Weight) // Standard Error: 0 - .saturating_add((88_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((106_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (55_485_000 as Weight) + (56_293_000 as Weight) // Standard Error: 0 - .saturating_add((90_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((110_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (29_381_000 as Weight) + (29_281_000 as Weight) // Standard Error: 0 - .saturating_add((83_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((105_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (53_339_000 as Weight) + (53_770_000 as Weight) // Standard Error: 0 - .saturating_add((100_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((122_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (70_481_000 as Weight) + (70_625_000 as Weight) // Standard Error: 0 - .saturating_add((193_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((212_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((4_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)) } fn approve_as_multi_create(s: u32, ) -> Weight { - (49_991_000 as Weight) + (49_662_000 as Weight) // Standard Error: 0 - .saturating_add((86_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((107_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)) } fn approve_as_multi_approve(s: u32, ) -> Weight { - (28_369_000 as Weight) + (28_469_000 as Weight) // Standard Error: 0 - .saturating_add((87_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((107_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)) } fn approve_as_multi_complete(s: u32, ) -> Weight { - (121_416_000 as Weight) + (121_389_000 as Weight) // Standard Error: 0 - .saturating_add((196_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((212_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)) } fn cancel_as_multi(s: u32, ) -> Weight { - (87_265_000 as Weight) + (86_993_000 as Weight) // Standard Error: 0 - .saturating_add((90_000 as Weight).saturating_mul(s as Weight)) + .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(2 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_proxy.rs b/runtime/westend/src/weights/pallet_proxy.rs index 3c649859aa49..e554547918f8 100644 --- a/runtime/westend/src/weights/pallet_proxy.rs +++ b/runtime/westend/src/weights/pallet_proxy.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_proxy //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,75 +44,75 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_proxy::WeightInfo for WeightInfo { fn proxy(p: u32, ) -> Weight { - (24_799_000 as Weight) + (24_786_000 as Weight) // Standard Error: 1_000 - .saturating_add((132_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((133_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } fn proxy_announced(a: u32, p: u32, ) -> Weight { - (56_202_000 as Weight) - // Standard Error: 6_000 - .saturating_add((502_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 7_000 - .saturating_add((68_000 as Weight).saturating_mul(p as Weight)) + (55_730_000 as Weight) + // Standard Error: 1_000 + .saturating_add((558_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 2_000 + .saturating_add((105_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)) } fn remove_announcement(a: u32, _p: u32, ) -> Weight { - (37_003_000 as Weight) + (37_947_000 as Weight) // Standard Error: 1_000 - .saturating_add((498_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((560_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn reject_announcement(a: u32, _p: u32, ) -> Weight { - (36_932_000 as Weight) + (37_904_000 as Weight) // Standard Error: 1_000 - .saturating_add((499_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((562_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn announce(a: u32, p: u32, ) -> Weight { - (50_165_000 as Weight) - // Standard Error: 1_000 - .saturating_add((499_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 1_000 - .saturating_add((118_000 as Weight).saturating_mul(p as Weight)) + (51_562_000 as Weight) + // Standard Error: 2_000 + .saturating_add((550_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 2_000 + .saturating_add((112_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)) } fn add_proxy(p: u32, ) -> Weight { - (35_416_000 as Weight) + (36_284_000 as Weight) // Standard Error: 1_000 - .saturating_add((191_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((223_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)) } fn remove_proxy(p: u32, ) -> Weight { - (35_237_000 as Weight) + (35_792_000 as Weight) // Standard Error: 2_000 - .saturating_add((216_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((249_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)) } fn remove_proxies(p: u32, ) -> Weight { - (33_872_000 as Weight) + (34_091_000 as Weight) // Standard Error: 1_000 - .saturating_add((134_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((136_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)) } fn anonymous(p: u32, ) -> Weight { - (47_651_000 as Weight) + (48_824_000 as Weight) // Standard Error: 1_000 - .saturating_add((27_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((31_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)) } fn kill_anonymous(p: u32, ) -> Weight { - (35_319_000 as Weight) - // Standard Error: 1_000 - .saturating_add((137_000 as Weight).saturating_mul(p as Weight)) + (35_989_000 as Weight) + // Standard Error: 0 + .saturating_add((134_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)) } diff --git a/runtime/westend/src/weights/pallet_scheduler.rs b/runtime/westend/src/weights/pallet_scheduler.rs index 9629137d125f..d2c20742a91e 100644 --- a/runtime/westend/src/weights/pallet_scheduler.rs +++ b/runtime/westend/src/weights/pallet_scheduler.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_scheduler //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,30 +44,30 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { fn schedule(s: u32, ) -> Weight { - (27_538_000 as Weight) + (28_493_000 as Weight) // Standard Error: 0 - .saturating_add((42_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((39_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)) } fn cancel(s: u32, ) -> Weight { - (26_898_000 as Weight) + (27_793_000 as Weight) // Standard Error: 14_000 - .saturating_add((3_721_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((6_333_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn schedule_named(s: u32, ) -> Weight { - (33_405_000 as Weight) + (34_482_000 as Weight) // Standard Error: 1_000 - .saturating_add((58_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((56_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)) } fn cancel_named(s: u32, ) -> Weight { - (28_566_000 as Weight) + (29_087_000 as Weight) // Standard Error: 14_000 - .saturating_add((3_731_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((6_341_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)) } diff --git a/runtime/westend/src/weights/pallet_session.rs b/runtime/westend/src/weights/pallet_session.rs index 862dff0cc69b..4c2118257018 100644 --- a/runtime/westend/src/weights/pallet_session.rs +++ b/runtime/westend/src/weights/pallet_session.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_session //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,12 +44,12 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_session::WeightInfo for WeightInfo { fn set_keys() -> Weight { - (71_267_000 as Weight) + (71_585_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } fn purge_keys() -> Weight { - (39_990_000 as Weight) + (40_032_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_staking.rs b/runtime/westend/src/weights/pallet_staking.rs index 2a1067ea3512..75c3078a1712 100644 --- a/runtime/westend/src/weights/pallet_staking.rs +++ b/runtime/westend/src/weights/pallet_staking.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,154 +44,154 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_staking::WeightInfo for WeightInfo { fn bond() -> Weight { - (69_787_000 as Weight) + (71_835_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn bond_extra() -> Weight { - (53_774_000 as Weight) + (54_894_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn unbond() -> Weight { - (57_805_000 as Weight) + (59_419_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn withdraw_unbonded_update(s: u32, ) -> Weight { - (49_787_000 as Weight) + (50_384_000 as Weight) // Standard Error: 0 - .saturating_add((23_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((26_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn withdraw_unbonded_kill(s: u32, ) -> Weight { - (81_664_000 as Weight) + (82_905_000 as Weight) // Standard Error: 1_000 - .saturating_add((2_238_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_287_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn validate() -> Weight { - (31_287_000 as Weight) + (33_672_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn kick(k: u32, ) -> Weight { - (10_445_000 as Weight) - // Standard Error: 9_000 - .saturating_add((16_845_000 as Weight).saturating_mul(k as Weight)) + (11_371_000 as Weight) + // Standard Error: 7_000 + .saturating_add((16_959_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight))) } fn nominate(n: u32, ) -> Weight { - (38_344_000 as Weight) - // Standard Error: 15_000 - .saturating_add((5_321_000 as Weight).saturating_mul(n as Weight)) + (40_353_000 as Weight) + // Standard Error: 12_000 + .saturating_add((5_341_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn chill() -> Weight { - (17_221_000 as Weight) + (17_740_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) } fn set_payee() -> Weight { - (11_371_000 as Weight) + (11_624_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_controller() -> Weight { - (25_217_000 as Weight) + (25_480_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_validator_count() -> Weight { - (2_092_000 as Weight) + (2_082_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_no_eras() -> Weight { - (2_339_000 as Weight) + (2_311_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_new_era() -> Weight { - (2_359_000 as Weight) + (2_282_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_new_era_always() -> Weight { - (2_324_000 as Weight) + (2_230_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_invulnerables(v: u32, ) -> Weight { - (2_318_000 as Weight) + (2_352_000 as Weight) // Standard Error: 0 - .saturating_add((5_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((27_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_unstake(s: u32, ) -> Weight { - (57_794_000 as Weight) + (58_375_000 as Weight) // Standard Error: 1_000 - .saturating_add((2_215_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_282_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn cancel_deferred_slash(s: u32, ) -> Weight { - (3_389_533_000 as Weight) - // Standard Error: 221_000 - .saturating_add((19_801_000 as Weight).saturating_mul(s as Weight)) + (3_430_757_000 as Weight) + // Standard Error: 222_000 + .saturating_add((19_760_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)) } fn payout_stakers_dead_controller(n: u32, ) -> Weight { - (106_909_000 as Weight) - // Standard Error: 39_000 - .saturating_add((47_300_000 as Weight).saturating_mul(n as Weight)) + (103_686_000 as Weight) + // Standard Error: 17_000 + .saturating_add((47_044_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(n as Weight))) } fn payout_stakers_alive_staked(n: u32, ) -> Weight { - (132_392_000 as Weight) - // Standard Error: 36_000 - .saturating_add((58_988_000 as Weight).saturating_mul(n as Weight)) + (128_168_000 as Weight) + // Standard Error: 21_000 + .saturating_add((59_293_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(11 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight))) } fn rebond(l: u32, ) -> Weight { - (46_661_000 as Weight) + (46_916_000 as Weight) // Standard Error: 1_000 - .saturating_add((67_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((64_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_history_depth(e: u32, ) -> Weight { (0 as Weight) - // Standard Error: 65_000 - .saturating_add((33_444_000 as Weight).saturating_mul(e as Weight)) + // Standard Error: 63_000 + .saturating_add((33_032_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight))) } fn reap_stash(s: u32, ) -> Weight { - (68_870_000 as Weight) - // Standard Error: 0 - .saturating_add((2_211_000 as Weight).saturating_mul(s as Weight)) + (69_690_000 as Weight) + // Standard Error: 1_000 + .saturating_add((2_271_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn new_era(v: u32, n: u32, ) -> Weight { (0 as Weight) - // Standard Error: 909_000 - .saturating_add((300_182_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 45_000 - .saturating_add((48_335_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 787_000 + .saturating_add((310_720_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 39_000 + .saturating_add((48_687_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) @@ -200,12 +200,12 @@ impl pallet_staking::WeightInfo for WeightInfo { } fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight { (0 as Weight) - // Standard Error: 97_000 - .saturating_add((26_275_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 97_000 - .saturating_add((28_529_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 3_318_000 - .saturating_add((53_298_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 110_000 + .saturating_add((25_641_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 110_000 + .saturating_add((27_889_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 3_749_000 + .saturating_add((15_769_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) @@ -213,18 +213,18 @@ impl pallet_staking::WeightInfo for WeightInfo { } fn get_npos_targets(v: u32, ) -> Weight { (0 as Weight) - // Standard Error: 32_000 - .saturating_add((10_999_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 36_000 + .saturating_add((10_960_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight))) } fn set_staking_limits() -> Weight { - (4_846_000 as Weight) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + (5_696_000 as Weight) + .saturating_add(T::DbWeight::get().writes(5 as Weight)) } fn chill_other() -> Weight { - (32_703_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) + (41_216_000 as Weight) + .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/westend/src/weights/pallet_timestamp.rs b/runtime/westend/src/weights/pallet_timestamp.rs index 577bcc8f8612..ecf0ac9bc1b6 100644 --- a/runtime/westend/src/weights/pallet_timestamp.rs +++ b/runtime/westend/src/weights/pallet_timestamp.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,7 +44,7 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { fn set() -> Weight { - (9_227_000 as Weight) + (9_647_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_utility.rs b/runtime/westend/src/weights/pallet_utility.rs index 1471eacbc250..8ee0f466139c 100644 --- a/runtime/westend/src/weights/pallet_utility.rs +++ b/runtime/westend/src/weights/pallet_utility.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_utility //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,16 +44,16 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { fn batch(c: u32, ) -> Weight { - (15_158_000 as Weight) + (15_136_000 as Weight) // Standard Error: 0 - .saturating_add((2_641_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((2_640_000 as Weight).saturating_mul(c as Weight)) } fn as_derivative() -> Weight { - (5_540_000 as Weight) + (5_428_000 as Weight) } fn batch_all(c: u32, ) -> Weight { - (17_590_000 as Weight) + (16_887_000 as Weight) // Standard Error: 0 - .saturating_add((3_269_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((3_091_000 as Weight).saturating_mul(c as Weight)) } } diff --git a/runtime/westend/src/weights/pallet_vesting.rs b/runtime/westend/src/weights/pallet_vesting.rs index 2d1142b4f220..63d662f16add 100644 --- a/runtime/westend/src/weights/pallet_vesting.rs +++ b/runtime/westend/src/weights/pallet_vesting.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_vesting //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: diff --git a/runtime/westend/src/weights/runtime_common_auctions.rs b/runtime/westend/src/weights/runtime_common_auctions.rs index c4d398faacd3..808be370df6c 100644 --- a/runtime/westend/src/weights/runtime_common_auctions.rs +++ b/runtime/westend/src/weights/runtime_common_auctions.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::auctions //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-24, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -31,7 +31,7 @@ // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt -// --output=./runtime/westend/src/weights/runtime_common_auctions.rs +// --output=./runtime/westend/src/weights/ #![allow(unused_parens)] @@ -44,22 +44,22 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::auctions::WeightInfo for WeightInfo { fn new_auction() -> Weight { - (29_966_000 as Weight) + (22_995_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn bid() -> Weight { - (152_563_000 as Weight) + (129_219_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn on_initialize() -> Weight { - (32_736_787_000 as Weight) + (23_099_346_000 as Weight) .saturating_add(T::DbWeight::get().reads(3688 as Weight)) .saturating_add(T::DbWeight::get().writes(3683 as Weight)) } fn cancel_auction() -> Weight { - (7_057_595_000 as Weight) + (4_847_229_000 as Weight) .saturating_add(T::DbWeight::get().reads(73 as Weight)) .saturating_add(T::DbWeight::get().writes(3673 as Weight)) } diff --git a/runtime/westend/src/weights/runtime_common_crowdloan.rs b/runtime/westend/src/weights/runtime_common_crowdloan.rs index 060e481ed66e..23a9f78b6374 100644 --- a/runtime/westend/src/weights/runtime_common_crowdloan.rs +++ b/runtime/westend/src/weights/runtime_common_crowdloan.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::crowdloan //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-24, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -31,7 +31,7 @@ // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt -// --output=./runtime/westend/src/weights/runtime_common_crowdloan.rs +// --output=./runtime/westend/src/weights/ #![allow(unused_parens)] @@ -44,53 +44,53 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::crowdloan::WeightInfo for WeightInfo { fn create() -> Weight { - (95_715_000 as Weight) + (82_435_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn contribute() -> Weight { - (500_788_000 as Weight) + (267_367_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn withdraw() -> Weight { - (127_448_000 as Weight) + (106_591_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn refund(k: u32, ) -> Weight { (0 as Weight) - // Standard Error: 53_000 - .saturating_add((56_113_000 as Weight).saturating_mul(k as Weight)) + // Standard Error: 28_000 + .saturating_add((44_792_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(k as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(k as Weight))) } fn dissolve() -> Weight { - (71_359_000 as Weight) + (61_912_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn edit() -> Weight { - (43_194_000 as Weight) + (38_032_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn add_memo() -> Weight { - (65_648_000 as Weight) + (52_847_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn poke() -> Weight { - (51_082_000 as Weight) + (41_461_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn on_initialize(n: u32, ) -> Weight { (0 as Weight) - // Standard Error: 31_000 - .saturating_add((134_501_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 20_000 + .saturating_add((108_965_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) diff --git a/runtime/westend/src/weights/runtime_common_paras_registrar.rs b/runtime/westend/src/weights/runtime_common_paras_registrar.rs index 3526923a7d21..aeb93ac07430 100644 --- a/runtime/westend/src/weights/runtime_common_paras_registrar.rs +++ b/runtime/westend/src/weights/runtime_common_paras_registrar.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::paras_registrar //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-21, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -31,7 +31,7 @@ // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt -// --output=./runtime/westend/src/weights/runtime_common_paras_registrar.rs +// --output=./runtime/westend/src/weights/ #![allow(unused_parens)] @@ -44,27 +44,27 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::paras_registrar::WeightInfo for WeightInfo { fn reserve() -> Weight { - (58_328_000 as Weight) + (49_034_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn register() -> Weight { - (4_162_851_000 as Weight) + (4_178_287_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn force_register() -> Weight { - (4_141_674_000 as Weight) + (4_156_439_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn deregister() -> Weight { - (91_960_000 as Weight) + (82_728_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn swap() -> Weight { - (79_489_000 as Weight) + (68_944_000 as Weight) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) } diff --git a/runtime/westend/src/weights/runtime_common_slots.rs b/runtime/westend/src/weights/runtime_common_slots.rs index 4a9f022327e3..6c886e7f0070 100644 --- a/runtime/westend/src/weights/runtime_common_slots.rs +++ b/runtime/westend/src/weights/runtime_common_slots.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::slots //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-25, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -31,7 +31,7 @@ // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt -// --output=./runtime/westend/src/weights/runtime_common_slots.rs +// --output=./runtime/westend/src/weights/ #![allow(unused_parens)] @@ -44,16 +44,16 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::slots::WeightInfo for WeightInfo { fn force_lease() -> Weight { - (53_939_000 as Weight) + (45_355_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn manage_lease_period_start(c: u32, t: u32, ) -> Weight { (0 as Weight) - // Standard Error: 37_000 - .saturating_add((19_723_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 37_000 - .saturating_add((42_186_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 16_000 + .saturating_add((16_002_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 16_000 + .saturating_add((33_337_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(t as Weight))) @@ -62,12 +62,12 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - (249_570_000 as Weight) + (191_822_000 as Weight) .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(9 as Weight)) } fn trigger_onboard() -> Weight { - (49_692_000 as Weight) + (40_822_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } diff --git a/scripts/run_all_benches.sh b/scripts/run_all_benches.sh new file mode 100755 index 000000000000..cfbaab233e84 --- /dev/null +++ b/scripts/run_all_benches.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Runs all benchmarks for all pallets, for each of the runtimes specified below +# Should be run on a reference machine to gain accurate benchmarks +# current reference machine: https://github.com/paritytech/substrate/pull/5848 + +runtimes=( + polkadot + kusama + westend +) + +# cargo build --locked --release +for runtime in "${runtimes[@]}"; do + cargo +nightly run --release --features=runtime-benchmarks --locked benchmark --chain "${runtime}-dev" --execution=wasm --wasm-execution=compiled --pallet "*" --extrinsic "*" --repeat 0 | sed -r -e 's/Pallet: "([a-z_:]+)".*/\1/' | uniq | grep -v frame_system > "${runtime}_pallets" + while read -r line; do + pallet="$(echo "$line" | cut -d' ' -f1)"; + echo "Runtime: $runtime. Pallet: $pallet"; + cargo +nightly run --release --features=runtime-benchmarks -- benchmark --chain="${runtime}-dev" --steps=50 --repeat=20 --pallet="$pallet" --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output="./runtime/${runtime}/src/weights/${pallet/::/_}.rs" + done < "${runtime}_pallets" + rm "${runtime}_pallets" +done From de9ed260c5079dd4966d0bb8fb9c30a696c74ddb Mon Sep 17 00:00:00 2001 From: emostov <32168567+emostov@users.noreply.github.com> Date: Tue, 6 Jul 2021 15:47:49 -0700 Subject: [PATCH 08/14] Revert "try merge origin master" This reverts commit 398d65d1ac6fad1112f94de3d8c351bcf33aa5a0. --- .../approval-voting/src/approval_db/v1/mod.rs | 19 +- .../src/approval_db/v1/tests.rs | 6 +- node/core/approval-voting/src/import.rs | 19 +- node/core/approval-voting/src/lib.rs | 7 +- node/core/approval-voting/src/tests.rs | 21 +- node/core/chain-selection/Cargo.toml | 2 - .../chain-selection/src/db_backend/mod.rs | 19 - .../core/chain-selection/src/db_backend/v1.rs | 668 ------------------ node/core/chain-selection/src/lib.rs | 290 +++----- node/core/chain-selection/src/tests.rs | 445 +----------- node/core/chain-selection/src/tree.rs | 7 +- node/service/src/chain_spec.rs | 18 +- runtime/common/src/integration_tests.rs | 2 +- runtime/common/src/paras_registrar.rs | 2 +- runtime/kusama/src/lib.rs | 2 +- runtime/kusama/src/weights/pallet_balances.rs | 14 +- runtime/kusama/src/weights/pallet_bounties.rs | 24 +- .../kusama/src/weights/pallet_collective.rs | 60 +- .../kusama/src/weights/pallet_democracy.rs | 84 +-- runtime/kusama/src/weights/pallet_gilt.rs | 28 +- runtime/kusama/src/weights/pallet_identity.rs | 96 +-- .../kusama/src/weights/pallet_im_online.rs | 8 +- runtime/kusama/src/weights/pallet_indices.rs | 12 +- .../kusama/src/weights/pallet_membership.rs | 34 +- runtime/kusama/src/weights/pallet_multisig.rs | 44 +- runtime/kusama/src/weights/pallet_proxy.rs | 48 +- .../kusama/src/weights/pallet_scheduler.rs | 18 +- runtime/kusama/src/weights/pallet_session.rs | 6 +- runtime/kusama/src/weights/pallet_staking.rs | 108 +-- .../kusama/src/weights/pallet_timestamp.rs | 6 +- runtime/kusama/src/weights/pallet_tips.rs | 20 +- runtime/kusama/src/weights/pallet_treasury.rs | 14 +- runtime/kusama/src/weights/pallet_utility.rs | 12 +- runtime/kusama/src/weights/pallet_vesting.rs | 2 +- .../src/weights/runtime_common_auctions.rs | 12 +- .../src/weights/runtime_common_claims.rs | 12 +- .../src/weights/runtime_common_crowdloan.rs | 26 +- .../weights/runtime_common_paras_registrar.rs | 14 +- .../src/weights/runtime_common_slots.rs | 18 +- runtime/parachains/src/hrmp.rs | 10 +- runtime/parachains/src/inclusion.rs | 8 +- runtime/parachains/src/initializer.rs | 6 +- runtime/parachains/src/lib.rs | 8 +- runtime/parachains/src/mock.rs | 7 +- runtime/parachains/src/paras.rs | 445 +++++------- runtime/parachains/src/runtime_api_impl/v1.rs | 6 +- runtime/parachains/src/scheduler.rs | 16 +- runtime/parachains/src/util.rs | 2 +- .../polkadot/src/weights/pallet_balances.rs | 14 +- .../polkadot/src/weights/pallet_bounties.rs | 24 +- .../polkadot/src/weights/pallet_collective.rs | 60 +- .../polkadot/src/weights/pallet_democracy.rs | 82 +-- .../src/weights/pallet_elections_phragmen.rs | 52 +- .../polkadot/src/weights/pallet_identity.rs | 98 +-- .../polkadot/src/weights/pallet_im_online.rs | 10 +- .../polkadot/src/weights/pallet_indices.rs | 12 +- .../polkadot/src/weights/pallet_membership.rs | 30 +- .../polkadot/src/weights/pallet_multisig.rs | 42 +- runtime/polkadot/src/weights/pallet_proxy.rs | 50 +- .../polkadot/src/weights/pallet_scheduler.rs | 18 +- .../polkadot/src/weights/pallet_session.rs | 6 +- .../polkadot/src/weights/pallet_staking.rs | 112 +-- .../polkadot/src/weights/pallet_timestamp.rs | 6 +- runtime/polkadot/src/weights/pallet_tips.rs | 24 +- .../polkadot/src/weights/pallet_treasury.rs | 14 +- .../polkadot/src/weights/pallet_utility.rs | 12 +- .../polkadot/src/weights/pallet_vesting.rs | 2 +- .../src/weights/runtime_common_claims.rs | 12 +- runtime/rococo/Cargo.toml | 10 - runtime/rococo/src/bridge_messages.rs | 410 ----------- runtime/rococo/src/lib.rs | 227 +----- runtime/westend/src/lib.rs | 2 +- .../westend/src/weights/pallet_balances.rs | 14 +- .../westend/src/weights/pallet_identity.rs | 96 +-- .../westend/src/weights/pallet_im_online.rs | 8 +- runtime/westend/src/weights/pallet_indices.rs | 12 +- .../westend/src/weights/pallet_multisig.rs | 40 +- runtime/westend/src/weights/pallet_proxy.rs | 56 +- .../westend/src/weights/pallet_scheduler.rs | 18 +- runtime/westend/src/weights/pallet_session.rs | 6 +- runtime/westend/src/weights/pallet_staking.rs | 116 +-- .../westend/src/weights/pallet_timestamp.rs | 4 +- runtime/westend/src/weights/pallet_utility.rs | 12 +- runtime/westend/src/weights/pallet_vesting.rs | 2 +- .../src/weights/runtime_common_auctions.rs | 12 +- .../src/weights/runtime_common_crowdloan.rs | 26 +- .../weights/runtime_common_paras_registrar.rs | 14 +- .../src/weights/runtime_common_slots.rs | 18 +- scripts/run_all_benches.sh | 22 - 89 files changed, 1309 insertions(+), 3251 deletions(-) delete mode 100644 node/core/chain-selection/src/db_backend/mod.rs delete mode 100644 node/core/chain-selection/src/db_backend/v1.rs delete mode 100644 runtime/rococo/src/bridge_messages.rs delete mode 100755 scripts/run_all_benches.sh diff --git a/node/core/approval-voting/src/approval_db/v1/mod.rs b/node/core/approval-voting/src/approval_db/v1/mod.rs index f6307a8b5a1e..27960eb29211 100644 --- a/node/core/approval-voting/src/approval_db/v1/mod.rs +++ b/node/core/approval-voting/src/approval_db/v1/mod.rs @@ -423,21 +423,17 @@ pub(crate) fn add_block_entry( /// Forcibly approve all candidates included at up to the given relay-chain height in the indicated /// chain. -/// -/// Returns a list of block hashes that were not approved and are now. pub fn force_approve( store: &dyn KeyValueDB, db_config: Config, chain_head: Hash, up_to: BlockNumber, -) -> Result> { +) -> Result<()> { enum State { WalkTo, Approving, } - let mut approved_hashes = Vec::new(); - let mut cur_hash = chain_head; let mut state = State::WalkTo; @@ -456,20 +452,13 @@ pub fn force_approve( match state { State::WalkTo => {}, State::Approving => { - let is_approved = entry.approved_bitfield.count_ones() - == entry.approved_bitfield.len(); - - if !is_approved { - entry.approved_bitfield.iter_mut().for_each(|mut b| *b = true); - approved_hashes.push(entry.block_hash); - tx.put_block_entry(entry); - } + entry.approved_bitfield.iter_mut().for_each(|mut b| *b = true); + tx.put_block_entry(entry); } } } - tx.write(store)?; - Ok(approved_hashes) + tx.write(store) } /// Return all blocks which have entries in the DB, ascending, by height. diff --git a/node/core/approval-voting/src/approval_db/v1/tests.rs b/node/core/approval-voting/src/approval_db/v1/tests.rs index d0056cd98d9e..71c4d3c47e29 100644 --- a/node/core/approval-voting/src/approval_db/v1/tests.rs +++ b/node/core/approval-voting/src/approval_db/v1/tests.rs @@ -534,7 +534,7 @@ fn force_approve_works() { ).unwrap(); } - let approved_hashes = force_approve(&store, TEST_CONFIG, block_hash_d, 2).unwrap(); + force_approve(&store, TEST_CONFIG, block_hash_d, 2).unwrap(); assert!(load_block_entry( &store, @@ -556,10 +556,6 @@ fn force_approve_works() { &TEST_CONFIG, &block_hash_d, ).unwrap().unwrap().approved_bitfield.not_any()); - assert_eq!( - approved_hashes, - vec![block_hash_b, block_hash_a], - ); } #[test] diff --git a/node/core/approval-voting/src/import.rs b/node/core/approval-voting/src/import.rs index 6cdbfe8550ab..bcb59f6ba7b0 100644 --- a/node/core/approval-voting/src/import.rs +++ b/node/core/approval-voting/src/import.rs @@ -31,7 +31,6 @@ use polkadot_node_subsystem::{ messages::{ RuntimeApiMessage, RuntimeApiRequest, ChainApiMessage, ApprovalDistributionMessage, - ChainSelectionMessage, }, SubsystemContext, SubsystemError, SubsystemResult, }; @@ -463,16 +462,10 @@ pub(crate) async fn handle_new_head( result.len(), ); } - result } }; - // If all bits are already set, then send an approve message. - if approved_bitfield.count_ones() == approved_bitfield.len() { - ctx.send_message(ChainSelectionMessage::Approved(block_hash).into()).await; - } - let block_entry = approval_db::v1::BlockEntry { block_hash, parent_hash: block_header.parent_hash, @@ -494,18 +487,8 @@ pub(crate) async fn handle_new_head( "Enacting force-approve", ); - let approved_hashes = approval_db::v1::force_approve( - db_writer, - db_config, - block_hash, - up_to, - ) + approval_db::v1::force_approve(db_writer, db_config, block_hash, up_to) .map_err(|e| SubsystemError::with_origin("approval-voting", e))?; - - // Notify chain-selection of all approved hashes. - for hash in approved_hashes { - ctx.send_message(ChainSelectionMessage::Approved(hash).into()).await; - } } tracing::trace!( diff --git a/node/core/approval-voting/src/lib.rs b/node/core/approval-voting/src/lib.rs index 28cc1ca6a709..54943c40b660 100644 --- a/node/core/approval-voting/src/lib.rs +++ b/node/core/approval-voting/src/lib.rs @@ -26,7 +26,7 @@ use polkadot_node_subsystem::{ AssignmentCheckError, AssignmentCheckResult, ApprovalCheckError, ApprovalCheckResult, ApprovalVotingMessage, RuntimeApiMessage, RuntimeApiRequest, ChainApiMessage, ApprovalDistributionMessage, CandidateValidationMessage, - AvailabilityRecoveryMessage, ChainSelectionMessage, + AvailabilityRecoveryMessage, }, errors::RecoveryError, Subsystem, SubsystemContext, SubsystemError, SubsystemResult, SpawnedSubsystem, @@ -717,7 +717,6 @@ enum Action { candidate: CandidateReceipt, backing_group: GroupIndex, }, - NoteApprovedInChainSelection(Hash), IssueApproval(CandidateHash, ApprovalVoteRequest), BecomeActive, Conclude, @@ -963,9 +962,6 @@ async fn handle_actions( Some(_) => {}, } } - Action::NoteApprovedInChainSelection(block_hash) => { - ctx.send_message(ChainSelectionMessage::Approved(block_hash).into()).await; - } Action::BecomeActive => { *mode = Mode::Active; @@ -1809,7 +1805,6 @@ fn import_checked_approval( if is_block_approved && !was_block_approved { metrics.on_block_approved(status.tranche_now as _); - actions.push(Action::NoteApprovedInChainSelection(block_hash)); } actions.push(Action::WriteBlockEntry(block_entry)); diff --git a/node/core/approval-voting/src/tests.rs b/node/core/approval-voting/src/tests.rs index 84006478bd85..5603c362fd24 100644 --- a/node/core/approval-voting/src/tests.rs +++ b/node/core/approval-voting/src/tests.rs @@ -850,14 +850,6 @@ fn import_checked_approval_updates_entries_and_schedules() { assert_matches!( actions.get(0).unwrap(), - Action::NoteApprovedInChainSelection(h) => { - assert_eq!(h, &block_hash); - } - ); - - - assert_matches!( - actions.get(1).unwrap(), Action::WriteBlockEntry(b_entry) => { assert_eq!(b_entry.block_hash(), block_hash); assert!(b_entry.is_fully_approved()); @@ -865,7 +857,7 @@ fn import_checked_approval_updates_entries_and_schedules() { } ); assert_matches!( - actions.get_mut(2).unwrap(), + actions.get_mut(1).unwrap(), Action::WriteCandidateEntry(c_hash, ref mut c_entry) => { assert_eq!(c_hash, &candidate_hash); assert!(c_entry.approval_entry(&block_hash).unwrap().is_approved()); @@ -1399,16 +1391,9 @@ fn import_checked_approval_sets_one_block_bit_at_a_time() { ApprovalSource::Remote(validator_index_b), ); - assert_eq!(actions.len(), 3); + assert_eq!(actions.len(), 2); assert_matches!( actions.get(0).unwrap(), - Action::NoteApprovedInChainSelection(h) => { - assert_eq!(h, &block_hash); - } - ); - - assert_matches!( - actions.get(1).unwrap(), Action::WriteBlockEntry(b_entry) => { assert_eq!(b_entry.block_hash(), block_hash); assert!(b_entry.is_fully_approved()); @@ -1418,7 +1403,7 @@ fn import_checked_approval_sets_one_block_bit_at_a_time() { ); assert_matches!( - actions.get(2).unwrap(), + actions.get(1).unwrap(), Action::WriteCandidateEntry(c_h, c_entry) => { assert_eq!(c_h, &candidate_hash_2); assert!(c_entry.approval_entry(&block_hash).unwrap().is_approved()); diff --git a/node/core/chain-selection/Cargo.toml b/node/core/chain-selection/Cargo.toml index f6b42a2bec47..53e74cf883a1 100644 --- a/node/core/chain-selection/Cargo.toml +++ b/node/core/chain-selection/Cargo.toml @@ -7,7 +7,6 @@ edition = "2018" [dependencies] futures = "0.3.15" -futures-timer = "3" tracing = "0.1.26" polkadot-primitives = { path = "../../../primitives" } polkadot-node-primitives = { path = "../../primitives" } @@ -22,4 +21,3 @@ polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" } sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } parking_lot = "0.11" assert_matches = "1" -kvdb-memorydb = "0.10.0" diff --git a/node/core/chain-selection/src/db_backend/mod.rs b/node/core/chain-selection/src/db_backend/mod.rs deleted file mode 100644 index 66e61426b738..000000000000 --- a/node/core/chain-selection/src/db_backend/mod.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2021 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . - -//! A database [`Backend`][crate::backend::Backend] for the chain selection subsystem. - -pub(super) mod v1; diff --git a/node/core/chain-selection/src/db_backend/v1.rs b/node/core/chain-selection/src/db_backend/v1.rs deleted file mode 100644 index 6aea4af8c136..000000000000 --- a/node/core/chain-selection/src/db_backend/v1.rs +++ /dev/null @@ -1,668 +0,0 @@ -// Copyright 2021 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . - -//! A database [`Backend`][crate::backend::Backend] for the chain selection subsystem. -//! -//! This stores the following schema: -//! -//! ```ignore -//! ("CS_block_entry", Hash) -> BlockEntry; -//! ("CS_block_height", BigEndianBlockNumber) -> Vec; -//! ("CS_stagnant_at", BigEndianTimestamp) -> Vec; -//! ("CS_leaves") -> LeafEntrySet; -//! ``` -//! -//! The big-endian encoding is used for creating iterators over the key-value DB which are -//! accessible by prefix, to find the earlist block number stored as well as the all stagnant -//! blocks. -//! -//! The `Vec`s stored are always non-empty. Empty `Vec`s are not stored on disk so there is no -//! semantic difference between `None` and an empty `Vec`. - -use crate::backend::{Backend, BackendWriteOp}; -use crate::Error; - -use polkadot_primitives::v1::{BlockNumber, Hash}; -use polkadot_node_primitives::BlockWeight; - -use kvdb::{DBTransaction, KeyValueDB}; -use parity_scale_codec::{Encode, Decode}; - -use std::sync::Arc; - -const BLOCK_ENTRY_PREFIX: &[u8; 14] = b"CS_block_entry"; -const BLOCK_HEIGHT_PREFIX: &[u8; 15] = b"CS_block_height"; -const STAGNANT_AT_PREFIX: &[u8; 14] = b"CS_stagnant_at"; -const LEAVES_KEY: &[u8; 9] = b"CS_leaves"; - -type Timestamp = u64; - -#[derive(Debug, Encode, Decode, Clone, PartialEq)] -enum Approval { - #[codec(index = 0)] - Approved, - #[codec(index = 1)] - Unapproved, - #[codec(index = 2)] - Stagnant, -} - -impl From for Approval { - fn from(x: crate::Approval) -> Self { - match x { - crate::Approval::Approved => Approval::Approved, - crate::Approval::Unapproved => Approval::Unapproved, - crate::Approval::Stagnant => Approval::Stagnant, - } - } -} - -impl From for crate::Approval { - fn from(x: Approval) -> crate::Approval { - match x { - Approval::Approved => crate::Approval::Approved, - Approval::Unapproved => crate::Approval::Unapproved, - Approval::Stagnant => crate::Approval::Stagnant, - } - } -} - -#[derive(Debug, Encode, Decode, Clone, PartialEq)] -struct ViabilityCriteria { - explicitly_reverted: bool, - approval: Approval, - earliest_unviable_ancestor: Option, -} - -impl From for ViabilityCriteria { - fn from(x: crate::ViabilityCriteria) -> Self { - ViabilityCriteria { - explicitly_reverted: x.explicitly_reverted, - approval: x.approval.into(), - earliest_unviable_ancestor: x.earliest_unviable_ancestor, - } - } -} - -impl From for crate::ViabilityCriteria { - fn from(x: ViabilityCriteria) -> crate::ViabilityCriteria { - crate::ViabilityCriteria { - explicitly_reverted: x.explicitly_reverted, - approval: x.approval.into(), - earliest_unviable_ancestor: x.earliest_unviable_ancestor, - } - } -} - -#[derive(Encode, Decode)] -struct LeafEntry { - weight: BlockWeight, - block_number: BlockNumber, - block_hash: Hash, -} - -impl From for LeafEntry { - fn from(x: crate::LeafEntry) -> Self { - LeafEntry { - weight: x.weight, - block_number: x.block_number, - block_hash: x.block_hash, - } - } -} - -impl From for crate::LeafEntry { - fn from(x: LeafEntry) -> crate::LeafEntry { - crate::LeafEntry { - weight: x.weight, - block_number: x.block_number, - block_hash: x.block_hash, - } - } -} - -#[derive(Encode, Decode)] -struct LeafEntrySet { - inner: Vec, -} - -impl From for LeafEntrySet { - fn from(x: crate::LeafEntrySet) -> Self { - LeafEntrySet { - inner: x.inner.into_iter().map(Into::into).collect(), - } - } -} - -impl From for crate::LeafEntrySet { - fn from(x: LeafEntrySet) -> crate::LeafEntrySet { - crate::LeafEntrySet { - inner: x.inner.into_iter().map(Into::into).collect(), - } - } -} - -#[derive(Debug, Encode, Decode, Clone, PartialEq)] -struct BlockEntry { - block_hash: Hash, - block_number: BlockNumber, - parent_hash: Hash, - children: Vec, - viability: ViabilityCriteria, - weight: BlockWeight, -} - -impl From for BlockEntry { - fn from(x: crate::BlockEntry) -> Self { - BlockEntry { - block_hash: x.block_hash, - block_number: x.block_number, - parent_hash: x.parent_hash, - children: x.children, - viability: x.viability.into(), - weight: x.weight, - } - } -} - -impl From for crate::BlockEntry { - fn from(x: BlockEntry) -> crate::BlockEntry { - crate::BlockEntry { - block_hash: x.block_hash, - block_number: x.block_number, - parent_hash: x.parent_hash, - children: x.children, - viability: x.viability.into(), - weight: x.weight, - } - } -} - -/// Configuration for the database backend. -#[derive(Debug, Clone, Copy)] -pub struct Config { - /// The column where block metadata is stored. - pub col_data: u32, -} - -/// The database backend. -pub struct DbBackend { - inner: Arc, - config: Config, -} - -impl DbBackend { - /// Create a new [`DbBackend`] with the supplied key-value store and - /// config. - pub fn new(db: Arc, config: Config) -> Self { - DbBackend { - inner: db, - config, - } - } -} - -impl Backend for DbBackend { - fn load_block_entry(&self, hash: &Hash) -> Result, Error> { - load_decode::( - &*self.inner, - self.config.col_data, - &block_entry_key(hash), - ).map(|o| o.map(Into::into)) - } - - fn load_leaves(&self) -> Result { - load_decode::( - &*self.inner, - self.config.col_data, - LEAVES_KEY, - ).map(|o| o.map(Into::into).unwrap_or_default()) - } - - fn load_stagnant_at(&self, timestamp: crate::Timestamp) -> Result, Error> { - load_decode::>( - &*self.inner, - self.config.col_data, - &stagnant_at_key(timestamp.into()), - ).map(|o| o.unwrap_or_default()) - } - - fn load_stagnant_at_up_to(&self, up_to: crate::Timestamp) - -> Result)>, Error> - { - let stagnant_at_iter = self.inner.iter_with_prefix( - self.config.col_data, - &STAGNANT_AT_PREFIX[..], - ); - - let val = stagnant_at_iter - .filter_map(|(k, v)| { - match (decode_stagnant_at_key(&mut &k[..]), >::decode(&mut &v[..]).ok()) { - (Some(at), Some(stagnant_at)) => Some((at, stagnant_at)), - _ => None, - } - }) - .take_while(|(at, _)| *at <= up_to.into()) - .collect::>(); - - Ok(val) - } - - fn load_first_block_number(&self) -> Result, Error> { - let blocks_at_height_iter = self.inner.iter_with_prefix( - self.config.col_data, - &BLOCK_HEIGHT_PREFIX[..], - ); - - let val = blocks_at_height_iter - .filter_map(|(k, _)| decode_block_height_key(&k[..])) - .next(); - - Ok(val) - } - - fn load_blocks_by_number(&self, number: BlockNumber) -> Result, Error> { - load_decode::>( - &*self.inner, - self.config.col_data, - &block_height_key(number), - ).map(|o| o.unwrap_or_default()) - } - - /// Atomically write the list of operations, with later operations taking precedence over prior. - fn write(&mut self, ops: I) -> Result<(), Error> - where I: IntoIterator - { - let mut tx = DBTransaction::new(); - for op in ops { - match op { - BackendWriteOp::WriteBlockEntry(block_entry) => { - let block_entry: BlockEntry = block_entry.into(); - tx.put_vec( - self.config.col_data, - &block_entry_key(&block_entry.block_hash), - block_entry.encode(), - ); - } - BackendWriteOp::WriteBlocksByNumber(block_number, v) => { - if v.is_empty() { - tx.delete( - self.config.col_data, - &block_height_key(block_number), - ); - } else { - tx.put_vec( - self.config.col_data, - &block_height_key(block_number), - v.encode(), - ); - } - } - BackendWriteOp::WriteViableLeaves(leaves) => { - let leaves: LeafEntrySet = leaves.into(); - if leaves.inner.is_empty() { - tx.delete( - self.config.col_data, - &LEAVES_KEY[..], - ); - } else { - tx.put_vec( - self.config.col_data, - &LEAVES_KEY[..], - leaves.encode(), - ); - } - } - BackendWriteOp::WriteStagnantAt(timestamp, stagnant_at) => { - let timestamp: Timestamp = timestamp.into(); - if stagnant_at.is_empty() { - tx.delete( - self.config.col_data, - &stagnant_at_key(timestamp), - ); - } else { - tx.put_vec( - self.config.col_data, - &stagnant_at_key(timestamp), - stagnant_at.encode(), - ); - } - } - BackendWriteOp::DeleteBlocksByNumber(block_number) => { - tx.delete( - self.config.col_data, - &block_height_key(block_number), - ); - } - BackendWriteOp::DeleteBlockEntry(hash) => { - tx.delete( - self.config.col_data, - &block_entry_key(&hash), - ); - } - BackendWriteOp::DeleteStagnantAt(timestamp) => { - let timestamp: Timestamp = timestamp.into(); - tx.delete( - self.config.col_data, - &stagnant_at_key(timestamp), - ); - } - } - } - - self.inner.write(tx).map_err(Into::into) - } -} - -fn load_decode( - db: &dyn KeyValueDB, - col_data: u32, - key: &[u8], -) -> Result, Error> { - match db.get(col_data, key)? { - None => Ok(None), - Some(raw) => D::decode(&mut &raw[..]) - .map(Some) - .map_err(Into::into), - } -} - -fn block_entry_key(hash: &Hash) -> [u8; 14 + 32] { - let mut key = [0; 14 + 32]; - key[..14].copy_from_slice(BLOCK_ENTRY_PREFIX); - hash.using_encoded(|s| key[14..].copy_from_slice(s)); - key -} - -fn block_height_key(number: BlockNumber) -> [u8; 15 + 4] { - let mut key = [0; 15 + 4]; - key[..15].copy_from_slice(BLOCK_HEIGHT_PREFIX); - key[15..].copy_from_slice(&number.to_be_bytes()); - key -} - -fn stagnant_at_key(timestamp: Timestamp) -> [u8; 14 + 8] { - let mut key = [0; 14 + 8]; - key[..14].copy_from_slice(STAGNANT_AT_PREFIX); - key[14..].copy_from_slice(×tamp.to_be_bytes()); - key -} - -fn decode_block_height_key(key: &[u8]) -> Option { - if key.len() != 15 + 4 { return None } - if !key.starts_with(BLOCK_HEIGHT_PREFIX) { return None } - - let mut bytes = [0; 4]; - bytes.copy_from_slice(&key[15..]); - Some(BlockNumber::from_be_bytes(bytes)) -} - -fn decode_stagnant_at_key(key: &[u8]) -> Option { - if key.len() != 14 + 8 { return None } - if !key.starts_with(STAGNANT_AT_PREFIX) { return None } - - let mut bytes = [0; 8]; - bytes.copy_from_slice(&key[14..]); - Some(Timestamp::from_be_bytes(bytes)) -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn block_height_key_decodes() { - let key = block_height_key(5); - assert_eq!(decode_block_height_key(&key), Some(5)); - } - - #[test] - fn stagnant_at_key_decodes() { - let key = stagnant_at_key(5); - assert_eq!(decode_stagnant_at_key(&key), Some(5)); - } - - #[test] - fn lower_block_height_key_lesser() { - for i in 0..256 { - for j in 1..=256 { - let key_a = block_height_key(i); - let key_b = block_height_key(i + j); - - assert!(key_a < key_b); - } - } - } - - #[test] - fn lower_stagnant_at_key_lesser() { - for i in 0..256 { - for j in 1..=256 { - let key_a = stagnant_at_key(i); - let key_b = stagnant_at_key(i + j); - - assert!(key_a < key_b); - } - } - } - - #[test] - fn write_read_block_entry() { - let db = Arc::new(kvdb_memorydb::create(1)); - let config = Config { col_data: 0 }; - - let mut backend = DbBackend::new(db, config); - - let block_entry = BlockEntry { - block_hash: Hash::repeat_byte(1), - block_number: 1, - parent_hash: Hash::repeat_byte(0), - children: vec![], - viability: ViabilityCriteria { - earliest_unviable_ancestor: None, - explicitly_reverted: false, - approval: Approval::Unapproved, - }, - weight: 100, - }; - - backend.write(vec![ - BackendWriteOp::WriteBlockEntry(block_entry.clone().into()) - ]).unwrap(); - - assert_eq!( - backend.load_block_entry(&block_entry.block_hash).unwrap().map(BlockEntry::from), - Some(block_entry), - ); - } - - #[test] - fn delete_block_entry() { - let db = Arc::new(kvdb_memorydb::create(1)); - let config = Config { col_data: 0 }; - - let mut backend = DbBackend::new(db, config); - - let block_entry = BlockEntry { - block_hash: Hash::repeat_byte(1), - block_number: 1, - parent_hash: Hash::repeat_byte(0), - children: vec![], - viability: ViabilityCriteria { - earliest_unviable_ancestor: None, - explicitly_reverted: false, - approval: Approval::Unapproved, - }, - weight: 100, - }; - - backend.write(vec![ - BackendWriteOp::WriteBlockEntry(block_entry.clone().into()) - ]).unwrap(); - - backend.write(vec![ - BackendWriteOp::DeleteBlockEntry(block_entry.block_hash), - ]).unwrap(); - - assert!( - backend.load_block_entry(&block_entry.block_hash).unwrap().is_none(), - ); - } - - #[test] - fn earliest_block_number() { - let db = Arc::new(kvdb_memorydb::create(1)); - let config = Config { col_data: 0 }; - - let mut backend = DbBackend::new(db, config); - - assert!( - backend.load_first_block_number().unwrap().is_none(), - ); - - backend.write(vec![ - BackendWriteOp::WriteBlocksByNumber(2, vec![Hash::repeat_byte(0)]), - BackendWriteOp::WriteBlocksByNumber(5, vec![Hash::repeat_byte(0)]), - BackendWriteOp::WriteBlocksByNumber(10, vec![Hash::repeat_byte(0)]), - ]).unwrap(); - - assert_eq!( - backend.load_first_block_number().unwrap(), - Some(2), - ); - - backend.write(vec![ - BackendWriteOp::WriteBlocksByNumber(2, vec![]), - BackendWriteOp::DeleteBlocksByNumber(5), - ]).unwrap(); - - assert_eq!( - backend.load_first_block_number().unwrap(), - Some(10), - ); - } - - #[test] - fn stagnant_at_up_to() { - let db = Arc::new(kvdb_memorydb::create(1)); - let config = Config { col_data: 0 }; - - let mut backend = DbBackend::new(db, config); - - // Prove that it's cheap - assert!( - backend.load_stagnant_at_up_to(Timestamp::max_value()).unwrap().is_empty(), - ); - - backend.write(vec![ - BackendWriteOp::WriteStagnantAt(2, vec![Hash::repeat_byte(1)]), - BackendWriteOp::WriteStagnantAt(5, vec![Hash::repeat_byte(2)]), - BackendWriteOp::WriteStagnantAt(10, vec![Hash::repeat_byte(3)]), - ]).unwrap(); - - assert_eq!( - backend.load_stagnant_at_up_to(Timestamp::max_value()).unwrap(), - vec![ - (2, vec![Hash::repeat_byte(1)]), - (5, vec![Hash::repeat_byte(2)]), - (10, vec![Hash::repeat_byte(3)]), - ] - ); - - assert_eq!( - backend.load_stagnant_at_up_to(10).unwrap(), - vec![ - (2, vec![Hash::repeat_byte(1)]), - (5, vec![Hash::repeat_byte(2)]), - (10, vec![Hash::repeat_byte(3)]), - ] - ); - - assert_eq!( - backend.load_stagnant_at_up_to(9).unwrap(), - vec![ - (2, vec![Hash::repeat_byte(1)]), - (5, vec![Hash::repeat_byte(2)]), - ] - ); - - backend.write(vec![ - BackendWriteOp::DeleteStagnantAt(2), - ]).unwrap(); - - assert_eq!( - backend.load_stagnant_at_up_to(5).unwrap(), - vec![ - (5, vec![Hash::repeat_byte(2)]), - ] - ); - - backend.write(vec![ - BackendWriteOp::WriteStagnantAt(5, vec![]), - ]).unwrap(); - - assert_eq!( - backend.load_stagnant_at_up_to(10).unwrap(), - vec![ - (10, vec![Hash::repeat_byte(3)]), - ] - ); - } - - #[test] - fn write_read_blocks_at_height() { - let db = Arc::new(kvdb_memorydb::create(1)); - let config = Config { col_data: 0 }; - - let mut backend = DbBackend::new(db, config); - - backend.write(vec![ - BackendWriteOp::WriteBlocksByNumber(2, vec![Hash::repeat_byte(1)]), - BackendWriteOp::WriteBlocksByNumber(5, vec![Hash::repeat_byte(2)]), - BackendWriteOp::WriteBlocksByNumber(10, vec![Hash::repeat_byte(3)]), - ]).unwrap(); - - assert_eq!( - backend.load_blocks_by_number(2).unwrap(), - vec![Hash::repeat_byte(1)], - ); - - assert_eq!( - backend.load_blocks_by_number(3).unwrap(), - vec![], - ); - - backend.write(vec![ - BackendWriteOp::WriteBlocksByNumber(2, vec![]), - BackendWriteOp::DeleteBlocksByNumber(5), - ]).unwrap(); - - assert_eq!( - backend.load_blocks_by_number(2).unwrap(), - vec![], - ); - - assert_eq!( - backend.load_blocks_by_number(5).unwrap(), - vec![], - ); - - assert_eq!( - backend.load_blocks_by_number(10).unwrap(), - vec![Hash::repeat_byte(3)], - ); - } -} diff --git a/node/core/chain-selection/src/lib.rs b/node/core/chain-selection/src/lib.rs index 39d416eb22b2..dddfc2590d33 100644 --- a/node/core/chain-selection/src/lib.rs +++ b/node/core/chain-selection/src/lib.rs @@ -25,18 +25,15 @@ use polkadot_subsystem::{ errors::ChainApiError, }; -use kvdb::KeyValueDB; use parity_scale_codec::Error as CodecError; use futures::channel::oneshot; use futures::prelude::*; -use std::time::{UNIX_EPOCH, Duration,SystemTime}; -use std::sync::Arc; +use std::time::{UNIX_EPOCH, SystemTime}; use crate::backend::{Backend, OverlayedBackend, BackendWriteOp}; mod backend; -mod db_backend; mod tree; #[cfg(test)] @@ -46,10 +43,6 @@ const LOG_TARGET: &str = "parachain::chain-selection"; /// Timestamp based on the 1 Jan 1970 UNIX base, which is persistent across node restarts and OS reboots. type Timestamp = u64; -// If a block isn't approved in 120 seconds, nodes will abandon it -// and begin building on another chain. -const STAGNANT_TIMEOUT: Timestamp = 120; - #[derive(Debug, Clone)] enum Approval { // Approved @@ -209,143 +202,96 @@ impl Error { } } -/// A clock used for fetching the current timestamp. -pub trait Clock { - /// Get the current timestamp. - fn timestamp_now(&self) -> Timestamp; -} - -struct SystemClock; - -impl Clock for SystemClock { - fn timestamp_now(&self) -> Timestamp { - // `SystemTime` is notoriously non-monotonic, so our timers might not work - // exactly as expected. Regardless, stagnation is detected on the order of minutes, - // and slippage of a few seconds in either direction won't cause any major harm. - // - // The exact time that a block becomes stagnant in the local node is always expected - // to differ from other nodes due to network asynchrony and delays in block propagation. - // Non-monotonicity exarcerbates that somewhat, but not meaningfully. - - match SystemTime::now().duration_since(UNIX_EPOCH) { - Ok(d) => d.as_secs(), - Err(e) => { - tracing::warn!( - target: LOG_TARGET, - err = ?e, - "Current time is before unix epoch. Validation will not work correctly." - ); +fn timestamp_now() -> Timestamp { + // `SystemTime` is notoriously non-monotonic, so our timers might not work + // exactly as expected. Regardless, stagnation is detected on the order of minutes, + // and slippage of a few seconds in either direction won't cause any major harm. + // + // The exact time that a block becomes stagnant in the local node is always expected + // to differ from other nodes due to network asynchrony and delays in block propagation. + // Non-monotonicity exarcerbates that somewhat, but not meaningfully. + + match SystemTime::now().duration_since(UNIX_EPOCH) { + Ok(d) => d.as_secs(), + Err(e) => { + tracing::warn!( + target: LOG_TARGET, + err = ?e, + "Current time is before unix epoch. Validation will not work correctly." + ); - 0 - } + 0 } } } -/// The interval, in seconds to check for stagnant blocks. -#[derive(Debug, Clone)] -pub struct StagnantCheckInterval(Duration); - -impl Default for StagnantCheckInterval { - fn default() -> Self { - // 5 seconds is a reasonable balance between avoiding DB reads and - // ensuring validators are generally in agreement on stagnant blocks. - // - // Assuming a network delay of D, the longest difference in view possible - // between 2 validators is D + 5s. - const DEFAULT_STAGNANT_CHECK_INTERVAL: Duration = Duration::from_secs(5); - - StagnantCheckInterval(DEFAULT_STAGNANT_CHECK_INTERVAL) - } -} +fn stagnant_timeout_from_now() -> Timestamp { + // If a block isn't approved in 120 seconds, nodes will abandon it + // and begin building on another chain. + const STAGNANT_TIMEOUT: Timestamp = 120; -impl StagnantCheckInterval { - /// Create a new stagnant-check interval wrapping the given duration. - pub fn new(interval: Duration) -> Self { - StagnantCheckInterval(interval) - } - - fn timeout_stream(&self) -> impl Stream { - let interval = self.0; - let mut delay = futures_timer::Delay::new(interval); + timestamp_now() + STAGNANT_TIMEOUT +} - futures::stream::poll_fn(move |cx| { - let poll = delay.poll_unpin(cx); - if poll.is_ready() { - delay.reset(interval) - } +// TODO https://github.com/paritytech/polkadot/issues/3293: +// +// This is used just so we can have a public function that calls +// `run` and eliminates all the unused errors. +// +// Should be removed when the real implementation is done. +struct VoidBackend; - poll.map(Some) - }) +impl Backend for VoidBackend { + fn load_block_entry(&self, _: &Hash) -> Result, Error> { + Ok(None) + } + fn load_leaves(&self) -> Result { + Ok(LeafEntrySet::default()) + } + fn load_stagnant_at(&self, _: Timestamp) -> Result, Error> { + Ok(Vec::new()) + } + fn load_stagnant_at_up_to(&self, _: Timestamp) + -> Result)>, Error> + { + Ok(Vec::new()) + } + fn load_first_block_number(&self) -> Result, Error> { + Ok(None) + } + fn load_blocks_by_number(&self, _: BlockNumber) -> Result, Error> { + Ok(Vec::new()) } -} -/// Configuration for the chain selection subsystem. -#[derive(Debug, Clone)] -pub struct Config { - /// The column in the database that the storage should use. - pub col_data: u32, - /// How often to check for stagnant blocks. - pub stagnant_check_interval: StagnantCheckInterval, + fn write(&mut self, _: I) -> Result<(), Error> + where I: IntoIterator + { + Ok(()) + } } /// The chain selection subsystem. -pub struct ChainSelectionSubsystem { - config: Config, - db: Arc, -} - -impl ChainSelectionSubsystem { - /// Create a new instance of the subsystem with the given config - /// and key-value store. - pub fn new(config: Config, db: Arc) -> Self { - ChainSelectionSubsystem { - config, - db, - } - } -} +pub struct ChainSelectionSubsystem; impl Subsystem for ChainSelectionSubsystem where Context: SubsystemContext { fn start(self, ctx: Context) -> SpawnedSubsystem { - let backend = crate::db_backend::v1::DbBackend::new( - self.db, - crate::db_backend::v1::Config { col_data: self.config.col_data }, - ); - + let backend = VoidBackend; SpawnedSubsystem { - future: run( - ctx, - backend, - self.config.stagnant_check_interval, - Box::new(SystemClock), - ) - .map(Ok) - .boxed(), + future: run(ctx, backend).map(|()| Ok(())).boxed(), name: "chain-selection-subsystem", } } } -async fn run( - mut ctx: Context, - mut backend: B, - stagnant_check_interval: StagnantCheckInterval, - clock: Box, -) +async fn run(mut ctx: Context, mut backend: B) where Context: SubsystemContext, B: Backend, { loop { - let res = run_iteration( - &mut ctx, - &mut backend, - &stagnant_check_interval, - &*clock, - ).await; + let res = run_iteration(&mut ctx, &mut backend).await; match res { Err(e) => { e.trace(); @@ -367,69 +313,55 @@ async fn run( // // A return value of `Ok` indicates that an exit should be made, while non-fatal errors // lead to another call to this function. -async fn run_iteration( - ctx: &mut Context, - backend: &mut B, - stagnant_check_interval: &StagnantCheckInterval, - clock: &(dyn Clock + Sync), -) +async fn run_iteration(ctx: &mut Context, backend: &mut B) -> Result<(), Error> where Context: SubsystemContext, B: Backend, { - let mut stagnant_check_stream = stagnant_check_interval.timeout_stream(); + // TODO https://github.com/paritytech/polkadot/issues/3293: Add stagnant checking timer loop. loop { - futures::select! { - msg = ctx.recv().fuse() => { - let msg = msg?; - match msg { - FromOverseer::Signal(OverseerSignal::Conclude) => { - return Ok(()) - } - FromOverseer::Signal(OverseerSignal::ActiveLeaves(update)) => { - for leaf in update.activated { - let write_ops = handle_active_leaf( - ctx, - &*backend, - clock.timestamp_now() + STAGNANT_TIMEOUT, - leaf.hash, - ).await?; - - backend.write(write_ops)?; - } - } - FromOverseer::Signal(OverseerSignal::BlockFinalized(h, n)) => { - handle_finalized_block(backend, h, n)? - } - FromOverseer::Communication { msg } => match msg { - ChainSelectionMessage::Approved(hash) => { - handle_approved_block(backend, hash)? - } - ChainSelectionMessage::Leaves(tx) => { - let leaves = load_leaves(ctx, &*backend).await?; - let _ = tx.send(leaves); - } - ChainSelectionMessage::BestLeafContaining(required, tx) => { - let best_containing = crate::backend::find_best_leaf_containing( - &*backend, - required, - )?; - - // note - this may be none if the finalized block is - // a leaf. this is fine according to the expected usage of the - // function. `None` responses should just `unwrap_or(required)`, - // so if the required block is the finalized block, then voilá. - - let _ = tx.send(best_containing); - } - } + match ctx.recv().await? { + FromOverseer::Signal(OverseerSignal::Conclude) => { + return Ok(()) + } + FromOverseer::Signal(OverseerSignal::ActiveLeaves(update)) => { + for leaf in update.activated { + let write_ops = handle_active_leaf( + ctx, + &*backend, + leaf.hash, + ).await?; + + backend.write(write_ops)?; } } - _ = stagnant_check_stream.next().fuse() => { - detect_stagnant(backend, clock.timestamp_now())?; + FromOverseer::Signal(OverseerSignal::BlockFinalized(h, n)) => { + handle_finalized_block(backend, h, n)? } - } + FromOverseer::Communication { msg } => match msg { + ChainSelectionMessage::Approved(hash) => { + handle_approved_block(backend, hash)? + } + ChainSelectionMessage::Leaves(tx) => { + let leaves = load_leaves(ctx, &*backend).await?; + let _ = tx.send(leaves); + } + ChainSelectionMessage::BestLeafContaining(required, tx) => { + let best_containing = crate::backend::find_best_leaf_containing( + &*backend, + required, + )?; + + // note - this may be none if the finalized block is + // a leaf. this is fine according to the expected usage of the + // function. `None` responses should just `unwrap_or(required)`, + // so if the required block is the finalized block, then voilá. + + let _ = tx.send(best_containing); + } + } + }; } } @@ -483,7 +415,6 @@ async fn fetch_block_weight( async fn handle_active_leaf( ctx: &mut impl SubsystemContext, backend: &impl Backend, - stagnant_at: Timestamp, hash: Hash, ) -> Result, Error> { let lower_bound = match backend.load_first_block_number()? { @@ -544,7 +475,6 @@ async fn handle_active_leaf( header.parent_hash, reversion_logs, weight, - stagnant_at, )?; } @@ -626,22 +556,6 @@ fn handle_approved_block( backend.write(ops) } -fn detect_stagnant( - backend: &mut impl Backend, - now: Timestamp, -) -> Result<(), Error> { - let ops = { - let overlay = crate::tree::detect_stagnant( - &*backend, - now, - )?; - - overlay.into_write_ops() - }; - - backend.write(ops) -} - // Load the leaves from the backend. If there are no leaves, then return // the finalized block. async fn load_leaves( diff --git a/node/core/chain-selection/src/tests.rs b/node/core/chain-selection/src/tests.rs index 1449fae3f5dd..945578a47e6e 100644 --- a/node/core/chain-selection/src/tests.rs +++ b/node/core/chain-selection/src/tests.rs @@ -22,7 +22,7 @@ use super::*; use std::collections::{HashMap, HashSet, BTreeMap}; -use std::sync::{atomic::{Ordering as AtomicOrdering, AtomicU64}, Arc}; +use std::sync::Arc; use futures::channel::oneshot; use parity_scale_codec::Encode; @@ -103,21 +103,6 @@ impl TestBackend { } } } - - fn assert_stagnant_at_state( - &self, - stagnant_at: Vec<(Timestamp, Vec)>, - ) { - let inner = self.inner.lock(); - assert_eq!(inner.stagnant_at.len(), stagnant_at.len()); - for (at, hashes) in stagnant_at { - let stored_hashes = inner.stagnant_at.get(&at).unwrap(); - assert_eq!(hashes.len(), stored_hashes.len()); - for hash in hashes { - assert!(stored_hashes.contains(&hash)); - } - } - } } impl Default for TestBackend { @@ -188,45 +173,18 @@ impl Backend for TestBackend { } } -#[derive(Clone)] -pub struct TestClock(Arc); - -impl TestClock { - fn new(initial: u64) -> Self { - TestClock(Arc::new(AtomicU64::new(initial))) - } - - fn inc_by(&self, duration: u64) { - self.0.fetch_add(duration, AtomicOrdering::Relaxed); - } -} - -impl Clock for TestClock { - fn timestamp_now(&self) -> Timestamp { - self.0.load(AtomicOrdering::Relaxed) - } -} - -const TEST_STAGNANT_INTERVAL: Duration = Duration::from_millis(20); - type VirtualOverseer = test_helpers::TestSubsystemContextHandle; fn test_harness>( - test: impl FnOnce(TestBackend, TestClock, VirtualOverseer) -> T + test: impl FnOnce(TestBackend, VirtualOverseer) -> T ) { let pool = TaskExecutor::new(); let (context, virtual_overseer) = test_helpers::make_subsystem_context(pool); let backend = TestBackend::default(); - let clock = TestClock::new(0); - let subsystem = crate::run( - context, - backend.clone(), - StagnantCheckInterval::new(TEST_STAGNANT_INTERVAL), - Box::new(clock.clone()), - ); + let subsystem = crate::run(context, backend.clone()); - let test_fut = test(backend, clock, virtual_overseer); + let test_fut = test(backend, virtual_overseer); let test_and_conclude = async move { let mut virtual_overseer = test_fut.await; virtual_overseer.send(OverseerSignal::Conclude.into()).await; @@ -624,12 +582,12 @@ async fn approve_block( #[test] fn no_op_subsystem_run() { - test_harness(|_, _, virtual_overseer| async move { virtual_overseer }); + test_harness(|_, virtual_overseer| async move { virtual_overseer }); } #[test] fn import_direct_child_of_finalized_on_empty() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -656,7 +614,7 @@ fn import_direct_child_of_finalized_on_empty() { #[test] fn import_chain_on_finalized_incrementally() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -685,7 +643,7 @@ fn import_chain_on_finalized_incrementally() { #[test] fn import_two_subtrees_on_finalized() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -729,7 +687,7 @@ fn import_two_subtrees_on_finalized() { #[test] fn import_two_subtrees_on_nonzero_finalized() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 100; let finalized_hash = Hash::repeat_byte(0); @@ -773,7 +731,7 @@ fn import_two_subtrees_on_nonzero_finalized() { #[test] fn leaves_ordered_by_weight_and_then_number() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -826,7 +784,7 @@ fn leaves_ordered_by_weight_and_then_number() { #[test] fn subtrees_imported_even_with_gaps() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -877,7 +835,7 @@ fn subtrees_imported_even_with_gaps() { #[test] fn reversion_removes_viability_of_chain() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -913,7 +871,7 @@ fn reversion_removes_viability_of_chain() { #[test] fn reversion_removes_viability_and_finds_ancestor_as_leaf() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -947,7 +905,7 @@ fn reversion_removes_viability_and_finds_ancestor_as_leaf() { #[test] fn ancestor_of_unviable_is_not_leaf_if_has_children() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1016,7 +974,7 @@ fn ancestor_of_unviable_is_not_leaf_if_has_children() { #[test] fn self_and_future_reversions_are_ignored() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1048,7 +1006,7 @@ fn self_and_future_reversions_are_ignored() { #[test] fn revert_finalized_is_ignored() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 10; let finalized_hash = Hash::repeat_byte(0); @@ -1080,7 +1038,7 @@ fn revert_finalized_is_ignored() { #[test] fn reversion_affects_viability_of_all_subtrees() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1138,7 +1096,7 @@ fn reversion_affects_viability_of_all_subtrees() { #[test] fn finalize_viable_prunes_subtrees() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1246,7 +1204,7 @@ fn finalize_viable_prunes_subtrees() { #[test] fn finalization_does_not_clobber_unviability() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1300,7 +1258,7 @@ fn finalization_does_not_clobber_unviability() { #[test] fn finalization_erases_unviable() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1364,7 +1322,7 @@ fn finalization_erases_unviable() { #[test] fn finalize_erases_unviable_but_keeps_later_unviability() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1432,7 +1390,7 @@ fn finalize_erases_unviable_but_keeps_later_unviability() { #[test] fn finalize_erases_unviable_from_one_but_not_all_reverts() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1492,7 +1450,7 @@ fn finalize_erases_unviable_from_one_but_not_all_reverts() { #[test] fn finalize_triggers_viability_search() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1564,7 +1522,7 @@ fn finalize_triggers_viability_search() { #[test] fn best_leaf_none_with_empty_db() { - test_harness(|_backend, _, mut virtual_overseer| async move { + test_harness(|_backend, mut virtual_overseer| async move { let required = Hash::repeat_byte(1); let best_leaf = best_leaf_containing(&mut virtual_overseer, required).await; assert!(best_leaf.is_none()); @@ -1575,7 +1533,7 @@ fn best_leaf_none_with_empty_db() { #[test] fn best_leaf_none_with_no_viable_leaves() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1617,7 +1575,7 @@ fn best_leaf_none_with_no_viable_leaves() { #[test] fn best_leaf_none_with_unknown_required() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1651,7 +1609,7 @@ fn best_leaf_none_with_unknown_required() { #[test] fn best_leaf_none_with_unviable_required() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1703,7 +1661,7 @@ fn best_leaf_none_with_unviable_required() { #[test] fn best_leaf_with_finalized_required() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1747,7 +1705,7 @@ fn best_leaf_with_finalized_required() { #[test] fn best_leaf_with_unfinalized_required() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1793,7 +1751,7 @@ fn best_leaf_with_unfinalized_required() { #[test] fn best_leaf_ancestor_of_all_leaves() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1851,7 +1809,7 @@ fn best_leaf_ancestor_of_all_leaves() { #[test] fn approve_message_approves_block_entry() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1901,7 +1859,7 @@ fn approve_message_approves_block_entry() { #[test] fn approve_nonexistent_has_no_effect() { - test_harness(|backend, _, mut virtual_overseer| async move { + test_harness(|backend, mut virtual_overseer| async move { let finalized_number = 0; let finalized_hash = Hash::repeat_byte(0); @@ -1949,342 +1907,3 @@ fn approve_nonexistent_has_no_effect() { virtual_overseer }) } - -#[test] -fn block_has_correct_stagnant_at() { - test_harness(|backend, clock, mut virtual_overseer| async move { - let finalized_number = 0; - let finalized_hash = Hash::repeat_byte(0); - - // F <- A1 <- A2 - - let (a1_hash, chain_a) = construct_chain_on_base( - vec![1], - finalized_number, - finalized_hash, - |h| { - salt_header(h, b"a"); - } - ); - - let (a2_hash, chain_a_ext) = construct_chain_on_base( - vec![1], - 1, - a1_hash, - |h| { - salt_header(h, b"a"); - } - ); - - import_chains_into_empty( - &mut virtual_overseer, - &backend, - finalized_number, - finalized_hash, - vec![chain_a.clone()], - ).await; - - clock.inc_by(1); - - import_blocks_into( - &mut virtual_overseer, - &backend, - None, - chain_a_ext.clone(), - ).await; - - backend.assert_stagnant_at_state(vec![ - (STAGNANT_TIMEOUT, vec![a1_hash]), - (STAGNANT_TIMEOUT + 1, vec![a2_hash]), - ]); - - virtual_overseer - }) -} - -#[test] -fn detects_stagnant() { - test_harness(|backend, clock, mut virtual_overseer| async move { - let finalized_number = 0; - let finalized_hash = Hash::repeat_byte(0); - - // F <- A1 - - let (a1_hash, chain_a) = construct_chain_on_base( - vec![1], - finalized_number, - finalized_hash, - |h| { - salt_header(h, b"a"); - } - ); - - import_chains_into_empty( - &mut virtual_overseer, - &backend, - finalized_number, - finalized_hash, - vec![chain_a.clone()], - ).await; - - { - let (_, write_rx) = backend.await_next_write(); - clock.inc_by(STAGNANT_TIMEOUT); - - write_rx.await.unwrap(); - } - - backend.assert_stagnant_at_state(vec![]); - - assert_matches!( - backend.load_block_entry(&a1_hash).unwrap().unwrap().viability.approval, - Approval::Stagnant - ); - - assert_leaves(&backend, vec![]); - - virtual_overseer - }) -} - -#[test] -fn finalize_stagnant_unlocks_subtree() { - test_harness(|backend, clock, mut virtual_overseer| async move { - let finalized_number = 0; - let finalized_hash = Hash::repeat_byte(0); - - // F <- A1 <- A2 - - let (a1_hash, chain_a) = construct_chain_on_base( - vec![1], - finalized_number, - finalized_hash, - |h| { - salt_header(h, b"a"); - } - ); - - let (a2_hash, chain_a_ext) = construct_chain_on_base( - vec![1], - 1, - a1_hash, - |h| { - salt_header(h, b"a"); - } - ); - - import_chains_into_empty( - &mut virtual_overseer, - &backend, - finalized_number, - finalized_hash, - vec![chain_a.clone()], - ).await; - - clock.inc_by(1); - - import_blocks_into( - &mut virtual_overseer, - &backend, - None, - chain_a_ext.clone(), - ).await; - - { - let (_, write_rx) = backend.await_next_write(); - clock.inc_by(STAGNANT_TIMEOUT - 1); - - write_rx.await.unwrap(); - } - - backend.assert_stagnant_at_state(vec![(STAGNANT_TIMEOUT + 1, vec![a2_hash])]); - - assert_matches!( - backend.load_block_entry(&a1_hash).unwrap().unwrap().viability.approval, - Approval::Stagnant - ); - - assert_leaves(&backend, vec![]); - - finalize_block( - &mut virtual_overseer, - &backend, - 1, - a1_hash, - ).await; - - assert_leaves(&backend, vec![a2_hash]); - - virtual_overseer - }) -} - -#[test] -fn approval_undoes_stagnant_unlocking_subtree() { - test_harness(|backend, clock, mut virtual_overseer| async move { - let finalized_number = 0; - let finalized_hash = Hash::repeat_byte(0); - - // F <- A1 <- A2 - - let (a1_hash, chain_a) = construct_chain_on_base( - vec![1], - finalized_number, - finalized_hash, - |h| { - salt_header(h, b"a"); - } - ); - - let (a2_hash, chain_a_ext) = construct_chain_on_base( - vec![1], - 1, - a1_hash, - |h| { - salt_header(h, b"a"); - } - ); - - import_chains_into_empty( - &mut virtual_overseer, - &backend, - finalized_number, - finalized_hash, - vec![chain_a.clone()], - ).await; - - clock.inc_by(1); - - import_blocks_into( - &mut virtual_overseer, - &backend, - None, - chain_a_ext.clone(), - ).await; - - { - let (_, write_rx) = backend.await_next_write(); - clock.inc_by(STAGNANT_TIMEOUT - 1); - - write_rx.await.unwrap(); - } - - backend.assert_stagnant_at_state(vec![(STAGNANT_TIMEOUT + 1, vec![a2_hash])]); - - approve_block( - &mut virtual_overseer, - &backend, - a1_hash, - ).await; - - assert_matches!( - backend.load_block_entry(&a1_hash).unwrap().unwrap().viability.approval, - Approval::Approved - ); - - assert_leaves(&backend, vec![a2_hash]); - - virtual_overseer - }) -} - -#[test] -fn stagnant_preserves_parents_children() { - test_harness(|backend, clock, mut virtual_overseer| async move { - let finalized_number = 0; - let finalized_hash = Hash::repeat_byte(0); - - // F <- A1 <- A2 - // A1 <- B2 - - let (a2_hash, chain_a) = construct_chain_on_base( - vec![1, 2], - finalized_number, - finalized_hash, - |h| { - salt_header(h, b"a"); - } - ); - - let (_, a1_hash, _) = extract_info_from_chain(0, &chain_a); - - let (b2_hash, chain_b) = construct_chain_on_base( - vec![1], - 1, - a1_hash, - |h| { - salt_header(h, b"b"); - } - ); - - import_chains_into_empty( - &mut virtual_overseer, - &backend, - finalized_number, - finalized_hash, - vec![chain_a.clone(), chain_b.clone()], - ).await; - - approve_block(&mut virtual_overseer, &backend, a1_hash).await; - approve_block(&mut virtual_overseer, &backend, b2_hash).await; - - assert_leaves(&backend, vec![a2_hash, b2_hash]); - - { - let (_, write_rx) = backend.await_next_write(); - clock.inc_by(STAGNANT_TIMEOUT); - - write_rx.await.unwrap(); - } - - backend.assert_stagnant_at_state(vec![]); - assert_leaves(&backend, vec![b2_hash]); - - virtual_overseer - }) -} - -#[test] -fn stagnant_makes_childless_parent_leaf() { - test_harness(|backend, clock, mut virtual_overseer| async move { - let finalized_number = 0; - let finalized_hash = Hash::repeat_byte(0); - - // F <- A1 <- A2 - - let (a2_hash, chain_a) = construct_chain_on_base( - vec![1, 2], - finalized_number, - finalized_hash, - |h| { - salt_header(h, b"a"); - } - ); - - let (_, a1_hash, _) = extract_info_from_chain(0, &chain_a); - - import_chains_into_empty( - &mut virtual_overseer, - &backend, - finalized_number, - finalized_hash, - vec![chain_a.clone()], - ).await; - - approve_block(&mut virtual_overseer, &backend, a1_hash).await; - - assert_leaves(&backend, vec![a2_hash]); - - { - let (_, write_rx) = backend.await_next_write(); - clock.inc_by(STAGNANT_TIMEOUT); - - write_rx.await.unwrap(); - } - - backend.assert_stagnant_at_state(vec![]); - assert_leaves(&backend, vec![a1_hash]); - - virtual_overseer - }) -} diff --git a/node/core/chain-selection/src/tree.rs b/node/core/chain-selection/src/tree.rs index ff3db9e9e4a3..a10f0d0c5ad5 100644 --- a/node/core/chain-selection/src/tree.rs +++ b/node/core/chain-selection/src/tree.rs @@ -251,9 +251,8 @@ pub(crate) fn import_block( parent_hash: Hash, reversion_logs: Vec, weight: BlockWeight, - stagnant_at: Timestamp, ) -> Result<(), Error> { - add_block(backend, block_hash, block_number, parent_hash, weight, stagnant_at)?; + add_block(backend, block_hash, block_number, parent_hash, weight)?; apply_reversions( backend, block_hash, @@ -309,7 +308,6 @@ fn add_block( block_number: BlockNumber, parent_hash: Hash, weight: BlockWeight, - stagnant_at: Timestamp, ) -> Result<(), Error> { let mut leaves = backend.load_leaves()?; let parent_entry = backend.load_block_entry(&parent_hash)?; @@ -352,6 +350,7 @@ fn add_block( backend.write_blocks_by_number(block_number, blocks_by_number); // 5. Add stagnation timeout. + let stagnant_at = crate::stagnant_timeout_from_now(); let mut stagnant_at_list = backend.load_stagnant_at(stagnant_at)?; stagnant_at_list.push(block_hash); backend.write_stagnant_at(stagnant_at, stagnant_at_list); @@ -550,6 +549,8 @@ pub(super) fn approve_block( /// /// This accepts a fresh backend and returns an overlay on top of it representing /// all changes made. +// TODO https://github.com/paritytech/polkadot/issues/3293:: remove allow +#[allow(unused)] pub(super) fn detect_stagnant<'a, B: 'a + Backend>( backend: &'a B, up_to: Timestamp, diff --git a/node/service/src/chain_spec.rs b/node/service/src/chain_spec.rs index 57e07b2bf0f7..2eee6b5f4cea 100644 --- a/node/service/src/chain_spec.rs +++ b/node/service/src/chain_spec.rs @@ -975,6 +975,7 @@ fn rococo_staging_testnet_config_genesis(wasm_binary: &[u8]) -> rococo_runtime:: }, paras: rococo_runtime::ParasConfig { paras: vec![], + _phdata: Default::default(), }, hrmp: Default::default(), parachains_configuration: rococo_runtime::ParachainsConfigurationConfig { @@ -988,14 +989,6 @@ fn rococo_staging_testnet_config_genesis(wasm_binary: &[u8]) -> rococo_runtime:: owner: Some(endowed_accounts[0].clone()), ..Default::default() }, - bridge_rococo_messages: rococo_runtime::BridgeRococoMessagesConfig { - owner: Some(endowed_accounts[0].clone()), - ..Default::default() - }, - bridge_wococo_messages: rococo_runtime::BridgeWococoMessagesConfig { - owner: Some(endowed_accounts[0].clone()), - ..Default::default() - }, } } @@ -1523,6 +1516,7 @@ pub fn rococo_testnet_genesis( hrmp: Default::default(), paras: rococo_runtime::ParasConfig { paras: vec![], + _phdata: Default::default(), }, bridge_rococo_grandpa: rococo_runtime::BridgeRococoGrandpaConfig { owner: Some(root_key.clone()), @@ -1532,14 +1526,6 @@ pub fn rococo_testnet_genesis( owner: Some(root_key.clone()), ..Default::default() }, - bridge_rococo_messages: rococo_runtime::BridgeRococoMessagesConfig { - owner: Some(root_key.clone()), - ..Default::default() - }, - bridge_wococo_messages: rococo_runtime::BridgeWococoMessagesConfig { - owner: Some(root_key.clone()), - ..Default::default() - }, } } diff --git a/runtime/common/src/integration_tests.rs b/runtime/common/src/integration_tests.rs index 0fb3b7ea1bf4..dfca5f5cbc7f 100644 --- a/runtime/common/src/integration_tests.rs +++ b/runtime/common/src/integration_tests.rs @@ -65,7 +65,7 @@ frame_support::construct_runtime!( // Parachains Runtime Configuration: configuration::{Pallet, Call, Storage, Config}, - Paras: paras::{Pallet, Origin, Call, Storage, Event, Config}, + Paras: paras::{Pallet, Origin, Call, Storage, Event, Config}, // Para Onboarding Pallets Registrar: paras_registrar::{Pallet, Call, Storage, Event}, diff --git a/runtime/common/src/paras_registrar.rs b/runtime/common/src/paras_registrar.rs index 30a97bf76942..26c3ce20d26b 100644 --- a/runtime/common/src/paras_registrar.rs +++ b/runtime/common/src/paras_registrar.rs @@ -572,7 +572,7 @@ mod tests { System: frame_system::{Pallet, Call, Config, Storage, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, ParachainsConfiguration: configuration::{Pallet, Call, Storage, Config}, - Parachains: paras::{Pallet, Origin, Call, Storage, Config, Event}, + Parachains: paras::{Pallet, Origin, Call, Storage, Config, Event}, Registrar: paras_registrar::{Pallet, Call, Storage, Event}, } ); diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 8361b5b97452..dce47b8f1b79 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1488,7 +1488,7 @@ construct_runtime! { ParasInclusion: parachains_inclusion::{Pallet, Call, Storage, Event} = 53, ParasInherent: parachains_paras_inherent::{Pallet, Call, Storage, Inherent} = 54, ParasScheduler: parachains_scheduler::{Pallet, Call, Storage} = 55, - Paras: parachains_paras::{Pallet, Call, Storage, Event, Config} = 56, + Paras: parachains_paras::{Pallet, Call, Storage, Event, Config} = 56, ParasInitializer: parachains_initializer::{Pallet, Call, Storage} = 57, ParasDmp: parachains_dmp::{Pallet, Call, Storage} = 58, ParasUmp: parachains_ump::{Pallet, Call, Storage, Event} = 59, diff --git a/runtime/kusama/src/weights/pallet_balances.rs b/runtime/kusama/src/weights/pallet_balances.rs index 747863a737a6..c030c3dcafee 100644 --- a/runtime/kusama/src/weights/pallet_balances.rs +++ b/runtime/kusama/src/weights/pallet_balances.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_balances //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,32 +44,32 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { fn transfer() -> Weight { - (73_559_000 as Weight) + (72_443_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn transfer_keep_alive() -> Weight { - (54_667_000 as Weight) + (52_788_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_balance_creating() -> Weight { - (29_203_000 as Weight) + (28_510_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_balance_killing() -> Weight { - (35_128_000 as Weight) + (34_621_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_transfer() -> Weight { - (72_833_000 as Weight) + (70_962_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn transfer_all() -> Weight { - (67_554_000 as Weight) + (66_162_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_bounties.rs b/runtime/kusama/src/weights/pallet_bounties.rs index 5ca7c519b871..c8d37d90a3fd 100644 --- a/runtime/kusama/src/weights/pallet_bounties.rs +++ b/runtime/kusama/src/weights/pallet_bounties.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_bounties //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,49 +44,49 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_bounties::WeightInfo for WeightInfo { fn propose_bounty(d: u32, ) -> Weight { - (43_276_000 as Weight) + (42_863_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn approve_bounty() -> Weight { - (11_557_000 as Weight) + (11_260_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn propose_curator() -> Weight { - (8_693_000 as Weight) + (8_487_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn unassign_curator() -> Weight { - (53_028_000 as Weight) + (52_302_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn accept_curator() -> Weight { - (36_603_000 as Weight) + (36_396_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn award_bounty() -> Weight { - (24_706_000 as Weight) + (24_492_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn claim_bounty() -> Weight { - (126_167_000 as Weight) + (124_315_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } fn close_bounty_proposed() -> Weight { - (51_788_000 as Weight) + (51_443_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn close_bounty_active() -> Weight { - (83_343_000 as Weight) + (82_325_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -97,8 +97,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { } fn spend_funds(b: u32, ) -> Weight { (0 as Weight) - // Standard Error: 14_000 - .saturating_add((60_142_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 12_000 + .saturating_add((59_403_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(b as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) diff --git a/runtime/kusama/src/weights/pallet_collective.rs b/runtime/kusama/src/weights/pallet_collective.rs index 8fc3e1c564ea..aeac3eaea6d5 100644 --- a/runtime/kusama/src/weights/pallet_collective.rs +++ b/runtime/kusama/src/weights/pallet_collective.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_collective //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -46,94 +46,94 @@ impl pallet_collective::WeightInfo for WeightInfo { fn set_members(m: u32, n: u32, p: u32, ) -> Weight { (0 as Weight) // Standard Error: 4_000 - .saturating_add((14_115_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((14_300_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 4_000 - .saturating_add((60_000 as Weight).saturating_mul(n as Weight)) + .saturating_add((95_000 as Weight).saturating_mul(n as Weight)) // Standard Error: 4_000 - .saturating_add((19_459_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((19_625_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(p as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) } fn execute(b: u32, m: u32, ) -> Weight { - (23_670_000 as Weight) + (23_351_000 as Weight) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((83_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((87_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } fn propose_execute(b: u32, m: u32, ) -> Weight { - (28_523_000 as Weight) + (28_075_000 as Weight) // Standard Error: 0 .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((163_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((175_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) } fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (44_252_000 as Weight) + (43_983_000 as Weight) // Standard Error: 0 .saturating_add((4_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((91_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((94_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((399_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((365_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)) } fn vote(m: u32, ) -> Weight { - (32_883_000 as Weight) + (32_626_000 as Weight) // Standard Error: 0 - .saturating_add((214_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((206_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (42_090_000 as Weight) + (42_402_000 as Weight) // Standard Error: 0 - .saturating_add((166_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((174_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((374_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((339_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)) } fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (62_491_000 as Weight) + (62_616_000 as Weight) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((169_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((175_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((380_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((343_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)) } fn close_disapproved(m: u32, p: u32, ) -> Weight { - (46_976_000 as Weight) + (46_908_000 as Weight) // Standard Error: 0 - .saturating_add((168_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((177_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((374_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((341_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)) } fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (66_976_000 as Weight) + (66_697_000 as Weight) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((169_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((176_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((378_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((345_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)) } fn disapprove_proposal(p: u32, ) -> Weight { - (26_129_000 as Weight) + (25_921_000 as Weight) // Standard Error: 0 - .saturating_add((379_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((346_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_democracy.rs b/runtime/kusama/src/weights/pallet_democracy.rs index 36bff259cb60..56373855862e 100644 --- a/runtime/kusama/src/weights/pallet_democracy.rs +++ b/runtime/kusama/src/weights/pallet_democracy.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_democracy //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,163 +44,163 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_democracy::WeightInfo for WeightInfo { fn propose() -> Weight { - (58_488_000 as Weight) + (57_057_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn second(s: u32, ) -> Weight { - (39_011_000 as Weight) + (38_340_000 as Weight) // Standard Error: 0 - .saturating_add((157_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((139_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)) } fn vote_new(r: u32, ) -> Weight { - (43_998_000 as Weight) + (43_376_000 as Weight) // Standard Error: 0 - .saturating_add((211_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((182_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn vote_existing(r: u32, ) -> Weight { - (44_219_000 as Weight) + (43_661_000 as Weight) // Standard Error: 0 - .saturating_add((206_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((173_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn emergency_cancel() -> Weight { - (28_974_000 as Weight) + (28_302_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn blacklist(p: u32, ) -> Weight { - (77_299_000 as Weight) + (76_895_000 as Weight) // Standard Error: 4_000 - .saturating_add((541_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((467_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } fn external_propose(v: u32, ) -> Weight { - (13_334_000 as Weight) + (13_005_000 as Weight) // Standard Error: 0 - .saturating_add((80_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((84_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn external_propose_majority() -> Weight { - (2_650_000 as Weight) + (2_734_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn external_propose_default() -> Weight { - (2_667_000 as Weight) + (2_716_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn fast_track() -> Weight { - (27_908_000 as Weight) + (27_335_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn veto_external(v: u32, ) -> Weight { - (28_446_000 as Weight) + (27_918_000 as Weight) // Standard Error: 0 - .saturating_add((134_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((119_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn cancel_proposal(p: u32, ) -> Weight { - (51_004_000 as Weight) + (50_828_000 as Weight) // Standard Error: 0 - .saturating_add((512_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((440_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)) } fn cancel_referendum() -> Weight { - (17_377_000 as Weight) + (17_244_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn cancel_queued(r: u32, ) -> Weight { - (33_882_000 as Weight) + (33_078_000 as Weight) // Standard Error: 15_000 - .saturating_add((6_070_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((4_660_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn on_initialize_base(r: u32, ) -> Weight { - (7_295_000 as Weight) + (7_135_000 as Weight) // Standard Error: 4_000 - .saturating_add((5_093_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((5_086_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) } fn delegate(r: u32, ) -> Weight { - (54_128_000 as Weight) + (53_113_000 as Weight) // Standard Error: 5_000 - .saturating_add((7_209_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((7_074_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) } fn undelegate(r: u32, ) -> Weight { - (23_613_000 as Weight) - // Standard Error: 4_000 - .saturating_add((7_196_000 as Weight).saturating_mul(r as Weight)) + (23_010_000 as Weight) + // Standard Error: 5_000 + .saturating_add((7_048_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) } fn clear_public_proposals() -> Weight { - (2_607_000 as Weight) + (2_640_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn note_preimage(b: u32, ) -> Weight { - (42_847_000 as Weight) + (41_512_000 as Weight) // Standard Error: 0 .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn note_imminent_preimage(b: u32, ) -> Weight { - (27_699_000 as Weight) + (26_759_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn reap_preimage(b: u32, ) -> Weight { - (38_171_000 as Weight) + (37_154_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn unlock_remove(r: u32, ) -> Weight { - (37_418_000 as Weight) + (37_083_000 as Weight) // Standard Error: 0 - .saturating_add((55_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((49_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn unlock_set(r: u32, ) -> Weight { - (35_077_000 as Weight) + (34_821_000 as Weight) // Standard Error: 0 - .saturating_add((197_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((159_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn remove_vote(r: u32, ) -> Weight { - (19_476_000 as Weight) + (19_491_000 as Weight) // Standard Error: 0 - .saturating_add((183_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((148_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn remove_other_vote(r: u32, ) -> Weight { - (19_518_000 as Weight) + (19_498_000 as Weight) // Standard Error: 0 - .saturating_add((186_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((148_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_gilt.rs b/runtime/kusama/src/weights/pallet_gilt.rs index 41bbd987e622..969957f64f20 100644 --- a/runtime/kusama/src/weights/pallet_gilt.rs +++ b/runtime/kusama/src/weights/pallet_gilt.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_gilt //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,50 +44,50 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_gilt::WeightInfo for WeightInfo { fn place_bid(l: u32, ) -> Weight { - (57_179_000 as Weight) + (51_257_000 as Weight) // Standard Error: 0 - .saturating_add((195_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((171_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)) } fn place_bid_max() -> Weight { - (226_003_000 as Weight) + (196_161_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn retract_bid(l: u32, ) -> Weight { - (57_082_000 as Weight) + (51_317_000 as Weight) // Standard Error: 0 - .saturating_add((166_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((144_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)) } fn set_target() -> Weight { - (5_948_000 as Weight) + (5_785_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn thaw() -> Weight { - (70_070_000 as Weight) + (68_092_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn pursue_target_noop() -> Weight { - (3_347_000 as Weight) + (3_242_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } fn pursue_target_per_item(b: u32, ) -> Weight { - (56_853_000 as Weight) + (52_205_000 as Weight) // Standard Error: 1_000 - .saturating_add((10_238_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((9_944_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(b as Weight))) } fn pursue_target_per_queue(q: u32, ) -> Weight { - (23_272_000 as Weight) - // Standard Error: 5_000 - .saturating_add((16_821_000 as Weight).saturating_mul(q as Weight)) + (16_887_000 as Weight) + // Standard Error: 6_000 + .saturating_add((16_321_000 as Weight).saturating_mul(q as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(q as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) diff --git a/runtime/kusama/src/weights/pallet_identity.rs b/runtime/kusama/src/weights/pallet_identity.rs index bef743c77a4f..8d93e14be4c7 100644 --- a/runtime/kusama/src/weights/pallet_identity.rs +++ b/runtime/kusama/src/weights/pallet_identity.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_identity //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,135 +44,135 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_identity::WeightInfo for WeightInfo { fn add_registrar(r: u32, ) -> Weight { - (21_339_000 as Weight) + (21_467_000 as Weight) // Standard Error: 2_000 - .saturating_add((236_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((200_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_identity(r: u32, x: u32, ) -> Weight { - (50_839_000 as Weight) - // Standard Error: 14_000 - .saturating_add((223_000 as Weight).saturating_mul(r as Weight)) + (52_103_000 as Weight) + // Standard Error: 15_000 + .saturating_add((201_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 1_000 - .saturating_add((954_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((932_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_subs_new(s: u32, ) -> Weight { - (40_807_000 as Weight) + (40_048_000 as Weight) // Standard Error: 1_000 - .saturating_add((6_374_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((6_295_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn set_subs_old(p: u32, ) -> Weight { - (40_924_000 as Weight) + (40_539_000 as Weight) // Standard Error: 0 - .saturating_add((2_059_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((1_996_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(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) } fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - (51_123_000 as Weight) - // Standard Error: 7_000 - .saturating_add((110_000 as Weight).saturating_mul(r as Weight)) + (49_774_000 as Weight) + // Standard Error: 5_000 + .saturating_add((139_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((2_042_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((1_985_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 - .saturating_add((595_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((602_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn request_judgement(r: u32, x: u32, ) -> Weight { - (53_230_000 as Weight) - // Standard Error: 5_000 - .saturating_add((223_000 as Weight).saturating_mul(r as Weight)) + (53_847_000 as Weight) + // Standard Error: 4_000 + .saturating_add((235_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((1_169_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((1_156_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn cancel_request(r: u32, x: u32, ) -> Weight { - (48_425_000 as Weight) + (49_428_000 as Weight) // Standard Error: 6_000 - .saturating_add((161_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((147_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((1_161_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((1_142_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_fee(r: u32, ) -> Weight { - (8_028_000 as Weight) - // Standard Error: 0 - .saturating_add((202_000 as Weight).saturating_mul(r as Weight)) + (7_739_000 as Weight) + // Standard Error: 1_000 + .saturating_add((168_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_account_id(r: u32, ) -> Weight { - (8_682_000 as Weight) - // Standard Error: 1_000 - .saturating_add((203_000 as Weight).saturating_mul(r as Weight)) + (8_326_000 as Weight) + // Standard Error: 0 + .saturating_add((175_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_fields(r: u32, ) -> Weight { - (8_010_000 as Weight) - // Standard Error: 0 - .saturating_add((203_000 as Weight).saturating_mul(r as Weight)) + (7_725_000 as Weight) + // Standard Error: 1_000 + .saturating_add((170_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn provide_judgement(r: u32, x: u32, ) -> Weight { - (34_291_000 as Weight) - // Standard Error: 5_000 - .saturating_add((203_000 as Weight).saturating_mul(r as Weight)) + (35_272_000 as Weight) + // Standard Error: 4_000 + .saturating_add((188_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((1_164_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((1_147_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { - (62_644_000 as Weight) - // Standard Error: 6_000 - .saturating_add((111_000 as Weight).saturating_mul(r as Weight)) + (63_036_000 as Weight) + // Standard Error: 5_000 + .saturating_add((88_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((2_048_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((1_987_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((10_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn add_sub(s: u32, ) -> Weight { - (54_234_000 as Weight) + (53_817_000 as Weight) // Standard Error: 0 - .saturating_add((154_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((145_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn rename_sub(s: u32, ) -> Weight { - (16_622_000 as Weight) + (16_130_000 as Weight) // Standard Error: 0 .saturating_add((21_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)) } fn remove_sub(s: u32, ) -> Weight { - (55_325_000 as Weight) + (54_744_000 as Weight) // Standard Error: 0 - .saturating_add((138_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((127_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn quit_sub(s: u32, ) -> Weight { - (34_002_000 as Weight) + (33_675_000 as Weight) // Standard Error: 0 - .saturating_add((138_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((123_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)) } diff --git a/runtime/kusama/src/weights/pallet_im_online.rs b/runtime/kusama/src/weights/pallet_im_online.rs index 481009d3d756..f226108c7287 100644 --- a/runtime/kusama/src/weights/pallet_im_online.rs +++ b/runtime/kusama/src/weights/pallet_im_online.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_im_online //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,11 +44,11 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_im_online::WeightInfo for WeightInfo { fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { - (86_872_000 as Weight) + (87_465_000 as Weight) // Standard Error: 0 - .saturating_add((158_000 as Weight).saturating_mul(k as Weight)) + .saturating_add((169_000 as Weight).saturating_mul(k as Weight)) // Standard Error: 1_000 - .saturating_add((347_000 as Weight).saturating_mul(e as Weight)) + .saturating_add((335_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_indices.rs b/runtime/kusama/src/weights/pallet_indices.rs index 213620648940..d37264f7facd 100644 --- a/runtime/kusama/src/weights/pallet_indices.rs +++ b/runtime/kusama/src/weights/pallet_indices.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_indices //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,27 +44,27 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_indices::WeightInfo for WeightInfo { fn claim() -> Weight { - (40_340_000 as Weight) + (39_903_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn transfer() -> Weight { - (48_814_000 as Weight) + (48_162_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn free() -> Weight { - (40_153_000 as Weight) + (39_958_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_transfer() -> Weight { - (40_676_000 as Weight) + (40_459_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn freeze() -> Weight { - (37_742_000 as Weight) + (37_761_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_membership.rs b/runtime/kusama/src/weights/pallet_membership.rs index 29cad36612f6..7878243a203b 100644 --- a/runtime/kusama/src/weights/pallet_membership.rs +++ b/runtime/kusama/src/weights/pallet_membership.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_membership //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,49 +44,51 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_membership::WeightInfo for WeightInfo { fn add_member(m: u32, ) -> Weight { - (23_736_000 as Weight) - // Standard Error: 3_000 - .saturating_add((166_000 as Weight).saturating_mul(m as Weight)) + (23_510_000 as Weight) + // Standard Error: 1_000 + .saturating_add((126_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn remove_member(m: u32, ) -> Weight { - (28_609_000 as Weight) + (28_576_000 as Weight) // Standard Error: 0 - .saturating_add((137_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((102_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn swap_member(m: u32, ) -> Weight { - (28_935_000 as Weight) + (28_826_000 as Weight) // Standard Error: 0 - .saturating_add((150_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((117_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn reset_member(m: u32, ) -> Weight { - (29_621_000 as Weight) + (29_556_000 as Weight) // Standard Error: 0 - .saturating_add((304_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((271_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn change_key(m: u32, ) -> Weight { - (30_393_000 as Weight) + (30_300_000 as Weight) // Standard Error: 0 - .saturating_add((145_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((113_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn set_prime(m: u32, ) -> Weight { - (7_534_000 as Weight) + (7_436_000 as Weight) // Standard Error: 0 - .saturating_add((79_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((84_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } - fn clear_prime(_m: u32, ) -> Weight { - (2_755_000 as Weight) + fn clear_prime(m: u32, ) -> Weight { + (2_947_000 as Weight) + // Standard Error: 0 + .saturating_add((1_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/kusama/src/weights/pallet_multisig.rs b/runtime/kusama/src/weights/pallet_multisig.rs index c2ac465aaada..2d05d2d877dd 100644 --- a/runtime/kusama/src/weights/pallet_multisig.rs +++ b/runtime/kusama/src/weights/pallet_multisig.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_multisig //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,78 +44,78 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { fn as_multi_threshold_1(_z: u32, ) -> Weight { - (12_153_000 as Weight) + (10_273_000 as Weight) } fn as_multi_create(s: u32, z: u32, ) -> Weight { - (50_455_000 as Weight) + (50_795_000 as Weight) // Standard Error: 0 - .saturating_add((103_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((85_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (56_117_000 as Weight) + (56_223_000 as Weight) // Standard Error: 0 - .saturating_add((106_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((91_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (29_486_000 as Weight) + (29_190_000 as Weight) // Standard Error: 0 - .saturating_add((103_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((86_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (53_516_000 as Weight) + (53_138_000 as Weight) // Standard Error: 0 - .saturating_add((118_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((98_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (70_795_000 as Weight) + (73_267_000 as Weight) + // Standard Error: 2_000 + .saturating_add((195_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 - .saturating_add((205_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) + .saturating_add((4_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)) } fn approve_as_multi_create(s: u32, ) -> Weight { - (50_128_000 as Weight) + (50_201_000 as Weight) // Standard Error: 0 - .saturating_add((104_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((83_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)) } fn approve_as_multi_approve(s: u32, ) -> Weight { - (28_902_000 as Weight) + (28_525_000 as Weight) // Standard Error: 0 - .saturating_add((105_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((88_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)) } fn approve_as_multi_complete(s: u32, ) -> Weight { - (112_716_000 as Weight) + (120_751_000 as Weight) // Standard Error: 0 - .saturating_add((210_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((196_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)) } fn cancel_as_multi(s: u32, ) -> Weight { - (84_205_000 as Weight) + (86_776_000 as Weight) // Standard Error: 0 - .saturating_add((101_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((86_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)) } diff --git a/runtime/kusama/src/weights/pallet_proxy.rs b/runtime/kusama/src/weights/pallet_proxy.rs index 8b0b2801beda..195a8613a601 100644 --- a/runtime/kusama/src/weights/pallet_proxy.rs +++ b/runtime/kusama/src/weights/pallet_proxy.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_proxy //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,75 +44,75 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_proxy::WeightInfo for WeightInfo { fn proxy(p: u32, ) -> Weight { - (24_892_000 as Weight) - // Standard Error: 0 - .saturating_add((122_000 as Weight).saturating_mul(p as Weight)) + (24_270_000 as Weight) + // Standard Error: 1_000 + .saturating_add((130_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } fn proxy_announced(a: u32, p: u32, ) -> Weight { - (55_405_000 as Weight) + (54_046_000 as Weight) // Standard Error: 1_000 - .saturating_add((563_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((503_000 as Weight).saturating_mul(a as Weight)) // Standard Error: 1_000 - .saturating_add((106_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((107_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)) } fn remove_announcement(a: u32, _p: u32, ) -> Weight { - (37_762_000 as Weight) + (36_894_000 as Weight) // Standard Error: 1_000 - .saturating_add((554_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((489_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn reject_announcement(a: u32, _p: u32, ) -> Weight { - (37_826_000 as Weight) + (36_533_000 as Weight) // Standard Error: 1_000 - .saturating_add((554_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((497_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn announce(a: u32, p: u32, ) -> Weight { - (51_131_000 as Weight) + (49_934_000 as Weight) // Standard Error: 1_000 - .saturating_add((562_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((495_000 as Weight).saturating_mul(a as Weight)) // Standard Error: 1_000 - .saturating_add((109_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((111_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)) } fn add_proxy(p: u32, ) -> Weight { - (36_114_000 as Weight) + (34_641_000 as Weight) // Standard Error: 1_000 - .saturating_add((223_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((190_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)) } fn remove_proxy(p: u32, ) -> Weight { - (35_456_000 as Weight) + (34_496_000 as Weight) // Standard Error: 2_000 - .saturating_add((246_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((213_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)) } fn remove_proxies(p: u32, ) -> Weight { - (33_748_000 as Weight) + (33_022_000 as Weight) // Standard Error: 1_000 - .saturating_add((136_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((139_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)) } fn anonymous(p: u32, ) -> Weight { - (48_409_000 as Weight) + (47_629_000 as Weight) // Standard Error: 1_000 - .saturating_add((31_000 as Weight).saturating_mul(p as Weight)) + .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(1 as Weight)) } fn kill_anonymous(p: u32, ) -> Weight { - (35_515_000 as Weight) + (34_875_000 as Weight) // Standard Error: 1_000 - .saturating_add((134_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((135_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)) } diff --git a/runtime/kusama/src/weights/pallet_scheduler.rs b/runtime/kusama/src/weights/pallet_scheduler.rs index a89f745c7a1e..4b00baa217fd 100644 --- a/runtime/kusama/src/weights/pallet_scheduler.rs +++ b/runtime/kusama/src/weights/pallet_scheduler.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_scheduler //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,30 +44,30 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { fn schedule(s: u32, ) -> Weight { - (28_202_000 as Weight) + (28_189_000 as Weight) // Standard Error: 0 .saturating_add((42_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)) } fn cancel(s: u32, ) -> Weight { - (27_640_000 as Weight) + (27_165_000 as Weight) // Standard Error: 14_000 - .saturating_add((5_699_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((4_332_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn schedule_named(s: u32, ) -> Weight { - (34_298_000 as Weight) + (33_852_000 as Weight) // Standard Error: 1_000 - .saturating_add((56_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((62_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)) } fn cancel_named(s: u32, ) -> Weight { - (29_004_000 as Weight) - // Standard Error: 15_000 - .saturating_add((5_720_000 as Weight).saturating_mul(s as Weight)) + (29_352_000 as Weight) + // Standard Error: 14_000 + .saturating_add((4_346_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)) } diff --git a/runtime/kusama/src/weights/pallet_session.rs b/runtime/kusama/src/weights/pallet_session.rs index 4c9a9fe8e5b0..92bbfe9443ad 100644 --- a/runtime/kusama/src/weights/pallet_session.rs +++ b/runtime/kusama/src/weights/pallet_session.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_session //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,12 +44,12 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_session::WeightInfo for WeightInfo { fn set_keys() -> Weight { - (72_025_000 as Weight) + (70_343_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } fn purge_keys() -> Weight { - (39_838_000 as Weight) + (40_249_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } diff --git a/runtime/kusama/src/weights/pallet_staking.rs b/runtime/kusama/src/weights/pallet_staking.rs index c517d84c6ed4..a078fe8fc8c0 100644 --- a/runtime/kusama/src/weights/pallet_staking.rs +++ b/runtime/kusama/src/weights/pallet_staking.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,154 +44,154 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_staking::WeightInfo for WeightInfo { fn bond() -> Weight { - (70_648_000 as Weight) + (68_483_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn bond_extra() -> Weight { - (54_235_000 as Weight) + (52_724_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn unbond() -> Weight { - (57_950_000 as Weight) + (56_614_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn withdraw_unbonded_update(s: u32, ) -> Weight { - (49_532_000 as Weight) + (48_650_000 as Weight) // Standard Error: 0 - .saturating_add((29_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((28_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn withdraw_unbonded_kill(s: u32, ) -> Weight { - (81_722_000 as Weight) + (79_902_000 as Weight) // Standard Error: 1_000 - .saturating_add((2_331_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_200_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn validate() -> Weight { - (31_838_000 as Weight) + (29_119_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn kick(k: u32, ) -> Weight { - (10_120_000 as Weight) + (10_981_000 as Weight) // Standard Error: 6_000 - .saturating_add((18_142_000 as Weight).saturating_mul(k as Weight)) + .saturating_add((17_518_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight))) } fn nominate(n: u32, ) -> Weight { - (37_716_000 as Weight) + (35_585_000 as Weight) // Standard Error: 6_000 - .saturating_add((5_240_000 as Weight).saturating_mul(n as Weight)) + .saturating_add((5_106_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn chill() -> Weight { - (16_594_000 as Weight) + (16_193_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) } fn set_payee() -> Weight { - (11_260_000 as Weight) + (10_861_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_controller() -> Weight { - (24_156_000 as Weight) + (23_628_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_validator_count() -> Weight { - (2_123_000 as Weight) + (2_081_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_no_eras() -> Weight { - (2_458_000 as Weight) + (2_358_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_new_era() -> Weight { - (2_428_000 as Weight) + (2_338_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_new_era_always() -> Weight { - (2_435_000 as Weight) + (2_312_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_invulnerables(v: u32, ) -> Weight { - (2_524_000 as Weight) + (2_285_000 as Weight) // Standard Error: 0 - .saturating_add((23_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((5_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_unstake(s: u32, ) -> Weight { - (57_861_000 as Weight) + (55_848_000 as Weight) // Standard Error: 1_000 - .saturating_add((2_315_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_197_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn cancel_deferred_slash(s: u32, ) -> Weight { - (3_460_645_000 as Weight) + (3_386_960_000 as Weight) // Standard Error: 221_000 - .saturating_add((19_673_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((19_794_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)) } fn payout_stakers_dead_controller(n: u32, ) -> Weight { - (108_055_000 as Weight) - // Standard Error: 15_000 - .saturating_add((47_913_000 as Weight).saturating_mul(n as Weight)) + (109_960_000 as Weight) + // Standard Error: 16_000 + .saturating_add((47_064_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(n as Weight))) } fn payout_stakers_alive_staked(n: u32, ) -> Weight { - (122_624_000 as Weight) - // Standard Error: 22_000 - .saturating_add((60_815_000 as Weight).saturating_mul(n as Weight)) + (145_438_000 as Weight) + // Standard Error: 24_000 + .saturating_add((59_384_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(11 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight))) } fn rebond(l: u32, ) -> Weight { - (46_725_000 as Weight) + (45_646_000 as Weight) // Standard Error: 1_000 - .saturating_add((62_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((72_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_history_depth(e: u32, ) -> Weight { (0 as Weight) - // Standard Error: 68_000 - .saturating_add((32_190_000 as Weight).saturating_mul(e as Weight)) + // Standard Error: 70_000 + .saturating_add((32_189_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight))) } fn reap_stash(s: u32, ) -> Weight { - (68_887_000 as Weight) + (66_554_000 as Weight) // Standard Error: 0 - .saturating_add((2_318_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_198_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn new_era(v: u32, n: u32, ) -> Weight { (0 as Weight) - // Standard Error: 734_000 - .saturating_add((296_342_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 36_000 - .saturating_add((46_481_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 749_000 + .saturating_add((299_115_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 37_000 + .saturating_add((46_619_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) @@ -200,12 +200,12 @@ impl pallet_staking::WeightInfo for WeightInfo { } fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight { (0 as Weight) - // Standard Error: 92_000 - .saturating_add((24_187_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 92_000 - .saturating_add((27_771_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 3_152_000 - .saturating_add((40_493_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 97_000 + .saturating_add((24_261_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 97_000 + .saturating_add((27_765_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 3_310_000 + .saturating_add((22_891_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) @@ -213,18 +213,18 @@ impl pallet_staking::WeightInfo for WeightInfo { } fn get_npos_targets(v: u32, ) -> Weight { (0 as Weight) - // Standard Error: 27_000 - .saturating_add((10_233_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 31_000 + .saturating_add((10_297_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight))) } fn set_staking_limits() -> Weight { - (5_708_000 as Weight) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + (4_799_000 as Weight) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn chill_other() -> Weight { - (39_559_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) + (31_294_000 as Weight) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/kusama/src/weights/pallet_timestamp.rs b/runtime/kusama/src/weights/pallet_timestamp.rs index cb9098577a61..094e394eb420 100644 --- a/runtime/kusama/src/weights/pallet_timestamp.rs +++ b/runtime/kusama/src/weights/pallet_timestamp.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,11 +44,11 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { fn set() -> Weight { - (9_872_000 as Weight) + (10_330_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn on_finalize() -> Weight { - (4_405_000 as Weight) + (4_458_000 as Weight) } } diff --git a/runtime/kusama/src/weights/pallet_tips.rs b/runtime/kusama/src/weights/pallet_tips.rs index bf358e3b80ef..370c01ef395d 100644 --- a/runtime/kusama/src/weights/pallet_tips.rs +++ b/runtime/kusama/src/weights/pallet_tips.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_tips //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,42 +44,42 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_tips::WeightInfo for WeightInfo { fn report_awesome(r: u32, ) -> Weight { - (49_516_000 as Weight) + (50_649_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn retract_tip() -> Weight { - (45_151_000 as Weight) + (45_588_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn tip_new(r: u32, t: u32, ) -> Weight { - (30_538_000 as Weight) + (29_606_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((116_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((124_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn tip(t: u32, ) -> Weight { - (18_895_000 as Weight) + (18_751_000 as Weight) // Standard Error: 0 - .saturating_add((558_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((567_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn close_tip(t: u32, ) -> Weight { - (82_263_000 as Weight) + (81_517_000 as Weight) // Standard Error: 0 - .saturating_add((290_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((318_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn slash_tip(t: u32, ) -> Weight { - (24_307_000 as Weight) + (24_467_000 as Weight) // Standard Error: 0 .saturating_add((7_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) diff --git a/runtime/kusama/src/weights/pallet_treasury.rs b/runtime/kusama/src/weights/pallet_treasury.rs index 80e169edc7db..24c2c1c36a0e 100644 --- a/runtime/kusama/src/weights/pallet_treasury.rs +++ b/runtime/kusama/src/weights/pallet_treasury.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_treasury //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,26 +44,26 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_treasury::WeightInfo for WeightInfo { fn propose_spend() -> Weight { - (41_175_000 as Weight) + (40_599_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn reject_proposal() -> Weight { - (50_148_000 as Weight) + (49_321_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn approve_proposal(p: u32, ) -> Weight { - (12_321_000 as Weight) + (12_230_000 as Weight) // Standard Error: 0 .saturating_add((34_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)) } fn on_initialize_proposals(p: u32, ) -> Weight { - (76_361_000 as Weight) - // Standard Error: 17_000 - .saturating_add((60_132_000 as Weight).saturating_mul(p as Weight)) + (75_382_000 as Weight) + // Standard Error: 16_000 + .saturating_add((59_314_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) diff --git a/runtime/kusama/src/weights/pallet_utility.rs b/runtime/kusama/src/weights/pallet_utility.rs index 66f9857c00ec..02dda1721835 100644 --- a/runtime/kusama/src/weights/pallet_utility.rs +++ b/runtime/kusama/src/weights/pallet_utility.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_utility //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,16 +44,16 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { fn batch(c: u32, ) -> Weight { - (15_334_000 as Weight) + (14_911_000 as Weight) // Standard Error: 0 - .saturating_add((2_478_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((2_456_000 as Weight).saturating_mul(c as Weight)) } fn as_derivative() -> Weight { - (5_220_000 as Weight) + (5_087_000 as Weight) } fn batch_all(c: u32, ) -> Weight { - (16_791_000 as Weight) + (16_211_000 as Weight) // Standard Error: 0 - .saturating_add((3_292_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((3_296_000 as Weight).saturating_mul(c as Weight)) } } diff --git a/runtime/kusama/src/weights/pallet_vesting.rs b/runtime/kusama/src/weights/pallet_vesting.rs index a6469b2917be..b675ae93fc52 100644 --- a/runtime/kusama/src/weights/pallet_vesting.rs +++ b/runtime/kusama/src/weights/pallet_vesting.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_vesting //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-19, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: diff --git a/runtime/kusama/src/weights/runtime_common_auctions.rs b/runtime/kusama/src/weights/runtime_common_auctions.rs index f3fd08ec3ae5..f33b909ae1d2 100644 --- a/runtime/kusama/src/weights/runtime_common_auctions.rs +++ b/runtime/kusama/src/weights/runtime_common_auctions.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::auctions //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-24, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -31,7 +31,7 @@ // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt -// --output=./runtime/kusama/src/weights/ +// --output=./runtime/kusama/src/weights/runtime_common_auctions.rs #![allow(unused_parens)] @@ -44,22 +44,22 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::auctions::WeightInfo for WeightInfo { fn new_auction() -> Weight { - (24_436_000 as Weight) + (29_554_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn bid() -> Weight { - (137_499_000 as Weight) + (154_464_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn on_initialize() -> Weight { - (23_555_687_000 as Weight) + (33_239_172_000 as Weight) .saturating_add(T::DbWeight::get().reads(3688 as Weight)) .saturating_add(T::DbWeight::get().writes(3683 as Weight)) } fn cancel_auction() -> Weight { - (5_007_594_000 as Weight) + (7_021_314_000 as Weight) .saturating_add(T::DbWeight::get().reads(73 as Weight)) .saturating_add(T::DbWeight::get().writes(3673 as Weight)) } diff --git a/runtime/kusama/src/weights/runtime_common_claims.rs b/runtime/kusama/src/weights/runtime_common_claims.rs index 94a4bd36f9e0..0277b96f3f9e 100644 --- a/runtime/kusama/src/weights/runtime_common_claims.rs +++ b/runtime/kusama/src/weights/runtime_common_claims.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::claims //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -44,27 +44,27 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::claims::WeightInfo for WeightInfo { fn claim() -> Weight { - (438_457_000 as Weight) + (443_398_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } fn mint_claim() -> Weight { - (13_035_000 as Weight) + (12_397_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn claim_attest() -> Weight { - (439_894_000 as Weight) + (444_202_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } fn attest() -> Weight { - (132_760_000 as Weight) + (130_109_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } fn move_claim() -> Weight { - (28_459_000 as Weight) + (27_762_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } diff --git a/runtime/kusama/src/weights/runtime_common_crowdloan.rs b/runtime/kusama/src/weights/runtime_common_crowdloan.rs index d269b826db36..0f4382bb1a16 100644 --- a/runtime/kusama/src/weights/runtime_common_crowdloan.rs +++ b/runtime/kusama/src/weights/runtime_common_crowdloan.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::crowdloan //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-24, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -31,7 +31,7 @@ // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt -// --output=./runtime/kusama/src/weights/ +// --output=./runtime/kusama/src/weights/runtime_common_crowdloan.rs #![allow(unused_parens)] @@ -44,53 +44,53 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::crowdloan::WeightInfo for WeightInfo { fn create() -> Weight { - (83_561_000 as Weight) + (93_538_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn contribute() -> Weight { - (306_719_000 as Weight) + (581_495_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn withdraw() -> Weight { - (110_824_000 as Weight) + (127_588_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn refund(k: u32, ) -> Weight { (0 as Weight) - // Standard Error: 21_000 - .saturating_add((45_890_000 as Weight).saturating_mul(k as Weight)) + // Standard Error: 52_000 + .saturating_add((56_719_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(k as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(k as Weight))) } fn dissolve() -> Weight { - (62_162_000 as Weight) + (68_758_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn edit() -> Weight { - (37_555_000 as Weight) + (42_049_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn add_memo() -> Weight { - (55_817_000 as Weight) + (65_306_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn poke() -> Weight { - (43_448_000 as Weight) + (51_610_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn on_initialize(n: u32, ) -> Weight { (0 as Weight) - // Standard Error: 19_000 - .saturating_add((110_004_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 32_000 + .saturating_add((131_978_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) diff --git a/runtime/kusama/src/weights/runtime_common_paras_registrar.rs b/runtime/kusama/src/weights/runtime_common_paras_registrar.rs index 666e1edffffe..a10b1215f48f 100644 --- a/runtime/kusama/src/weights/runtime_common_paras_registrar.rs +++ b/runtime/kusama/src/weights/runtime_common_paras_registrar.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::paras_registrar //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-21, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -31,7 +31,7 @@ // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt -// --output=./runtime/kusama/src/weights/ +// --output=./runtime/kusama/src/weights/runtime_common_paras_registrar.rs #![allow(unused_parens)] @@ -44,27 +44,27 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::paras_registrar::WeightInfo for WeightInfo { fn reserve() -> Weight { - (48_931_000 as Weight) + (59_279_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn register() -> Weight { - (4_193_117_000 as Weight) + (4_148_907_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn force_register() -> Weight { - (4_174_902_000 as Weight) + (4_144_844_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn deregister() -> Weight { - (81_324_000 as Weight) + (90_495_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn swap() -> Weight { - (69_717_000 as Weight) + (80_604_000 as Weight) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) } diff --git a/runtime/kusama/src/weights/runtime_common_slots.rs b/runtime/kusama/src/weights/runtime_common_slots.rs index b1867c175c8c..0762ded1a116 100644 --- a/runtime/kusama/src/weights/runtime_common_slots.rs +++ b/runtime/kusama/src/weights/runtime_common_slots.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::slots //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-25, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128 // Executed Command: @@ -31,7 +31,7 @@ // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt -// --output=./runtime/kusama/src/weights/ +// --output=./runtime/kusama/src/weights/runtime_common_slots.rs #![allow(unused_parens)] @@ -44,16 +44,16 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::slots::WeightInfo for WeightInfo { fn force_lease() -> Weight { - (92_502_000 as Weight) + (54_624_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn manage_lease_period_start(c: u32, t: u32, ) -> Weight { (0 as Weight) - // Standard Error: 17_000 - .saturating_add((16_401_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 17_000 - .saturating_add((34_480_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 36_000 + .saturating_add((19_526_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 36_000 + .saturating_add((42_887_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(t as Weight))) @@ -62,12 +62,12 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - (194_756_000 as Weight) + (230_377_000 as Weight) .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(9 as Weight)) } fn trigger_onboard() -> Weight { - (41_785_000 as Weight) + (45_884_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } diff --git a/runtime/parachains/src/hrmp.rs b/runtime/parachains/src/hrmp.rs index e1d7d3d57c08..a04fd465dd6e 100644 --- a/runtime/parachains/src/hrmp.rs +++ b/runtime/parachains/src/hrmp.rs @@ -573,8 +573,8 @@ impl Module { ); if request.confirmed { - if >::is_valid_para(channel_id.sender) - && >::is_valid_para(channel_id.recipient) + if >::is_valid_para(channel_id.sender) + && >::is_valid_para(channel_id.recipient) { ::HrmpChannels::insert( &channel_id, @@ -972,7 +972,7 @@ impl Module { ) -> DispatchResult { ensure!(origin != recipient, Error::::OpenHrmpChannelToSelf); ensure!( - >::is_valid_para(recipient), + >::is_valid_para(recipient), Error::::OpenHrmpChannelInvalidRecipient, ); @@ -1010,7 +1010,7 @@ impl Module { let egress_cnt = ::HrmpEgressChannelsIndex::decode_len(&origin).unwrap_or(0) as u32; let open_req_cnt = ::HrmpOpenChannelRequestCount::get(&origin); - let channel_num_limit = if >::is_parathread(origin) { + let channel_num_limit = if >::is_parathread(origin) { config.hrmp_max_parathread_outbound_channels } else { config.hrmp_max_parachain_outbound_channels @@ -1080,7 +1080,7 @@ impl Module { // check if by accepting this open channel request, this parachain would exceed the // number of inbound channels. let config = >::config(); - let channel_num_limit = if >::is_parathread(origin) { + let channel_num_limit = if >::is_parathread(origin) { config.hrmp_max_parathread_inbound_channels } else { config.hrmp_max_parachain_inbound_channels diff --git a/runtime/parachains/src/inclusion.rs b/runtime/parachains/src/inclusion.rs index eb58f315a0fa..79b682a4d192 100644 --- a/runtime/parachains/src/inclusion.rs +++ b/runtime/parachains/src/inclusion.rs @@ -453,7 +453,7 @@ impl Module { ); let validation_code_hash = - >::validation_code_hash_at(para_id, now, None) + >::validation_code_hash_at(para_id, now, None) // A candidate for a parachain without current validation code is not scheduled. .ok_or_else(|| Error::::UnscheduledCandidate)?; ensure!( @@ -679,7 +679,7 @@ impl Module { // initial weight is config read. let mut weight = T::DbWeight::get().reads_writes(1, 0); if let Some(new_code) = commitments.new_validation_code { - weight += >::schedule_code_upgrade( + weight += >::schedule_code_upgrade( receipt.descriptor.para_id, new_code, relay_parent_number + config.validation_upgrade_delay, @@ -708,7 +708,7 @@ impl Module { Event::::CandidateIncluded(plain, commitments.head_data.clone(), core_index, backing_group) ); - weight + >::note_new_head( + weight + >::note_new_head( receipt.descriptor.para_id, commitments.head_data, relay_parent_number, @@ -869,7 +869,7 @@ impl CandidateCheckContext { // if any, the code upgrade attempt is allowed. if let Some(new_validation_code) = new_validation_code { - let valid_upgrade_attempt = >::last_code_upgrade(para_id, true) + let valid_upgrade_attempt = >::last_code_upgrade(para_id, true) .map_or(true, |last| { last <= self.relay_parent_number && self.relay_parent_number.saturating_sub(last) diff --git a/runtime/parachains/src/initializer.rs b/runtime/parachains/src/initializer.rs index 12e404575b80..9eb441fd8c12 100644 --- a/runtime/parachains/src/initializer.rs +++ b/runtime/parachains/src/initializer.rs @@ -131,7 +131,7 @@ decl_module! { // - HRMP let total_weight = configuration::Module::::initializer_initialize(now) + shared::Module::::initializer_initialize(now) + - paras::Pallet::::initializer_initialize(now) + + paras::Module::::initializer_initialize(now) + scheduler::Module::::initializer_initialize(now) + inclusion::Module::::initializer_initialize(now) + session_info::Module::::initializer_initialize(now) + @@ -152,7 +152,7 @@ decl_module! { session_info::Module::::initializer_finalize(); inclusion::Module::::initializer_finalize(); scheduler::Module::::initializer_finalize(); - paras::Pallet::::initializer_finalize(); + paras::Module::::initializer_finalize(); shared::Module::::initializer_finalize(); configuration::Module::::initializer_finalize(); @@ -224,7 +224,7 @@ impl Module { session_index, }; - let outgoing_paras = paras::Pallet::::initializer_on_new_session(¬ification); + let outgoing_paras = paras::Module::::initializer_on_new_session(¬ification); scheduler::Module::::initializer_on_new_session(¬ification); inclusion::Module::::initializer_on_new_session(¬ification); session_info::Module::::initializer_on_new_session(¬ification); diff --git a/runtime/parachains/src/lib.rs b/runtime/parachains/src/lib.rs index 98014340f21e..b486d82958ac 100644 --- a/runtime/parachains/src/lib.rs +++ b/runtime/parachains/src/lib.rs @@ -52,20 +52,20 @@ pub fn schedule_para_initialize( id: ParaId, genesis: paras::ParaGenesisArgs, ) -> Result<(), ()> { - >::schedule_para_initialize(id, genesis).map_err(|_| ()) + >::schedule_para_initialize(id, genesis).map_err(|_| ()) } /// Schedule a para to be cleaned up at the start of the next session. pub fn schedule_para_cleanup(id: primitives::v1::Id) -> Result<(), ()> { - >::schedule_para_cleanup(id).map_err(|_| ()) + >::schedule_para_cleanup(id).map_err(|_| ()) } /// Schedule a parathread to be upgraded to a parachain. pub fn schedule_parathread_upgrade(id: ParaId) -> Result<(), ()> { - paras::Pallet::::schedule_parathread_upgrade(id).map_err(|_| ()) + paras::Module::::schedule_parathread_upgrade(id).map_err(|_| ()) } /// Schedule a parachain to be downgraded to a parathread. pub fn schedule_parachain_downgrade(id: ParaId) -> Result<(), ()> { - paras::Pallet::::schedule_parachain_downgrade(id).map_err(|_| ()) + paras::Module::::schedule_parachain_downgrade(id).map_err(|_| ()) } diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index ccf25104ee0e..82d17a9e0b9d 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -23,7 +23,6 @@ use sp_runtime::traits::{ }; use primitives::v1::{AuthorityDiscoveryId, Balance, BlockNumber, Header, ValidatorIndex}; use frame_support::parameter_types; -use frame_support::traits::GenesisBuild; use frame_support_test::TestRandomness; use std::cell::RefCell; use std::collections::HashMap; @@ -43,7 +42,7 @@ frame_support::construct_runtime!( { System: frame_system::{Pallet, Call, Config, Storage, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Paras: paras::{Pallet, Origin, Call, Storage, Event, Config}, + Paras: paras::{Pallet, Origin, Call, Storage, Event, Config}, Configuration: configuration::{Pallet, Call, Storage, Config}, Shared: shared::{Pallet, Call, Storage}, Inclusion: inclusion::{Pallet, Call, Storage, Event}, @@ -209,7 +208,7 @@ pub fn new_test_ext(state: MockGenesisConfig) -> TestExternalities { let mut t = state.system.build_storage::().unwrap(); state.configuration.assimilate_storage(&mut t).unwrap(); - GenesisBuild::::assimilate_storage(&state.paras, &mut t).unwrap(); + state.paras.assimilate_storage(&mut t).unwrap(); t.into() } @@ -218,5 +217,5 @@ pub fn new_test_ext(state: MockGenesisConfig) -> TestExternalities { pub struct MockGenesisConfig { pub system: frame_system::GenesisConfig, pub configuration: crate::configuration::GenesisConfig, - pub paras: crate::paras::GenesisConfig, + pub paras: crate::paras::GenesisConfig, } diff --git a/runtime/parachains/src/paras.rs b/runtime/parachains/src/paras.rs index ce407963fc39..2d64721b833c 100644 --- a/runtime/parachains/src/paras.rs +++ b/runtime/parachains/src/paras.rs @@ -14,23 +14,29 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -//! The paras pallet is responsible for storing data on parachains and parathreads. +//! The paras module is responsible for storing data on parachains and parathreads. //! //! It tracks which paras are parachains, what their current head data is in //! this fork of the relay chain, what their validation code is, and what their past and upcoming //! validation code is. //! -//! A para is not considered live until it is registered and activated in this pallet. Activation can +//! A para is not considered live until it is registered and activated in this module. Activation can //! only occur at session boundaries. use sp_std::prelude::*; use sp_std::result; +#[cfg(feature = "std")] +use sp_std::marker::PhantomData; use primitives::v1::{ Id as ParaId, ValidationCode, ValidationCodeHash, HeadData, SessionIndex, ConsensusLog, }; use sp_runtime::{traits::One, DispatchResult, SaturatedConversion}; -use frame_system::pallet_prelude::*; -use frame_support::pallet_prelude::*; +use frame_system::ensure_root; +use frame_support::{ + decl_storage, decl_module, decl_error, decl_event, ensure, + traits::Get, + weights::Weight, +}; use parity_scale_codec::{Encode, Decode}; use crate::{configuration, shared, initializer::SessionChangeNotification}; use sp_core::RuntimeDebug; @@ -38,9 +44,20 @@ use sp_core::RuntimeDebug; #[cfg(feature = "std")] use serde::{Serialize, Deserialize}; -pub use crate::Origin as ParachainOrigin; +pub use crate::Origin; -pub use pallet::*; +pub trait Config: + frame_system::Config + + configuration::Config + + shared::Config +{ + /// The outer origin type. + type Origin: From + + From<::Origin> + + Into::Origin>>; + + type Event: From + Into<::Event>; +} // the two key times necessary to track for every code replacement. #[derive(Default, Encode, Decode)] @@ -262,45 +279,91 @@ pub struct ParaGenesisArgs { pub parachain: bool, } -#[frame_support::pallet] -pub mod pallet { - use super::*; - - #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] - pub struct Pallet(_); - - #[pallet::config] - pub trait Config: - frame_system::Config + - configuration::Config + - shared::Config - { - /// The outer origin type. - type Origin: From - + From<::Origin> - + Into::Origin>>; - - type Event: From + IsType<::Event>; +decl_storage! { + trait Store for Module as Paras { + /// All parachains. Ordered ascending by ParaId. Parathreads are not included. + Parachains get(fn parachains): Vec; + /// The current lifecycle of a all known Para IDs. + ParaLifecycles: map hasher(twox_64_concat) ParaId => Option; + /// The head-data of every registered para. + Heads get(fn para_head): map hasher(twox_64_concat) ParaId => Option; + /// The validation code hash of every live para. + /// + /// Corresponding code can be retrieved with [`CodeByHash`]. + CurrentCodeHash: map hasher(twox_64_concat) ParaId => Option; + /// Actual past code hash, indicated by the para id as well as the block number at which it + /// became outdated. + /// + /// Corresponding code can be retrieved with [`CodeByHash`]. + PastCodeHash: map hasher(twox_64_concat) (ParaId, T::BlockNumber) => Option; + /// Past code of parachains. The parachains themselves may not be registered anymore, + /// but we also keep their code on-chain for the same amount of time as outdated code + /// to keep it available for secondary checkers. + PastCodeMeta get(fn past_code_meta): + map hasher(twox_64_concat) ParaId => ParaPastCodeMeta; + /// Which paras have past code that needs pruning and the relay-chain block at which the code was replaced. + /// Note that this is the actual height of the included block, not the expected height at which the + /// code upgrade would be applied, although they may be equal. + /// This is to ensure the entire acceptance period is covered, not an offset acceptance period starting + /// from the time at which the parachain perceives a code upgrade as having occurred. + /// Multiple entries for a single para are permitted. Ordered ascending by block number. + PastCodePruning: Vec<(ParaId, T::BlockNumber)>; + /// The block number at which the planned code change is expected for a para. + /// The change will be applied after the first parablock for this ID included which executes + /// in the context of a relay chain block with a number >= `expected_at`. + FutureCodeUpgrades get(fn future_code_upgrade_at): map hasher(twox_64_concat) ParaId => Option; + /// The actual future code hash of a para. + /// + /// Corresponding code can be retrieved with [`CodeByHash`]. + FutureCodeHash: map hasher(twox_64_concat) ParaId => Option; + /// The actions to perform during the start of a specific session index. + ActionsQueue get(fn actions_queue): map hasher(twox_64_concat) SessionIndex => Vec; + /// Upcoming paras instantiation arguments. + UpcomingParasGenesis: map hasher(twox_64_concat) ParaId => Option; + /// The number of reference on the validation code in [`CodeByHash`] storage. + CodeByHashRefs: map hasher(identity) ValidationCodeHash => u32; + /// Validation code stored by its hash. + /// + /// This storage is consistent with [`FutureCodeHash`], [`CurrentCodeHash`] and + /// [`PastCodeHash`]. + CodeByHash get(fn code_by_hash): map hasher(identity) ValidationCodeHash => Option; } + add_extra_genesis { + config(paras): Vec<(ParaId, ParaGenesisArgs)>; + config(_phdata): PhantomData; + build(build::); + } +} - #[pallet::event] - #[pallet::generate_deposit(pub(super) fn deposit_event)] - pub enum Event { - /// Current code has been updated for a Para. \[para_id\] - CurrentCodeUpdated(ParaId), - /// Current head has been updated for a Para. \[para_id\] - CurrentHeadUpdated(ParaId), - /// A code upgrade has been scheduled for a Para. \[para_id\] - CodeUpgradeScheduled(ParaId), - /// A new head has been noted for a Para. \[para_id\] - NewHeadNoted(ParaId), - /// A para has been queued to execute pending actions. \[para_id\] - ActionQueued(ParaId, SessionIndex), +#[cfg(feature = "std")] +fn build(config: &GenesisConfig) { + let mut parachains: Vec<_> = config.paras + .iter() + .filter(|(_, args)| args.parachain) + .map(|&(ref id, _)| id) + .cloned() + .collect(); + + parachains.sort(); + parachains.dedup(); + + Parachains::put(¶chains); + + for (id, genesis_args) in &config.paras { + let code_hash = genesis_args.validation_code.hash(); + >::increase_code_ref(&code_hash, &genesis_args.validation_code); + as Store>::CurrentCodeHash::insert(&id, &code_hash); + as Store>::Heads::insert(&id, &genesis_args.genesis_head); + if genesis_args.parachain { + ParaLifecycles::insert(&id, ParaLifecycle::Parachain); + } else { + ParaLifecycles::insert(&id, ParaLifecycle::Parathread); + } } +} - #[pallet::error] - pub enum Error { +decl_error! { + pub enum Error for Module { /// Para is not registered in our system. NotRegistered, /// Para cannot be onboarded because it is already tracked by our system. @@ -312,146 +375,33 @@ pub mod pallet { /// Para cannot be downgraded to a parathread. CannotDowngrade, } +} - /// All parachains. Ordered ascending by ParaId. Parathreads are not included. - #[pallet::storage] - #[pallet::getter(fn parachains)] - pub(super) type Parachains = StorageValue<_, Vec, ValueQuery>; - - /// The current lifecycle of a all known Para IDs. - #[pallet::storage] - pub(super) type ParaLifecycles = StorageMap<_, Twox64Concat, ParaId, ParaLifecycle>; - - /// The head-data of every registered para. - #[pallet::storage] - #[pallet::getter(fn para_head)] - pub(super) type Heads = StorageMap<_, Twox64Concat, ParaId, HeadData>; - - /// The validation code hash of every live para. - /// - /// Corresponding code can be retrieved with [`CodeByHash`]. - #[pallet::storage] - pub(super) type CurrentCodeHash = StorageMap<_, Twox64Concat, ParaId, ValidationCodeHash>; - - /// Actual past code hash, indicated by the para id as well as the block number at which it - /// became outdated. - /// - /// Corresponding code can be retrieved with [`CodeByHash`]. - #[pallet::storage] - pub(super) type PastCodeHash = StorageMap< - _, - Twox64Concat, - (ParaId, T::BlockNumber), - ValidationCodeHash - >; - - /// Past code of parachains. The parachains themselves may not be registered anymore, - /// but we also keep their code on-chain for the same amount of time as outdated code - /// to keep it available for secondary checkers. - #[pallet::storage] - #[pallet::getter(fn past_code_meta)] - pub(super) type PastCodeMeta = StorageMap< - _, - Twox64Concat, - ParaId, - ParaPastCodeMeta, - ValueQuery - >; - - /// Which paras have past code that needs pruning and the relay-chain block at which the code was replaced. - /// Note that this is the actual height of the included block, not the expected height at which the - /// code upgrade would be applied, although they may be equal. - /// This is to ensure the entire acceptance period is covered, not an offset acceptance period starting - /// from the time at which the parachain perceives a code upgrade as having occurred. - /// Multiple entries for a single para are permitted. Ordered ascending by block number. - #[pallet::storage] - pub(super) type PastCodePruning = StorageValue<_, Vec<(ParaId, T::BlockNumber)>, ValueQuery>; - - /// The block number at which the planned code change is expected for a para. - /// The change will be applied after the first parablock for this ID included which executes - /// in the context of a relay chain block with a number >= `expected_at`. - #[pallet::storage] - #[pallet::getter(fn future_code_upgrade_at)] - pub(super) type FutureCodeUpgrades = StorageMap<_, Twox64Concat, ParaId, T::BlockNumber>; - - /// The actual future code hash of a para. - /// - /// Corresponding code can be retrieved with [`CodeByHash`]. - #[pallet::storage] - pub(super) type FutureCodeHash = StorageMap<_, Twox64Concat, ParaId, ValidationCodeHash>; - - /// The actions to perform during the start of a specific session index. - #[pallet::storage] - #[pallet::getter(fn actions_queue)] - pub(super) type ActionsQueue = StorageMap<_, Twox64Concat, SessionIndex, Vec, ValueQuery>; - - /// Upcoming paras instantiation arguments. - #[pallet::storage] - pub(super) type UpcomingParasGenesis = StorageMap<_, Twox64Concat, ParaId, ParaGenesisArgs>; - - /// The number of reference on the validation code in [`CodeByHash`] storage. - #[pallet::storage] - pub(super) type CodeByHashRefs = StorageMap<_, Identity, ValidationCodeHash, u32, ValueQuery>; - - /// Validation code stored by its hash. - /// - /// This storage is consistent with [`FutureCodeHash`], [`CurrentCodeHash`] and - /// [`PastCodeHash`]. - #[pallet::storage] - #[pallet::getter(fn code_by_hash)] - pub(super) type CodeByHash = StorageMap<_, Identity, ValidationCodeHash, ValidationCode>; - - #[pallet::genesis_config] - pub struct GenesisConfig { - pub paras: Vec<(ParaId, ParaGenesisArgs)>, - } - - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - GenesisConfig { - paras: Default::default(), - } - } +decl_event! { + pub enum Event { + /// Current code has been updated for a Para. \[para_id\] + CurrentCodeUpdated(ParaId), + /// Current head has been updated for a Para. \[para_id\] + CurrentHeadUpdated(ParaId), + /// A code upgrade has been scheduled for a Para. \[para_id\] + CodeUpgradeScheduled(ParaId), + /// A new head has been noted for a Para. \[para_id\] + NewHeadNoted(ParaId), + /// A para has been queued to execute pending actions. \[para_id\] + ActionQueued(ParaId, SessionIndex), } +} - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { - fn build(&self) { - let mut parachains: Vec<_> = self.paras - .iter() - .filter(|(_, args)| args.parachain) - .map(|&(ref id, _)| id) - .cloned() - .collect(); - - parachains.sort(); - parachains.dedup(); - - Parachains::::put(¶chains); - - for (id, genesis_args) in &self.paras { - let code_hash = genesis_args.validation_code.hash(); - >::increase_code_ref(&code_hash, &genesis_args.validation_code); - as Store>::CurrentCodeHash::insert(&id, &code_hash); - as Store>::Heads::insert(&id, &genesis_args.genesis_head); - if genesis_args.parachain { - ParaLifecycles::::insert(&id, ParaLifecycle::Parachain); - } else { - ParaLifecycles::::insert(&id, ParaLifecycle::Parathread); - } - } - } - } +decl_module! { + /// The parachains configuration module. + pub struct Module for enum Call where origin: ::Origin { + type Error = Error; - #[pallet::origin] - pub type Origin = ParachainOrigin; + fn deposit_event() = default; - #[pallet::call] - impl Pallet { /// Set the storage for the parachain validation code immediately. - #[pallet::weight(0)] - pub fn force_set_current_code(origin: OriginFor, para: ParaId, new_code: ValidationCode) -> DispatchResult { + #[weight = 0] + fn force_set_current_code(origin, para: ParaId, new_code: ValidationCode) { ensure_root(origin)?; let prior_code_hash = ::CurrentCodeHash::get(¶).unwrap_or_default(); let new_code_hash = new_code.hash(); @@ -461,67 +411,57 @@ pub mod pallet { let now = frame_system::Pallet::::block_number(); Self::note_past_code(para, now, now, prior_code_hash); Self::deposit_event(Event::CurrentCodeUpdated(para)); - Ok(()) } /// Set the storage for the current parachain head data immediately. - #[pallet::weight(0)] - pub fn force_set_current_head(origin: OriginFor, para: ParaId, new_head: HeadData) -> DispatchResult { + #[weight = 0] + fn force_set_current_head(origin, para: ParaId, new_head: HeadData) { ensure_root(origin)?; ::Heads::insert(¶, new_head); Self::deposit_event(Event::CurrentHeadUpdated(para)); - Ok(()) } /// Schedule a code upgrade for block `expected_at`. - #[pallet::weight(0)] - pub fn force_schedule_code_upgrade( - origin: OriginFor, - para: ParaId, - new_code: ValidationCode, - expected_at: T::BlockNumber - ) -> DispatchResult { + #[weight = 0] + fn force_schedule_code_upgrade(origin, para: ParaId, new_code: ValidationCode, expected_at: T::BlockNumber) { ensure_root(origin)?; Self::schedule_code_upgrade(para, new_code, expected_at); Self::deposit_event(Event::CodeUpgradeScheduled(para)); - Ok(()) } /// Note a new block head for para within the context of the current block. - #[pallet::weight(0)] - pub fn force_note_new_head(origin: OriginFor, para: ParaId, new_head: HeadData) -> DispatchResult { + #[weight = 0] + fn force_note_new_head(origin, para: ParaId, new_head: HeadData) { ensure_root(origin)?; let now = frame_system::Pallet::::block_number(); Self::note_new_head(para, new_head, now); Self::deposit_event(Event::NewHeadNoted(para)); - Ok(()) } /// Put a parachain directly into the next session's action queue. /// We can't queue it any sooner than this without going into the /// initializer... - #[pallet::weight(0)] - pub fn force_queue_action(origin: OriginFor, para: ParaId) -> DispatchResult { + #[weight = 0] + fn force_queue_action(origin, para: ParaId) { ensure_root(origin)?; - let next_session = shared::Pallet::::session_index().saturating_add(One::one()); - ActionsQueue::::mutate(next_session, |v| { + let next_session = shared::Module::::session_index().saturating_add(One::one()); + ActionsQueue::mutate(next_session, |v| { if let Err(i) = v.binary_search(¶) { v.insert(i, para); } }); Self::deposit_event(Event::ActionQueued(para, next_session)); - Ok(()) } } } -impl Pallet { - /// Called by the initializer to initialize the configuration pallet. +impl Module { + /// Called by the initializer to initialize the configuration module. pub(crate) fn initializer_initialize(now: T::BlockNumber) -> Weight { Self::prune_old_code(now) } - /// Called by the initializer to finalize the configuration pallet. + /// Called by the initializer to finalize the configuration module. pub(crate) fn initializer_finalize() { } /// Called by the initializer to note that a new session has started. @@ -534,8 +474,8 @@ impl Pallet { /// The validation code of live para. pub(crate) fn current_code(para_id: &ParaId) -> Option { - CurrentCodeHash::::get(para_id).and_then(|code_hash| { - let code = CodeByHash::::get(&code_hash); + CurrentCodeHash::get(para_id).and_then(|code_hash| { + let code = CodeByHash::get(&code_hash); if code.is_none() { log::error!( "Pallet paras storage is inconsistent, code not found for hash {}", @@ -556,13 +496,13 @@ impl Pallet { // // Returns the list of outgoing paras from the actions queue. fn apply_actions_queue(session: SessionIndex) -> Vec { - let actions = ActionsQueue::::take(session); + let actions = ActionsQueue::take(session); let mut parachains = ::Parachains::get(); let now = >::block_number(); let mut outgoing = Vec::new(); for para in actions { - let lifecycle = ParaLifecycles::::get(¶); + let lifecycle = ParaLifecycles::get(¶); match lifecycle { None | Some(ParaLifecycle::Parathread) | Some(ParaLifecycle::Parachain) => { /* Nothing to do... */ }, // Onboard a new parathread or parachain. @@ -572,9 +512,9 @@ impl Pallet { if let Err(i) = parachains.binary_search(¶) { parachains.insert(i, para); } - ParaLifecycles::::insert(¶, ParaLifecycle::Parachain); + ParaLifecycles::insert(¶, ParaLifecycle::Parachain); } else { - ParaLifecycles::::insert(¶, ParaLifecycle::Parathread); + ParaLifecycles::insert(¶, ParaLifecycle::Parathread); } let code_hash = genesis_data.validation_code.hash(); @@ -588,14 +528,14 @@ impl Pallet { if let Err(i) = parachains.binary_search(¶) { parachains.insert(i, para); } - ParaLifecycles::::insert(¶, ParaLifecycle::Parachain); + ParaLifecycles::insert(¶, ParaLifecycle::Parachain); }, // Downgrade a parachain to a parathread Some(ParaLifecycle::DowngradingParachain) => { if let Ok(i) = parachains.binary_search(¶) { parachains.remove(i); } - ParaLifecycles::::insert(¶, ParaLifecycle::Parathread); + ParaLifecycles::insert(¶, ParaLifecycle::Parathread); }, // Offboard a parathread or parachain from the system Some(ParaLifecycle::OffboardingParachain) | Some(ParaLifecycle::OffboardingParathread) => { @@ -605,7 +545,7 @@ impl Pallet { ::Heads::remove(¶); ::FutureCodeUpgrades::remove(¶); - ParaLifecycles::::remove(¶); + ParaLifecycles::remove(¶); let removed_future_code_hash = ::FutureCodeHash::take(¶); if let Some(removed_future_code_hash) = removed_future_code_hash { Self::decrease_code_ref(&removed_future_code_hash); @@ -659,7 +599,7 @@ impl Pallet { // looks at old code metadata, compares them to the current acceptance window, and prunes those // that are too old. fn prune_old_code(now: T::BlockNumber) -> Weight { - let config = configuration::Pallet::::config(); + let config = configuration::Module::::config(); let code_retention_period = config.code_retention_period; if now <= code_retention_period { let weight = T::DbWeight::get().reads_writes(1, 0); @@ -718,7 +658,7 @@ impl Pallet { /// /// Returns false if para is already registered in the system. pub fn can_schedule_para_initialize(id: &ParaId, _: &ParaGenesisArgs) -> bool { - let lifecycle = ParaLifecycles::::get(id); + let lifecycle = ParaLifecycles::get(id); lifecycle.is_none() } @@ -731,9 +671,9 @@ impl Pallet { // Make sure parachain isn't already in our system. ensure!(Self::can_schedule_para_initialize(&id, &genesis), Error::::CannotOnboard); - ParaLifecycles::::insert(&id, ParaLifecycle::Onboarding); - UpcomingParasGenesis::::insert(&id, genesis); - ActionsQueue::::mutate(scheduled_session, |v| { + ParaLifecycles::insert(&id, ParaLifecycle::Onboarding); + UpcomingParasGenesis::insert(&id, genesis); + ActionsQueue::mutate(scheduled_session, |v| { if let Err(i) = v.binary_search(&id) { v.insert(i, id); } @@ -748,23 +688,23 @@ impl Pallet { /// /// No-op if para is not registered at all. pub(crate) fn schedule_para_cleanup(id: ParaId) -> DispatchResult { - let lifecycle = ParaLifecycles::::get(&id); + let lifecycle = ParaLifecycles::get(&id); match lifecycle { // If para is not registered, nothing to do! None => { return Ok(()) }, Some(ParaLifecycle::Parathread) => { - ParaLifecycles::::insert(&id, ParaLifecycle::OffboardingParathread); + ParaLifecycles::insert(&id, ParaLifecycle::OffboardingParathread); }, Some(ParaLifecycle::Parachain) => { - ParaLifecycles::::insert(&id, ParaLifecycle::OffboardingParachain); + ParaLifecycles::insert(&id, ParaLifecycle::OffboardingParachain); }, _ => return Err(Error::::CannotOffboard)?, } let scheduled_session = Self::scheduled_session(); - ActionsQueue::::mutate(scheduled_session, |v| { + ActionsQueue::mutate(scheduled_session, |v| { if let Err(i) = v.binary_search(&id) { v.insert(i, id); } @@ -778,12 +718,12 @@ impl Pallet { /// Will return error if `ParaLifecycle` is not `Parathread`. pub(crate) fn schedule_parathread_upgrade(id: ParaId) -> DispatchResult { let scheduled_session = Self::scheduled_session(); - let lifecycle = ParaLifecycles::::get(&id).ok_or(Error::::NotRegistered)?; + let lifecycle = ParaLifecycles::get(&id).ok_or(Error::::NotRegistered)?; ensure!(lifecycle == ParaLifecycle::Parathread, Error::::CannotUpgrade); - ParaLifecycles::::insert(&id, ParaLifecycle::UpgradingParathread); - ActionsQueue::::mutate(scheduled_session, |v| { + ParaLifecycles::insert(&id, ParaLifecycle::UpgradingParathread); + ActionsQueue::mutate(scheduled_session, |v| { if let Err(i) = v.binary_search(&id) { v.insert(i, id); } @@ -797,12 +737,12 @@ impl Pallet { /// Noop if `ParaLifecycle` is not `Parachain`. pub(crate) fn schedule_parachain_downgrade(id: ParaId) -> DispatchResult { let scheduled_session = Self::scheduled_session(); - let lifecycle = ParaLifecycles::::get(&id).ok_or(Error::::NotRegistered)?; + let lifecycle = ParaLifecycles::get(&id).ok_or(Error::::NotRegistered)?; ensure!(lifecycle == ParaLifecycle::Parachain, Error::::CannotDowngrade); - ParaLifecycles::::insert(&id, ParaLifecycle::DowngradingParachain); - ActionsQueue::::mutate(scheduled_session, |v| { + ParaLifecycles::insert(&id, ParaLifecycle::DowngradingParachain); + ActionsQueue::mutate(scheduled_session, |v| { if let Err(i) = v.binary_search(&id) { v.insert(i, id); } @@ -833,7 +773,7 @@ impl Pallet { >::deposit_log(log.into()); let (reads, writes) = Self::increase_code_ref(&new_code_hash, &new_code); - FutureCodeHash::::insert(&id, new_code_hash); + FutureCodeHash::insert(&id, new_code_hash); T::DbWeight::get().reads_writes(1 + reads, 2 + writes) } }) @@ -847,16 +787,16 @@ impl Pallet { new_head: HeadData, execution_context: T::BlockNumber, ) -> Weight { - Heads::::insert(&id, new_head); + Heads::insert(&id, new_head); if let Some(expected_at) = ::FutureCodeUpgrades::get(&id) { if expected_at <= execution_context { ::FutureCodeUpgrades::remove(&id); // Both should always be `Some` in this case, since a code upgrade is scheduled. - let new_code_hash = FutureCodeHash::::take(&id).unwrap_or_default(); - let prior_code_hash = CurrentCodeHash::::get(&id).unwrap_or_default(); - CurrentCodeHash::::insert(&id, &new_code_hash); + let new_code_hash = FutureCodeHash::take(&id).unwrap_or_default(); + let prior_code_hash = CurrentCodeHash::get(&id).unwrap_or_default(); + CurrentCodeHash::insert(&id, &new_code_hash); let log = ConsensusLog::ParaUpgradeCode(id, new_code_hash); >::deposit_log(log.into()); @@ -907,11 +847,11 @@ impl Pallet { }; if upgrade_applied_intermediate { - FutureCodeHash::::get(&id) + FutureCodeHash::get(&id) } else { match Self::past_code_meta(&id).code_at(at) { None => None, - Some(UseCodeAt::Current) => CurrentCodeHash::::get(&id), + Some(UseCodeAt::Current) => CurrentCodeHash::get(&id), Some(UseCodeAt::ReplacedAt(replaced)) => ::PastCodeHash::get(&(id, replaced)), } } @@ -919,14 +859,14 @@ impl Pallet { /// Returns the current lifecycle state of the para. pub fn lifecycle(id: ParaId) -> Option { - ParaLifecycles::::get(&id) + ParaLifecycles::get(&id) } /// Returns whether the given ID refers to a valid para. /// /// Paras that are onboarding or offboarding are not included. pub fn is_valid_para(id: ParaId) -> bool { - if let Some(state) = ParaLifecycles::::get(&id) { + if let Some(state) = ParaLifecycles::get(&id) { !state.is_onboarding() && !state.is_offboarding() } else { false @@ -937,7 +877,7 @@ impl Pallet { /// /// Includes parachains which will downgrade to a parathread in the future. pub fn is_parachain(id: ParaId) -> bool { - if let Some(state) = ParaLifecycles::::get(&id) { + if let Some(state) = ParaLifecycles::get(&id) { state.is_parachain() } else { false @@ -948,7 +888,7 @@ impl Pallet { /// /// Includes parathreads which will upgrade to parachains in the future. pub fn is_parathread(id: ParaId) -> bool { - if let Some(state) = ParaLifecycles::::get(&id) { + if let Some(state) = ParaLifecycles::get(&id) { state.is_parathread() } else { false @@ -969,7 +909,7 @@ impl Pallet { /// Return the session index that should be used for any future scheduled changes. fn scheduled_session() -> SessionIndex { - shared::Pallet::::scheduled_session() + shared::Module::::scheduled_session() } /// Store the validation code if not already stored, and increase the number of reference. @@ -1004,7 +944,7 @@ impl Pallet { #[cfg(any(feature = "std", feature = "runtime-benchmarks", test))] pub fn test_on_new_session() { Self::initializer_on_new_session(&SessionChangeNotification { - session_index: shared::Pallet::::session_index(), + session_index: shared::Module::::session_index(), ..Default::default() }); } @@ -1014,7 +954,10 @@ impl Pallet { mod tests { use super::*; use primitives::v1::BlockNumber; - use frame_support::assert_ok; + use frame_support::{ + assert_ok, + traits::{OnFinalize, OnInitialize} + }; use crate::mock::{new_test_ext, Paras, Shared, System, MockGenesisConfig}; use crate::configuration::HostConfiguration; @@ -1670,9 +1613,9 @@ mod tests { ); // Lifecycle is tracked correctly - assert_eq!(::ParaLifecycles::get(&a), Some(ParaLifecycle::Onboarding)); - assert_eq!(::ParaLifecycles::get(&b), Some(ParaLifecycle::Onboarding)); - assert_eq!(::ParaLifecycles::get(&c), Some(ParaLifecycle::Onboarding)); + assert_eq!(ParaLifecycles::get(&a), Some(ParaLifecycle::Onboarding)); + assert_eq!(ParaLifecycles::get(&b), Some(ParaLifecycle::Onboarding)); + assert_eq!(ParaLifecycles::get(&c), Some(ParaLifecycle::Onboarding)); // run to block without session change. run_to_block(2, None); @@ -1684,9 +1627,9 @@ mod tests { ); // Lifecycle is tracked correctly - assert_eq!(::ParaLifecycles::get(&a), Some(ParaLifecycle::Onboarding)); - assert_eq!(::ParaLifecycles::get(&b), Some(ParaLifecycle::Onboarding)); - assert_eq!(::ParaLifecycles::get(&c), Some(ParaLifecycle::Onboarding)); + assert_eq!(ParaLifecycles::get(&a), Some(ParaLifecycle::Onboarding)); + assert_eq!(ParaLifecycles::get(&b), Some(ParaLifecycle::Onboarding)); + assert_eq!(ParaLifecycles::get(&c), Some(ParaLifecycle::Onboarding)); // Two sessions pass, so action queue is triggered @@ -1696,9 +1639,9 @@ mod tests { assert_eq!(::ActionsQueue::get(Paras::scheduled_session()), Vec::new()); // Lifecycle is tracked correctly - assert_eq!(::ParaLifecycles::get(&a), Some(ParaLifecycle::Parathread)); - assert_eq!(::ParaLifecycles::get(&b), Some(ParaLifecycle::Parachain)); - assert_eq!(::ParaLifecycles::get(&c), Some(ParaLifecycle::Parachain)); + assert_eq!(ParaLifecycles::get(&a), Some(ParaLifecycle::Parathread)); + assert_eq!(ParaLifecycles::get(&b), Some(ParaLifecycle::Parachain)); + assert_eq!(ParaLifecycles::get(&c), Some(ParaLifecycle::Parachain)); assert_eq!(Paras::current_code(&a), Some(vec![2].into())); assert_eq!(Paras::current_code(&b), Some(vec![1].into())); @@ -1834,18 +1777,18 @@ mod tests { Paras::increase_code_ref(&code.hash(), &code); Paras::increase_code_ref(&code.hash(), &code); - assert!(::CodeByHash::contains_key(code.hash())); - assert_eq!(::CodeByHashRefs::get(code.hash()), 2); + assert!(CodeByHash::contains_key(code.hash())); + assert_eq!(CodeByHashRefs::get(code.hash()), 2); Paras::decrease_code_ref(&code.hash()); - assert!(::CodeByHash::contains_key(code.hash())); - assert_eq!(::CodeByHashRefs::get(code.hash()), 1); + assert!(CodeByHash::contains_key(code.hash())); + assert_eq!(CodeByHashRefs::get(code.hash()), 1); Paras::decrease_code_ref(&code.hash()); - assert!(!::CodeByHash::contains_key(code.hash())); - assert!(!::CodeByHashRefs::contains_key(code.hash())); + assert!(!CodeByHash::contains_key(code.hash())); + assert!(!CodeByHashRefs::contains_key(code.hash())); }); } } diff --git a/runtime/parachains/src/runtime_api_impl/v1.rs b/runtime/parachains/src/runtime_api_impl/v1.rs index d51e980c933a..c91095a77547 100644 --- a/runtime/parachains/src/runtime_api_impl/v1.rs +++ b/runtime/parachains/src/runtime_api_impl/v1.rs @@ -51,7 +51,7 @@ pub fn validator_groups() -> ( /// Implementation for the `availability_cores` function of the runtime API. pub fn availability_cores() -> Vec> { let cores = >::availability_cores(); - let parachains = >::parachains(); + let parachains = >::parachains(); let config = >::config(); let now = >::block_number() + One::one(); @@ -270,7 +270,7 @@ pub fn validation_code( with_assumption::( para_id, assumption, - || >::current_code(¶_id), + || >::current_code(¶_id), ) } @@ -327,5 +327,5 @@ pub fn inbound_hrmp_channels_contents( pub fn validation_code_by_hash( hash: ValidationCodeHash, ) -> Option { - >::code_by_hash(hash) + >::code_by_hash(hash) } diff --git a/runtime/parachains/src/scheduler.rs b/runtime/parachains/src/scheduler.rs index 44e03b701681..32c7e169e735 100644 --- a/runtime/parachains/src/scheduler.rs +++ b/runtime/parachains/src/scheduler.rs @@ -228,7 +228,7 @@ impl Module { let config = new_config; let mut thread_queue = ParathreadQueue::get(); - let n_parachains = >::parachains().len() as u32; + let n_parachains = >::parachains().len() as u32; let n_cores = core::cmp::max( n_parachains + config.parathread_cores, match config.max_validators_per_core { @@ -297,7 +297,7 @@ impl Module { // prune out all entries beyond retry or that no longer correspond to live parathread. thread_queue.queue.retain(|queued| { let will_keep = queued.claim.retries <= config.parathread_retries - && >::is_parathread(queued.claim.claim.0); + && >::is_parathread(queued.claim.claim.0); if !will_keep { let claim_para = queued.claim.claim.0; @@ -333,7 +333,7 @@ impl Module { /// Fails if the claim does not correspond to any live parathread. #[allow(unused)] pub fn add_parathread_claim(claim: ParathreadClaim) { - if !>::is_parathread(claim.0) { return } + if !>::is_parathread(claim.0) { return } let config = >::config(); let queue_max_size = config.parathread_cores * config.scheduling_lookahead; @@ -399,7 +399,7 @@ impl Module { } } - let parachains = >::parachains(); + let parachains = >::parachains(); let mut scheduled = Scheduled::get(); let mut parathread_queue = ParathreadQueue::get(); @@ -537,7 +537,7 @@ impl Module { match cores.get(core_index.0 as usize).and_then(|c| c.as_ref()) { None => None, Some(CoreOccupied::Parachain) => { - let parachains = >::parachains(); + let parachains = >::parachains(); Some(parachains[core_index.0 as usize]) } Some(CoreOccupied::Parathread(ref entry)) => Some(entry.claim.0), @@ -647,7 +647,7 @@ impl Module { /// For parathreads, this is based on the next item in the ParathreadQueue assigned to that /// core, and is None if there isn't one. pub(crate) fn next_up_on_available(core: CoreIndex) -> Option { - let parachains = >::parachains(); + let parachains = >::parachains(); if (core.0 as usize) < parachains.len() { Some(ScheduledCore { para_id: parachains[core.0 as usize], @@ -671,7 +671,7 @@ impl Module { /// core, or if there isn't one, the claim that is currently occupying the core, as long /// as the claim's retries would not exceed the limit. Otherwise None. pub(crate) fn next_up_on_time_out(core: CoreIndex) -> Option { - let parachains = >::parachains(); + let parachains = >::parachains(); if (core.0 as usize) < parachains.len() { Some(ScheduledCore { para_id: parachains[core.0 as usize], @@ -712,7 +712,7 @@ impl Module { ParathreadQueue::mutate(|queue| { for core_assignment in Scheduled::take() { if let AssignmentKind::Parathread(collator, retries) = core_assignment.kind { - if !>::is_parathread(core_assignment.para_id) { continue } + if !>::is_parathread(core_assignment.para_id) { continue } let entry = ParathreadEntry { claim: ParathreadClaim(core_assignment.para_id, collator), diff --git a/runtime/parachains/src/util.rs b/runtime/parachains/src/util.rs index 45b578166897..6cada4dd65ab 100644 --- a/runtime/parachains/src/util.rs +++ b/runtime/parachains/src/util.rs @@ -34,7 +34,7 @@ pub fn make_persisted_validation_data( let config = >::config(); Some(PersistedValidationData { - parent_head: >::para_head(¶_id)?, + parent_head: >::para_head(¶_id)?, relay_parent_number, relay_parent_storage_root, max_pov_size: config.max_pov_size, diff --git a/runtime/polkadot/src/weights/pallet_balances.rs b/runtime/polkadot/src/weights/pallet_balances.rs index 19ebf60963e3..fd39857ec655 100644 --- a/runtime/polkadot/src/weights/pallet_balances.rs +++ b/runtime/polkadot/src/weights/pallet_balances.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_balances //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,32 +44,32 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { fn transfer() -> Weight { - (68_885_000 as Weight) + (68_987_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn transfer_keep_alive() -> Weight { - (51_441_000 as Weight) + (50_696_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_balance_creating() -> Weight { - (27_736_000 as Weight) + (27_340_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_balance_killing() -> Weight { - (32_999_000 as Weight) + (33_128_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_transfer() -> Weight { - (67_451_000 as Weight) + (67_909_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn transfer_all() -> Weight { - (63_359_000 as Weight) + (63_138_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_bounties.rs b/runtime/polkadot/src/weights/pallet_bounties.rs index 05e2d438d6dd..08a7b17b8801 100644 --- a/runtime/polkadot/src/weights/pallet_bounties.rs +++ b/runtime/polkadot/src/weights/pallet_bounties.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_bounties //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,61 +44,61 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_bounties::WeightInfo for WeightInfo { fn propose_bounty(d: u32, ) -> Weight { - (41_618_000 as Weight) + (41_122_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn approve_bounty() -> Weight { - (10_450_000 as Weight) + (10_042_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn propose_curator() -> Weight { - (8_111_000 as Weight) + (7_654_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn unassign_curator() -> Weight { - (51_324_000 as Weight) + (50_121_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn accept_curator() -> Weight { - (35_558_000 as Weight) + (34_663_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn award_bounty() -> Weight { - (23_099_000 as Weight) + (23_054_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn claim_bounty() -> Weight { - (122_233_000 as Weight) + (120_265_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } fn close_bounty_proposed() -> Weight { - (50_418_000 as Weight) + (49_587_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn close_bounty_active() -> Weight { - (80_662_000 as Weight) + (79_774_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn extend_bounty_expiry() -> Weight { - (22_554_000 as Weight) + (22_533_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn spend_funds(b: u32, ) -> Weight { (0 as Weight) // Standard Error: 14_000 - .saturating_add((58_304_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((57_405_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(b as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) diff --git a/runtime/polkadot/src/weights/pallet_collective.rs b/runtime/polkadot/src/weights/pallet_collective.rs index dca397766b7b..6e41d192c1e7 100644 --- a/runtime/polkadot/src/weights/pallet_collective.rs +++ b/runtime/polkadot/src/weights/pallet_collective.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_collective //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -46,94 +46,94 @@ impl pallet_collective::WeightInfo for WeightInfo { fn set_members(m: u32, n: u32, p: u32, ) -> Weight { (0 as Weight) // Standard Error: 4_000 - .saturating_add((14_051_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((14_001_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 4_000 - .saturating_add((57_000 as Weight).saturating_mul(n as Weight)) + .saturating_add((106_000 as Weight).saturating_mul(n as Weight)) // Standard Error: 4_000 - .saturating_add((19_434_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((19_318_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(p as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) } fn execute(b: u32, m: u32, ) -> Weight { - (20_424_000 as Weight) + (20_878_000 as Weight) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((82_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((83_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } fn propose_execute(b: u32, m: u32, ) -> Weight { - (24_961_000 as Weight) + (25_662_000 as Weight) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((160_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((162_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) } fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (41_826_000 as Weight) + (42_102_000 as Weight) // Standard Error: 0 .saturating_add((4_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((90_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((89_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((405_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((364_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)) } fn vote(m: u32, ) -> Weight { - (31_640_000 as Weight) + (31_866_000 as Weight) // Standard Error: 0 - .saturating_add((216_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((196_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (40_355_000 as Weight) + (40_751_000 as Weight) // Standard Error: 0 - .saturating_add((165_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((167_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((376_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((333_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)) } fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (55_837_000 as Weight) + (56_534_000 as Weight) // Standard Error: 0 .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((170_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((166_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((382_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((347_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)) } fn close_disapproved(m: u32, p: u32, ) -> Weight { - (44_700_000 as Weight) + (45_673_000 as Weight) // Standard Error: 0 - .saturating_add((169_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((167_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((380_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((336_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)) } fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (60_051_000 as Weight) + (61_152_000 as Weight) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((169_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((167_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 0 - .saturating_add((385_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((340_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)) } fn disapprove_proposal(p: u32, ) -> Weight { - (24_750_000 as Weight) + (25_103_000 as Weight) // Standard Error: 0 - .saturating_add((380_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((346_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_democracy.rs b/runtime/polkadot/src/weights/pallet_democracy.rs index b970e12d1711..6dcdf6a97371 100644 --- a/runtime/polkadot/src/weights/pallet_democracy.rs +++ b/runtime/polkadot/src/weights/pallet_democracy.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_democracy //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,163 +44,163 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_democracy::WeightInfo for WeightInfo { fn propose() -> Weight { - (56_840_000 as Weight) + (55_166_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn second(s: u32, ) -> Weight { - (37_688_000 as Weight) + (36_768_000 as Weight) // Standard Error: 0 - .saturating_add((154_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((143_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)) } fn vote_new(r: u32, ) -> Weight { - (43_654_000 as Weight) + (42_144_000 as Weight) // Standard Error: 0 - .saturating_add((208_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((183_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn vote_existing(r: u32, ) -> Weight { - (43_543_000 as Weight) + (42_316_000 as Weight) // Standard Error: 0 - .saturating_add((207_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((174_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn emergency_cancel() -> Weight { - (26_829_000 as Weight) + (26_501_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn blacklist(p: u32, ) -> Weight { - (74_916_000 as Weight) + (73_883_000 as Weight) // Standard Error: 4_000 - .saturating_add((536_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((460_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } fn external_propose(v: u32, ) -> Weight { - (12_632_000 as Weight) + (12_461_000 as Weight) // Standard Error: 0 - .saturating_add((79_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((78_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn external_propose_majority() -> Weight { - (2_396_000 as Weight) + (2_393_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn external_propose_default() -> Weight { - (2_450_000 as Weight) + (2_401_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn fast_track() -> Weight { - (25_867_000 as Weight) + (25_767_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn veto_external(v: u32, ) -> Weight { - (26_789_000 as Weight) + (26_834_000 as Weight) // Standard Error: 0 - .saturating_add((133_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((116_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn cancel_proposal(p: u32, ) -> Weight { - (49_939_000 as Weight) + (49_339_000 as Weight) // Standard Error: 0 - .saturating_add((511_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((436_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)) } fn cancel_referendum() -> Weight { - (15_902_000 as Weight) + (15_793_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn cancel_queued(r: u32, ) -> Weight { - (27_621_000 as Weight) + (27_553_000 as Weight) // Standard Error: 1_000 - .saturating_add((2_163_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((1_614_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn on_initialize_base(r: u32, ) -> Weight { - (7_728_000 as Weight) + (6_724_000 as Weight) // Standard Error: 4_000 - .saturating_add((5_099_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((5_014_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) } fn delegate(r: u32, ) -> Weight { - (53_667_000 as Weight) + (50_940_000 as Weight) // Standard Error: 4_000 - .saturating_add((7_194_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((7_009_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) } fn undelegate(r: u32, ) -> Weight { - (23_077_000 as Weight) + (22_520_000 as Weight) // Standard Error: 5_000 - .saturating_add((7_164_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((6_964_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) } fn clear_public_proposals() -> Weight { - (2_195_000 as Weight) + (2_251_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn note_preimage(b: u32, ) -> Weight { - (41_252_000 as Weight) + (40_109_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn note_imminent_preimage(b: u32, ) -> Weight { - (26_149_000 as Weight) + (25_678_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn reap_preimage(b: u32, ) -> Weight { - (36_669_000 as Weight) + (36_132_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn unlock_remove(r: u32, ) -> Weight { - (37_226_000 as Weight) + (36_160_000 as Weight) // Standard Error: 0 - .saturating_add((53_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((51_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn unlock_set(r: u32, ) -> Weight { - (34_663_000 as Weight) + (33_706_000 as Weight) // Standard Error: 0 - .saturating_add((199_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((165_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn remove_vote(r: u32, ) -> Weight { - (19_247_000 as Weight) + (18_398_000 as Weight) // Standard Error: 0 - .saturating_add((182_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((149_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn remove_other_vote(r: u32, ) -> Weight { - (19_335_000 as Weight) + (18_520_000 as Weight) // Standard Error: 0 - .saturating_add((184_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((151_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_elections_phragmen.rs b/runtime/polkadot/src/weights/pallet_elections_phragmen.rs index 06155383261f..52ae5f90b91d 100644 --- a/runtime/polkadot/src/weights/pallet_elections_phragmen.rs +++ b/runtime/polkadot/src/weights/pallet_elections_phragmen.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_elections_phragmen //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,80 +44,82 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_elections_phragmen::WeightInfo for WeightInfo { fn vote_equal(v: u32, ) -> Weight { - (40_509_000 as Weight) + (40_098_000 as Weight) // Standard Error: 3_000 - .saturating_add((254_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((251_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn vote_more(v: u32, ) -> Weight { - (63_177_000 as Weight) + (62_907_000 as Weight) // Standard Error: 5_000 - .saturating_add((246_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((244_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn vote_less(v: u32, ) -> Weight { - (62_878_000 as Weight) + (62_646_000 as Weight) // Standard Error: 5_000 - .saturating_add((269_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((275_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn remove_voter() -> Weight { - (58_025_000 as Weight) + (57_669_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn submit_candidacy(c: u32, ) -> Weight { - (51_250_000 as Weight) + (51_325_000 as Weight) // Standard Error: 0 - .saturating_add((272_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((246_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn renounce_candidacy_candidate(c: u32, ) -> Weight { - (42_742_000 as Weight) + (42_877_000 as Weight) // Standard Error: 0 - .saturating_add((156_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((129_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn renounce_candidacy_members() -> Weight { - (66_974_000 as Weight) + (65_943_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn renounce_candidacy_runners_up() -> Weight { - (46_343_000 as Weight) + (45_901_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn remove_member_with_replacement() -> Weight { - (85_130_000 as Weight) + (84_434_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } fn remove_member_wrong_refund() -> Weight { - (6_347_000 as Weight) + (6_294_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } - fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight { + fn clean_defunct_voters(v: u32, d: u32, ) -> Weight { (0 as Weight) - // Standard Error: 43_000 - .saturating_add((107_372_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 34_000 + .saturating_add((106_858_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 32_000 + .saturating_add((212_000 as Weight).saturating_mul(d as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(v as Weight))) } fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight { (0 as Weight) - // Standard Error: 2_739_000 - .saturating_add((126_782_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 1_139_000 - .saturating_add((105_285_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 77_000 - .saturating_add((6_966_000 as Weight).saturating_mul(e as Weight)) + // Standard Error: 2_605_000 + .saturating_add((122_952_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 1_083_000 + .saturating_add((102_007_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 74_000 + .saturating_add((6_719_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) diff --git a/runtime/polkadot/src/weights/pallet_identity.rs b/runtime/polkadot/src/weights/pallet_identity.rs index a037e0b6737a..e30e902f7137 100644 --- a/runtime/polkadot/src/weights/pallet_identity.rs +++ b/runtime/polkadot/src/weights/pallet_identity.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_identity //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,135 +44,135 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_identity::WeightInfo for WeightInfo { fn add_registrar(r: u32, ) -> Weight { - (20_345_000 as Weight) + (20_387_000 as Weight) // Standard Error: 2_000 - .saturating_add((233_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((201_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_identity(r: u32, x: u32, ) -> Weight { - (50_253_000 as Weight) + (50_833_000 as Weight) // Standard Error: 14_000 - .saturating_add((196_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((180_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 1_000 - .saturating_add((942_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((936_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_subs_new(s: u32, ) -> Weight { - (39_222_000 as Weight) - // Standard Error: 1_000 - .saturating_add((6_369_000 as Weight).saturating_mul(s as Weight)) + (38_886_000 as Weight) + // Standard Error: 2_000 + .saturating_add((6_241_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn set_subs_old(p: u32, ) -> Weight { - (39_661_000 as Weight) + (39_842_000 as Weight) // Standard Error: 0 - .saturating_add((2_102_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((2_003_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(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) } fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - (48_967_000 as Weight) - // Standard Error: 7_000 - .saturating_add((135_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 0 - .saturating_add((2_108_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((594_000 as Weight).saturating_mul(x as Weight)) + (48_868_000 as Weight) + // Standard Error: 11_000 + .saturating_add((159_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 1_000 + .saturating_add((2_003_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 1_000 + .saturating_add((597_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn request_judgement(r: u32, x: u32, ) -> Weight { - (52_197_000 as Weight) - // Standard Error: 4_000 - .saturating_add((218_000 as Weight).saturating_mul(r as Weight)) + (52_307_000 as Weight) + // Standard Error: 5_000 + .saturating_add((221_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((1_151_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((1_168_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn cancel_request(r: u32, x: u32, ) -> Weight { - (48_022_000 as Weight) - // Standard Error: 6_000 - .saturating_add((141_000 as Weight).saturating_mul(r as Weight)) + (47_911_000 as Weight) + // Standard Error: 7_000 + .saturating_add((163_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((1_146_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((1_130_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_fee(r: u32, ) -> Weight { - (7_590_000 as Weight) + (7_595_000 as Weight) // Standard Error: 1_000 - .saturating_add((203_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((159_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_account_id(r: u32, ) -> Weight { - (8_422_000 as Weight) + (8_265_000 as Weight) // Standard Error: 1_000 - .saturating_add((210_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((161_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_fields(r: u32, ) -> Weight { - (7_561_000 as Weight) - // Standard Error: 0 - .saturating_add((207_000 as Weight).saturating_mul(r as Weight)) + (7_644_000 as Weight) + // Standard Error: 1_000 + .saturating_add((157_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn provide_judgement(r: u32, x: u32, ) -> Weight { - (33_330_000 as Weight) - // Standard Error: 4_000 - .saturating_add((196_000 as Weight).saturating_mul(r as Weight)) + (33_454_000 as Weight) + // Standard Error: 5_000 + .saturating_add((202_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((1_147_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((1_143_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { - (61_538_000 as Weight) + (63_116_000 as Weight) // Standard Error: 4_000 - .saturating_add((106_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((54_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((2_105_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_003_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((1_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn add_sub(s: u32, ) -> Weight { - (52_704_000 as Weight) + (52_871_000 as Weight) // Standard Error: 0 - .saturating_add((156_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((141_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn rename_sub(s: u32, ) -> Weight { - (16_279_000 as Weight) + (16_359_000 as Weight) // Standard Error: 0 - .saturating_add((22_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((21_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)) } fn remove_sub(s: u32, ) -> Weight { - (53_681_000 as Weight) + (54_147_000 as Weight) // Standard Error: 0 - .saturating_add((138_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((122_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn quit_sub(s: u32, ) -> Weight { - (32_963_000 as Weight) + (33_116_000 as Weight) // Standard Error: 0 - .saturating_add((136_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((122_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)) } diff --git a/runtime/polkadot/src/weights/pallet_im_online.rs b/runtime/polkadot/src/weights/pallet_im_online.rs index 620ea6c42643..803a81972316 100644 --- a/runtime/polkadot/src/weights/pallet_im_online.rs +++ b/runtime/polkadot/src/weights/pallet_im_online.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_im_online //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,11 +44,11 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_im_online::WeightInfo for WeightInfo { fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { - (88_006_000 as Weight) + (88_108_000 as Weight) // Standard Error: 0 - .saturating_add((157_000 as Weight).saturating_mul(k as Weight)) - // Standard Error: 1_000 - .saturating_add((328_000 as Weight).saturating_mul(e as Weight)) + .saturating_add((162_000 as Weight).saturating_mul(k as Weight)) + // Standard Error: 2_000 + .saturating_add((314_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_indices.rs b/runtime/polkadot/src/weights/pallet_indices.rs index 0b590d27adc4..4b799601b1a0 100644 --- a/runtime/polkadot/src/weights/pallet_indices.rs +++ b/runtime/polkadot/src/weights/pallet_indices.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_indices //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,27 +44,27 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_indices::WeightInfo for WeightInfo { fn claim() -> Weight { - (38_148_000 as Weight) + (38_147_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn transfer() -> Weight { - (46_185_000 as Weight) + (46_258_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn free() -> Weight { - (38_031_000 as Weight) + (38_012_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_transfer() -> Weight { - (38_125_000 as Weight) + (38_762_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn freeze() -> Weight { - (36_300_000 as Weight) + (36_160_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_membership.rs b/runtime/polkadot/src/weights/pallet_membership.rs index fbc04feb62d4..b4892d3d66bc 100644 --- a/runtime/polkadot/src/weights/pallet_membership.rs +++ b/runtime/polkadot/src/weights/pallet_membership.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_membership //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,49 +44,49 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_membership::WeightInfo for WeightInfo { fn add_member(m: u32, ) -> Weight { - (22_415_000 as Weight) - // Standard Error: 3_000 - .saturating_add((169_000 as Weight).saturating_mul(m as Weight)) + (22_281_000 as Weight) + // Standard Error: 1_000 + .saturating_add((121_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn remove_member(m: u32, ) -> Weight { - (27_436_000 as Weight) + (27_105_000 as Weight) // Standard Error: 0 - .saturating_add((135_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((96_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn swap_member(m: u32, ) -> Weight { - (27_577_000 as Weight) + (27_225_000 as Weight) // Standard Error: 0 - .saturating_add((149_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((110_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn reset_member(m: u32, ) -> Weight { - (28_417_000 as Weight) + (27_835_000 as Weight) // Standard Error: 0 - .saturating_add((305_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((264_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn change_key(m: u32, ) -> Weight { - (29_217_000 as Weight) + (28_699_000 as Weight) // Standard Error: 0 - .saturating_add((145_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((108_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn set_prime(m: u32, ) -> Weight { - (7_017_000 as Weight) + (6_983_000 as Weight) // Standard Error: 0 - .saturating_add((80_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((78_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn clear_prime(_m: u32, ) -> Weight { - (2_742_000 as Weight) + (2_735_000 as Weight) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/polkadot/src/weights/pallet_multisig.rs b/runtime/polkadot/src/weights/pallet_multisig.rs index 4e7eca209113..52d90bc6427f 100644 --- a/runtime/polkadot/src/weights/pallet_multisig.rs +++ b/runtime/polkadot/src/weights/pallet_multisig.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_multisig //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,78 +44,78 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { fn as_multi_threshold_1(_z: u32, ) -> Weight { - (10_355_000 as Weight) + (8_469_000 as Weight) } fn as_multi_create(s: u32, z: u32, ) -> Weight { - (48_627_000 as Weight) + (48_033_000 as Weight) // Standard Error: 0 - .saturating_add((106_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((87_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (54_885_000 as Weight) + (53_076_000 as Weight) // Standard Error: 0 - .saturating_add((108_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((91_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (28_368_000 as Weight) + (27_924_000 as Weight) // Standard Error: 0 - .saturating_add((103_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((87_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (52_085_000 as Weight) + (50_732_000 as Weight) // Standard Error: 0 - .saturating_add((116_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((102_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (66_094_000 as Weight) + (64_066_000 as Weight) // Standard Error: 0 - .saturating_add((206_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((196_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) + .saturating_add((4_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)) } fn approve_as_multi_create(s: u32, ) -> Weight { - (48_354_000 as Weight) + (47_877_000 as Weight) // Standard Error: 0 - .saturating_add((105_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((86_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)) } fn approve_as_multi_approve(s: u32, ) -> Weight { - (27_780_000 as Weight) + (27_217_000 as Weight) // Standard Error: 0 - .saturating_add((103_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((87_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)) } fn approve_as_multi_complete(s: u32, ) -> Weight { - (108_496_000 as Weight) + (108_186_000 as Weight) // Standard Error: 0 - .saturating_add((211_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((196_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)) } fn cancel_as_multi(s: u32, ) -> Weight { - (81_062_000 as Weight) + (80_428_000 as Weight) // Standard Error: 0 - .saturating_add((103_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((83_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)) } diff --git a/runtime/polkadot/src/weights/pallet_proxy.rs b/runtime/polkadot/src/weights/pallet_proxy.rs index cd44de29fec9..bfb932c3a939 100644 --- a/runtime/polkadot/src/weights/pallet_proxy.rs +++ b/runtime/polkadot/src/weights/pallet_proxy.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_proxy //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,75 +44,75 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_proxy::WeightInfo for WeightInfo { fn proxy(p: u32, ) -> Weight { - (21_368_000 as Weight) - // Standard Error: 0 - .saturating_add((123_000 as Weight).saturating_mul(p as Weight)) + (21_441_000 as Weight) + // Standard Error: 1_000 + .saturating_add((124_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } fn proxy_announced(a: u32, p: u32, ) -> Weight { - (51_019_000 as Weight) - // Standard Error: 1_000 - .saturating_add((562_000 as Weight).saturating_mul(a as Weight)) + (50_942_000 as Weight) // Standard Error: 1_000 - .saturating_add((108_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((495_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 2_000 + .saturating_add((100_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)) } fn remove_announcement(a: u32, _p: u32, ) -> Weight { - (36_491_000 as Weight) + (35_895_000 as Weight) // Standard Error: 1_000 - .saturating_add((556_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((485_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn reject_announcement(a: u32, _p: u32, ) -> Weight { - (36_142_000 as Weight) + (35_800_000 as Weight) // Standard Error: 1_000 - .saturating_add((564_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((488_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn announce(a: u32, p: u32, ) -> Weight { - (48_515_000 as Weight) + (48_613_000 as Weight) // Standard Error: 2_000 - .saturating_add((562_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((498_000 as Weight).saturating_mul(a as Weight)) // Standard Error: 2_000 - .saturating_add((110_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((106_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)) } fn add_proxy(p: u32, ) -> Weight { - (34_650_000 as Weight) + (34_308_000 as Weight) // Standard Error: 1_000 - .saturating_add((212_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((176_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)) } fn remove_proxy(p: u32, ) -> Weight { - (34_378_000 as Weight) + (33_775_000 as Weight) // Standard Error: 2_000 - .saturating_add((240_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((206_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)) } fn remove_proxies(p: u32, ) -> Weight { - (32_543_000 as Weight) + (32_306_000 as Weight) // Standard Error: 1_000 - .saturating_add((134_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((130_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)) } fn anonymous(p: u32, ) -> Weight { - (46_410_000 as Weight) + (45_964_000 as Weight) // Standard Error: 1_000 - .saturating_add((32_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((31_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)) } fn kill_anonymous(p: u32, ) -> Weight { - (34_483_000 as Weight) + (33_990_000 as Weight) // Standard Error: 1_000 - .saturating_add((133_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((132_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)) } diff --git a/runtime/polkadot/src/weights/pallet_scheduler.rs b/runtime/polkadot/src/weights/pallet_scheduler.rs index d071d389024d..17564ec684e4 100644 --- a/runtime/polkadot/src/weights/pallet_scheduler.rs +++ b/runtime/polkadot/src/weights/pallet_scheduler.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_scheduler //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,30 +44,30 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { fn schedule(s: u32, ) -> Weight { - (23_340_000 as Weight) + (22_755_000 as Weight) // Standard Error: 0 - .saturating_add((39_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((47_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)) } fn cancel(s: u32, ) -> Weight { - (22_347_000 as Weight) + (22_112_000 as Weight) // Standard Error: 4_000 - .saturating_add((1_864_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((1_354_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn schedule_named(s: u32, ) -> Weight { - (29_626_000 as Weight) + (29_156_000 as Weight) // Standard Error: 1_000 - .saturating_add((58_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((64_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)) } fn cancel_named(s: u32, ) -> Weight { - (25_024_000 as Weight) + (24_505_000 as Weight) // Standard Error: 4_000 - .saturating_add((1_882_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((1_376_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)) } diff --git a/runtime/polkadot/src/weights/pallet_session.rs b/runtime/polkadot/src/weights/pallet_session.rs index b873df595f08..cd2aa1395343 100644 --- a/runtime/polkadot/src/weights/pallet_session.rs +++ b/runtime/polkadot/src/weights/pallet_session.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_session //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,12 +44,12 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_session::WeightInfo for WeightInfo { fn set_keys() -> Weight { - (71_592_000 as Weight) + (68_529_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } fn purge_keys() -> Weight { - (40_063_000 as Weight) + (38_184_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_staking.rs b/runtime/polkadot/src/weights/pallet_staking.rs index 101956ffe9ab..85cde7e6fe2a 100644 --- a/runtime/polkadot/src/weights/pallet_staking.rs +++ b/runtime/polkadot/src/weights/pallet_staking.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,154 +44,154 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_staking::WeightInfo for WeightInfo { fn bond() -> Weight { - (70_259_000 as Weight) + (66_434_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn bond_extra() -> Weight { - (53_621_000 as Weight) + (51_531_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn unbond() -> Weight { - (57_038_000 as Weight) + (54_336_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn withdraw_unbonded_update(s: u32, ) -> Weight { - (49_182_000 as Weight) + (47_505_000 as Weight) // Standard Error: 0 - .saturating_add((31_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((24_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn withdraw_unbonded_kill(s: u32, ) -> Weight { - (81_006_000 as Weight) + (77_865_000 as Weight) // Standard Error: 1_000 - .saturating_add((2_333_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_194_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn validate() -> Weight { - (31_525_000 as Weight) + (28_555_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn kick(k: u32, ) -> Weight { - (10_487_000 as Weight) - // Standard Error: 7_000 - .saturating_add((16_334_000 as Weight).saturating_mul(k as Weight)) + (10_886_000 as Weight) + // Standard Error: 6_000 + .saturating_add((15_538_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight))) } fn nominate(n: u32, ) -> Weight { - (38_083_000 as Weight) - // Standard Error: 10_000 - .saturating_add((5_185_000 as Weight).saturating_mul(n as Weight)) + (34_708_000 as Weight) + // Standard Error: 9_000 + .saturating_add((5_034_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn chill() -> Weight { - (16_783_000 as Weight) + (15_837_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) } fn set_payee() -> Weight { - (11_391_000 as Weight) + (10_696_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_controller() -> Weight { - (24_470_000 as Weight) + (23_482_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_validator_count() -> Weight { - (1_879_000 as Weight) + (1_815_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_no_eras() -> Weight { - (2_139_000 as Weight) + (2_048_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_new_era() -> Weight { - (2_096_000 as Weight) + (2_052_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_new_era_always() -> Weight { - (2_089_000 as Weight) + (2_047_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_invulnerables(v: u32, ) -> Weight { - (2_143_000 as Weight) + (1_969_000 as Weight) // Standard Error: 0 - .saturating_add((23_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((5_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_unstake(s: u32, ) -> Weight { - (58_264_000 as Weight) + (54_672_000 as Weight) // Standard Error: 1_000 - .saturating_add((2_309_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_189_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn cancel_deferred_slash(s: u32, ) -> Weight { - (3_444_385_000 as Weight) - // Standard Error: 224_000 - .saturating_add((19_743_000 as Weight).saturating_mul(s as Weight)) + (3_374_694_000 as Weight) + // Standard Error: 221_000 + .saturating_add((19_788_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)) } fn payout_stakers_dead_controller(n: u32, ) -> Weight { - (106_496_000 as Weight) - // Standard Error: 13_000 - .saturating_add((46_186_000 as Weight).saturating_mul(n as Weight)) + (95_732_000 as Weight) + // Standard Error: 17_000 + .saturating_add((45_189_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(n as Weight))) } fn payout_stakers_alive_staked(n: u32, ) -> Weight { - (131_706_000 as Weight) - // Standard Error: 20_000 - .saturating_add((60_519_000 as Weight).saturating_mul(n as Weight)) + (123_745_000 as Weight) + // Standard Error: 22_000 + .saturating_add((58_409_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(11 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight))) } fn rebond(l: u32, ) -> Weight { - (46_089_000 as Weight) + (44_585_000 as Weight) // Standard Error: 1_000 - .saturating_add((64_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((63_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_history_depth(e: u32, ) -> Weight { (0 as Weight) - // Standard Error: 67_000 - .saturating_add((32_486_000 as Weight).saturating_mul(e as Weight)) + // Standard Error: 69_000 + .saturating_add((31_931_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight))) } fn reap_stash(s: u32, ) -> Weight { - (69_019_000 as Weight) + (65_438_000 as Weight) // Standard Error: 0 - .saturating_add((2_317_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_182_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn new_era(v: u32, n: u32, ) -> Weight { (0 as Weight) - // Standard Error: 666_000 - .saturating_add((306_698_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 33_000 - .saturating_add((47_483_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 786_000 + .saturating_add((286_767_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 39_000 + .saturating_add((46_380_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) @@ -200,12 +200,12 @@ impl pallet_staking::WeightInfo for WeightInfo { } fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight { (0 as Weight) - // Standard Error: 97_000 - .saturating_add((25_109_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 97_000 - .saturating_add((27_162_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 3_332_000 - .saturating_add((50_488_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 93_000 + .saturating_add((23_941_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 93_000 + .saturating_add((26_505_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 3_172_000 + .saturating_add((25_012_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) @@ -214,17 +214,17 @@ impl pallet_staking::WeightInfo for WeightInfo { fn get_npos_targets(v: u32, ) -> Weight { (0 as Weight) // Standard Error: 31_000 - .saturating_add((10_220_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((10_079_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight))) } fn set_staking_limits() -> Weight { - (5_584_000 as Weight) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + (4_524_000 as Weight) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn chill_other() -> Weight { - (39_524_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) + (30_191_000 as Weight) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/polkadot/src/weights/pallet_timestamp.rs b/runtime/polkadot/src/weights/pallet_timestamp.rs index f3078196b93e..53a369db2f70 100644 --- a/runtime/polkadot/src/weights/pallet_timestamp.rs +++ b/runtime/polkadot/src/weights/pallet_timestamp.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,11 +44,11 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { fn set() -> Weight { - (9_886_000 as Weight) + (9_868_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn on_finalize() -> Weight { - (4_386_000 as Weight) + (4_337_000 as Weight) } } diff --git a/runtime/polkadot/src/weights/pallet_tips.rs b/runtime/polkadot/src/weights/pallet_tips.rs index c3315cc0f250..157148b26101 100644 --- a/runtime/polkadot/src/weights/pallet_tips.rs +++ b/runtime/polkadot/src/weights/pallet_tips.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_tips //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,44 +44,44 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_tips::WeightInfo for WeightInfo { fn report_awesome(r: u32, ) -> Weight { - (46_460_000 as Weight) + (45_075_000 as Weight) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((1_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn retract_tip() -> Weight { - (42_798_000 as Weight) + (42_197_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn tip_new(r: u32, t: u32, ) -> Weight { - (27_685_000 as Weight) + (27_673_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((115_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((117_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn tip(t: u32, ) -> Weight { - (18_081_000 as Weight) + (17_648_000 as Weight) // Standard Error: 0 - .saturating_add((565_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((536_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn close_tip(t: u32, ) -> Weight { - (77_929_000 as Weight) + (77_210_000 as Weight) // Standard Error: 0 - .saturating_add((299_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((301_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn slash_tip(t: u32, ) -> Weight { - (22_710_000 as Weight) + (22_593_000 as Weight) // Standard Error: 0 - .saturating_add((7_000 as Weight).saturating_mul(t as Weight)) + .saturating_add((6_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } diff --git a/runtime/polkadot/src/weights/pallet_treasury.rs b/runtime/polkadot/src/weights/pallet_treasury.rs index 058cf2d845b9..3b37e873709f 100644 --- a/runtime/polkadot/src/weights/pallet_treasury.rs +++ b/runtime/polkadot/src/weights/pallet_treasury.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_treasury //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,26 +44,26 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_treasury::WeightInfo for WeightInfo { fn propose_spend() -> Weight { - (39_374_000 as Weight) + (37_918_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn reject_proposal() -> Weight { - (48_264_000 as Weight) + (47_245_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn approve_proposal(p: u32, ) -> Weight { - (11_245_000 as Weight) + (11_005_000 as Weight) // Standard Error: 0 - .saturating_add((32_000 as Weight).saturating_mul(p as Weight)) + .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)) } fn on_initialize_proposals(p: u32, ) -> Weight { - (40_847_000 as Weight) + (38_570_000 as Weight) // Standard Error: 15_000 - .saturating_add((56_748_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((56_410_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) diff --git a/runtime/polkadot/src/weights/pallet_utility.rs b/runtime/polkadot/src/weights/pallet_utility.rs index e760a508f063..7c81ce2a7a6e 100644 --- a/runtime/polkadot/src/weights/pallet_utility.rs +++ b/runtime/polkadot/src/weights/pallet_utility.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_utility //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,16 +44,16 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { fn batch(c: u32, ) -> Weight { - (13_489_000 as Weight) + (13_742_000 as Weight) // Standard Error: 0 - .saturating_add((605_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((607_000 as Weight).saturating_mul(c as Weight)) } fn as_derivative() -> Weight { - (3_230_000 as Weight) + (3_045_000 as Weight) } fn batch_all(c: u32, ) -> Weight { - (13_266_000 as Weight) + (13_513_000 as Weight) // Standard Error: 0 - .saturating_add((1_014_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((1_026_000 as Weight).saturating_mul(c as Weight)) } } diff --git a/runtime/polkadot/src/weights/pallet_vesting.rs b/runtime/polkadot/src/weights/pallet_vesting.rs index 8b9cd15637ac..6d7555d03afe 100644 --- a/runtime/polkadot/src/weights/pallet_vesting.rs +++ b/runtime/polkadot/src/weights/pallet_vesting.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_vesting //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: diff --git a/runtime/polkadot/src/weights/runtime_common_claims.rs b/runtime/polkadot/src/weights/runtime_common_claims.rs index 42d2b2f6d8eb..3b5047ea9473 100644 --- a/runtime/polkadot/src/weights/runtime_common_claims.rs +++ b/runtime/polkadot/src/weights/runtime_common_claims.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::claims //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128 // Executed Command: @@ -44,27 +44,27 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::claims::WeightInfo for WeightInfo { fn claim() -> Weight { - (447_705_000 as Weight) + (435_155_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } fn mint_claim() -> Weight { - (11_995_000 as Weight) + (11_642_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn claim_attest() -> Weight { - (439_703_000 as Weight) + (437_198_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } fn attest() -> Weight { - (128_588_000 as Weight) + (124_628_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } fn move_claim() -> Weight { - (26_297_000 as Weight) + (25_441_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } diff --git a/runtime/rococo/Cargo.toml b/runtime/rococo/Cargo.toml index d59aac3a0834..f9cd04c7decf 100644 --- a/runtime/rococo/Cargo.toml +++ b/runtime/rococo/Cargo.toml @@ -69,14 +69,9 @@ xcm-builder = { package = "xcm-builder", path = "../../xcm/xcm-builder", default pallet-xcm = { path = "../../xcm/pallet-xcm", default-features = false } # Bridge Dependencies -bp-messages = { path = "../../bridges/primitives/messages", default-features = false } bp-rococo = { path = "../../bridges/primitives/chain-rococo", default-features = false } -bp-runtime = { path = "../../bridges/primitives/runtime", default-features = false } bp-wococo = { path = "../../bridges/primitives/chain-wococo", default-features = false } -bridge-runtime-common = { path = "../../bridges/bin/runtime-common", default-features = false } -pallet-bridge-dispatch = { path = "../../bridges/modules/dispatch", default-features = false } pallet-bridge-grandpa = { path = "../../bridges/modules/grandpa", default-features = false } -pallet-bridge-messages = { path = "../../bridges/modules/messages", default-features = false } [build-dependencies] substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -87,11 +82,8 @@ no_std = [] std = [ "authority-discovery-primitives/std", "babe-primitives/std", - "bp-messages/std", "bp-rococo/std", - "bp-runtime/std", "bp-wococo/std", - "bridge-runtime-common/std", "parity-scale-codec/std", "frame-executive/std", "pallet-authority-discovery/std", @@ -99,9 +91,7 @@ std = [ "pallet-babe/std", "beefy-primitives/std", "pallet-balances/std", - "pallet-bridge-dispatch/std", "pallet-bridge-grandpa/std", - "pallet-bridge-messages/std", "pallet-collective/std", "pallet-beefy/std", "pallet-grandpa/std", diff --git a/runtime/rococo/src/bridge_messages.rs b/runtime/rococo/src/bridge_messages.rs deleted file mode 100644 index 93e7314c737d..000000000000 --- a/runtime/rococo/src/bridge_messages.rs +++ /dev/null @@ -1,410 +0,0 @@ -// Copyright 2020 Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . - -//! Over-bridge messaging support for Rococo <> Wococo bridge. - -pub use self::{at_rococo::*, at_wococo::*}; - -use bp_messages::{ - source_chain::TargetHeaderChain, - target_chain::{ProvedMessages, SourceHeaderChain}, - InboundLaneData, LaneId, Message, MessageNonce, -}; -use bp_rococo::{EXTRA_STORAGE_PROOF_SIZE, MAXIMAL_ENCODED_ACCOUNT_ID_SIZE, max_extrinsic_size, max_extrinsic_weight}; -use bp_runtime::{ROCOCO_CHAIN_ID, WOCOCO_CHAIN_ID, ChainId}; -use bridge_runtime_common::messages::{ - BridgedChainWithMessages, ChainWithMessages, MessageBridge, MessageTransaction, ThisChainWithMessages, - source as messages_source, target as messages_target, -}; -use frame_support::{traits::Get, weights::{Weight, WeightToFeePolynomial}, RuntimeDebug}; -use sp_std::{convert::TryFrom, marker::PhantomData, ops::RangeInclusive}; - -/// Maximal number of pending outbound messages. -const MAXIMAL_PENDING_MESSAGES_AT_OUTBOUND_LANE: MessageNonce = bp_rococo::MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE; -/// Maximal weight of single message delivery confirmation transaction on Rococo/Wococo chain. -/// -/// This value is a result of `pallet_bridge_messages::Pallet::receive_messages_delivery_proof` weight formula -/// computation for the case when single message is confirmed. The result then must be rounded up to account -/// possible future runtime upgrades. -const MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT: Weight = 2_000_000_000; -/// Increase of delivery transaction weight on Rococo/Wococo chain with every additional message byte. -/// -/// This value is a result of `pallet_bridge_messages::WeightInfoExt::storage_proof_size_overhead(1)` call. The -/// result then must be rounded up to account possible future runtime upgrades. -const ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT: Weight = 25_000; -/// Weight of single regular message delivery transaction on Rococo/Wococo chain. -/// -/// This value is a result of `pallet_bridge_messages::Pallet::receive_messages_proof_weight()` call -/// for the case when single message of `pallet_bridge_messages::EXPECTED_DEFAULT_MESSAGE_LENGTH` bytes is delivered. -/// The message must have dispatch weight set to zero. The result then must be rounded up to account -/// possible future runtime upgrades. -const DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT: Weight = 1_500_000_000; -/// Weight of pay-dispatch-fee operation for inbound messages at Rococo/Wococo chain. -/// -/// This value corresponds to the result of `pallet_bridge_messages::WeightInfoExt::pay_inbound_dispatch_fee_overhead()` -/// call for your chain. Don't put too much reserve there, because it is used to **decrease** -/// `DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT` cost. So putting large reserve would make delivery transactions cheaper. -const PAY_INBOUND_DISPATCH_FEE_WEIGHT: Weight = 600_000_000; -/// Number of bytes, included in the signed Rococo/Wococo transaction apart from the encoded call itself. -/// -/// Can be computed by subtracting encoded call size from raw transaction size. -const TX_EXTRA_BYTES: u32 = 130; - -/// Rococo chain as it is seen at Rococo. -pub type RococoAtRococo = RococoLikeChain; - -/// Rococo chain as it is seen at Wococo. -pub type RococoAtWococo = RococoLikeChain; - -/// Wococo chain as it is seen at Wococo. -pub type WococoAtWococo = RococoLikeChain; - -/// Wococo chain as it is seen at Rococo. -pub type WococoAtRococo = RococoLikeChain; - -/// Rococo/Wococo chain from message lane point of view. -#[derive(RuntimeDebug, Clone, Copy)] -pub struct RococoLikeChain { - _bridge_definition: PhantomData, - _at_this_chain_grandpa_pallet_instance: PhantomData, -} - -impl ChainWithMessages for RococoLikeChain { - type Hash = crate::Hash; - type AccountId = crate::AccountId; - type Signer = primitives::v1::AccountPublic; - type Signature = crate::Signature; - type Weight = Weight; - type Balance = crate::Balance; -} - -impl ThisChainWithMessages for RococoLikeChain { - type Call = crate::Call; - - fn is_outbound_lane_enabled(lane: &LaneId) -> bool { - *lane == [0, 0, 0, 0] - } - - fn maximal_pending_messages_at_outbound_lane() -> MessageNonce { - MAXIMAL_PENDING_MESSAGES_AT_OUTBOUND_LANE - } - - fn estimate_delivery_confirmation_transaction() -> MessageTransaction { - let inbound_data_size = InboundLaneData::::encoded_size_hint( - MAXIMAL_ENCODED_ACCOUNT_ID_SIZE, - 1, - 1, - ) - .unwrap_or(u32::MAX); - - MessageTransaction { - dispatch_weight: MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT, - size: inbound_data_size - .saturating_add(EXTRA_STORAGE_PROOF_SIZE) - .saturating_add(TX_EXTRA_BYTES), - } - } - - fn transaction_payment(transaction: MessageTransaction) -> crate::Balance { - // current fee multiplier is used here - bridge_runtime_common::messages::transaction_payment( - crate::BlockWeights::get().get(frame_support::weights::DispatchClass::Normal).base_extrinsic, - crate::TransactionByteFee::get(), - pallet_transaction_payment::Pallet::::next_fee_multiplier(), - |weight| crate::constants::fee::WeightToFee::calc(&weight), - transaction, - ) - } -} - -impl BridgedChainWithMessages for RococoLikeChain { - fn maximal_extrinsic_size() -> u32 { - max_extrinsic_size() - } - - fn message_weight_limits(_message_payload: &[u8]) -> RangeInclusive { - // we don't want to relay too large messages + keep reserve for future upgrades - let upper_limit = messages_target::maximal_incoming_message_dispatch_weight(max_extrinsic_weight()); - - // we're charging for payload bytes in `With(Wococo | Rococo)MessageBridge::transaction_payment` function - // - // this bridge may be used to deliver all kind of messages, so we're not making any assumptions about - // minimal dispatch weight here - - 0..=upper_limit - } - - fn estimate_delivery_transaction( - message_payload: &[u8], - include_pay_dispatch_fee_cost: bool, - message_dispatch_weight: Weight, - ) -> MessageTransaction { - let message_payload_len = u32::try_from(message_payload.len()).unwrap_or(u32::MAX); - let extra_bytes_in_payload = Weight::from(message_payload_len) - .saturating_sub(pallet_bridge_messages::EXPECTED_DEFAULT_MESSAGE_LENGTH.into()); - - MessageTransaction { - dispatch_weight: extra_bytes_in_payload - .saturating_mul(ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT) - .saturating_add(DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT) - .saturating_sub(if include_pay_dispatch_fee_cost { - 0 - } else { - PAY_INBOUND_DISPATCH_FEE_WEIGHT - }) - .saturating_add(message_dispatch_weight), - size: message_payload_len - .saturating_add(EXTRA_STORAGE_PROOF_SIZE) - .saturating_add(TX_EXTRA_BYTES), - } - } - - fn transaction_payment(transaction: MessageTransaction) -> crate::Balance { - // current fee multiplier is used here - bridge_runtime_common::messages::transaction_payment( - crate::BlockWeights::get().get(frame_support::weights::DispatchClass::Normal).base_extrinsic, - crate::TransactionByteFee::get(), - pallet_transaction_payment::Pallet::::next_fee_multiplier(), - |weight| crate::constants::fee::WeightToFee::calc(&weight), - transaction, - ) - } -} - -impl TargetHeaderChain, crate::AccountId> - for RococoLikeChain -where - B: MessageBridge, - B::ThisChain: ChainWithMessages, - B::BridgedChain: ChainWithMessages, - GI: 'static, - crate::Runtime: pallet_bridge_grandpa::Config + pallet_bridge_messages::Config, - <>::BridgedChain as bp_runtime::Chain>::Hash: From, -{ - type Error = &'static str; - type MessagesDeliveryProof = messages_source::FromBridgedChainMessagesDeliveryProof; - - fn verify_message(payload: &messages_source::FromThisChainMessagePayload) -> Result<(), Self::Error> { - messages_source::verify_chain_message::(payload) - } - - fn verify_messages_delivery_proof( - proof: Self::MessagesDeliveryProof, - ) -> Result<(LaneId, InboundLaneData), Self::Error> { - messages_source::verify_messages_delivery_proof::(proof) - } -} - -impl SourceHeaderChain for RococoLikeChain -where - B: MessageBridge, - B::BridgedChain: ChainWithMessages, - GI: 'static, - crate::Runtime: pallet_bridge_grandpa::Config + pallet_bridge_messages::Config, - <>::BridgedChain as bp_runtime::Chain>::Hash: From, -{ - type Error = &'static str; - type MessagesProof = messages_target::FromBridgedChainMessagesProof; - - fn verify_messages_proof( - proof: Self::MessagesProof, - messages_count: u32, - ) -> Result>, Self::Error> { - messages_target::verify_messages_proof::(proof, messages_count) - } -} - -/// The cost of delivery confirmation transaction. -pub struct GetDeliveryConfirmationTransactionFee; - -impl Get for GetDeliveryConfirmationTransactionFee { - fn get() -> crate::Balance { - ::transaction_payment( - RococoAtRococo::estimate_delivery_confirmation_transaction() - ) - } -} - -/// This module contains definitions that are used by the messages pallet instance, 'deployed' at Rococo. -mod at_rococo { - use super::*; - - /// Message bridge that is 'deployed' at Rococo chain and connecting it to Wococo chain. - #[derive(RuntimeDebug, Clone, Copy)] - pub struct AtRococoWithWococoMessageBridge; - - impl MessageBridge for AtRococoWithWococoMessageBridge { - const THIS_CHAIN_ID: ChainId = ROCOCO_CHAIN_ID; - const BRIDGED_CHAIN_ID: ChainId = WOCOCO_CHAIN_ID; - const RELAYER_FEE_PERCENT: u32 = 10; - - type ThisChain = RococoAtRococo; - type BridgedChain = WococoAtRococo; - type BridgedMessagesInstance = crate::AtWococoWithRococoMessagesInstance; - - fn bridged_balance_to_this_balance(bridged_balance: bp_wococo::Balance) -> bp_rococo::Balance { - bridged_balance - } - } - - /// Message payload for Rococo -> Wococo messages as it is seen at the Rococo. - pub type ToWococoMessagePayload = messages_source::FromThisChainMessagePayload; - - /// Message verifier for Rococo -> Wococo messages at Rococo. - pub type ToWococoMessageVerifier = messages_source::FromThisChainMessageVerifier; - - /// Message payload for Wococo -> Rococo messages as it is seen at Rococo. - pub type FromWococoMessagePayload = messages_target::FromBridgedChainMessagePayload< - AtRococoWithWococoMessageBridge - >; - - /// Encoded Rococo Call as it comes from Wococo. - pub type FromWococoEncodedCall = messages_target::FromBridgedChainEncodedMessageCall; - - /// Call-dispatch based message dispatch for Wococo -> Rococo messages. - pub type FromWococoMessageDispatch = messages_target::FromBridgedChainMessageDispatch< - AtRococoWithWococoMessageBridge, - crate::Runtime, - pallet_balances::Pallet, - crate::AtRococoFromWococoMessagesDispatch, - >; -} - -/// This module contains definitions that are used by the messages pallet instance, 'deployed' at Wococo. -mod at_wococo { - use super::*; - - /// Message bridge that is 'deployed' at Wococo chain and connecting it to Rococo chain. - #[derive(RuntimeDebug, Clone, Copy)] - pub struct AtWococoWithRococoMessageBridge; - - impl MessageBridge for AtWococoWithRococoMessageBridge { - const THIS_CHAIN_ID: ChainId = WOCOCO_CHAIN_ID; - const BRIDGED_CHAIN_ID: ChainId = ROCOCO_CHAIN_ID; - const RELAYER_FEE_PERCENT: u32 = 10; - - type ThisChain = WococoAtWococo; - type BridgedChain = RococoAtWococo; - type BridgedMessagesInstance = crate::AtRococoWithWococoMessagesInstance; - - fn bridged_balance_to_this_balance(bridged_balance: bp_rococo::Balance) -> bp_wococo::Balance { - bridged_balance - } - } - - /// Message payload for Wococo -> Rococo messages as it is seen at the Wococo. - pub type ToRococoMessagePayload = messages_source::FromThisChainMessagePayload; - - /// Message verifier for Wococo -> Rococo messages at Wococo. - pub type ToRococoMessageVerifier = messages_source::FromThisChainMessageVerifier; - - /// Message payload for Rococo -> Wococo messages as it is seen at Wococo. - pub type FromRococoMessagePayload = messages_target::FromBridgedChainMessagePayload< - AtWococoWithRococoMessageBridge, - >; - - /// Encoded Wococo Call as it comes from Rococo. - pub type FromRococoEncodedCall = messages_target::FromBridgedChainEncodedMessageCall; - - /// Call-dispatch based message dispatch for Rococo -> Wococo messages. - pub type FromRococoMessageDispatch = messages_target::FromBridgedChainMessageDispatch< - AtWococoWithRococoMessageBridge, - crate::Runtime, - pallet_balances::Pallet, - crate::AtWococoFromRococoMessagesDispatch, - >; -} - -#[cfg(test)] -mod tests { - use bridge_runtime_common::messages; - use parity_scale_codec::Encode; - use super::*; - - #[test] - fn ensure_rococo_messages_weights_are_correct() { - // **NOTE**: the main purpose of this test is to be sure that any message that is sumbitted - // to (any) inbound lane in Rococo<>Wococo bridge can be delivered to the bridged chain. - // Since we deal with testnets here, in case of failure + urgency: - // - // 1) ping bridges team about this failure (see the CODEOWNERS file if you're unsure who to ping); - // 2) comment/#[ignore] the test. - - // we don't have any knowledge of messages-at-Rococo weights, so we'll be using - // weights of one of our testnets, which should be accurate enough - type Weights = pallet_bridge_messages::weights::RialtoWeight; - - pallet_bridge_messages::ensure_weights_are_correct::( - DEFAULT_MESSAGE_DELIVERY_TX_WEIGHT, - ADDITIONAL_MESSAGE_BYTE_DELIVERY_WEIGHT, - MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT, - PAY_INBOUND_DISPATCH_FEE_WEIGHT, - ); - - let max_incoming_message_proof_size = bp_rococo::EXTRA_STORAGE_PROOF_SIZE.saturating_add( - messages::target::maximal_incoming_message_size(bp_rococo::max_extrinsic_size()), - ); - pallet_bridge_messages::ensure_able_to_receive_message::( - bp_rococo::max_extrinsic_size(), - bp_rococo::max_extrinsic_weight(), - max_incoming_message_proof_size, - messages::target::maximal_incoming_message_dispatch_weight(bp_rococo::max_extrinsic_weight()), - ); - - let max_incoming_inbound_lane_data_proof_size = bp_messages::InboundLaneData::<()>::encoded_size_hint( - bp_rococo::MAXIMAL_ENCODED_ACCOUNT_ID_SIZE, - bp_rococo::MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE as _, - bp_rococo::MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE as _, - ) - .unwrap_or(u32::MAX); - pallet_bridge_messages::ensure_able_to_receive_confirmation::( - bp_rococo::max_extrinsic_size(), - bp_rococo::max_extrinsic_weight(), - max_incoming_inbound_lane_data_proof_size, - bp_rococo::MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE, - bp_rococo::MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE, - ); - } - - #[test] - fn ensure_rococo_tx_extra_bytes_constant_is_correct() { - // **NOTE**: this test checks that we're computing transaction fee (for bridged chain, which, in - // case of Rococo<>Wococo, means any chain) on-chain properly. If this assert fails: - // - // 1) just fix the `TX_EXTRA_BYTES` constant to actual (or sightly rounded up) value; - // 2) (only if it has changed significantly (> x2 times)) ping the bridges team (see the CODEOWNERS - // file if you're unsure who to ping) - - let signed_extra: crate::SignedExtra = ( - frame_system::CheckSpecVersion::new(), - frame_system::CheckTxVersion::new(), - frame_system::CheckGenesis::new(), - frame_system::CheckMortality::from(sp_runtime::generic::Era::mortal(u64::MAX, u64::MAX)), - frame_system::CheckNonce::from(primitives::v1::Nonce::MAX), - frame_system::CheckWeight::new(), - pallet_transaction_payment::ChargeTransactionPayment::from(primitives::v1::Balance::MAX), - ); - let extra_bytes_in_transaction = crate::Address::default().encoded_size() - + crate::Signature::default().encoded_size() - + signed_extra.encoded_size(); - assert!( - TX_EXTRA_BYTES as usize >= extra_bytes_in_transaction, - "Hardcoded number of extra bytes in Rococo transaction {} is lower than actual value: {}", - TX_EXTRA_BYTES, - extra_bytes_in_transaction, - ); - } -} diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index a68123efea23..7b48f2c0336b 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -82,8 +82,6 @@ use runtime_parachains::ump as parachains_ump; use runtime_parachains::hrmp as parachains_hrmp; use runtime_parachains::scheduler as parachains_scheduler; -use bridge_runtime_common::messages::{MessageBridge, source::estimate_message_dispatch_and_delivery_fee}; - pub use pallet_balances::Call as BalancesCall; use polkadot_parachain::primitives::Id as ParaId; @@ -101,7 +99,6 @@ use frame_support::traits::InstanceFilter; /// Constant values used within the runtime. pub mod constants; -mod bridge_messages; mod validator_manager; // Make the WASM binary available. @@ -217,7 +214,7 @@ construct_runtime! { Inclusion: parachains_inclusion::{Pallet, Call, Storage, Event}, ParasInherent: parachains_paras_inherent::{Pallet, Call, Storage, Inherent}, Scheduler: parachains_scheduler::{Pallet, Call, Storage}, - Paras: parachains_paras::{Pallet, Call, Storage, Event, Config}, + Paras: parachains_paras::{Pallet, Call, Storage, Event, Config}, Initializer: parachains_initializer::{Pallet, Call, Storage}, Dmp: parachains_dmp::{Pallet, Call, Storage}, Ump: parachains_ump::{Pallet, Call, Storage, Event}, @@ -248,13 +245,6 @@ construct_runtime! { // Validator Manager pallet. ValidatorManager: validator_manager::{Pallet, Call, Storage, Event}, - // Bridge messages support. The same story as with the bridge grandpa pallet above ^^^ - when we're - // running as Rococo we only use `BridgeWococoMessages`/`BridgeWococoMessagesDispatch`, and vice versa. - BridgeRococoMessages: pallet_bridge_messages::{Pallet, Call, Storage, Event, Config} = 43, - BridgeWococoMessages: pallet_bridge_messages::::{Pallet, Call, Storage, Event, Config} = 44, - BridgeRococoMessagesDispatch: pallet_bridge_dispatch::{Pallet, Event} = 45, - BridgeWococoMessagesDispatch: pallet_bridge_dispatch::::{Pallet, Event} = 46, - // A "council" Collective: pallet_collective::{Pallet, Call, Storage, Origin, Event, Config} = 80, Membership: pallet_membership::{Pallet, Call, Storage, Event, Config} = 81, @@ -867,111 +857,6 @@ impl pallet_bridge_grandpa::Config for Runtime { type WeightInfo = pallet_bridge_grandpa::weights::RialtoWeight; } -// Instance that is 'deployed' at Wococo chain. Responsible for dispatching Rococo -> Wococo messages. -pub type AtWococoFromRococoMessagesDispatch = pallet_bridge_dispatch::DefaultInstance; -impl pallet_bridge_dispatch::Config for Runtime { - type Event = Event; - type MessageId = (bp_messages::LaneId, bp_messages::MessageNonce); - type Call = Call; - type CallFilter = (); - type EncodedCall = bridge_messages::FromRococoEncodedCall; - type SourceChainAccountId = bp_wococo::AccountId; - type TargetChainAccountPublic = sp_runtime::MultiSigner; - type TargetChainSignature = sp_runtime::MultiSignature; - type AccountIdConverter = bp_rococo::AccountIdConverter; -} - -// Instance that is 'deployed' at Rococo chain. Responsible for dispatching Wococo -> Rococo messages. -pub type AtRococoFromWococoMessagesDispatch = pallet_bridge_dispatch::Instance1; -impl pallet_bridge_dispatch::Config for Runtime { - type Event = Event; - type MessageId = (bp_messages::LaneId, bp_messages::MessageNonce); - type Call = Call; - type CallFilter = (); - type EncodedCall = bridge_messages::FromWococoEncodedCall; - type SourceChainAccountId = bp_rococo::AccountId; - type TargetChainAccountPublic = sp_runtime::MultiSigner; - type TargetChainSignature = sp_runtime::MultiSignature; - type AccountIdConverter = bp_wococo::AccountIdConverter; -} - -parameter_types! { - pub const MaxMessagesToPruneAtOnce: bp_messages::MessageNonce = 8; - pub const MaxUnrewardedRelayerEntriesAtInboundLane: bp_messages::MessageNonce = - bp_rococo::MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE; - pub const MaxUnconfirmedMessagesAtInboundLane: bp_messages::MessageNonce = - bp_rococo::MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE; - pub const RootAccountForPayments: Option = None; -} - -// Instance that is 'deployed' at Wococo chain. Responsible for sending Wococo -> Rococo messages -// and receiving Rococo -> Wococo messages. -pub type AtWococoWithRococoMessagesInstance = pallet_bridge_messages::DefaultInstance; -impl pallet_bridge_messages::Config for Runtime { - type Event = Event; - type WeightInfo = pallet_bridge_messages::weights::RialtoWeight; - type Parameter = (); - type MaxMessagesToPruneAtOnce = MaxMessagesToPruneAtOnce; - type MaxUnrewardedRelayerEntriesAtInboundLane = MaxUnrewardedRelayerEntriesAtInboundLane; - type MaxUnconfirmedMessagesAtInboundLane = MaxUnconfirmedMessagesAtInboundLane; - - type OutboundPayload = crate::bridge_messages::ToRococoMessagePayload; - type OutboundMessageFee = bp_wococo::Balance; - - type InboundPayload = crate::bridge_messages::FromRococoMessagePayload; - type InboundMessageFee = bp_rococo::Balance; - type InboundRelayer = bp_rococo::AccountId; - - type AccountIdConverter = bp_wococo::AccountIdConverter; - - type TargetHeaderChain = crate::bridge_messages::RococoAtWococo; - type LaneMessageVerifier = crate::bridge_messages::ToRococoMessageVerifier; - type MessageDeliveryAndDispatchPayment = pallet_bridge_messages::instant_payments::InstantCurrencyPayments< - Runtime, - pallet_balances::Pallet, - crate::bridge_messages::GetDeliveryConfirmationTransactionFee, - RootAccountForPayments, - >; - type OnDeliveryConfirmed = (); - - type SourceHeaderChain = crate::bridge_messages::RococoAtWococo; - type MessageDispatch = crate::bridge_messages::FromRococoMessageDispatch; -} - -// Instance that is 'deployed' at Rococo chain. Responsible for sending Rococo -> Wococo messages -// and receiving Wococo -> Rococo messages. -pub type AtRococoWithWococoMessagesInstance = pallet_bridge_messages::Instance1; -impl pallet_bridge_messages::Config for Runtime { - type Event = Event; - type WeightInfo = pallet_bridge_messages::weights::RialtoWeight; - type Parameter = (); - type MaxMessagesToPruneAtOnce = MaxMessagesToPruneAtOnce; - type MaxUnrewardedRelayerEntriesAtInboundLane = MaxUnrewardedRelayerEntriesAtInboundLane; - type MaxUnconfirmedMessagesAtInboundLane = MaxUnconfirmedMessagesAtInboundLane; - - type OutboundPayload = crate::bridge_messages::ToWococoMessagePayload; - type OutboundMessageFee = bp_rococo::Balance; - - type InboundPayload = crate::bridge_messages::FromWococoMessagePayload; - type InboundMessageFee = bp_wococo::Balance; - type InboundRelayer = bp_wococo::AccountId; - - type AccountIdConverter = bp_rococo::AccountIdConverter; - - type TargetHeaderChain = crate::bridge_messages::WococoAtRococo; - type LaneMessageVerifier = crate::bridge_messages::ToWococoMessageVerifier; - type MessageDeliveryAndDispatchPayment = pallet_bridge_messages::instant_payments::InstantCurrencyPayments< - Runtime, - pallet_balances::Pallet, - crate::bridge_messages::GetDeliveryConfirmationTransactionFee, - RootAccountForPayments, - >; - type OnDeliveryConfirmed = (); - - type SourceHeaderChain = crate::bridge_messages::WococoAtRococo; - type MessageDispatch = crate::bridge_messages::FromWococoMessageDispatch; -} - impl Randomness for ParentHashRandomness { fn random(subject: &[u8]) -> (Hash, BlockNumber) { ( @@ -1417,116 +1302,6 @@ sp_api::impl_runtime_apis! { } } - impl bp_rococo::ToRococoOutboundLaneApi for Runtime { - fn estimate_message_delivery_and_dispatch_fee( - _lane_id: bp_messages::LaneId, - payload: bridge_messages::ToWococoMessagePayload, - ) -> Option { - estimate_message_dispatch_and_delivery_fee::( - &payload, - bridge_messages::AtWococoWithRococoMessageBridge::RELAYER_FEE_PERCENT, - ).ok() - } - - fn message_details( - lane: bp_messages::LaneId, - begin: bp_messages::MessageNonce, - end: bp_messages::MessageNonce, - ) -> Vec> { - (begin..=end).filter_map(|nonce| { - let message_data = BridgeRococoMessages::outbound_message_data(lane, nonce)?; - let decoded_payload = bridge_messages::ToRococoMessagePayload::decode( - &mut &message_data.payload[..] - ).ok()?; - Some(bp_messages::MessageDetails { - nonce, - dispatch_weight: decoded_payload.weight, - size: message_data.payload.len() as _, - delivery_and_dispatch_fee: message_data.fee, - dispatch_fee_payment: decoded_payload.dispatch_fee_payment, - }) - }) - .collect() - } - - fn latest_received_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce { - BridgeRococoMessages::outbound_latest_received_nonce(lane) - } - - fn latest_generated_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce { - BridgeRococoMessages::outbound_latest_generated_nonce(lane) - } - } - - impl bp_rococo::FromRococoInboundLaneApi for Runtime { - fn latest_received_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce { - BridgeRococoMessages::inbound_latest_received_nonce(lane) - } - - fn latest_confirmed_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce { - BridgeRococoMessages::inbound_latest_confirmed_nonce(lane) - } - - fn unrewarded_relayers_state(lane: bp_messages::LaneId) -> bp_messages::UnrewardedRelayersState { - BridgeRococoMessages::inbound_unrewarded_relayers_state(lane) - } - } - - impl bp_wococo::ToWococoOutboundLaneApi for Runtime { - fn estimate_message_delivery_and_dispatch_fee( - _lane_id: bp_messages::LaneId, - payload: bridge_messages::ToWococoMessagePayload, - ) -> Option { - estimate_message_dispatch_and_delivery_fee::( - &payload, - bridge_messages::AtRococoWithWococoMessageBridge::RELAYER_FEE_PERCENT, - ).ok() - } - - fn message_details( - lane: bp_messages::LaneId, - begin: bp_messages::MessageNonce, - end: bp_messages::MessageNonce, - ) -> Vec> { - (begin..=end).filter_map(|nonce| { - let message_data = BridgeWococoMessages::outbound_message_data(lane, nonce)?; - let decoded_payload = bridge_messages::ToWococoMessagePayload::decode( - &mut &message_data.payload[..] - ).ok()?; - Some(bp_messages::MessageDetails { - nonce, - dispatch_weight: decoded_payload.weight, - size: message_data.payload.len() as _, - delivery_and_dispatch_fee: message_data.fee, - dispatch_fee_payment: decoded_payload.dispatch_fee_payment, - }) - }) - .collect() - } - - fn latest_received_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce { - BridgeWococoMessages::outbound_latest_received_nonce(lane) - } - - fn latest_generated_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce { - BridgeWococoMessages::outbound_latest_generated_nonce(lane) - } - } - - impl bp_wococo::FromWococoInboundLaneApi for Runtime { - fn latest_received_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce { - BridgeWococoMessages::inbound_latest_received_nonce(lane) - } - - fn latest_confirmed_nonce(lane: bp_messages::LaneId) -> bp_messages::MessageNonce { - BridgeWococoMessages::inbound_latest_confirmed_nonce(lane) - } - - fn unrewarded_relayers_state(lane: bp_messages::LaneId) -> bp_messages::UnrewardedRelayersState { - BridgeWococoMessages::inbound_unrewarded_relayers_state(lane) - } - } - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { fn account_nonce(account: AccountId) -> Nonce { System::account_nonce(account) diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 04f3c509dac8..1358d07b780c 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1079,7 +1079,7 @@ construct_runtime! { ParasInclusion: parachains_inclusion::{Pallet, Call, Storage, Event} = 44, ParasInherent: parachains_paras_inherent::{Pallet, Call, Storage, Inherent} = 45, ParasScheduler: parachains_scheduler::{Pallet, Call, Storage} = 46, - Paras: parachains_paras::{Pallet, Call, Storage, Event, Config} = 47, + Paras: parachains_paras::{Pallet, Call, Storage, Event, Config} = 47, ParasInitializer: parachains_initializer::{Pallet, Call, Storage} = 48, ParasDmp: parachains_dmp::{Pallet, Call, Storage} = 49, ParasUmp: parachains_ump::{Pallet, Call, Storage, Event} = 50, diff --git a/runtime/westend/src/weights/pallet_balances.rs b/runtime/westend/src/weights/pallet_balances.rs index 86f2121b4732..1fdbb034d67d 100644 --- a/runtime/westend/src/weights/pallet_balances.rs +++ b/runtime/westend/src/weights/pallet_balances.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_balances //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,32 +44,32 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { fn transfer() -> Weight { - (73_094_000 as Weight) + (72_675_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn transfer_keep_alive() -> Weight { - (54_347_000 as Weight) + (53_454_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_balance_creating() -> Weight { - (29_223_000 as Weight) + (28_750_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_balance_killing() -> Weight { - (35_007_000 as Weight) + (35_013_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_transfer() -> Weight { - (72_492_000 as Weight) + (72_130_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn transfer_all() -> Weight { - (67_276_000 as Weight) + (66_281_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_identity.rs b/runtime/westend/src/weights/pallet_identity.rs index 1ca5dabd6ff2..229eee38a0cb 100644 --- a/runtime/westend/src/weights/pallet_identity.rs +++ b/runtime/westend/src/weights/pallet_identity.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_identity //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,133 +44,133 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_identity::WeightInfo for WeightInfo { fn add_registrar(r: u32, ) -> Weight { - (20_852_000 as Weight) + (20_868_000 as Weight) // Standard Error: 2_000 - .saturating_add((249_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((228_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_identity(r: u32, x: u32, ) -> Weight { - (50_867_000 as Weight) + (50_889_000 as Weight) // Standard Error: 14_000 - .saturating_add((216_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((193_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 1_000 - .saturating_add((948_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((934_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_subs_new(s: u32, ) -> Weight { - (39_701_000 as Weight) + (39_392_000 as Weight) // Standard Error: 1_000 - .saturating_add((6_376_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((6_164_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn set_subs_old(p: u32, ) -> Weight { - (40_181_000 as Weight) + (40_206_000 as Weight) // Standard Error: 0 - .saturating_add((2_045_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((2_006_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(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) } fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - (48_884_000 as Weight) - // Standard Error: 6_000 - .saturating_add((140_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 0 - .saturating_add((2_052_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((607_000 as Weight).saturating_mul(x as Weight)) + (49_355_000 as Weight) + // Standard Error: 10_000 + .saturating_add((89_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 1_000 + .saturating_add((1_997_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 1_000 + .saturating_add((605_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn request_judgement(r: u32, x: u32, ) -> Weight { - (52_661_000 as Weight) - // Standard Error: 5_000 - .saturating_add((250_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 0 - .saturating_add((1_172_000 as Weight).saturating_mul(x as Weight)) + (51_505_000 as Weight) + // Standard Error: 10_000 + .saturating_add((290_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 1_000 + .saturating_add((1_159_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn cancel_request(r: u32, x: u32, ) -> Weight { - (48_072_000 as Weight) + (48_609_000 as Weight) // Standard Error: 7_000 - .saturating_add((173_000 as Weight).saturating_mul(r as Weight)) - // Standard Error: 0 - .saturating_add((1_165_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((132_000 as Weight).saturating_mul(r as Weight)) + // Standard Error: 1_000 + .saturating_add((1_141_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_fee(r: u32, ) -> Weight { - (7_817_000 as Weight) - // Standard Error: 1_000 - .saturating_add((220_000 as Weight).saturating_mul(r as Weight)) + (7_565_000 as Weight) + // Standard Error: 0 + .saturating_add((190_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_account_id(r: u32, ) -> Weight { - (8_397_000 as Weight) + (8_260_000 as Weight) // Standard Error: 1_000 - .saturating_add((223_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((190_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_fields(r: u32, ) -> Weight { - (7_854_000 as Weight) + (7_681_000 as Weight) // Standard Error: 1_000 - .saturating_add((216_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((190_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn provide_judgement(r: u32, x: u32, ) -> Weight { - (33_563_000 as Weight) + (33_891_000 as Weight) // Standard Error: 5_000 - .saturating_add((232_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((230_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((1_168_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((1_139_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn kill_identity(r: u32, s: u32, _x: u32, ) -> Weight { - (49_152_000 as Weight) - // Standard Error: 3_000 - .saturating_add((72_000 as Weight).saturating_mul(r as Weight)) + (50_289_000 as Weight) + // Standard Error: 6_000 + .saturating_add((63_000 as Weight).saturating_mul(r as Weight)) // Standard Error: 0 - .saturating_add((2_043_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((1_985_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(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn add_sub(s: u32, ) -> Weight { - (53_373_000 as Weight) + (52_741_000 as Weight) // Standard Error: 0 - .saturating_add((162_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((144_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn rename_sub(s: u32, ) -> Weight { - (16_191_000 as Weight) + (15_775_000 as Weight) // Standard Error: 0 - .saturating_add((19_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((22_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)) } fn remove_sub(s: u32, ) -> Weight { - (54_328_000 as Weight) + (54_310_000 as Weight) // Standard Error: 0 - .saturating_add((143_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((126_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn quit_sub(s: u32, ) -> Weight { - (32_901_000 as Weight) + (33_162_000 as Weight) // Standard Error: 0 - .saturating_add((145_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((125_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)) } diff --git a/runtime/westend/src/weights/pallet_im_online.rs b/runtime/westend/src/weights/pallet_im_online.rs index fc7cf81a9d40..862f896a5ffb 100644 --- a/runtime/westend/src/weights/pallet_im_online.rs +++ b/runtime/westend/src/weights/pallet_im_online.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_im_online //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,11 +44,11 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_im_online::WeightInfo for WeightInfo { fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { - (88_980_000 as Weight) + (88_602_000 as Weight) // Standard Error: 0 - .saturating_add((167_000 as Weight).saturating_mul(k as Weight)) + .saturating_add((169_000 as Weight).saturating_mul(k as Weight)) // Standard Error: 1_000 - .saturating_add((332_000 as Weight).saturating_mul(e as Weight)) + .saturating_add((325_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_indices.rs b/runtime/westend/src/weights/pallet_indices.rs index 8bb176f7ce2d..ebab9cdc1950 100644 --- a/runtime/westend/src/weights/pallet_indices.rs +++ b/runtime/westend/src/weights/pallet_indices.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_indices //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,27 +44,27 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_indices::WeightInfo for WeightInfo { fn claim() -> Weight { - (40_414_000 as Weight) + (38_980_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn transfer() -> Weight { - (48_770_000 as Weight) + (46_875_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn free() -> Weight { - (40_357_000 as Weight) + (38_813_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_transfer() -> Weight { - (40_846_000 as Weight) + (38_848_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn freeze() -> Weight { - (38_084_000 as Weight) + (36_403_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_multisig.rs b/runtime/westend/src/weights/pallet_multisig.rs index 8dc861b508a8..c79ff762dab1 100644 --- a/runtime/westend/src/weights/pallet_multisig.rs +++ b/runtime/westend/src/weights/pallet_multisig.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_multisig //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,78 +44,78 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { fn as_multi_threshold_1(_z: u32, ) -> Weight { - (12_189_000 as Weight) + (10_239_000 as Weight) } fn as_multi_create(s: u32, z: u32, ) -> Weight { - (50_768_000 as Weight) + (50_062_000 as Weight) // Standard Error: 0 - .saturating_add((106_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((88_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (56_293_000 as Weight) + (55_485_000 as Weight) // Standard Error: 0 - .saturating_add((110_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((90_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (29_281_000 as Weight) + (29_381_000 as Weight) // Standard Error: 0 - .saturating_add((105_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((83_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (53_770_000 as Weight) + (53_339_000 as Weight) // Standard Error: 0 - .saturating_add((122_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((100_000 as Weight).saturating_mul(s as Weight)) // 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)) } fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (70_625_000 as Weight) + (70_481_000 as Weight) // Standard Error: 0 - .saturating_add((212_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((193_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((4_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)) } fn approve_as_multi_create(s: u32, ) -> Weight { - (49_662_000 as Weight) + (49_991_000 as Weight) // Standard Error: 0 - .saturating_add((107_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((86_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)) } fn approve_as_multi_approve(s: u32, ) -> Weight { - (28_469_000 as Weight) + (28_369_000 as Weight) // Standard Error: 0 - .saturating_add((107_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((87_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)) } fn approve_as_multi_complete(s: u32, ) -> Weight { - (121_389_000 as Weight) + (121_416_000 as Weight) // Standard Error: 0 - .saturating_add((212_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((196_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)) } fn cancel_as_multi(s: u32, ) -> Weight { - (86_993_000 as Weight) + (87_265_000 as Weight) // Standard Error: 0 - .saturating_add((102_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((90_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)) } diff --git a/runtime/westend/src/weights/pallet_proxy.rs b/runtime/westend/src/weights/pallet_proxy.rs index e554547918f8..3c649859aa49 100644 --- a/runtime/westend/src/weights/pallet_proxy.rs +++ b/runtime/westend/src/weights/pallet_proxy.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_proxy //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,75 +44,75 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_proxy::WeightInfo for WeightInfo { fn proxy(p: u32, ) -> Weight { - (24_786_000 as Weight) + (24_799_000 as Weight) // Standard Error: 1_000 - .saturating_add((133_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((132_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } fn proxy_announced(a: u32, p: u32, ) -> Weight { - (55_730_000 as Weight) - // Standard Error: 1_000 - .saturating_add((558_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 2_000 - .saturating_add((105_000 as Weight).saturating_mul(p as Weight)) + (56_202_000 as Weight) + // Standard Error: 6_000 + .saturating_add((502_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 7_000 + .saturating_add((68_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)) } fn remove_announcement(a: u32, _p: u32, ) -> Weight { - (37_947_000 as Weight) + (37_003_000 as Weight) // Standard Error: 1_000 - .saturating_add((560_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((498_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn reject_announcement(a: u32, _p: u32, ) -> Weight { - (37_904_000 as Weight) + (36_932_000 as Weight) // Standard Error: 1_000 - .saturating_add((562_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((499_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn announce(a: u32, p: u32, ) -> Weight { - (51_562_000 as Weight) - // Standard Error: 2_000 - .saturating_add((550_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 2_000 - .saturating_add((112_000 as Weight).saturating_mul(p as Weight)) + (50_165_000 as Weight) + // Standard Error: 1_000 + .saturating_add((499_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 1_000 + .saturating_add((118_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)) } fn add_proxy(p: u32, ) -> Weight { - (36_284_000 as Weight) + (35_416_000 as Weight) // Standard Error: 1_000 - .saturating_add((223_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((191_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)) } fn remove_proxy(p: u32, ) -> Weight { - (35_792_000 as Weight) + (35_237_000 as Weight) // Standard Error: 2_000 - .saturating_add((249_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((216_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)) } fn remove_proxies(p: u32, ) -> Weight { - (34_091_000 as Weight) + (33_872_000 as Weight) // Standard Error: 1_000 - .saturating_add((136_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((134_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)) } fn anonymous(p: u32, ) -> Weight { - (48_824_000 as Weight) + (47_651_000 as Weight) // Standard Error: 1_000 - .saturating_add((31_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((27_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)) } fn kill_anonymous(p: u32, ) -> Weight { - (35_989_000 as Weight) - // Standard Error: 0 - .saturating_add((134_000 as Weight).saturating_mul(p as Weight)) + (35_319_000 as Weight) + // Standard Error: 1_000 + .saturating_add((137_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)) } diff --git a/runtime/westend/src/weights/pallet_scheduler.rs b/runtime/westend/src/weights/pallet_scheduler.rs index d2c20742a91e..9629137d125f 100644 --- a/runtime/westend/src/weights/pallet_scheduler.rs +++ b/runtime/westend/src/weights/pallet_scheduler.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_scheduler //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,30 +44,30 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { fn schedule(s: u32, ) -> Weight { - (28_493_000 as Weight) + (27_538_000 as Weight) // Standard Error: 0 - .saturating_add((39_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((42_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)) } fn cancel(s: u32, ) -> Weight { - (27_793_000 as Weight) + (26_898_000 as Weight) // Standard Error: 14_000 - .saturating_add((6_333_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((3_721_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn schedule_named(s: u32, ) -> Weight { - (34_482_000 as Weight) + (33_405_000 as Weight) // Standard Error: 1_000 - .saturating_add((56_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((58_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)) } fn cancel_named(s: u32, ) -> Weight { - (29_087_000 as Weight) + (28_566_000 as Weight) // Standard Error: 14_000 - .saturating_add((6_341_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((3_731_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)) } diff --git a/runtime/westend/src/weights/pallet_session.rs b/runtime/westend/src/weights/pallet_session.rs index 4c2118257018..862dff0cc69b 100644 --- a/runtime/westend/src/weights/pallet_session.rs +++ b/runtime/westend/src/weights/pallet_session.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_session //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,12 +44,12 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_session::WeightInfo for WeightInfo { fn set_keys() -> Weight { - (71_585_000 as Weight) + (71_267_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } fn purge_keys() -> Weight { - (40_032_000 as Weight) + (39_990_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_staking.rs b/runtime/westend/src/weights/pallet_staking.rs index 75c3078a1712..2a1067ea3512 100644 --- a/runtime/westend/src/weights/pallet_staking.rs +++ b/runtime/westend/src/weights/pallet_staking.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_staking //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,154 +44,154 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_staking::WeightInfo for WeightInfo { fn bond() -> Weight { - (71_835_000 as Weight) + (69_787_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn bond_extra() -> Weight { - (54_894_000 as Weight) + (53_774_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn unbond() -> Weight { - (59_419_000 as Weight) + (57_805_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn withdraw_unbonded_update(s: u32, ) -> Weight { - (50_384_000 as Weight) + (49_787_000 as Weight) // Standard Error: 0 - .saturating_add((26_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((23_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn withdraw_unbonded_kill(s: u32, ) -> Weight { - (82_905_000 as Weight) + (81_664_000 as Weight) // Standard Error: 1_000 - .saturating_add((2_287_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_238_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn validate() -> Weight { - (33_672_000 as Weight) + (31_287_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn kick(k: u32, ) -> Weight { - (11_371_000 as Weight) - // Standard Error: 7_000 - .saturating_add((16_959_000 as Weight).saturating_mul(k as Weight)) + (10_445_000 as Weight) + // Standard Error: 9_000 + .saturating_add((16_845_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight))) } fn nominate(n: u32, ) -> Weight { - (40_353_000 as Weight) - // Standard Error: 12_000 - .saturating_add((5_341_000 as Weight).saturating_mul(n as Weight)) + (38_344_000 as Weight) + // Standard Error: 15_000 + .saturating_add((5_321_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn chill() -> Weight { - (17_740_000 as Weight) + (17_221_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) } fn set_payee() -> Weight { - (11_624_000 as Weight) + (11_371_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_controller() -> Weight { - (25_480_000 as Weight) + (25_217_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_validator_count() -> Weight { - (2_082_000 as Weight) + (2_092_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_no_eras() -> Weight { - (2_311_000 as Weight) + (2_339_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_new_era() -> Weight { - (2_282_000 as Weight) + (2_359_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_new_era_always() -> Weight { - (2_230_000 as Weight) + (2_324_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn set_invulnerables(v: u32, ) -> Weight { - (2_352_000 as Weight) + (2_318_000 as Weight) // Standard Error: 0 - .saturating_add((27_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((5_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn force_unstake(s: u32, ) -> Weight { - (58_375_000 as Weight) + (57_794_000 as Weight) // Standard Error: 1_000 - .saturating_add((2_282_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((2_215_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn cancel_deferred_slash(s: u32, ) -> Weight { - (3_430_757_000 as Weight) - // Standard Error: 222_000 - .saturating_add((19_760_000 as Weight).saturating_mul(s as Weight)) + (3_389_533_000 as Weight) + // Standard Error: 221_000 + .saturating_add((19_801_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)) } fn payout_stakers_dead_controller(n: u32, ) -> Weight { - (103_686_000 as Weight) - // Standard Error: 17_000 - .saturating_add((47_044_000 as Weight).saturating_mul(n as Weight)) + (106_909_000 as Weight) + // Standard Error: 39_000 + .saturating_add((47_300_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(n as Weight))) } fn payout_stakers_alive_staked(n: u32, ) -> Weight { - (128_168_000 as Weight) - // Standard Error: 21_000 - .saturating_add((59_293_000 as Weight).saturating_mul(n as Weight)) + (132_392_000 as Weight) + // Standard Error: 36_000 + .saturating_add((58_988_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(11 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight))) } fn rebond(l: u32, ) -> Weight { - (46_916_000 as Weight) + (46_661_000 as Weight) // Standard Error: 1_000 - .saturating_add((64_000 as Weight).saturating_mul(l as Weight)) + .saturating_add((67_000 as Weight).saturating_mul(l as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_history_depth(e: u32, ) -> Weight { (0 as Weight) - // Standard Error: 63_000 - .saturating_add((33_032_000 as Weight).saturating_mul(e as Weight)) + // Standard Error: 65_000 + .saturating_add((33_444_000 as Weight).saturating_mul(e as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight))) } fn reap_stash(s: u32, ) -> Weight { - (69_690_000 as Weight) - // Standard Error: 1_000 - .saturating_add((2_271_000 as Weight).saturating_mul(s as Weight)) + (68_870_000 as Weight) + // Standard Error: 0 + .saturating_add((2_211_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } fn new_era(v: u32, n: u32, ) -> Weight { (0 as Weight) - // Standard Error: 787_000 - .saturating_add((310_720_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 39_000 - .saturating_add((48_687_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 909_000 + .saturating_add((300_182_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 45_000 + .saturating_add((48_335_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) @@ -200,12 +200,12 @@ impl pallet_staking::WeightInfo for WeightInfo { } fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight { (0 as Weight) - // Standard Error: 110_000 - .saturating_add((25_641_000 as Weight).saturating_mul(v as Weight)) - // Standard Error: 110_000 - .saturating_add((27_889_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 3_749_000 - .saturating_add((15_769_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 97_000 + .saturating_add((26_275_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 97_000 + .saturating_add((28_529_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 3_318_000 + .saturating_add((53_298_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight))) @@ -213,18 +213,18 @@ impl pallet_staking::WeightInfo for WeightInfo { } fn get_npos_targets(v: u32, ) -> Weight { (0 as Weight) - // Standard Error: 36_000 - .saturating_add((10_960_000 as Weight).saturating_mul(v as Weight)) + // Standard Error: 32_000 + .saturating_add((10_999_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight))) } fn set_staking_limits() -> Weight { - (5_696_000 as Weight) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + (4_846_000 as Weight) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn chill_other() -> Weight { - (41_216_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) + (32_703_000 as Weight) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } } diff --git a/runtime/westend/src/weights/pallet_timestamp.rs b/runtime/westend/src/weights/pallet_timestamp.rs index ecf0ac9bc1b6..577bcc8f8612 100644 --- a/runtime/westend/src/weights/pallet_timestamp.rs +++ b/runtime/westend/src/weights/pallet_timestamp.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,7 +44,7 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { fn set() -> Weight { - (9_647_000 as Weight) + (9_227_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } diff --git a/runtime/westend/src/weights/pallet_utility.rs b/runtime/westend/src/weights/pallet_utility.rs index 8ee0f466139c..1471eacbc250 100644 --- a/runtime/westend/src/weights/pallet_utility.rs +++ b/runtime/westend/src/weights/pallet_utility.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_utility //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -44,16 +44,16 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { fn batch(c: u32, ) -> Weight { - (15_136_000 as Weight) + (15_158_000 as Weight) // Standard Error: 0 - .saturating_add((2_640_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((2_641_000 as Weight).saturating_mul(c as Weight)) } fn as_derivative() -> Weight { - (5_428_000 as Weight) + (5_540_000 as Weight) } fn batch_all(c: u32, ) -> Weight { - (16_887_000 as Weight) + (17_590_000 as Weight) // Standard Error: 0 - .saturating_add((3_091_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((3_269_000 as Weight).saturating_mul(c as Weight)) } } diff --git a/runtime/westend/src/weights/pallet_vesting.rs b/runtime/westend/src/weights/pallet_vesting.rs index 63d662f16add..2d1142b4f220 100644 --- a/runtime/westend/src/weights/pallet_vesting.rs +++ b/runtime/westend/src/weights/pallet_vesting.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for pallet_vesting //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-18, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: diff --git a/runtime/westend/src/weights/runtime_common_auctions.rs b/runtime/westend/src/weights/runtime_common_auctions.rs index 808be370df6c..c4d398faacd3 100644 --- a/runtime/westend/src/weights/runtime_common_auctions.rs +++ b/runtime/westend/src/weights/runtime_common_auctions.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::auctions //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-24, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -31,7 +31,7 @@ // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt -// --output=./runtime/westend/src/weights/ +// --output=./runtime/westend/src/weights/runtime_common_auctions.rs #![allow(unused_parens)] @@ -44,22 +44,22 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::auctions::WeightInfo for WeightInfo { fn new_auction() -> Weight { - (22_995_000 as Weight) + (29_966_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn bid() -> Weight { - (129_219_000 as Weight) + (152_563_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn on_initialize() -> Weight { - (23_099_346_000 as Weight) + (32_736_787_000 as Weight) .saturating_add(T::DbWeight::get().reads(3688 as Weight)) .saturating_add(T::DbWeight::get().writes(3683 as Weight)) } fn cancel_auction() -> Weight { - (4_847_229_000 as Weight) + (7_057_595_000 as Weight) .saturating_add(T::DbWeight::get().reads(73 as Weight)) .saturating_add(T::DbWeight::get().writes(3673 as Weight)) } diff --git a/runtime/westend/src/weights/runtime_common_crowdloan.rs b/runtime/westend/src/weights/runtime_common_crowdloan.rs index 23a9f78b6374..060e481ed66e 100644 --- a/runtime/westend/src/weights/runtime_common_crowdloan.rs +++ b/runtime/westend/src/weights/runtime_common_crowdloan.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::crowdloan //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-24, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -31,7 +31,7 @@ // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt -// --output=./runtime/westend/src/weights/ +// --output=./runtime/westend/src/weights/runtime_common_crowdloan.rs #![allow(unused_parens)] @@ -44,53 +44,53 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::crowdloan::WeightInfo for WeightInfo { fn create() -> Weight { - (82_435_000 as Weight) + (95_715_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn contribute() -> Weight { - (267_367_000 as Weight) + (500_788_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn withdraw() -> Weight { - (106_591_000 as Weight) + (127_448_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn refund(k: u32, ) -> Weight { (0 as Weight) - // Standard Error: 28_000 - .saturating_add((44_792_000 as Weight).saturating_mul(k as Weight)) + // Standard Error: 53_000 + .saturating_add((56_113_000 as Weight).saturating_mul(k as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(k as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(k as Weight))) } fn dissolve() -> Weight { - (61_912_000 as Weight) + (71_359_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn edit() -> Weight { - (38_032_000 as Weight) + (43_194_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn add_memo() -> Weight { - (52_847_000 as Weight) + (65_648_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn poke() -> Weight { - (41_461_000 as Weight) + (51_082_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn on_initialize(n: u32, ) -> Weight { (0 as Weight) - // Standard Error: 20_000 - .saturating_add((108_965_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 31_000 + .saturating_add((134_501_000 as Weight).saturating_mul(n as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes(3 as Weight)) diff --git a/runtime/westend/src/weights/runtime_common_paras_registrar.rs b/runtime/westend/src/weights/runtime_common_paras_registrar.rs index aeb93ac07430..3526923a7d21 100644 --- a/runtime/westend/src/weights/runtime_common_paras_registrar.rs +++ b/runtime/westend/src/weights/runtime_common_paras_registrar.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::paras_registrar //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-21, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -31,7 +31,7 @@ // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt -// --output=./runtime/westend/src/weights/ +// --output=./runtime/westend/src/weights/runtime_common_paras_registrar.rs #![allow(unused_parens)] @@ -44,27 +44,27 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::paras_registrar::WeightInfo for WeightInfo { fn reserve() -> Weight { - (49_034_000 as Weight) + (58_328_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn register() -> Weight { - (4_178_287_000 as Weight) + (4_162_851_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn force_register() -> Weight { - (4_156_439_000 as Weight) + (4_141_674_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn deregister() -> Weight { - (82_728_000 as Weight) + (91_960_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn swap() -> Weight { - (68_944_000 as Weight) + (79_489_000 as Weight) .saturating_add(T::DbWeight::get().reads(10 as Weight)) .saturating_add(T::DbWeight::get().writes(8 as Weight)) } diff --git a/runtime/westend/src/weights/runtime_common_slots.rs b/runtime/westend/src/weights/runtime_common_slots.rs index 6c886e7f0070..4a9f022327e3 100644 --- a/runtime/westend/src/weights/runtime_common_slots.rs +++ b/runtime/westend/src/weights/runtime_common_slots.rs @@ -16,7 +16,7 @@ //! Autogenerated weights for runtime_common::slots //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2021-06-25, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128 // Executed Command: @@ -31,7 +31,7 @@ // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt -// --output=./runtime/westend/src/weights/ +// --output=./runtime/westend/src/weights/runtime_common_slots.rs #![allow(unused_parens)] @@ -44,16 +44,16 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl runtime_common::slots::WeightInfo for WeightInfo { fn force_lease() -> Weight { - (45_355_000 as Weight) + (53_939_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } fn manage_lease_period_start(c: u32, t: u32, ) -> Weight { (0 as Weight) - // Standard Error: 16_000 - .saturating_add((16_002_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 16_000 - .saturating_add((33_337_000 as Weight).saturating_mul(t as Weight)) + // Standard Error: 37_000 + .saturating_add((19_723_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 37_000 + .saturating_add((42_186_000 as Weight).saturating_mul(t as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(t as Weight))) @@ -62,12 +62,12 @@ impl runtime_common::slots::WeightInfo for WeightInfo Weight { - (191_822_000 as Weight) + (249_570_000 as Weight) .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(9 as Weight)) } fn trigger_onboard() -> Weight { - (40_822_000 as Weight) + (49_692_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } diff --git a/scripts/run_all_benches.sh b/scripts/run_all_benches.sh deleted file mode 100755 index cfbaab233e84..000000000000 --- a/scripts/run_all_benches.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -# Runs all benchmarks for all pallets, for each of the runtimes specified below -# Should be run on a reference machine to gain accurate benchmarks -# current reference machine: https://github.com/paritytech/substrate/pull/5848 - -runtimes=( - polkadot - kusama - westend -) - -# cargo build --locked --release -for runtime in "${runtimes[@]}"; do - cargo +nightly run --release --features=runtime-benchmarks --locked benchmark --chain "${runtime}-dev" --execution=wasm --wasm-execution=compiled --pallet "*" --extrinsic "*" --repeat 0 | sed -r -e 's/Pallet: "([a-z_:]+)".*/\1/' | uniq | grep -v frame_system > "${runtime}_pallets" - while read -r line; do - pallet="$(echo "$line" | cut -d' ' -f1)"; - echo "Runtime: $runtime. Pallet: $pallet"; - cargo +nightly run --release --features=runtime-benchmarks -- benchmark --chain="${runtime}-dev" --steps=50 --repeat=20 --pallet="$pallet" --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output="./runtime/${runtime}/src/weights/${pallet/::/_}.rs" - done < "${runtime}_pallets" - rm "${runtime}_pallets" -done From f9c845745f6010f99fed620355e47df6381ac9d7 Mon Sep 17 00:00:00 2001 From: emostov <32168567+emostov@users.noreply.github.com> Date: Tue, 6 Jul 2021 17:51:21 -0700 Subject: [PATCH 09/14] update to pass integrity test --- runtime/common/src/claims.rs | 2 +- runtime/common/src/purchase.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/common/src/claims.rs b/runtime/common/src/claims.rs index d3f1dfb3f90c..0766f4595b6e 100644 --- a/runtime/common/src/claims.rs +++ b/runtime/common/src/claims.rs @@ -725,7 +725,7 @@ mod tests { } parameter_types! { - pub const MinVestedTransfer: u64 = 0; + pub const MinVestedTransfer: u64 = 1; pub const MaxVestingSchedules: u32 = 28; } diff --git a/runtime/common/src/purchase.rs b/runtime/common/src/purchase.rs index a6af3d1bf81e..2eea3d9b3a8e 100644 --- a/runtime/common/src/purchase.rs +++ b/runtime/common/src/purchase.rs @@ -499,7 +499,7 @@ mod tests { } parameter_types! { - pub const MinVestedTransfer: u64 = 0; + pub const MinVestedTransfer: u64 = 1; pub const MaxVestingSchedules: u32 = 28; } From ed5d8a9c34c2e151c7fb4808b7e682ad15cd7666 Mon Sep 17 00:00:00 2001 From: emostov <32168567+emostov@users.noreply.github.com> Date: Wed, 7 Jul 2021 22:46:53 -0700 Subject: [PATCH 10/14] Make integrity tests work --- runtime/test-runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index 8064c5c5b4fb..b95f5dfdae55 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -433,7 +433,7 @@ impl claims::Config for Runtime { } parameter_types! { - pub storage MinVestedTransfer: Balance = 100 * DOLLARS; + pub const MinVestedTransfer: Balance = 100 * DOLLARS; pub const MaxVestingSchedules: u32 = 28; } From 5dc2b537b97f2e8be6316c639f7582dc3abedc2b Mon Sep 17 00:00:00 2001 From: emostov <32168567+emostov@users.noreply.github.com> Date: Sun, 18 Jul 2021 16:31:04 -0700 Subject: [PATCH 11/14] Revert const to storage MinVestedTransfer --- runtime/test-runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index 3e2e4e2aa45b..71e9db8394c8 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -433,7 +433,7 @@ impl claims::Config for Runtime { } parameter_types! { - pub const MinVestedTransfer: Balance = 100 * DOLLARS; + pub storage MinVestedTransfer: Balance = 100 * DOLLARS; pub const MaxVestingSchedules: u32 = 28; } From 8d256154c64292547cd9ec4e6b4a6d646d382ece Mon Sep 17 00:00:00 2001 From: emostov <32168567+emostov@users.noreply.github.com> Date: Thu, 22 Jul 2021 12:36:22 -0700 Subject: [PATCH 12/14] Use MAX_VESTING_SCHEDULES const --- runtime/common/src/claims.rs | 3 +-- runtime/common/src/purchase.rs | 3 +-- runtime/kusama/src/lib.rs | 3 +-- runtime/polkadot/src/lib.rs | 3 +-- runtime/test-runtime/src/lib.rs | 3 +-- runtime/westend/src/lib.rs | 3 +-- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/runtime/common/src/claims.rs b/runtime/common/src/claims.rs index 34ad6048c9a3..9de19c2acf28 100644 --- a/runtime/common/src/claims.rs +++ b/runtime/common/src/claims.rs @@ -724,7 +724,6 @@ mod tests { parameter_types! { pub const MinVestedTransfer: u64 = 1; - pub const MaxVestingSchedules: u32 = 28; } impl pallet_vesting::Config for Test { @@ -733,7 +732,7 @@ mod tests { type BlockNumberToBalance = Identity; type MinVestedTransfer = MinVestedTransfer; type WeightInfo = (); - type MaxVestingSchedules = MaxVestingSchedules; + const MAX_VESTING_SCHEDULES: u32 = 28; } parameter_types!{ diff --git a/runtime/common/src/purchase.rs b/runtime/common/src/purchase.rs index e8b7e636c14e..a190bbf24c96 100644 --- a/runtime/common/src/purchase.rs +++ b/runtime/common/src/purchase.rs @@ -500,7 +500,6 @@ mod tests { parameter_types! { pub const MinVestedTransfer: u64 = 1; - pub const MaxVestingSchedules: u32 = 28; } impl pallet_vesting::Config for Test { @@ -509,7 +508,7 @@ mod tests { type BlockNumberToBalance = Identity; type MinVestedTransfer = MinVestedTransfer; type WeightInfo = (); - type MaxVestingSchedules = MaxVestingSchedules; + const MAX_VESTING_SCHEDULES: u32 = 28; } parameter_types! { diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index c3c6a25ea293..379c9790613b 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -947,7 +947,6 @@ impl pallet_society::Config for Runtime { parameter_types! { pub const MinVestedTransfer: Balance = 100 * CENTS; - pub const MaxVestingSchedules: u32 = 28; } impl pallet_vesting::Config for Runtime { @@ -956,7 +955,7 @@ impl pallet_vesting::Config for Runtime { type BlockNumberToBalance = ConvertInto; type MinVestedTransfer = MinVestedTransfer; type WeightInfo = weights::pallet_vesting::WeightInfo; - type MaxVestingSchedules = MaxVestingSchedules; + const MAX_VESTING_SCHEDULES: u32 = 28; } parameter_types! { diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 3b3b4e02dab5..cbbaa6df4855 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -829,7 +829,6 @@ impl claims::Config for Runtime { parameter_types! { pub const MinVestedTransfer: Balance = 1 * DOLLARS; - pub const MaxVestingSchedules: u32 = 28; } impl pallet_vesting::Config for Runtime { @@ -838,7 +837,7 @@ impl pallet_vesting::Config for Runtime { type BlockNumberToBalance = ConvertInto; type MinVestedTransfer = MinVestedTransfer; type WeightInfo = weights::pallet_vesting::WeightInfo; - type MaxVestingSchedules = MaxVestingSchedules; + const MAX_VESTING_SCHEDULES: u32 = 28; } impl pallet_utility::Config for Runtime { diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index 465445fd2597..ffb3a270e204 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -435,7 +435,6 @@ impl claims::Config for Runtime { parameter_types! { pub storage MinVestedTransfer: Balance = 100 * DOLLARS; - pub const MaxVestingSchedules: u32 = 28; } impl pallet_vesting::Config for Runtime { @@ -444,7 +443,7 @@ impl pallet_vesting::Config for Runtime { type BlockNumberToBalance = ConvertInto; type MinVestedTransfer = MinVestedTransfer; type WeightInfo = (); - type MaxVestingSchedules = MaxVestingSchedules; + const MAX_VESTING_SCHEDULES: u32 = 28; } impl pallet_sudo::Config for Runtime { diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 82d8e500d649..bf79b3cffbf9 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -630,7 +630,6 @@ impl pallet_recovery::Config for Runtime { parameter_types! { pub const MinVestedTransfer: Balance = 100 * CENTS; - pub const MaxVestingSchedules: u32 = 28; } impl pallet_vesting::Config for Runtime { @@ -639,7 +638,7 @@ impl pallet_vesting::Config for Runtime { type BlockNumberToBalance = ConvertInto; type MinVestedTransfer = MinVestedTransfer; type WeightInfo = weights::pallet_vesting::WeightInfo; - type MaxVestingSchedules = MaxVestingSchedules; + const MAX_VESTING_SCHEDULES: u32 = 28; } impl pallet_sudo::Config for Runtime { From 91ba773cdd4f3b410b241dfb8597ba70e7a25ab6 Mon Sep 17 00:00:00 2001 From: emostov <32168567+emostov@users.noreply.github.com> Date: Thu, 19 Aug 2021 16:17:16 -0700 Subject: [PATCH 13/14] Update Cargo.lock to make it compile --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c20fadac3306..9b8570084105 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -572,9 +572,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitvec" From cecc4c1db71151fd3783c68e13d542db223f1906 Mon Sep 17 00:00:00 2001 From: parity-processbot <> Date: Tue, 24 Aug 2021 00:15:39 +0000 Subject: [PATCH 14/14] update Substrate --- Cargo.lock | 353 +++++++++++++++++++++++++---------------------------- 1 file changed, 163 insertions(+), 190 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8a7b32e37553..d492f719e4e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -445,12 +445,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" -[[package]] -name = "base64" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" - [[package]] name = "base64" version = "0.12.3" @@ -1529,9 +1523,9 @@ dependencies = [ [[package]] name = "directories" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8fed639d60b58d0f53498ab13d26f621fd77569cc6edb031f4cc36a2ad9da0f" +checksum = "e69600ff1703123957937708eb27f7a564e48885c537782722ed0ba3189ce1d7" dependencies = [ "dirs-sys", ] @@ -1548,12 +1542,12 @@ dependencies = [ [[package]] name = "dirs-sys" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e93d7f5705de3e49895a2b5e0b8855a1c27f080192ae9c32a6432d50741a57a" +checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" dependencies = [ "libc", - "redox_users 0.3.4", + "redox_users", "winapi 0.3.9", ] @@ -1564,7 +1558,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", - "redox_users 0.4.0", + "redox_users", "winapi 0.3.9", ] @@ -1923,7 +1917,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "parity-scale-codec", ] @@ -1941,7 +1935,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-support", "frame-system", @@ -1960,7 +1954,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "Inflector", "chrono", @@ -1986,7 +1980,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-support", "frame-system", @@ -1999,7 +1993,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-support", "frame-system", @@ -2014,7 +2008,7 @@ dependencies = [ [[package]] name = "frame-metadata" version = "14.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "parity-scale-codec", "serde", @@ -2025,7 +2019,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "bitflags", "frame-metadata", @@ -2051,7 +2045,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2063,7 +2057,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.0.0", @@ -2075,7 +2069,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "proc-macro2", "quote", @@ -2085,7 +2079,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-metadata", "frame-support", @@ -2106,7 +2100,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-support", "frame-system", @@ -2116,7 +2110,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-support", "log", @@ -2132,7 +2126,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -2146,7 +2140,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "parity-scale-codec", "sp-api", @@ -2155,7 +2149,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-support", "sp-api", @@ -4554,7 +4548,7 @@ checksum = "13370dae44474229701bb69b90b4f4dca6404cb0357a2d50d635f1171dc3aa7b" [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-support", "frame-system", @@ -4569,7 +4563,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-support", "frame-system", @@ -4583,7 +4577,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -4606,7 +4600,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -4661,7 +4655,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -4739,7 +4733,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -4755,7 +4749,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -4770,7 +4764,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4793,7 +4787,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -4810,7 +4804,7 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -4824,7 +4818,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -4846,7 +4840,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4861,7 +4855,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -4880,7 +4874,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -4896,7 +4890,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -4911,7 +4905,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -4928,7 +4922,7 @@ dependencies = [ [[package]] name = "pallet-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-support", "frame-system", @@ -4944,7 +4938,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4961,7 +4955,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -4975,7 +4969,7 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-support", "frame-system", @@ -4988,7 +4982,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-support", "frame-system", @@ -5004,7 +4998,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5026,7 +5020,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -5040,7 +5034,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-support", "frame-system", @@ -5053,7 +5047,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -5068,7 +5062,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-support", "frame-system", @@ -5088,7 +5082,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -5104,7 +5098,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-support", "frame-system", @@ -5117,7 +5111,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5139,7 +5133,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -5150,7 +5144,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "log", "sp-arithmetic", @@ -5159,7 +5153,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-support", "frame-system", @@ -5172,7 +5166,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -5189,7 +5183,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -5204,7 +5198,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-support", "frame-system", @@ -5220,7 +5214,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -5237,7 +5231,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5248,7 +5242,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -5264,7 +5258,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", @@ -5279,11 +5273,12 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "sp-runtime", "sp-std", @@ -7705,17 +7700,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "redox_users" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" -dependencies = [ - "getrandom 0.1.14", - "redox_syscall 0.1.56", - "rust-argon2", -] - [[package]] name = "redox_users" version = "0.4.0" @@ -7814,7 +7798,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "env_logger 0.9.0", "jsonrpsee-proc-macros", @@ -7826,6 +7810,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", + "sp-version", ] [[package]] @@ -7969,18 +7954,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "rust-argon2" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" -dependencies = [ - "base64 0.11.0", - "blake2b_simd", - "constant_time_eq", - "crossbeam-utils 0.7.2", -] - [[package]] name = "rustc-demangle" version = "0.1.16" @@ -8096,7 +8069,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "log", "sp-core", @@ -8107,7 +8080,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "async-trait", "derive_more", @@ -8117,7 +8090,7 @@ dependencies = [ "libp2p", "log", "parity-scale-codec", - "prost 0.7.0", + "prost 0.8.0", "prost-build 0.7.0", "rand 0.7.3", "sc-client-api", @@ -8134,7 +8107,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "futures 0.3.16", "futures-timer 3.0.2", @@ -8157,7 +8130,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8173,7 +8146,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8189,7 +8162,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -8200,7 +8173,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "chrono", "fdlimit", @@ -8238,7 +8211,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "fnv", "futures 0.3.16", @@ -8266,7 +8239,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "hash-db", "kvdb", @@ -8291,7 +8264,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "async-trait", "futures 0.3.16", @@ -8315,7 +8288,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "async-trait", "derive_more", @@ -8358,7 +8331,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "derive_more", "futures 0.3.16", @@ -8382,7 +8355,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8395,7 +8368,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "assert_matches", "async-trait", @@ -8429,7 +8402,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "async-trait", "futures 0.3.16", @@ -8455,7 +8428,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "sc-client-api", "sp-authorship", @@ -8466,7 +8439,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "lazy_static", "libsecp256k1 0.6.0", @@ -8492,7 +8465,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "derive_more", "parity-scale-codec", @@ -8509,7 +8482,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "log", "parity-scale-codec", @@ -8525,7 +8498,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "cfg-if 1.0.0", "libc", @@ -8544,7 +8517,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "async-trait", "derive_more", @@ -8581,7 +8554,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "derive_more", "finality-grandpa", @@ -8605,7 +8578,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "ansi_term 0.12.1", "futures 0.3.16", @@ -8622,7 +8595,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "async-trait", "derive_more", @@ -8637,7 +8610,7 @@ dependencies = [ [[package]] name = "sc-light" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "hash-db", "parity-scale-codec", @@ -8655,7 +8628,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "async-std", "async-trait", @@ -8679,7 +8652,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.11.1", "pin-project 1.0.8", - "prost 0.7.0", + "prost 0.8.0", "prost-build 0.7.0", "rand 0.7.3", "sc-block-builder", @@ -8706,7 +8679,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "futures 0.3.16", "futures-timer 3.0.2", @@ -8722,7 +8695,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "bytes 1.0.1", "fnv", @@ -8749,7 +8722,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "futures 0.3.16", "libp2p", @@ -8762,7 +8735,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -8771,7 +8744,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "futures 0.3.16", "hash-db", @@ -8802,7 +8775,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "derive_more", "futures 0.3.16", @@ -8827,7 +8800,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "futures 0.3.16", "jsonrpc-core", @@ -8843,7 +8816,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "async-trait", "directories", @@ -8907,7 +8880,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "log", "parity-scale-codec", @@ -8921,7 +8894,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -8943,7 +8916,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "chrono", "futures 0.3.16", @@ -8961,7 +8934,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "ansi_term 0.12.1", "atty", @@ -8992,7 +8965,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -9003,7 +8976,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "futures 0.3.16", "intervalier", @@ -9030,7 +9003,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "derive_more", "futures 0.3.16", @@ -9464,7 +9437,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "hash-db", "log", @@ -9481,7 +9454,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "blake2-rfc", "proc-macro-crate 1.0.0", @@ -9493,7 +9466,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "parity-scale-codec", "serde", @@ -9505,7 +9478,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "integer-sqrt", "num-traits", @@ -9519,7 +9492,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "parity-scale-codec", "sp-api", @@ -9531,7 +9504,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "async-trait", "parity-scale-codec", @@ -9543,7 +9516,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "parity-scale-codec", "sp-api", @@ -9555,7 +9528,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "futures 0.3.16", "log", @@ -9573,7 +9546,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "async-trait", "futures 0.3.16", @@ -9592,7 +9565,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "async-trait", "merlin", @@ -9614,7 +9587,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "parity-scale-codec", "sp-arithmetic", @@ -9624,7 +9597,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -9636,7 +9609,7 @@ dependencies = [ [[package]] name = "sp-core" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "base58", "blake2-rfc", @@ -9680,7 +9653,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "kvdb", "parking_lot 0.11.1", @@ -9689,7 +9662,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "proc-macro2", "quote", @@ -9699,7 +9672,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "environmental", "parity-scale-codec", @@ -9710,7 +9683,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "finality-grandpa", "log", @@ -9727,7 +9700,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -9741,7 +9714,7 @@ dependencies = [ [[package]] name = "sp-io" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "futures 0.3.16", "hash-db", @@ -9766,7 +9739,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "lazy_static", "sp-core", @@ -9777,7 +9750,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "async-trait", "derive_more", @@ -9794,7 +9767,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "ruzstd", "zstd", @@ -9803,7 +9776,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "parity-scale-codec", "serde", @@ -9816,7 +9789,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "proc-macro-crate 1.0.0", "proc-macro2", @@ -9827,7 +9800,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "sp-api", "sp-core", @@ -9837,7 +9810,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "backtrace", ] @@ -9845,7 +9818,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "rustc-hash", "serde", @@ -9855,7 +9828,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "either", "hash256-std-hasher", @@ -9876,7 +9849,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9893,7 +9866,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "Inflector", "proc-macro-crate 1.0.0", @@ -9905,7 +9878,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "serde", "serde_json", @@ -9914,7 +9887,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "parity-scale-codec", "sp-api", @@ -9927,7 +9900,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -9937,7 +9910,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "hash-db", "log", @@ -9960,12 +9933,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" [[package]] name = "sp-storage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "impl-serde", "parity-scale-codec", @@ -9978,7 +9951,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "log", "sp-core", @@ -9991,7 +9964,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "async-trait", "futures-timer 3.0.2", @@ -10007,7 +9980,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "erased-serde", "log", @@ -10025,7 +9998,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "sp-api", "sp-runtime", @@ -10034,7 +10007,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "async-trait", "log", @@ -10049,7 +10022,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "hash-db", "memory-db", @@ -10063,7 +10036,7 @@ dependencies = [ [[package]] name = "sp-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "futures 0.3.16", "futures-timer 3.0.2", @@ -10074,7 +10047,7 @@ dependencies = [ [[package]] name = "sp-version" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10089,7 +10062,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10100,7 +10073,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10298,7 +10271,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "platforms", ] @@ -10306,7 +10279,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.16", @@ -10328,7 +10301,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "async-std", "derive_more", @@ -10342,7 +10315,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "async-trait", "futures 0.3.16", @@ -10369,7 +10342,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "futures 0.3.16", "substrate-test-utils-derive", @@ -10379,7 +10352,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "proc-macro-crate 1.0.0", "quote", @@ -10389,7 +10362,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "ansi_term 0.12.1", "build-helper", @@ -10544,7 +10517,7 @@ dependencies = [ [[package]] name = "test-runner" version = "0.9.0" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "frame-system", "futures 0.3.16", @@ -10995,7 +10968,7 @@ checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#74e839b8690725873423885bef2e0af7d878fc6e" +source = "git+https://github.com/paritytech/substrate?branch=master#60c6ec78ef14bb7fdab50141c0071629c33c8415" dependencies = [ "log", "parity-scale-codec",