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

Currency type.

Something that can predict the fee of a call. Used to sensibly distribute rewards.

Duration of the unsigned phase.

Duration of the signed phase.

The minimum amount of improvement to the solution score that defines a solution as “better” (in any phase).

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

Maximum number of iteration of balancing that will be executed in the embedded miner of the pallet.

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.

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.

Maximum weight of a signed solution.

This should probably be similar to Config::MinerMaxWeight.

Base reward for a signed solution

Base deposit for a signed solution.

Per-byte deposit for a signed solution.

Per-weight deposit for a signed solution.

Handler for the slashed deposits.

Handler for the rewards.

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.

Something that will provide the election data.

The solution type.

Accuracy used for fallback on-chain election.

Configuration for the fallback

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.

The weight of the pallet.

Implementors