diff --git a/Cargo.lock b/Cargo.lock index e1d14265e..fbb4e4475 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8221,7 +8221,6 @@ dependencies = [ "frame-system", "frame-system-rpc-runtime-api", "hashbrown 0.14.5", - "pallet-authorship", "pallet-babe", "pallet-grandpa", "pallet-timestamp", diff --git a/substrate/runtime/Cargo.toml b/substrate/runtime/Cargo.toml index 54869f6df..67d44d16f 100644 --- a/substrate/runtime/Cargo.toml +++ b/substrate/runtime/Cargo.toml @@ -52,7 +52,6 @@ serai-primitives = { path = "../primitives", default-features = false } serai-abi = { path = "../abi", default-features = false, features = ["serde"] } pallet-timestamp = { git = "https://github.com/serai-dex/substrate", default-features = false } -pallet-authorship = { git = "https://github.com/serai-dex/substrate", default-features = false } pallet-transaction-payment = { git = "https://github.com/serai-dex/substrate", default-features = false } @@ -107,7 +106,6 @@ std = [ "serai-abi/serde", "pallet-timestamp/std", - "pallet-authorship/std", "pallet-transaction-payment/std", diff --git a/substrate/runtime/src/lib.rs b/substrate/runtime/src/lib.rs index bef2c062a..0533fc3c1 100644 --- a/substrate/runtime/src/lib.rs +++ b/substrate/runtime/src/lib.rs @@ -273,15 +273,6 @@ where type OverarchingCall = RuntimeCall; } -// for validating equivocation evidences. -// The following runtime construction doesn't actually implement the pallet as doing so is -// unnecessary -// TODO: Replace the requirement on Config for a requirement on FindAuthor directly -impl pallet_authorship::Config for Runtime { - type FindAuthor = ValidatorSets; - type EventHandler = (); -} - // Maximum number of authorities per session. pub type MaxAuthorities = ConstU32<{ validator_sets::primitives::MAX_KEY_SHARES_PER_SET }>; @@ -317,6 +308,8 @@ impl grandpa::Config for Runtime { type KeyOwnerProof = MembershipProof; type EquivocationReportSystem = grandpa::EquivocationReportSystem; + + type FindAuthor = Babe; } pub type Executive = frame_executive::Executive< diff --git a/substrate/validator-sets/pallet/src/lib.rs b/substrate/validator-sets/pallet/src/lib.rs index 8a002bab7..bb961bffd 100644 --- a/substrate/validator-sets/pallet/src/lib.rs +++ b/substrate/validator-sets/pallet/src/lib.rs @@ -9,13 +9,13 @@ use sp_std::{vec, vec::Vec}; use sp_core::sr25519::{Public, Signature}; use sp_application_crypto::RuntimePublic; use sp_session::{ShouldEndSession, GetSessionNumber, GetValidatorCount}; -use sp_runtime::{KeyTypeId, ConsensusEngineId, traits::IsMember}; +use sp_runtime::{KeyTypeId, traits::IsMember}; use sp_staking::offence::{ReportOffence, Offence, OffenceError}; use frame_system::{pallet_prelude::*, RawOrigin}; use frame_support::{ pallet_prelude::*, - traits::{DisabledValidators, KeyOwnerProofSystem, FindAuthor}, + traits::{DisabledValidators, KeyOwnerProofSystem}, BoundedVec, WeakBoundedVec, StoragePrefixedMap, }; @@ -1213,16 +1213,6 @@ pub mod pallet { } } - impl FindAuthor for Pallet { - fn find_author<'a, I>(digests: I) -> Option - where - I: 'a + IntoIterator, - { - let i = Babe::::find_author(digests)?; - Some(Babe::::authorities()[i as usize].0.clone().into()) - } - } - impl DisabledValidators for Pallet { fn is_disabled(index: u32) -> bool { SeraiDisabledIndices::::get(index).is_some()