@@ -429,17 +429,6 @@ impl pallet_authorship::Config for Runtime {
429429 type EventHandler = ( Staking , ImOnline ) ;
430430}
431431
432- impl_opaque_keys ! {
433- pub struct OldSessionKeys {
434- pub grandpa: Grandpa ,
435- pub babe: Babe ,
436- pub im_online: ImOnline ,
437- pub para_validator: Initializer ,
438- pub para_assignment: ParaSessionInfo ,
439- pub authority_discovery: AuthorityDiscovery ,
440- }
441- }
442-
443432impl_opaque_keys ! {
444433 pub struct SessionKeys {
445434 pub grandpa: Grandpa ,
@@ -452,32 +441,6 @@ impl_opaque_keys! {
452441 }
453442}
454443
455- // remove this when removing `OldSessionKeys`
456- fn transform_session_keys ( v : AccountId , old : OldSessionKeys ) -> SessionKeys {
457- SessionKeys {
458- grandpa : old. grandpa ,
459- babe : old. babe ,
460- im_online : old. im_online ,
461- para_validator : old. para_validator ,
462- para_assignment : old. para_assignment ,
463- authority_discovery : old. authority_discovery ,
464- beefy : {
465- // From Session::upgrade_keys():
466- //
467- // Care should be taken that the raw versions of the
468- // added keys are unique for every `ValidatorId, KeyTypeId` combination.
469- // This is an invariant that the session pallet typically maintains internally.
470- //
471- // So, produce a dummy value that's unique for the `ValidatorId, KeyTypeId` combination.
472- let mut id: BeefyId = sp_application_crypto:: ecdsa:: Public :: from_raw ( [ 0u8 ; 33 ] ) . into ( ) ;
473- let id_raw: & mut [ u8 ] = id. as_mut ( ) ;
474- id_raw[ 1 ..33 ] . copy_from_slice ( v. as_ref ( ) ) ;
475- id_raw[ 0 ..4 ] . copy_from_slice ( b"beef" ) ;
476- id
477- } ,
478- }
479- }
480-
481444impl pallet_session:: Config for Runtime {
482445 type RuntimeEvent = RuntimeEvent ;
483446 type ValidatorId = AccountId ;
@@ -1687,25 +1650,8 @@ pub type Migrations = migrations::Unreleased;
16871650/// The runtime migrations per release.
16881651#[ allow( deprecated, missing_docs) ]
16891652pub mod migrations {
1690- use super :: * ;
1691-
1692- /// Upgrade Session keys to include BEEFY key.
1693- /// When this is removed, should also remove `OldSessionKeys`.
1694- pub struct UpgradeSessionKeys ;
1695- impl frame_support:: traits:: OnRuntimeUpgrade for UpgradeSessionKeys {
1696- fn on_runtime_upgrade ( ) -> Weight {
1697- Session :: upgrade_keys :: < OldSessionKeys , _ > ( transform_session_keys) ;
1698- Perbill :: from_percent ( 50 ) * BlockWeights :: get ( ) . max_block
1699- }
1700- }
1701-
17021653 /// Unreleased migrations. Add new ones here:
1703- pub type Unreleased = (
1704- // Upgrade SessionKeys to include BEEFY key
1705- UpgradeSessionKeys ,
1706- pallet_nomination_pools:: migration:: versioned_migrations:: V5toV6 < Runtime > ,
1707- pallet_nomination_pools:: migration:: versioned_migrations:: V6ToV7 < Runtime > ,
1708- ) ;
1654+ pub type Unreleased = ( ) ;
17091655}
17101656
17111657/// Unchecked extrinsic type as expected by this runtime.
0 commit comments