runtime update, with history depth for the slow clap

Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
This commit is contained in:
Uncle Stinky
2025-06-18 14:17:02 +03:00
parent 417de5a7b2
commit 99c43a0c24
3 changed files with 12 additions and 7 deletions

View File

@@ -492,6 +492,8 @@ parameter_types! {
pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17);
pub const MaxNominations: u32 =
<NposCompactSolution16 as frame_election_provider_support::NposSolution>::LIMIT as u32;
pub const StakingHistoryDepth: u32 = 84;
pub const MaxUnlockingChunks: u32 = 32;
}
impl pallet_staking::Config for Runtime {
@@ -520,8 +522,8 @@ impl pallet_staking::Config for Runtime {
type VoterList = VoterList;
type TargetList = UseValidatorsMap<Self>;
type NominationsQuota = pallet_staking::FixedNominationsQuota<{ MaxNominations::get() }>;
type MaxUnlockingChunks = frame_support::traits::ConstU32<32>;
type HistoryDepth = frame_support::traits::ConstU32<84>;
type MaxUnlockingChunks = MaxUnlockingChunks;
type HistoryDepth = StakingHistoryDepth;
type MaxControllersInDeprecationBatch = ConstU32<5314>;
type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig;
type EventListeners = NominationPools;
@@ -1075,10 +1077,12 @@ impl ghost_claims::Config<CultCollectiveInstance> for Runtime {
parameter_types! {
// will be used in `Perbill::from_percent()`
pub ApplauseThreshold: u32 = 70;
pub const ApplauseThreshold: u32 = 70;
// will be used in `Perbill::from_percent()`
pub OffenceThreshold: u32 = 40;
pub const OffenceThreshold: u32 = 40;
pub const SlowClapUnsignedPriority: TransactionPriority = TransactionPriority::MAX;
pub const SlowClapHistoryDepth: sp_staking::SessionIndex =
StakingHistoryDepth::get() * SessionsPerEra::get();
}
impl ghost_slow_clap::Config for Runtime {
@@ -1096,6 +1100,7 @@ impl ghost_slow_clap::Config for Runtime {
type ApplauseThreshold = ApplauseThreshold;
type OffenceThreshold = OffenceThreshold;
type UnsignedPriority = SlowClapUnsignedPriority;
type HistoryDepth = SlowClapHistoryDepth;
type WeightInfo = weights::ghost_slow_clap::WeightInfo<Runtime>;
}