Trait pallet_dkg_proposals::pallet::Config
source · 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§
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
The overarching RuntimeEvent type.
sourcetype AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>
type AdminOrigin: EnsureOrigin<Self::RuntimeOrigin>
Origin used to administer the pallet
sourcetype NextSessionRotation: EstimateNextSessionRotation<BlockNumberFor<Self>>
type NextSessionRotation: EstimateNextSessionRotation<BlockNumberFor<Self>>
Estimate next session rotation
sourcetype DKGId: Member + Parameter + RuntimeAppPublic + MaybeSerializeDeserialize
type DKGId: Member + Parameter + RuntimeAppPublic + MaybeSerializeDeserialize
Authority identifier type
sourcetype DKGAuthorityToMerkleLeaf: Convert<Self::DKGId, Vec<u8>>
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.
sourcetype ProposalHandler: ProposalHandlerTrait<MaxProposalLength = Self::MaxProposalLength>
type ProposalHandler: ProposalHandlerTrait<MaxProposalLength = Self::MaxProposalLength>
The handler for proposals
sourcetype ChainIdentifier: Get<TypedChainId>
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.
type ProposalLifetime: Get<BlockNumberFor<Self>>
sourcetype MaxResources: Get<u32> + TypeInfo
type MaxResources: Get<u32> + TypeInfo
The max resources that can be stored in storage
sourcetype MaxProposers: Get<u32> + TypeInfo
type MaxProposers: Get<u32> + TypeInfo
The max proposers that can be stored in storage
sourcetype VotingKeySize: Get<u32> + Debug + Clone + Eq + PartialEq + PartialOrd + Ord + TypeInfo
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)
sourcetype MaxProposalLength: Get<u32> + Debug + Clone + Eq + PartialEq + PartialOrd + Ord + TypeInfo
type MaxProposalLength: Get<u32> + Debug + Clone + Eq + PartialEq + PartialOrd + Ord + TypeInfo
Max length of a proposal