pub trait Config: Config + SendTransactionTypes<Call<Self>> {
Show 29 associated items type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent> + 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 BetterSignedThreshold: Get<Perbill>; type BetterUnsignedThreshold: Get<Perbill>; type OffchainRepeat: Get<Self::BlockNumber>; type MinerTxPriority: Get<TransactionPriority>; type MinerConfig: MinerConfig<AccountId = Self::AccountId, MaxVotesPerVoter = <Self::DataProvider as ElectionDataProvider>::MaxVotesPerVoter, MaxWinners = Self::MaxWinners>; type SignedMaxSubmissions: Get<u32>; type SignedMaxWeight: Get<Weight>; type SignedMaxRefunds: Get<u32>; type SignedRewardBase: Get<BalanceOf<Self>>; type SignedDepositBase: Get<BalanceOf<Self>>; type SignedDepositByte: Get<BalanceOf<Self>>; type SignedDepositWeight: Get<BalanceOf<Self>>; type MaxElectingVoters: Get<SolutionVoterIndexOf<Self::MinerConfig>>; type MaxElectableTargets: Get<SolutionTargetIndexOf<Self::MinerConfig>>; type MaxWinners: Get<u32>; type SlashHandler: OnUnbalanced<NegativeImbalanceOf<Self>>; type RewardHandler: OnUnbalanced<PositiveImbalanceOf<Self>>; type DataProvider: ElectionDataProvider<AccountId = Self::AccountId, BlockNumber = Self::BlockNumber>; type Fallback: InstantElectionProvider<AccountId = Self::AccountId, BlockNumber = Self::BlockNumber, DataProvider = Self::DataProvider, MaxWinners = Self::MaxWinners>; type GovernanceFallback: InstantElectionProvider<AccountId = Self::AccountId, BlockNumber = Self::BlockNumber, DataProvider = Self::DataProvider, MaxWinners = Self::MaxWinners>; type Solver: NposSolver<AccountId = Self::AccountId>; type ForceOrigin: EnsureOrigin<Self::RuntimeOrigin>; 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.

Required 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 the Signed phase.

The minimum amount of improvement to the solution score that defines a solution as “better” in the Unsigned 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

Configurations of the embedded miner.

Any external software implementing this can use the unsigned::Miner type provided, which can mine new solutions and trim them accordingly.

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.

If Config::MinerConfig is being implemented to submit signed solutions (outside of this pallet), then MinerConfig::solution_weight is used to compare against this value.

The maximum amount of unchecked solutions to refund the call fee for.

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.

The maximum number of electing voters to put in the snapshot. At the moment, snapshots are only over a single block, but once multi-block elections are introduced they will take place over multiple blocks.

The maximum number of electable targets to put in the snapshot.

The maximum number of winners that can be elected by this ElectionProvider implementation.

Note: This must always be greater or equal to T::DataProvider::desired_targets().

Handler for the slashed deposits.

Handler for the rewards.

Something that will provide the election data.

Configuration for the fallback.

Configuration of the governance-only fallback.

As a side-note, it is recommend for test-nets to use type ElectionProvider = BoundedExecution<_> if the test-net is not expected to have thousands of nominators.

OCW election solution miner algorithm implementation.

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.