diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 57659f81cbdb..c97b2b50b6b4 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -357,6 +357,7 @@ impl pallet_session::Config for Runtime { type NextSessionRotation = Babe; type SessionManager = pallet_session::historical::NoteHistoricalRoot; type SessionHandler = ::KeyTypeIdProviders; + type SessionChangeListener = Offences; type Keys = SessionKeys; type WeightInfo = weights::pallet_session::WeightInfo; } @@ -666,6 +667,7 @@ impl pallet_bounties::Config for Runtime { parameter_types! { pub const MaxActiveChildBountyCount: u32 = 100; pub const ChildBountyValueMinimum: Balance = BountyValueMinimum::get() / 10; + pub const MaxSessionReportAge: u32 = BondingDuration::get() * SessionsPerEra::get(); } impl pallet_child_bounties::Config for Runtime { @@ -679,6 +681,8 @@ impl pallet_offences::Config for Runtime { type RuntimeEvent = RuntimeEvent; type IdentificationTuple = pallet_session::historical::IdentificationTuple; type OnOffenceHandler = Staking; + type MaxSessionReportAge = MaxSessionReportAge; + type SessionInfoProvider = Session; } impl pallet_authority_discovery::Config for Runtime { diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 7c06ee84901c..423c3c031ecc 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -352,6 +352,7 @@ impl pallet_session::Config for Runtime { type NextSessionRotation = Babe; type SessionManager = pallet_session::historical::NoteHistoricalRoot; type SessionHandler = ::KeyTypeIdProviders; + type SessionChangeListener = Offences; type Keys = SessionKeys; type WeightInfo = weights::pallet_session::WeightInfo; } @@ -704,6 +705,7 @@ impl pallet_bounties::Config for Runtime { parameter_types! { pub const MaxActiveChildBountyCount: u32 = 100; pub const ChildBountyValueMinimum: Balance = BountyValueMinimum::get() / 10; + pub const MaxSessionReportAge: u32 = BondingDuration::get() * SessionsPerEra::get(); } impl pallet_child_bounties::Config for Runtime { @@ -728,6 +730,8 @@ impl pallet_offences::Config for Runtime { type RuntimeEvent = RuntimeEvent; type IdentificationTuple = pallet_session::historical::IdentificationTuple; type OnOffenceHandler = Staking; + type MaxSessionReportAge = MaxSessionReportAge; + type SessionInfoProvider = Session; } impl pallet_authority_discovery::Config for Runtime { diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index a02b98f86ed1..db06d36c75d5 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -347,6 +347,7 @@ impl pallet_session::Config for Runtime { type NextSessionRotation = Babe; type SessionManager = pallet_session::historical::NoteHistoricalRoot; type SessionHandler = ::KeyTypeIdProviders; + type SessionChangeListener = Offences; type Keys = SessionKeys; type WeightInfo = weights::pallet_session::WeightInfo; } @@ -605,6 +606,7 @@ impl pallet_bounties::Config for Runtime { parameter_types! { pub const MaxActiveChildBountyCount: u32 = 100; pub const ChildBountyValueMinimum: Balance = BountyValueMinimum::get() / 10; + pub const MaxSessionReportAge: u32 = BondingDuration::get() * SessionsPerEra::get(); } impl pallet_child_bounties::Config for Runtime { @@ -629,6 +631,8 @@ impl pallet_offences::Config for Runtime { type RuntimeEvent = RuntimeEvent; type IdentificationTuple = pallet_session::historical::IdentificationTuple; type OnOffenceHandler = (); + type MaxSessionReportAge = MaxSessionReportAge; + type SessionInfoProvider = Session; } impl pallet_authority_discovery::Config for Runtime { diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index fb114df2ee46..6c7ac018b9fb 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -278,6 +278,7 @@ impl pallet_session::Config for Runtime { type NextSessionRotation = Babe; type SessionManager = Staking; type SessionHandler = ::KeyTypeIdProviders; + type SessionChangeListener = Offences; type Keys = SessionKeys; type WeightInfo = (); } @@ -359,6 +360,7 @@ impl pallet_staking::Config for Runtime { parameter_types! { pub MaxSetIdSessionEntries: u32 = BondingDuration::get() * SessionsPerEra::get(); + pub MaxSessionReportAge: u32 = BondingDuration::get() * SessionsPerEra::get(); } impl pallet_grandpa::Config for Runtime { @@ -421,6 +423,8 @@ impl pallet_offences::Config for Runtime { type RuntimeEvent = RuntimeEvent; type IdentificationTuple = pallet_session::historical::IdentificationTuple; type OnOffenceHandler = Staking; + type MaxSessionReportAge = MaxSessionReportAge; + type SessionInfoProvider = Session; } impl pallet_authority_discovery::Config for Runtime { diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index e7675c34fc91..b99e36a8d878 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -319,6 +319,7 @@ impl pallet_session::Config for Runtime { type NextSessionRotation = Babe; type SessionManager = pallet_session::historical::NoteHistoricalRoot; type SessionHandler = ::KeyTypeIdProviders; + type SessionChangeListener = Offences; type Keys = SessionKeys; type WeightInfo = weights::pallet_session::WeightInfo; } @@ -532,12 +533,15 @@ impl pallet_fast_unstake::Config for Runtime { parameter_types! { pub const MaxAuthorities: u32 = 100_000; + pub const MaxSessionReportAge: u32 = BondingDuration::get() * SessionsPerEra::get(); } impl pallet_offences::Config for Runtime { type RuntimeEvent = RuntimeEvent; type IdentificationTuple = pallet_session::historical::IdentificationTuple; type OnOffenceHandler = Staking; + type MaxSessionReportAge = MaxSessionReportAge; + type SessionInfoProvider = Session; } impl pallet_authority_discovery::Config for Runtime {