Trait pallet_dkg_metadata::pallet::Config
source · pub trait Config: Config + Config + CreateSignedTransaction<Call<Self>> {
Show 24 associated items
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type DKGId: Member + Parameter + RuntimeAppPublic + MaybeSerializeDeserialize + AsRef<[u8]> + Into<Public> + From<Public> + MaxEncodedLen;
type DKGAuthorityToMerkleLeaf: Convert<Self::DKGId, Vec<u8>>;
type KeygenJailSentence: Get<BlockNumberFor<Self>>;
type SigningJailSentence: Get<BlockNumberFor<Self>>;
type AuthorityIdOf: Convert<Self::AccountId, Option<Self::DKGId>>;
type Reputation: Member + Parameter + Default + Encode + Decode + AtLeast32BitUnsigned + MaxEncodedLen + Copy;
type DecayPercentage: Get<Percent>;
type OffChainAuthId: AppCrypto<Self::Public, Self::Signature>;
type OnAuthoritySetChangeHandler: OnAuthoritySetChangeHandler<Self::AccountId, AuthoritySetId, Self::DKGId>;
type OnDKGPublicKeyChangeHandler: OnDKGPublicKeyChangeHandler<AuthoritySetId>;
type ProposalHandler: ProposalHandlerTrait<MaxProposalLength = Self::MaxProposalLength>;
type NextSessionRotation: EstimateNextSessionRotation<BlockNumberFor<Self>>;
type UnsignedInterval: Get<BlockNumberFor<Self>>;
type UnsignedPriority: Get<TransactionPriority>;
type SessionPeriod: Get<BlockNumberFor<Self>>;
type MaxKeyLength: Get<u32> + Default + TypeInfo + MaxEncodedLen + Debug + Clone + Eq + PartialEq + PartialOrd + Ord;
type MaxSignatureLength: Get<u32> + Default + TypeInfo + MaxEncodedLen + Debug + Clone + Eq + PartialEq + PartialOrd + Ord;
type MaxAuthorities: Get<u32> + Default + TypeInfo + MaxEncodedLen + Debug + Clone + Eq + PartialEq + PartialOrd + Ord;
type MaxReporters: Get<u32> + Default + TypeInfo + MaxEncodedLen + Debug + Clone + Eq + PartialEq + PartialOrd + Ord;
type VoteLength: Get<u32> + Default + TypeInfo + MaxEncodedLen + Debug + Clone + Eq + PartialEq + PartialOrd + Ord;
type ForceOrigin: EnsureOrigin<Self::RuntimeOrigin>;
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.
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 DKGId: Member + Parameter + RuntimeAppPublic + MaybeSerializeDeserialize + AsRef<[u8]> + Into<Public> + From<Public> + MaxEncodedLen
type DKGId: Member + Parameter + RuntimeAppPublic + MaybeSerializeDeserialize + AsRef<[u8]> + Into<Public> + From<Public> + MaxEncodedLen
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 KeygenJailSentence: Get<BlockNumberFor<Self>>
type KeygenJailSentence: Get<BlockNumberFor<Self>>
Jail lengths for misbehaviours
type SigningJailSentence: Get<BlockNumberFor<Self>>
sourcetype AuthorityIdOf: Convert<Self::AccountId, Option<Self::DKGId>>
type AuthorityIdOf: Convert<Self::AccountId, Option<Self::DKGId>>
Map from controller accounts to their DKG authority identifier.
sourcetype Reputation: Member + Parameter + Default + Encode + Decode + AtLeast32BitUnsigned + MaxEncodedLen + Copy
type Reputation: Member + Parameter + Default + Encode + Decode + AtLeast32BitUnsigned + MaxEncodedLen + Copy
The reputation decay percentage
sourcetype DecayPercentage: Get<Percent>
type DecayPercentage: Get<Percent>
The reputation decay percentage
sourcetype OffChainAuthId: AppCrypto<Self::Public, Self::Signature>
type OffChainAuthId: AppCrypto<Self::Public, Self::Signature>
The identifier type for an offchain worker.
sourcetype OnAuthoritySetChangeHandler: OnAuthoritySetChangeHandler<Self::AccountId, AuthoritySetId, Self::DKGId>
type OnAuthoritySetChangeHandler: OnAuthoritySetChangeHandler<Self::AccountId, AuthoritySetId, Self::DKGId>
Listener for authority set changes
sourcetype OnDKGPublicKeyChangeHandler: OnDKGPublicKeyChangeHandler<AuthoritySetId>
type OnDKGPublicKeyChangeHandler: OnDKGPublicKeyChangeHandler<AuthoritySetId>
Utility trait for handling DKG public key changes
sourcetype ProposalHandler: ProposalHandlerTrait<MaxProposalLength = Self::MaxProposalLength>
type ProposalHandler: ProposalHandlerTrait<MaxProposalLength = Self::MaxProposalLength>
Proposer handler trait
sourcetype NextSessionRotation: EstimateNextSessionRotation<BlockNumberFor<Self>>
type NextSessionRotation: EstimateNextSessionRotation<BlockNumberFor<Self>>
A type that gives allows the pallet access to the session progress
sourcetype UnsignedInterval: Get<BlockNumberFor<Self>>
type UnsignedInterval: Get<BlockNumberFor<Self>>
Number of blocks of cooldown after unsigned transaction is included.
This ensures that we only accept unsigned transactions once, every UnsignedInterval
blocks.
sourcetype UnsignedPriority: Get<TransactionPriority>
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.
sourcetype SessionPeriod: Get<BlockNumberFor<Self>>
type SessionPeriod: Get<BlockNumberFor<Self>>
Session length helper allowing to query session length across runtime upgrades.
sourcetype MaxKeyLength: Get<u32> + Default + TypeInfo + MaxEncodedLen + Debug + Clone + Eq + PartialEq + PartialOrd + Ord
type MaxKeyLength: Get<u32> + Default + TypeInfo + MaxEncodedLen + Debug + Clone + Eq + PartialEq + PartialOrd + Ord
MaxLength for keys
sourcetype MaxSignatureLength: Get<u32> + Default + TypeInfo + MaxEncodedLen + Debug + Clone + Eq + PartialEq + PartialOrd + Ord
type MaxSignatureLength: Get<u32> + Default + TypeInfo + MaxEncodedLen + Debug + Clone + Eq + PartialEq + PartialOrd + Ord
MaxLength for signature
sourcetype MaxAuthorities: Get<u32> + Default + TypeInfo + MaxEncodedLen + Debug + Clone + Eq + PartialEq + PartialOrd + Ord
type MaxAuthorities: Get<u32> + Default + TypeInfo + MaxEncodedLen + Debug + Clone + Eq + PartialEq + PartialOrd + Ord
Max authorities to store
sourcetype MaxReporters: Get<u32> + Default + TypeInfo + MaxEncodedLen + Debug + Clone + Eq + PartialEq + PartialOrd + Ord
type MaxReporters: Get<u32> + Default + TypeInfo + MaxEncodedLen + Debug + Clone + Eq + PartialEq + PartialOrd + Ord
Max reporters to store
sourcetype VoteLength: Get<u32> + Default + TypeInfo + MaxEncodedLen + Debug + Clone + Eq + PartialEq + PartialOrd + Ord
type VoteLength: Get<u32> + Default + TypeInfo + MaxEncodedLen + Debug + Clone + Eq + PartialEq + PartialOrd + Ord
Length of encoded proposer vote
sourcetype ForceOrigin: EnsureOrigin<Self::RuntimeOrigin>
type ForceOrigin: EnsureOrigin<Self::RuntimeOrigin>
The origin which may forcibly reset parameters or otherwise alter privileged attributes.
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