Module xcm_calls::staking [−][src]
Expand description
Xcm support for pallet_staking calls.
This module provides support for calling into the FRAME pallet_staking pallet of a remote
chain via XCM.
Staking involves the bonding of funds for a certain amount of blocks.
The pallet_staking pallet is configured with the [Config::BondingDuration], the in number of
eras that must pass until the funds can actually be removed (withdraw_unbonded), after they
were unbonded.
- An Era is defined as (whole) number of sessions, which is the period that the validator
set (and each validator’s active nominator set) is recalculated and where rewards are paid
out. An era is ~7 days (relay chain) and the
BondingDurationon polkadot is 28 Eras and 7 Eras on Kusama. - A Session is a period of time that has a constant set of validators and is measured in
block numbers. Sessions are handled by the FRAME
pallet_sessionpallet which implement theShouldEndSessiontrait which determines when a session has ended, and new started. This is used to determine the overall session length.
Kusama and polkadot rely on BABE (pallet_babe) to determine when a session has ended. the
BABE pallet implements the ShouldEndSession trait and determines whether a session should end
by determine whether the epoch should change. An epoch should change if more than
EpochDuration time has passed. EpochDuration measures the amount of time in slots, that each
epoch should last. An epoch length cannot be changed after the chain has started. Meaning
this is chain specific constant. An Epoch on kusama is 1 hour, and 4 hours
Knowledge of the EpochDuration and the BondingDuration and the MILLISECS_PER_BLOCK or
rather the SLOT_DURATION is required to determine when we call withdraw_unbonded after we
initiate the unbond.
Structs
The bond_extra extrinsic.
The pallet_staking configuration for a particular chain
Represents all staking related durations required to determine the correct chain-specific bonding duration.
Represents the state of staking of the PINT’s sovereign account on another chain
Represents an excerpt from the pallet_staking weights
Just a Balance/BlockNumber tuple to encode when a chunk of funds will be unlocked.
Enums
A destination account for payment. mirrored from pallet_staking
Represents dispatchable calls of the FRAME pallet_staking pallet.
Constants
The index of pallet_staking in the polkadot runtime
Traits
Provides encoder types to encode the associated types of the
pallet_staking::Config trait depending on the configured Context.