@@ -46,6 +46,7 @@ use sp_core::ByteArray;
4646use sp_core:: { OpaqueMetadata , crypto:: KeyTypeId } ;
4747use sp_governed_map:: MainChainScriptsV1 ;
4848use sp_inherents:: InherentIdentifier ;
49+ use sp_runtime:: traits:: ConvertInto ;
4950use sp_runtime:: {
5051 ApplyExtrinsicResult , MultiSignature , Perbill , generic, impl_opaque_keys,
5152 traits:: {
@@ -309,7 +310,24 @@ impl pallet_aura::Config for Runtime {
309310 type SlotDuration = ConstU64 < SLOT_DURATION > ;
310311}
311312
312- pallet_partner_chains_session:: impl_pallet_session_config!( Runtime ) ;
313+ impl pallet_session:: Config for Runtime {
314+ type RuntimeEvent = RuntimeEvent ;
315+ type ValidatorId = AccountId ;
316+ type ValidatorIdOf = ConvertInto ;
317+ type ShouldEndSession = ValidatorManagementSessionManager < Runtime > ;
318+ type NextSessionRotation = ( ) ;
319+ type SessionManager = ValidatorManagementSessionManager < Runtime > ;
320+ type SessionHandler = <SessionKeys as OpaqueKeys >:: KeyTypeIdProviders ;
321+ type Keys = SessionKeys ;
322+ type DisablingStrategy = pallet_session:: disabling:: UpToLimitWithReEnablingDisablingStrategy ;
323+
324+ type WeightInfo = pallet_session:: weights:: SubstrateWeight < Runtime > ;
325+ }
326+
327+ // impl pallet_session::historical::Config for Runtime {
328+ // type FullIdentification = ();
329+ // type FullIdentificationOf = ();
330+ // }
313331
314332impl pallet_grandpa:: Config for Runtime {
315333 type RuntimeEvent = RuntimeEvent ;
@@ -373,15 +391,6 @@ impl pallet_sudo::Config for Runtime {
373391 type WeightInfo = pallet_sudo:: weights:: SubstrateWeight < Runtime > ;
374392}
375393
376- impl pallet_partner_chains_session:: Config for Runtime {
377- type ValidatorId = <Self as frame_system:: Config >:: AccountId ;
378- type ShouldEndSession = ValidatorManagementSessionManager < Runtime > ;
379- type NextSessionRotation = ( ) ;
380- type SessionManager = ValidatorManagementSessionManager < Runtime > ;
381- type SessionHandler = <opaque:: SessionKeys as OpaqueKeys >:: KeyTypeIdProviders ;
382- type Keys = opaque:: SessionKeys ;
383- }
384-
385394parameter_types ! {
386395 pub const MaxValidators : u32 = 1024 ;
387396}
@@ -693,13 +702,8 @@ construct_runtime!(
693702 BlockProducerMetadata : pallet_block_producer_metadata,
694703 BlockProductionLog : pallet_block_production_log,
695704 BlockParticipation : pallet_block_participation,
696- // pallet_grandpa reads pallet_session::pallet::CurrentIndex storage.
697- // Only stub implementation of pallet_session should be wired.
698- // Partner Chains session_manager ValidatorManagementSessionManager writes to pallet_session::pallet::CurrentIndex.
699- // ValidatorManagementSessionManager is wired in by pallet_partner_chains_session.
700- PalletSession : pallet_session,
701- // The order matters!! pallet_partner_chains_session needs to come last for correct initialization order
702- Session : pallet_partner_chains_session,
705+ Session : pallet_session,
706+ // Historical: pallet_session::historical,
703707 NativeTokenManagement : pallet_native_token_management,
704708 GovernedMap : pallet_governed_map,
705709 TestHelperPallet : crate :: test_helper_pallet,
@@ -895,7 +899,6 @@ impl_runtime_apis! {
895899 }
896900 }
897901
898-
899902 impl frame_system_rpc_runtime_api:: AccountNonceApi <Block , AccountId , Nonce > for Runtime {
900903 fn account_nonce( account: AccountId ) -> Nonce {
901904 System :: account_nonce( account)
0 commit comments