Trait pallet_election_provider_multi_phase::pallet::Config [−][src]
pub trait Config: Config + SendTransactionTypes<Call<Self>> {}Show associated items
type Event: From<Event<Self>> + IsType<<Self as Config>::Event> + TryInto<Event<Self>>; type Currency: ReservableCurrency<Self::AccountId> + Currency<Self::AccountId>; type EstimateCallFee: EstimateCallFee<Call<Self>, BalanceOf<Self>>; type UnsignedPhase: Get<Self::BlockNumber>; type SignedPhase: Get<Self::BlockNumber>; type SolutionImprovementThreshold: Get<Perbill>; type OffchainRepeat: Get<Self::BlockNumber>; type MinerTxPriority: Get<TransactionPriority>; type MinerMaxIterations: Get<u32>; type MinerMaxWeight: Get<Weight>; type SignedMaxSubmissions: Get<u32>; type SignedMaxWeight: Get<Weight>; type SignedRewardBase: Get<BalanceOf<Self>>; type SignedDepositBase: Get<BalanceOf<Self>>; type SignedDepositByte: Get<BalanceOf<Self>>; type SignedDepositWeight: Get<BalanceOf<Self>>; type SlashHandler: OnUnbalanced<NegativeImbalanceOf<Self>>; type RewardHandler: OnUnbalanced<PositiveImbalanceOf<Self>>; type MinerMaxLength: Get<u32>; type DataProvider: ElectionDataProvider<Self::AccountId, Self::BlockNumber>; type Solution: Codec + Default + PartialEq + Eq + Clone + Debug + Ord + NposSolution; type OnChainAccuracy: PerThing128; type Fallback: Get<FallbackStrategy>; type ForceOrigin: EnsureOrigin<Self::Origin>; type BenchmarkingConfig: BenchmarkingConfig; type WeightInfo: WeightInfo;
Expand description
Configuration trait of this pallet.
Implement this type for a runtime in order to customize this pallet.
Associated Types
type EstimateCallFee: EstimateCallFee<Call<Self>, BalanceOf<Self>>
type EstimateCallFee: EstimateCallFee<Call<Self>, BalanceOf<Self>>
Something that can predict the fee of a call. Used to sensibly distribute rewards.
type UnsignedPhase: Get<Self::BlockNumber>
type UnsignedPhase: Get<Self::BlockNumber>
Duration of the unsigned phase.
type SignedPhase: Get<Self::BlockNumber>
type SignedPhase: Get<Self::BlockNumber>
Duration of the signed phase.
The minimum amount of improvement to the solution score that defines a solution as “better” (in any phase).
type OffchainRepeat: Get<Self::BlockNumber>
type OffchainRepeat: Get<Self::BlockNumber>
The repeat threshold of the offchain worker.
For example, if it is 5, that means that at least 5 blocks will elapse between attempts to submit the worker’s solution.
The priority of the unsigned transaction submitted in the unsigned-phase
type MinerMaxIterations: Get<u32>
type MinerMaxIterations: Get<u32>
Maximum number of iteration of balancing that will be executed in the embedded miner of the pallet.
type MinerMaxWeight: Get<Weight>
type MinerMaxWeight: Get<Weight>
Maximum weight that the miner should consume.
The miner will ensure that the total weight of the unsigned solution will not exceed
this value, based on WeightInfo::submit_unsigned
.
type SignedMaxSubmissions: Get<u32>
type SignedMaxSubmissions: Get<u32>
Maximum number of signed submissions that can be queued.
It is best to avoid adjusting this during an election, as it impacts downstream data
structures. In particular, SignedSubmissionIndices<T>
is bounded on this value. If you
update this value during an election, you must ensure that
SignedSubmissionIndices.len()
is less than or equal to the new value. Otherwise,
attempts to submit new solutions may cause a runtime panic.
type SignedMaxWeight: Get<Weight>
type SignedMaxWeight: Get<Weight>
Maximum weight of a signed solution.
This should probably be similar to Config::MinerMaxWeight
.
type SignedRewardBase: Get<BalanceOf<Self>>
type SignedRewardBase: Get<BalanceOf<Self>>
Base reward for a signed solution
type SignedDepositBase: Get<BalanceOf<Self>>
type SignedDepositBase: Get<BalanceOf<Self>>
Base deposit for a signed solution.
type SignedDepositByte: Get<BalanceOf<Self>>
type SignedDepositByte: Get<BalanceOf<Self>>
Per-byte deposit for a signed solution.
type SignedDepositWeight: Get<BalanceOf<Self>>
type SignedDepositWeight: Get<BalanceOf<Self>>
Per-weight deposit for a signed solution.
type SlashHandler: OnUnbalanced<NegativeImbalanceOf<Self>>
type SlashHandler: OnUnbalanced<NegativeImbalanceOf<Self>>
Handler for the slashed deposits.
type RewardHandler: OnUnbalanced<PositiveImbalanceOf<Self>>
type RewardHandler: OnUnbalanced<PositiveImbalanceOf<Self>>
Handler for the rewards.
type MinerMaxLength: Get<u32>
type MinerMaxLength: Get<u32>
Maximum length (bytes) that the mined solution should consume.
The miner will ensure that the total length of the unsigned solution will not exceed this value.
type DataProvider: ElectionDataProvider<Self::AccountId, Self::BlockNumber>
type DataProvider: ElectionDataProvider<Self::AccountId, Self::BlockNumber>
Something that will provide the election data.
The solution type.
Accuracy used for fallback on-chain election.
type Fallback: Get<FallbackStrategy>
type Fallback: Get<FallbackStrategy>
Configuration for the fallback
type ForceOrigin: EnsureOrigin<Self::Origin>
type ForceOrigin: EnsureOrigin<Self::Origin>
Origin that can control this pallet. Note that any action taken by this origin (such) as providing an emergency solution is not checked. Thus, it must be a trusted origin.
The configuration of benchmarking.
type WeightInfo: WeightInfo
type WeightInfo: WeightInfo
The weight of the pallet.