@@ -49,6 +49,7 @@ use sp_core::ByteArray;
4949use sp_core:: { OpaqueMetadata , crypto:: KeyTypeId } ;
5050use sp_governed_map:: MainChainScriptsV1 ;
5151use sp_inherents:: InherentIdentifier ;
52+ use sp_runtime:: traits:: ConvertInto ;
5253use sp_runtime:: {
5354 ApplyExtrinsicResult , MultiSignature , Perbill , generic, impl_opaque_keys,
5455 traits:: {
@@ -310,7 +311,24 @@ impl pallet_aura::Config for Runtime {
310311 type SlotDuration = ConstU64 < SLOT_DURATION > ;
311312}
312313
313- pallet_partner_chains_session:: impl_pallet_session_config!( Runtime ) ;
314+ impl pallet_session:: Config for Runtime {
315+ type RuntimeEvent = RuntimeEvent ;
316+ type ValidatorId = AccountId ;
317+ type ValidatorIdOf = ConvertInto ;
318+ type ShouldEndSession = ValidatorManagementSessionManager < Runtime > ;
319+ type NextSessionRotation = ( ) ;
320+ type SessionManager = ValidatorManagementSessionManager < Runtime > ;
321+ type SessionHandler = <SessionKeys as OpaqueKeys >:: KeyTypeIdProviders ;
322+ type Keys = SessionKeys ;
323+ type DisablingStrategy = pallet_session:: disabling:: UpToLimitWithReEnablingDisablingStrategy ;
324+
325+ type WeightInfo = pallet_session:: weights:: SubstrateWeight < Runtime > ;
326+ }
327+
328+ // impl pallet_session::historical::Config for Runtime {
329+ // type FullIdentification = ();
330+ // type FullIdentificationOf = ();
331+ // }
314332
315333impl pallet_grandpa:: Config for Runtime {
316334 type RuntimeEvent = RuntimeEvent ;
@@ -374,16 +392,6 @@ impl pallet_sudo::Config for Runtime {
374392 type WeightInfo = pallet_sudo:: weights:: SubstrateWeight < Runtime > ;
375393}
376394
377- impl pallet_partner_chains_session:: Config for Runtime {
378- type RuntimeEvent = RuntimeEvent ;
379- type ValidatorId = <Self as frame_system:: Config >:: AccountId ;
380- type ShouldEndSession = ValidatorManagementSessionManager < Runtime > ;
381- type NextSessionRotation = ( ) ;
382- type SessionManager = ValidatorManagementSessionManager < Runtime > ;
383- type SessionHandler = <opaque:: SessionKeys as OpaqueKeys >:: KeyTypeIdProviders ;
384- type Keys = opaque:: SessionKeys ;
385- }
386-
387395parameter_types ! {
388396 pub const MaxValidators : u32 = 32 ;
389397}
@@ -657,13 +665,8 @@ construct_runtime!(
657665 BlockProducerMetadata : pallet_block_producer_metadata,
658666 BlockProductionLog : pallet_block_production_log,
659667 BlockParticipation : pallet_block_participation,
660- // pallet_grandpa reads pallet_session::pallet::CurrentIndex storage.
661- // Only stub implementation of pallet_session should be wired.
662- // Partner Chains session_manager ValidatorManagementSessionManager writes to pallet_session::pallet::CurrentIndex.
663- // ValidatorManagementSessionManager is wired in by pallet_partner_chains_session.
664- PalletSession : pallet_session,
665- // The order matters!! pallet_partner_chains_session needs to come last for correct initialization order
666- Session : pallet_partner_chains_session,
668+ Session : pallet_session,
669+ // Historical: pallet_session::historical,
667670 NativeTokenManagement : pallet_native_token_management,
668671 GovernedMap : pallet_governed_map,
669672 TestHelperPallet : crate :: test_helper_pallet,
@@ -859,7 +862,6 @@ impl_runtime_apis! {
859862 }
860863 }
861864
862-
863865 impl frame_system_rpc_runtime_api:: AccountNonceApi <Block , AccountId , Nonce > for Runtime {
864866 fn account_nonce( account: AccountId ) -> Nonce {
865867 System :: account_nonce( account)
0 commit comments