Trait pallet_mixnet::pallet::Config
source · pub trait Config: Config + SendTransactionTypes<Call<Self>> {
type MaxAuthorities: Get<AuthorityIndex>;
type MaxExternalAddressSize: Get<u32>;
type MaxExternalAddressesPerMixnode: Get<u32>;
type NextSessionRotation: EstimateNextSessionRotation<BlockNumberFor<Self>>;
type NumCoverToCurrentBlocks: Get<BlockNumberFor<Self>>;
type NumRequestsToCurrentBlocks: Get<BlockNumberFor<Self>>;
type NumCoverToPrevBlocks: Get<BlockNumberFor<Self>>;
type NumRegisterStartSlackBlocks: Get<BlockNumberFor<Self>>;
type NumRegisterEndSlackBlocks: Get<BlockNumberFor<Self>>;
type RegistrationPriority: Get<TransactionPriority>;
type MinMixnodes: Get<u32>;
}
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 MaxAuthorities: Get<AuthorityIndex>
type MaxAuthorities: Get<AuthorityIndex>
The maximum number of authorities per session.
sourcetype MaxExternalAddressSize: Get<u32>
type MaxExternalAddressSize: Get<u32>
The maximum size of one of a mixnode’s external addresses.
sourcetype MaxExternalAddressesPerMixnode: Get<u32>
type MaxExternalAddressesPerMixnode: Get<u32>
The maximum number of external addresses for a mixnode.
sourcetype NextSessionRotation: EstimateNextSessionRotation<BlockNumberFor<Self>>
type NextSessionRotation: EstimateNextSessionRotation<BlockNumberFor<Self>>
Session progress/length estimation. Used to determine when to send registration transactions and the longevity of these transactions.
sourcetype NumCoverToCurrentBlocks: Get<BlockNumberFor<Self>>
type NumCoverToCurrentBlocks: Get<BlockNumberFor<Self>>
Length of the first phase of each session (CoverToCurrent
), in blocks.
sourcetype NumRequestsToCurrentBlocks: Get<BlockNumberFor<Self>>
type NumRequestsToCurrentBlocks: Get<BlockNumberFor<Self>>
Length of the second phase of each session (RequestsToCurrent
), in blocks.
sourcetype NumCoverToPrevBlocks: Get<BlockNumberFor<Self>>
type NumCoverToPrevBlocks: Get<BlockNumberFor<Self>>
Length of the third phase of each session (CoverToPrev
), in blocks.
sourcetype NumRegisterStartSlackBlocks: Get<BlockNumberFor<Self>>
type NumRegisterStartSlackBlocks: Get<BlockNumberFor<Self>>
The number of “slack” blocks at the start of each session, during which
maybe_register
will not attempt to post registration
transactions.
sourcetype NumRegisterEndSlackBlocks: Get<BlockNumberFor<Self>>
type NumRegisterEndSlackBlocks: Get<BlockNumberFor<Self>>
The number of “slack” blocks at the end of each session.
maybe_register
will try to register before this slack
period, but may post registration transactions during the slack period as a last
resort.
sourcetype RegistrationPriority: Get<TransactionPriority>
type RegistrationPriority: Get<TransactionPriority>
Priority of unsigned transactions used to register mixnodes.
sourcetype MinMixnodes: Get<u32>
type MinMixnodes: Get<u32>
Minimum number of mixnodes. If there are fewer than this many mixnodes registered for a session, the mixnet will not be active during the session.