pub trait Config: Config + Config<RuntimeEvent: From<Event<Self>>> {
type MaxValidators: Get<u32>;
type AuthorityId: Member + Parameter + MaybeSerializeDeserialize + MaxEncodedLen + Ord + Into<Self::AccountId>;
type AuthorityKeys: Parameter + Member + MaybeSerializeDeserialize + Ord + MaxEncodedLen;
type MainChainScriptsOrigin: EnsureOrigin<Self::RuntimeOrigin>;
type WeightInfo: WeightInfo;
// Required methods
fn select_authorities(
input: AuthoritySelectionInputs,
sidechain_epoch: ScEpochNumber,
) -> Option<BoundedVec<CommitteeMemberOf<Self>, Self::MaxValidators>>;
fn current_epoch_number() -> ScEpochNumber;
}Expand description
Configuration trait of this pallet.
The main purpose of this trait is to act as an interface between this pallet and the runtime in which it is embedded in. A type, function, or constant in this trait is essentially left to be configured by the runtime that includes this pallet.
Consequently, a runtime that wants to include this pallet must implement this trait.
Required Associated Types§
Sourcetype MaxValidators: Get<u32>
type MaxValidators: Get<u32>
Maximum amount of validators.
Sourcetype AuthorityId: Member + Parameter + MaybeSerializeDeserialize + MaxEncodedLen + Ord + Into<Self::AccountId>
type AuthorityId: Member + Parameter + MaybeSerializeDeserialize + MaxEncodedLen + Ord + Into<Self::AccountId>
Type identifying authorities.
Sourcetype AuthorityKeys: Parameter + Member + MaybeSerializeDeserialize + Ord + MaxEncodedLen
type AuthorityKeys: Parameter + Member + MaybeSerializeDeserialize + Ord + MaxEncodedLen
Type of authority keys.
Sourcetype MainChainScriptsOrigin: EnsureOrigin<Self::RuntimeOrigin>
type MainChainScriptsOrigin: EnsureOrigin<Self::RuntimeOrigin>
Origin for governance calls
Sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight functions needed for pallet_session_validator_management.
Required Methods§
Should select a committee for sidechain_epoch based on selection inputs input.
Should return None if selection was impossible for the given input.
Sourcefn current_epoch_number() -> ScEpochNumber
fn current_epoch_number() -> ScEpochNumber
Should return the current partner chain epoch.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.