pub trait Config: Config {
Show 15 associated items type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>; type AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>; type NextSessionRotation: EstimateNextSessionRotation<BlockNumberFor<Self>>; type DKGId: Member + Parameter + RuntimeAppPublic + MaybeSerializeDeserialize; type DKGAuthorityToMerkleLeaf: Convert<Self::DKGId, Vec<u8>>; type ProposalHandler: ProposalHandlerTrait<MaxProposalLength = Self::MaxProposalLength>; type ChainIdentifier: Get<TypedChainId>; type ProposalLifetime: Get<BlockNumberFor<Self>>; type Period: Get<BlockNumberFor<Self>>; type MaxVotes: Get<u32> + TypeInfo + Clone; type MaxResources: Get<u32> + TypeInfo; type MaxProposers: Get<u32> + TypeInfo; type VotingKeySize: Get<u32> + Debug + Clone + Eq + PartialEq + PartialOrd + Ord + TypeInfo; type MaxProposalLength: Get<u32> + Debug + Clone + Eq + PartialEq + PartialOrd + Ord + TypeInfo; 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. The module configuration trait.

Required Associated Types§

source

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

The overarching RuntimeEvent type.

source

type AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>

Origin used to administer the pallet

source

type NextSessionRotation: EstimateNextSessionRotation<BlockNumberFor<Self>>

Estimate next session rotation

source

type DKGId: Member + Parameter + RuntimeAppPublic + MaybeSerializeDeserialize

Authority identifier type

source

type DKGAuthorityToMerkleLeaf: Convert<Self::DKGId, Vec<u8>>

Convert DKG AuthorityId to a form that would end up in the Merkle Tree.

For instance for ECDSA (secp256k1) we want to store uncompressed public keys (65 bytes) and later to Ethereum Addresses (160 bits) to simplify using them on Ethereum chain, but the rest of the Substrate codebase is storing them compressed (33 bytes) for efficiency reasons.

source

type ProposalHandler: ProposalHandlerTrait<MaxProposalLength = Self::MaxProposalLength>

The handler for proposals

source

type ChainIdentifier: Get<TypedChainId>

The identifier for this chain. This must be unique and must not collide with existing IDs within a set of bridged chains.

source

type ProposalLifetime: Get<BlockNumberFor<Self>>

source

type Period: Get<BlockNumberFor<Self>>

The session period

source

type MaxVotes: Get<u32> + TypeInfo + Clone

The max votes to store for for and against

source

type MaxResources: Get<u32> + TypeInfo

The max resources that can be stored in storage

source

type MaxProposers: Get<u32> + TypeInfo

The max proposers that can be stored in storage

source

type VotingKeySize: Get<u32> + Debug + Clone + Eq + PartialEq + PartialOrd + Ord + TypeInfo

The size of an external proposer account (i.e. 64-byte Ethereum public key)

source

type MaxProposalLength: Get<u32> + Debug + Clone + Eq + PartialEq + PartialOrd + Ord + TypeInfo

Max length of a proposal

source

type WeightInfo: WeightInfo

Implementors§