mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 19:51:02 +00:00
Inherent filtering follow up (#4305)
* Add feature more feature gating for benchmarking + tests * New line * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras_inherent --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_parachains_paras_inherent.rs * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras_inherent --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/runtime_parachains_paras_inherent.rs * Do not assume we use max validators per core * Use kusama weights for rococo (hopefully temp) * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras_inherent --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_paras_inherent.rs * Add more validity votes when neccesary * Some fixes for the last commit * Restore westend weights * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras_inherent --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_parachains_paras_inherent.rs * Revert bad westend weights write * Make sure to update val idx before skipping * Fix validity vote range to max at group size' * Temp setup for rococo * cargo run --quiet --release --features runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras_inherent --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./runtime/rococo/src/weights/runtime_parachains_paras_inherent.rs --header=./file_header.txt * Augment generated Rococo weights * Make it compile * Revert range for enter_backed_candidates_variable * Delete runtime/kusama/src/weights/runtime_paras_paras_inherent.rs Co-authored-by: Parity Bot <admin@parity.io>
This commit is contained in:
@@ -74,7 +74,7 @@ pub(crate) struct BenchBuilder<T: paras_inherent::Config> {
|
||||
}
|
||||
|
||||
/// Paras inherent `enter` benchmark scenario.
|
||||
#[allow(dead_code)]
|
||||
#[cfg(any(feature = "runtime-benchmarks", test))]
|
||||
pub(crate) struct Bench<T: paras_inherent::Config> {
|
||||
pub(crate) data: ParachainsInherentData<T::Header>,
|
||||
pub(crate) _session: u32,
|
||||
@@ -133,7 +133,7 @@ impl<T: paras_inherent::Config> BenchBuilder<T> {
|
||||
self.max_validators.unwrap_or(Self::fallback_max_validators())
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
pub(crate) fn set_max_validators(mut self, n: u32) -> Self {
|
||||
self.max_validators = Some(n);
|
||||
self
|
||||
@@ -149,7 +149,7 @@ impl<T: paras_inherent::Config> BenchBuilder<T> {
|
||||
/// corresponding dispute statement set. Note that if the number of disputes is not specified it fallbacks
|
||||
/// to having a dispute per every validator. Additionally, an entry is not guaranteed to have a dispute - it
|
||||
/// must line up with the cores marked as disputed as defined in `Self::Build`.
|
||||
#[allow(dead_code)]
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
pub(crate) fn set_dispute_statements(mut self, m: BTreeMap<u32, u32>) -> Self {
|
||||
self.dispute_statements = m;
|
||||
self
|
||||
@@ -160,7 +160,7 @@ impl<T: paras_inherent::Config> BenchBuilder<T> {
|
||||
}
|
||||
|
||||
/// Set maximum number of validators per core.
|
||||
#[allow(dead_code)]
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
pub(crate) fn set_max_validators_per_core(mut self, n: u32) -> Self {
|
||||
self.max_validators_per_core = Some(n);
|
||||
self
|
||||
@@ -172,7 +172,7 @@ impl<T: paras_inherent::Config> BenchBuilder<T> {
|
||||
}
|
||||
|
||||
/// Minimum number of validity votes in order for a backed candidate to be included.
|
||||
#[allow(dead_code)]
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
pub(crate) fn fallback_min_validity_votes() -> u32 {
|
||||
(Self::fallback_max_validators() / 2) + 1
|
||||
}
|
||||
@@ -322,7 +322,6 @@ impl<T: paras_inherent::Config> BenchBuilder<T> {
|
||||
Default::default(),
|
||||
);
|
||||
|
||||
assert_eq!(scheduler::ValidatorGroups::<T>::get().len(), total_cores as usize);
|
||||
assert_eq!(<shared::Pallet<T>>::session_index(), target_session);
|
||||
|
||||
// We need to refetch validators since they have been shuffled.
|
||||
|
||||
Reference in New Issue
Block a user