Crate sp_staking

Source
Expand description

A crate which contains primitives that are useful for implementation that uses staking approaches in general. Definitions related to sessions, slashing, etc go here.

Modules§

currency_to_vote
offence
Common traits and types that are useful for describing offences for usage in environments that use staking.

Macros§

_runtime_benchmarks_enabled
runtime_benchmarks_enabled
Enable/disable the given code depending on feature = "runtime-benchmarks" being enabled for the crate or not.

Structs§

Agent
A type that belongs only in the context of an Agent.
Delegator
A type that belongs only in the context of a Delegator.
Exposure
A snapshot of the stake backing a single validator in the system.
ExposurePage
A snapshot of the stake backing a single validator in the system.
IndividualExposure
The amount of exposure for an era that an individual nominator has (susceptible to slashing).
PagedExposureMetadata
Metadata for Paged Exposure of a validator such as total stake across pages and page count.
Stake
A struct that reflects stake that an account has in the staking system. Provides a set of methods to operate on it’s properties. Aimed at making StakingInterface more concise.

Enums§

StakerStatus
Representation of the status of a staker.
StakingAccount
Representation of a staking account, which may be a stash or controller account.

Traits§

DelegationInterface
Trait to provide delegation functionality for stakers.
DelegationMigrator
Trait to provide functionality for direct stakers to migrate to delegation agents. See DelegationInterface for more details on delegation.
OnStakingUpdate
A generic staking event listener.
StakingInterface
A generic representation of a staking implementation.
StakingUnchecked
Set of low level apis to manipulate staking ledger.

Type Aliases§

EraIndex
Counter for the number of eras that have passed.
Page
Type for identifying a page.
SessionIndex
Simple index type with which we can count sessions.