From 87d152bec30379dade17710136e6a75847d361a7 Mon Sep 17 00:00:00 2001 From: Ankan Date: Fri, 11 Aug 2023 11:38:07 +0200 Subject: [PATCH] add max nominators param --- runtime/kusama/src/lib.rs | 6 ++++-- runtime/polkadot/src/lib.rs | 5 +++-- runtime/westend/src/lib.rs | 5 +++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index b138a64d5ed5..1b004c9b64a6 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -557,8 +557,10 @@ parameter_types! { 27, "DOT_SLASH_DEFER_DURATION" ); - pub const MaxExposurePageSize: u16 = 512; - pub const MaxExposurePageCount: u16 = 1; + pub const MaxExposurePageSize: u32 = 512; + pub const MaxExposurePageCount: u32 = 1; + pub const MaxNominatorRewardedPerValidator: u32 = MaxExposurePageSize::get() * MaxExposurePageCount::get(); + pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17); // 24 pub const MaxNominations: u32 = ::LIMIT as u32; diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index c3bcc5171a7a..bbb3702be7a9 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -538,8 +538,9 @@ parameter_types! { "DOT_SLASH_DEFER_DURATION" ); pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE; - pub const MaxExposurePageSize: u16 = 512; - pub const MaxExposurePageCount: u16 = 1; + pub const MaxExposurePageSize: u32 = 512; + pub const MaxExposurePageCount: u32 = 1; + pub const MaxNominatorRewardedPerValidator: u32 = MaxExposurePageSize::get() * MaxExposurePageCount::get(); pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17); // 16 pub const MaxNominations: u32 = ::LIMIT as u32; diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index c8637f3bceb1..551111bff3cf 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -501,8 +501,9 @@ parameter_types! { // 1 era in which slashes can be cancelled (6 hours). pub const SlashDeferDuration: sp_staking::EraIndex = 1; pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE; - pub const MaxExposurePageSize: u16 = 64; - pub const MaxExposurePageCount: u16 = 10; + pub const MaxExposurePageSize: u32 = 64; + pub const MaxExposurePageCount: u32 = 10; + pub const MaxNominatorRewardedPerValidator: u32 = MaxExposurePageSize::get() * MaxExposurePageCount::get(); pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17); pub const MaxNominations: u32 = ::LIMIT as u32; }