Polymesh
Polymesh copied to clipboard
Mesh 2149/staking update part2
changelog
new features
- The follosing extrinsics have been added:
kick
,set_staking_configs
,chill_other
,force_apply_min_commission
,set_min_commission
;
modified external API
-
StakingLedger::unlocking
andStakingLedger::claimed_rewards
types changed fromVec
toBoundedVec
; -
The following extrinsics were removed:
set_min_bond_threshold
,set_history_depth
,submit_election_solution
,submit_election_solution_unsigned
; -
The following events have been removed:
StakingElection
,SolutionStored
,MinimumBondThresholdUpdated
; -
Adds the following error variants:
DuplicateIndex
,InsufficientBond
,InvalidNumberOfNominations
,IncorrectHistoryDepth
,CannotChillOther
,TooManyValidators
,CommissionTooLow
,IdentityIsAlreadyPermissioned
,IdentityIsMissingCDD
,IdentityNotFound
,ValidatorNotFound
; -
Removes the following error variants:
InsufficientValue
,OffchainElectionEarlySubmission
,OffchainElectionWeakSubmission
,SnapshotUnavailable
,OffchainElectionBogusWinnerCount
,OffchainElectionBogusWinner
,OffchainElectionBogusCompact
,OffchainElectionBogusNominator
,OffchainElectionBogusNomination
,OffchainElectionSlashedNomination
,OffchainElectionBogusSelfVote
,OffchainElectionBogusEdge
,OffchainElectionBogusScore
,OffchainElectionBogusElectionSize
,CallNotAllowed
,AlreadyExists
,NotExists
,NoChange
,InvalidValidatorIdentity
,InvalidValidatorCommission
,HitIntendedValidatorCount
,BondTooSmall
,InvalidValidatorUnbondAmount
;
new external API
- Adds the following storage:
MinNominatorBond
,MinValidatorBond
,MinimumActiveStake
,MinCommission
,MaxValidatorsCount
,MaxNominatorsCount
,CurrentPlannedSession
,ChillThreshold
; - Removes the following storage:
EarliestUnappliedSlash
,SnapshotValidators
,SnapshotNominators
,QueuedElected
,QueuedScore
,EraElectionStatus
,IsCurrentSessionFinal
,MinimumBondThreshold
modified events
- All events are now in the Struct format;
new events
- The following events have been added:
StakersElected
,StakingElectionFailed
,Kicked
,Chilled
,PayoutStarted
,ValidatorPrefsSet
,ForceEra
;
other
- Removes
ElectionCompute
,ElectionResult
,ElectionStatus
andElectionSize
; - The
StakingLedger::slash()
function has been update to implement a a proportional slashing system; - Adds two parameters to the
EraPayout
trait; - Adds
ConvertCurve
which implementsEraPayout
this is needed since the associated typeT::Reward
no longer exists; - Adds
SlashParams::disable_strategy
; - In
compute_slash
the offending validator will be disabled only ifparams.disable_strategy != DisableStrategy::Never
; - In
kick_out_if_recent
the offending validator will be disabled only ifparams.disable_strategy == DisableStrategy::Always
; - Adds the following associated types:
CurrencyBalance
,ElectionProvider
,GenesisElectionProvider
,HistoryDepth
,AdminOrigin
,EraPayout
,VoterList
,TargetList
,OnStakerSlash
,BenchmarkingConfig
; - Removes the follosing associated types:
SlashCancelOrigin
,RewardCurve
,ElectionLookahead
,MaxIterations
,MinSolutionScoreBump
,UnsignedPriority
,OffchainSolutionWeightLimit
,RequiredAddOrigin
,RequiredRemoveOrigin
,RequiredCommissionOrigin
,MinimumBond
; - The following fields have been removed from
GenesisConfig
:min_bond_threshold
; - The following fields have been added to
GenesisConfig
:min_nominator_bond
,min_validator_bond
,max_validator_count
,max_nominator_count
; - In
do_payout_stakers
callT::Reward::on_unbalanced(total_imbalance)
; - In
chill_stash
emitChilled
; - In
new_session
remove call toForceEra::<T>::kill()
if Forcing::ForceNew; - In
new_session
remove call toSelf::close_election_window()
; - In
end_era
- In
set_force_era
emitForceEra
event; - Removes
ValidateUnsigned
impl for the pallet;
data migration
-
Validators
storage changed fromStorageMap
toCountedStorageMap
; -
Nominators
storage changed fromStorageMap
toCountedStorageMap
;