mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 18:41:03 +00:00
Increase payable nominators per validator (#2637)
* inc * cargo run --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/ * cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/ * cargo run --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/ * Add test Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
This commit is contained in:
@@ -360,7 +360,7 @@ parameter_types! {
|
||||
// 27 eras in which slashes can be cancelled (slightly less than 7 days).
|
||||
pub const SlashDeferDuration: pallet_staking::EraIndex = 27;
|
||||
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
|
||||
pub const MaxNominatorRewardedPerValidator: u32 = 128;
|
||||
pub const MaxNominatorRewardedPerValidator: u32 = 256;
|
||||
}
|
||||
|
||||
type SlashCancelOrigin = EnsureOneOf<
|
||||
@@ -1415,6 +1415,23 @@ mod test_fees {
|
||||
use pallet_transaction_payment::Multiplier;
|
||||
use separator::Separatable;
|
||||
|
||||
#[test]
|
||||
fn payout_weight_portion() {
|
||||
use pallet_staking::WeightInfo;
|
||||
let payout_weight =
|
||||
<Runtime as pallet_staking::Config>::WeightInfo::payout_stakers_alive_staked(
|
||||
MaxNominatorRewardedPerValidator::get(),
|
||||
) as f64;
|
||||
let block_weight = BlockWeights::get().max_block as f64;
|
||||
|
||||
println!(
|
||||
"a full payout takes {:.2} of the block weight [{} / {}]",
|
||||
payout_weight / block_weight,
|
||||
payout_weight,
|
||||
block_weight
|
||||
);
|
||||
assert!(payout_weight * 2f64 < block_weight);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
|
||||
Reference in New Issue
Block a user