diff --git a/substrate/runtime/Cargo.toml b/substrate/runtime/Cargo.toml index 7fba0184..c576fc2e 100644 --- a/substrate/runtime/Cargo.toml +++ b/substrate/runtime/Cargo.toml @@ -47,9 +47,9 @@ pallet-transaction-payment = { git = "https://github.com/serai-dex/substrate", d coins-pallet = { package = "serai-coins-pallet", path = "../coins/pallet", default-features = false } -pallet-session = { git = "https://github.com/serai-dex/substrate", default-features = false } validator-sets-pallet = { package = "serai-validator-sets-pallet", path = "../validator-sets/pallet", default-features = false } staking-pallet = { package = "serai-staking-pallet", path = "../staking/pallet", default-features = false } +pallet-session = { git = "https://github.com/serai-dex/substrate", default-features = false } in-instructions-pallet = { package = "serai-in-instructions-pallet", path = "../in-instructions/pallet", default-features = false } @@ -102,9 +102,9 @@ std = [ "coins-pallet/std", - "pallet-session/std", "validator-sets-pallet/std", "staking-pallet/std", + "pallet-session/std", "in-instructions-pallet/std", diff --git a/substrate/runtime/src/lib.rs b/substrate/runtime/src/lib.rs index 25bb7b02..790bfbb5 100644 --- a/substrate/runtime/src/lib.rs +++ b/substrate/runtime/src/lib.rs @@ -18,9 +18,9 @@ pub use pallet_transaction_payment as transaction_payment; pub use coins_pallet as coins; -pub use pallet_session as session; pub use staking_pallet as staking; pub use validator_sets_pallet as validator_sets; +pub use pallet_session as session; pub use in_instructions_pallet as in_instructions; @@ -166,12 +166,6 @@ impl Contains for CallFilter { timestamp::Call::__Ignore(_, _) => false, }, - RuntimeCall::Session(call) => match call { - session::Call::set_keys { .. } => true, - session::Call::purge_keys { .. } => true, - session::Call::__Ignore(_, _) => false, - }, - // All of these pallets are our own, and all of their written calls are intended to be called RuntimeCall::Coins(call) => !matches!(call, coins::Call::__Ignore(_, _)), RuntimeCall::ValidatorSets(call) => !matches!(call, validator_sets::Call::__Ignore(_, _)), @@ -179,6 +173,12 @@ impl Contains for CallFilter { RuntimeCall::InInstructions(call) => !matches!(call, in_instructions::Call::__Ignore(_, _)), RuntimeCall::Signals(call) => !matches!(call, signals::Call::__Ignore(_, _)), + RuntimeCall::Session(call) => match call { + session::Call::set_keys { .. } => true, + session::Call::purge_keys { .. } => false, + session::Call::__Ignore(_, _) => false, + }, + RuntimeCall::Babe(call) => match call { babe::Call::report_equivocation { .. } => true, babe::Call::report_equivocation_unsigned { .. } => true, @@ -245,6 +245,11 @@ impl coins::Config for Runtime { type RuntimeEvent = RuntimeEvent; } +impl validator_sets::Config for Runtime { + type RuntimeEvent = RuntimeEvent; +} +impl staking::Config for Runtime {} + pub struct IdentityValidatorIdOf; impl Convert> for IdentityValidatorIdOf { fn convert(key: PublicKey) -> Option { @@ -264,11 +269,6 @@ impl session::Config for Runtime { type WeightInfo = session::weights::SubstrateWeight; } -impl validator_sets::Config for Runtime { - type RuntimeEvent = RuntimeEvent; -} -impl staking::Config for Runtime {} - impl signals::Config for Runtime { type RuntimeEvent = RuntimeEvent; // 1 week @@ -346,9 +346,9 @@ construct_runtime!( Coins: coins, - Session: session, ValidatorSets: validator_sets, Staking: staking, + Session: session, InInstructions: in_instructions,