mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 07:01:03 +00:00
Companion for substrate PR#9766 (#3900)
* fix weights * reduce time * update Substrate Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+154
-154
File diff suppressed because it is too large
Load Diff
@@ -45,17 +45,18 @@ parameter_types! {
|
|||||||
.get(DispatchClass::Normal);
|
.get(DispatchClass::Normal);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The numbers configured here should always be more than the the maximum limits of staking pallet
|
/// The numbers configured here could always be more than the the maximum limits of staking pallet
|
||||||
/// to ensure election snapshot will not run out of memory.
|
/// to ensure election snapshot will not run out of memory. For now, we set them to smaller values
|
||||||
|
/// since the staking is bounded and the weight pipeline takes hours for this single pallet.
|
||||||
pub struct BenchmarkConfig;
|
pub struct BenchmarkConfig;
|
||||||
impl pallet_election_provider_multi_phase::BenchmarkingConfig for BenchmarkConfig {
|
impl pallet_election_provider_multi_phase::BenchmarkingConfig for BenchmarkConfig {
|
||||||
const VOTERS: [u32; 2] = [5_000, 10_000];
|
const VOTERS: [u32; 2] = [1000, 2000];
|
||||||
const TARGETS: [u32; 2] = [1_000, 2_000];
|
const TARGETS: [u32; 2] = [500, 1000];
|
||||||
const ACTIVE_VOTERS: [u32; 2] = [1000, 4_000];
|
const ACTIVE_VOTERS: [u32; 2] = [500, 800];
|
||||||
const DESIRED_TARGETS: [u32; 2] = [400, 800];
|
const DESIRED_TARGETS: [u32; 2] = [200, 400];
|
||||||
const SNAPSHOT_MAXIMUM_VOTERS: u32 = 25_000;
|
const SNAPSHOT_MAXIMUM_VOTERS: u32 = 1000;
|
||||||
const MINER_MAXIMUM_VOTERS: u32 = 15_000;
|
const MINER_MAXIMUM_VOTERS: u32 = 1000;
|
||||||
const MAXIMUM_TARGETS: u32 = 2000;
|
const MAXIMUM_TARGETS: u32 = 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The accuracy type used for genesis election provider;
|
/// The accuracy type used for genesis election provider;
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ impl<T: frame_system::Config> pallet_election_provider_multi_phase::WeightInfo f
|
|||||||
// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:0 w:1)
|
// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:0 w:1)
|
||||||
// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1)
|
// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1)
|
||||||
// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1)
|
// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1)
|
||||||
fn create_snapshot_internal() -> Weight {
|
fn create_snapshot_internal(_: u32, _: u32) -> Weight {
|
||||||
(8_835_233_000 as Weight).saturating_add(T::DbWeight::get().writes(3 as Weight))
|
(8_835_233_000 as Weight).saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||||
}
|
}
|
||||||
// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1)
|
// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1)
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ impl<T: frame_system::Config> pallet_election_provider_multi_phase::WeightInfo f
|
|||||||
// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:0 w:1)
|
// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:0 w:1)
|
||||||
// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1)
|
// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1)
|
||||||
// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1)
|
// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1)
|
||||||
fn create_snapshot_internal() -> Weight {
|
fn create_snapshot_internal(_: u32, _: u32) -> Weight {
|
||||||
(8_835_233_000 as Weight).saturating_add(T::DbWeight::get().writes(3 as Weight))
|
(8_835_233_000 as Weight).saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||||
}
|
}
|
||||||
// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1)
|
// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1)
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ impl<T: frame_system::Config> pallet_election_provider_multi_phase::WeightInfo f
|
|||||||
// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:0 w:1)
|
// Storage: ElectionProviderMultiPhase SnapshotMetadata (r:0 w:1)
|
||||||
// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1)
|
// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1)
|
||||||
// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1)
|
// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1)
|
||||||
fn create_snapshot_internal() -> Weight {
|
fn create_snapshot_internal(_: u32, _: u32) -> Weight {
|
||||||
(8_835_233_000 as Weight).saturating_add(T::DbWeight::get().writes(3 as Weight))
|
(8_835_233_000 as Weight).saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||||
}
|
}
|
||||||
// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1)
|
// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1)
|
||||||
|
|||||||
Reference in New Issue
Block a user