pub trait Config: SendTransactionTypes<Call<Self>> + Config {
    type AuthorityId: Member + Parameter + RuntimeAppPublic + Ord + MaybeSerializeDeserialize + MaxEncodedLen;
    type MaxKeys: Get<u32>;
    type MaxPeerInHeartbeats: Get<u32>;
    type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
    type ValidatorSet: ValidatorSetWithIdentification<Self::AccountId>;
    type NextSessionRotation: EstimateNextSessionRotation<BlockNumberFor<Self>>;
    type ReportUnresponsiveness: ReportOffence<Self::AccountId, IdentificationTuple<Self>, UnresponsivenessOffence<IdentificationTuple<Self>>>;
    type UnsignedPriority: Get<TransactionPriority>;
    type WeightInfo: WeightInfo;
}
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§

source

type AuthorityId: Member + Parameter + RuntimeAppPublic + Ord + MaybeSerializeDeserialize + MaxEncodedLen

The identifier type for an authority.

source

type MaxKeys: Get<u32>

The maximum number of keys that can be added.

source

type MaxPeerInHeartbeats: Get<u32>

The maximum number of peers to be stored in ReceivedHeartbeats

source

type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>

The overarching event type.

source

type ValidatorSet: ValidatorSetWithIdentification<Self::AccountId>

A type for retrieving the validators supposed to be online in a session.

source

type NextSessionRotation: EstimateNextSessionRotation<BlockNumberFor<Self>>

A trait that allows us to estimate the current session progress and also the average session length.

This parameter is used to determine the longevity of heartbeat transaction and a rough time when we should start considering sending heartbeats, since the workers avoids sending them at the very beginning of the session, assuming there is a chance the authority will produce a block and they won’t be necessary.

source

type ReportUnresponsiveness: ReportOffence<Self::AccountId, IdentificationTuple<Self>, UnresponsivenessOffence<IdentificationTuple<Self>>>

A type that gives us the ability to submit unresponsiveness offence reports.

source

type UnsignedPriority: Get<TransactionPriority>

A configuration for base priority of unsigned transactions.

This is exposed so that it can be tuned for particular runtime, when multiple pallets send unsigned transactions.

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

Implementors§