[−][src]Trait pallet_staking::Trait
Associated Types
type Currency: LockableCurrency<Self::AccountId, Moment = Self::BlockNumber>
The staking balance.
type Time: Time
Time used for computing era duration.
It is guaranteed to start being called from the first on_finalize
. Thus value at genesis
is not used.
type CurrencyToVote: Convert<BalanceOf<Self>, u64> + Convert<u128, BalanceOf<Self>>
Convert a balance into a number used for election calculation.
This must fit into a u64
but is allowed to be sensibly lossy.
TODO: #1377
The backward convert should be removed as the new Phragmen API returns ratio.
The post-processing needs it but will be moved to off-chain. TODO: #2908
type RewardRemainder: OnUnbalanced<<Self::Currency as Currency<Self::AccountId>>::NegativeImbalance>
Tokens have been minted and are unused for validator-reward.
type Event: From<Event<Self>> + Into<Self::Event>
The overarching event type.
type Slash: OnUnbalanced<<Self::Currency as Currency<Self::AccountId>>::NegativeImbalance>
Handler for the unbalanced reduction when slashing a staker.
type Reward: OnUnbalanced<<Self::Currency as Currency<Self::AccountId>>::PositiveImbalance>
Handler for the unbalanced increment when rewarding a staker.
type SessionsPerEra: Get<SessionIndex>
Number of sessions per era.
type BondingDuration: Get<EraIndex>
Number of eras that staked funds must remain bonded for.
type SlashDeferDuration: Get<EraIndex>
Number of eras that slashes are deferred by, after computation. This should be less than the bonding duration. Set to 0 if slashes should be applied immediately, without opportunity for intervention.
type SlashCancelOrigin: EnsureOrigin<Self::Origin>
The origin which can cancel a deferred slash. Root can always do this.
type SessionInterface: SessionInterface<Self::AccountId>
Interface for interacting with a session module.
type RewardCurve: Get<&'static PiecewiseLinear<'static>>
The NPoS reward curve to use.
type MaxNominatorRewardedPerValidator: Get<u32>
The maximum number of nominator rewarded for each validator.
For each validator only the $MaxNominatorRewardedPerValidator
biggest stakers can claim
their reward. This used to limit the i/o cost for the nominator payout.