Bump metadata (#2148)

* Bump metadata

* Adjust to non-customized democracy params
This commit is contained in:
Jaco Greeff
2020-04-09 14:46:48 +02:00
committed by GitHub
parent 83a762af1e
commit 9184268c3d
8 changed files with 178 additions and 38 deletions
@@ -99,7 +99,9 @@ function filterRewards (api: ApiInterfaceRx, accountId: Uint8Array | string, rew
? api.query.staking.migrateEra<Option<EraIndex>>()
: of(api.registry.createType('Option<EraIndex>', api.tx.staking.payoutStakers ? 0 : 1_000_000_000)),
api.derive.staking.query(accountId),
api.derive.staking.queryMulti(validators)
api.tx.staking.payoutStakers
? api.derive.staking.queryMulti(validators)
: of([])
]).pipe(
map(([optMigrate, { stakingLedger }, queryValidators]): DeriveStakerReward[] => {
const migrateEra = optMigrate.unwrapOr(new BN(-1));
+22 -10
View File
@@ -71,6 +71,13 @@ declare module '@polkadot/api/types/storage' {
* if per-block initialization has already been called for current block.
**/
initialized: AugmentedQuery<ApiType, () => Observable<Option<MaybeVrf>>> & QueryableStorageEntry<ApiType>;
/**
* How late the current block is compared to its parent.
* This entry is populated as part of block execution and is cleaned up
* on block finalization. Querying this storage entry outside of block
* execution context should always yield zero.
**/
lateness: AugmentedQuery<ApiType, () => Observable<BlockNumber>> & QueryableStorageEntry<ApiType>;
/**
* Next epoch randomness.
**/
@@ -546,7 +553,7 @@ declare module '@polkadot/api/types/storage' {
canceledSlashPayout: AugmentedQuery<ApiType, () => Observable<BalanceOf>> & QueryableStorageEntry<ApiType>;
/**
* The current era index.
* This is the latest planned era, depending on how session module queues the validator
* This is the latest planned era, depending on how the Session pallet queues the validator
* set, it might be active or not.
**/
currentEra: AugmentedQuery<ApiType, () => Observable<Option<EraIndex>>> & QueryableStorageEntry<ApiType>;
@@ -573,7 +580,7 @@ declare module '@polkadot/api/types/storage' {
erasStakers: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Exposure>> & QueryableStorageEntry<ApiType>;
/**
* Clipped Exposure of validator at era.
* This is similar to [`ErasStakers`] but number of nominators exposed is reduce to the
* This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the
* `T::MaxNominatorRewardedPerValidator` biggest stakers.
* (Note: the field `total` and `own` of the exposure remains unchanged).
* This is used to limit the i/o cost for the nominator payout.
@@ -583,7 +590,7 @@ declare module '@polkadot/api/types/storage' {
**/
erasStakersClipped: AugmentedQueryDoubleMap<ApiType, (key1: EraIndex | AnyNumber | Uint8Array, key2: AccountId | string | Uint8Array) => Observable<Exposure>> & QueryableStorageEntry<ApiType>;
/**
* The session index at which the era start for the last `HISTORY_DEPTH` eras
* The session index at which the era start for the last `HISTORY_DEPTH` eras.
**/
erasStartSessionIndex: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<Option<SessionIndex>>> & QueryableStorageEntry<ApiType>;
/**
@@ -592,7 +599,7 @@ declare module '@polkadot/api/types/storage' {
**/
erasTotalStake: AugmentedQuery<ApiType, (arg: EraIndex | AnyNumber | Uint8Array) => Observable<BalanceOf>> & QueryableStorageEntry<ApiType>;
/**
* Similarly to `ErasStakers` this holds the preferences of validators.
* Similar to `ErasStakers`, this holds the preferences of validators.
* This is keyed first by the era index to allow bulk deletion and then the stash account.
* Is it removed after `HISTORY_DEPTH` eras.
**/
@@ -607,11 +614,11 @@ declare module '@polkadot/api/types/storage' {
**/
forceEra: AugmentedQuery<ApiType, () => Observable<Forcing>> & QueryableStorageEntry<ApiType>;
/**
* Number of era to keep in history.
* Information is kept for eras in `[current_era - history_depth; current_era]
* Must be more than the number of era delayed by session otherwise.
* i.e. active era must always be in history.
* i.e. `active_era > current_era - history_depth` must be guaranteed.
* Number of eras to keep in history.
* Information is kept for eras in `[current_era - history_depth; current_era]`.
* Must be more than the number of eras delayed by session otherwise.
* I.e. active era must always be in history.
* I.e. `active_era > current_era - history_depth` must be guaranteed.
**/
historyDepth: AugmentedQuery<ApiType, () => Observable<u32>> & QueryableStorageEntry<ApiType>;
/**
@@ -621,13 +628,18 @@ declare module '@polkadot/api/types/storage' {
**/
invulnerables: AugmentedQuery<ApiType, () => Observable<Vec<AccountId>>> & QueryableStorageEntry<ApiType>;
/**
* True if the current planned session is final.
* True if the current **planned** session is final. Note that this does not take era
* forcing into account.
**/
isCurrentSessionFinal: AugmentedQuery<ApiType, () => Observable<bool>> & QueryableStorageEntry<ApiType>;
/**
* Map from all (unlocked) "controller" accounts to the info regarding the staking.
**/
ledger: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<StakingLedger>>> & QueryableStorageEntry<ApiType>;
/**
* The era where we migrated from Lazy Payouts to Simple Payouts
**/
migrateEra: AugmentedQuery<ApiType, () => Observable<Option<EraIndex>>> & QueryableStorageEntry<ApiType>;
/**
* Minimum number of staking participants before emergency conditions are imposed.
**/
+31 -2
View File
@@ -1329,7 +1329,8 @@ declare module '@polkadot/api/types/submittable' {
* Use this if there are additional funds in your stash account that you wish to bond.
* Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount
* that can be added.
* The dispatch origin for this call must be _Signed_ by the stash, not the controller.
* The dispatch origin for this call must be _Signed_ by the stash, not the controller and
* it can be only called when [`EraElectionStatus`] is `Closed`.
* Emits `Bonded`.
* # <weight>
* - Independent of the arguments. Insignificant complexity.
@@ -1351,6 +1352,7 @@ declare module '@polkadot/api/types/submittable' {
* Declare no desire to either validate or nominate.
* Effects will be felt at the beginning of the next era.
* The dispatch origin for this call must be _Signed_ by the controller, not the stash.
* And, it can be only called when [`EraElectionStatus`] is `Closed`.
* # <weight>
* - Independent of the arguments. Insignificant complexity.
* - Contains one read.
@@ -1386,8 +1388,10 @@ declare module '@polkadot/api/types/submittable' {
forceUnstake: AugmentedSubmittable<(stash: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
/**
* Declare the desire to nominate `targets` for the origin controller.
* Effects will be felt at the beginning of the next era.
* Effects will be felt at the beginning of the next era. This can only be called when
* [`EraElectionStatus`] is `Closed`.
* The dispatch origin for this call must be _Signed_ by the controller, not the stash.
* And, it can be only called when [`EraElectionStatus`] is `Closed`.
* # <weight>
* - The transaction's complexity is proportional to the size of `targets`,
* which is capped at CompactAssignments::LIMIT.
@@ -1396,6 +1400,9 @@ declare module '@polkadot/api/types/submittable' {
**/
nominate: AugmentedSubmittable<(targets: Vec<LookupSource> | (LookupSource | Address | AccountId | AccountIndex | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>>;
/**
* **This extrinsic will be removed after `MigrationEra + HistoryDepth` has passed, giving
* opportunity for users to claim all rewards before moving to Simple Payouts. After this
* time, you should use `payout_stakers` instead.**
* Make one nominator's payout for one era.
* - `who` is the controller account of the nominator to pay out.
* - `era` may not be lower than one following the most recently paid era. If it is higher,
@@ -1421,6 +1428,23 @@ declare module '@polkadot/api/types/submittable' {
**/
payoutNominator: AugmentedSubmittable<(era: EraIndex | AnyNumber | Uint8Array, validators: Vec<ITuple<[AccountId, u32]>> | ([AccountId | string | Uint8Array, u32 | AnyNumber | Uint8Array])[]) => SubmittableExtrinsic<ApiType>>;
/**
* Pay out all the stakers behind a single validator for a single era.
* - `validator_stash` is the stash account of the validator. Their nominators, up to
* `T::MaxNominatorRewardedPerValidator`, will also receive their rewards.
* - `era` may be any era between `[current_era - history_depth; current_era]`.
* The origin of this call must be _Signed_. Any account can call this function, even if
* it is not one of the stakers.
* This can only be called when [`EraElectionStatus`] is `Closed`.
* # <weight>
* - Time complexity: at most O(MaxNominatorRewardedPerValidator).
* - Contains a limited number of reads and writes.
* # </weight>
**/
payoutStakers: AugmentedSubmittable<(validatorStash: AccountId | string | Uint8Array, era: EraIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
/**
* **This extrinsic will be removed after `MigrationEra + HistoryDepth` has passed, giving
* opportunity for users to claim all rewards before moving to Simple Payouts. After this
* time, you should use `payout_stakers` instead.**
* Make one validator's payout for one era.
* - `who` is the controller account of the validator to pay out.
* - `era` may not be lower than one following the most recently paid era. If it is higher,
@@ -1444,6 +1468,8 @@ declare module '@polkadot/api/types/submittable' {
reapStash: AugmentedSubmittable<(stash: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
/**
* Rebond a portion of the stash scheduled to be unlocked.
* The dispatch origin must be signed by the controller, and it can be only called when
* [`EraElectionStatus`] is `Closed`.
* # <weight>
* - Time complexity: O(1). Bounded by `MAX_UNLOCKING_CHUNKS`.
* - Storage changes: Can't increase storage, only decrease it.
@@ -1558,6 +1584,7 @@ declare module '@polkadot/api/types/submittable' {
* can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need
* to be called first to remove some of the chunks (if possible).
* The dispatch origin for this call must be _Signed_ by the controller, not the stash.
* And, it can be only called when [`EraElectionStatus`] is `Closed`.
* Emits `Unbonded`.
* See also [`Call::withdraw_unbonded`].
* # <weight>
@@ -1575,6 +1602,7 @@ declare module '@polkadot/api/types/submittable' {
* Declare the desire to validate for the origin controller.
* Effects will be felt at the beginning of the next era.
* The dispatch origin for this call must be _Signed_ by the controller, not the stash.
* And, it can be only called when [`EraElectionStatus`] is `Closed`.
* # <weight>
* - Independent of the arguments. Insignificant complexity.
* - Contains a limited number of reads.
@@ -1587,6 +1615,7 @@ declare module '@polkadot/api/types/submittable' {
* This essentially frees up that balance to be used by the stash account to do
* whatever it wants.
* The dispatch origin for this call must be _Signed_ by the controller, not the stash.
* And, it can be only called when [`EraElectionStatus`] is `Closed`.
* Emits `Withdrawn`.
* See also [`Call::unbond`].
* # <weight>
@@ -670,11 +670,12 @@
"name": "NewMultisig",
"args": [
"AccountId",
"AccountId"
"AccountId",
"CallHash"
],
"documentation": [
" A new multisig operation has begun. First param is the account that is approving,",
" second is the multisig account."
" second is the multisig account, third is hash of the call."
]
},
{
@@ -682,11 +683,12 @@
"args": [
"AccountId",
"Timepoint",
"AccountId"
"AccountId",
"CallHash"
],
"documentation": [
" A multisig operation has been approved by someone. First param is the account that is",
" approving, third is the multisig account."
" approving, third is the multisig account, fourth is hash of the call."
]
},
{
@@ -695,11 +697,12 @@
"AccountId",
"Timepoint",
"AccountId",
"CallHash",
"DispatchResult"
],
"documentation": [
" A multisig operation has been executed. First param is the account that is",
" approving, third is the multisig account."
" approving, third is the multisig account, fourth is hash of the call to be executed."
]
},
{
@@ -707,11 +710,12 @@
"args": [
"AccountId",
"Timepoint",
"AccountId"
"AccountId",
"CallHash"
],
"documentation": [
" A multisig operation has been cancelled. First param is the account that is",
" cancelling, third is the multisig account."
" cancelling, third is the multisig account, fourth is hash of the call."
]
}
],
@@ -916,6 +920,21 @@
" Temporary value (cleared at block finalization) which is `Some`",
" if per-block initialization has already been called for current block."
]
},
{
"name": "Lateness",
"modifier": "Default",
"type": {
"Plain": "BlockNumber"
},
"fallback": "0x00000000",
"documentation": [
" How late the current block is compared to its parent.",
"",
" This entry is populated as part of block execution and is cleaned up",
" on block finalization. Querying this storage entry outside of block",
" execution context should always yield zero."
]
}
]
},
@@ -1630,13 +1649,13 @@
},
"fallback": "0x54000000",
"documentation": [
" Number of era to keep in history.",
" Number of eras to keep in history.",
"",
" Information is kept for eras in `[current_era - history_depth; current_era]",
" Information is kept for eras in `[current_era - history_depth; current_era]`.",
"",
" Must be more than the number of era delayed by session otherwise.",
" i.e. active era must always be in history.",
" i.e. `active_era > current_era - history_depth` must be guaranteed."
" Must be more than the number of eras delayed by session otherwise.",
" I.e. active era must always be in history.",
" I.e. `active_era > current_era - history_depth` must be guaranteed."
]
},
{
@@ -1764,7 +1783,7 @@
"documentation": [
" The current era index.",
"",
" This is the latest planned era, depending on how session module queues the validator",
" This is the latest planned era, depending on how the Session pallet queues the validator",
" set, it might be active or not."
]
},
@@ -1795,7 +1814,7 @@
},
"fallback": "0x00",
"documentation": [
" The session index at which the era start for the last `HISTORY_DEPTH` eras"
" The session index at which the era start for the last `HISTORY_DEPTH` eras."
]
},
{
@@ -1836,7 +1855,7 @@
"documentation": [
" Clipped Exposure of validator at era.",
"",
" This is similar to [`ErasStakers`] but number of nominators exposed is reduce to the",
" This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the",
" `T::MaxNominatorRewardedPerValidator` biggest stakers.",
" (Note: the field `total` and `own` of the exposure remains unchanged).",
" This is used to limit the i/o cost for the nominator payout.",
@@ -1861,7 +1880,7 @@
},
"fallback": "0x00",
"documentation": [
" Similarly to `ErasStakers` this holds the preferences of validators.",
" Similar to `ErasStakers`, this holds the preferences of validators.",
"",
" This is keyed first by the era index to allow bulk deletion and then the stash account.",
"",
@@ -2133,7 +2152,8 @@
},
"fallback": "0x00",
"documentation": [
" True if the current planned session is final."
" True if the current **planned** session is final. Note that this does not take era",
" forcing into account."
]
},
{
@@ -2149,6 +2169,17 @@
"",
" This is set to v3.0.0 for new networks."
]
},
{
"name": "MigrateEra",
"modifier": "Optional",
"type": {
"Plain": "EraIndex"
},
"fallback": "0x00",
"documentation": [
" The era where we migrated from Lazy Payouts to Simple Payouts"
]
}
]
},
@@ -2205,7 +2236,8 @@
" Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount",
" that can be added.",
"",
" The dispatch origin for this call must be _Signed_ by the stash, not the controller.",
" The dispatch origin for this call must be _Signed_ by the stash, not the controller and",
" it can be only called when [`EraElectionStatus`] is `Closed`.",
"",
" Emits `Bonded`.",
"",
@@ -2237,6 +2269,7 @@
" to be called first to remove some of the chunks (if possible).",
"",
" The dispatch origin for this call must be _Signed_ by the controller, not the stash.",
" And, it can be only called when [`EraElectionStatus`] is `Closed`.",
"",
" Emits `Unbonded`.",
"",
@@ -2263,6 +2296,7 @@
" whatever it wants.",
"",
" The dispatch origin for this call must be _Signed_ by the controller, not the stash.",
" And, it can be only called when [`EraElectionStatus`] is `Closed`.",
"",
" Emits `Withdrawn`.",
"",
@@ -2291,6 +2325,7 @@
" Effects will be felt at the beginning of the next era.",
"",
" The dispatch origin for this call must be _Signed_ by the controller, not the stash.",
" And, it can be only called when [`EraElectionStatus`] is `Closed`.",
"",
" # <weight>",
" - Independent of the arguments. Insignificant complexity.",
@@ -2310,9 +2345,11 @@
"documentation": [
" Declare the desire to nominate `targets` for the origin controller.",
"",
" Effects will be felt at the beginning of the next era.",
" Effects will be felt at the beginning of the next era. This can only be called when",
" [`EraElectionStatus`] is `Closed`.",
"",
" The dispatch origin for this call must be _Signed_ by the controller, not the stash.",
" And, it can be only called when [`EraElectionStatus`] is `Closed`.",
"",
" # <weight>",
" - The transaction's complexity is proportional to the size of `targets`,",
@@ -2330,6 +2367,7 @@
" Effects will be felt at the beginning of the next era.",
"",
" The dispatch origin for this call must be _Signed_ by the controller, not the stash.",
" And, it can be only called when [`EraElectionStatus`] is `Closed`.",
"",
" # <weight>",
" - Independent of the arguments. Insignificant complexity.",
@@ -2487,6 +2525,10 @@
}
],
"documentation": [
" **This extrinsic will be removed after `MigrationEra + HistoryDepth` has passed, giving",
" opportunity for users to claim all rewards before moving to Simple Payouts. After this",
" time, you should use `payout_stakers` instead.**",
"",
" Make one nominator's payout for one era.",
"",
" - `who` is the controller account of the nominator to pay out.",
@@ -2524,6 +2566,10 @@
}
],
"documentation": [
" **This extrinsic will be removed after `MigrationEra + HistoryDepth` has passed, giving",
" opportunity for users to claim all rewards before moving to Simple Payouts. After this",
" time, you should use `payout_stakers` instead.**",
"",
" Make one validator's payout for one era.",
"",
" - `who` is the controller account of the validator to pay out.",
@@ -2541,6 +2587,36 @@
" # </weight>"
]
},
{
"name": "payout_stakers",
"args": [
{
"name": "validator_stash",
"type": "AccountId"
},
{
"name": "era",
"type": "EraIndex"
}
],
"documentation": [
" Pay out all the stakers behind a single validator for a single era.",
"",
" - `validator_stash` is the stash account of the validator. Their nominators, up to",
" `T::MaxNominatorRewardedPerValidator`, will also receive their rewards.",
" - `era` may be any era between `[current_era - history_depth; current_era]`.",
"",
" The origin of this call must be _Signed_. Any account can call this function, even if",
" it is not one of the stakers.",
"",
" This can only be called when [`EraElectionStatus`] is `Closed`.",
"",
" # <weight>",
" - Time complexity: at most O(MaxNominatorRewardedPerValidator).",
" - Contains a limited number of reads and writes.",
" # </weight>"
]
},
{
"name": "rebond",
"args": [
@@ -2552,6 +2628,9 @@
"documentation": [
" Rebond a portion of the stash scheduled to be unlocked.",
"",
" The dispatch origin must be signed by the controller, and it can be only called when",
" [`EraElectionStatus`] is `Closed`.",
"",
" # <weight>",
" - Time complexity: O(1). Bounded by `MAX_UNLOCKING_CHUNKS`.",
" - Storage changes: Can't increase storage, only decrease it.",
@@ -2724,7 +2803,7 @@
"Balance"
],
"documentation": [
" The staker has been rewarded by this amount. AccountId is controller account."
" The staker has been rewarded by this amount. `AccountId` is the stash account."
]
},
{
@@ -2894,6 +2973,12 @@
" Items are not sorted and unique."
]
},
{
"name": "AlreadyClaimed",
"documentation": [
" Rewards for this era have already been claimed for this validator."
]
},
{
"name": "PhragmenEarlySubmission",
"documentation": [
@@ -2968,6 +3053,12 @@
"documentation": [
" The claimed score does not match with the one computed from the data."
]
},
{
"name": "CallNotAllowed",
"documentation": [
" The call is not allowed at the given time due to restrictions of election period."
]
}
]
},
@@ -9549,8 +9640,7 @@
"CheckNonce",
"CheckWeight",
"ChargeTransactionPayment",
"CheckBlockGasLimit",
"LockStakingStatus"
"CheckBlockGasLimit"
]
}
}
File diff suppressed because one or more lines are too long
+4 -1
View File
@@ -40,7 +40,7 @@ import { ApiId, KeyValueOption, RuntimeVersion, RuntimeVersionApi, StorageChange
import { AccountInfo, ChainProperties, ChainType, DigestOf, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, EventRecordTo76, Health, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, Phase, RefCount } from '@polkadot/types/interfaces/system';
import { OpenTip, OpenTipFinder, OpenTipTip, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
import { Multiplier } from '@polkadot/types/interfaces/txpayment';
import { Multisig, Timepoint } from '@polkadot/types/interfaces/utility';
import { CallHash, Multisig, Timepoint } from '@polkadot/types/interfaces/utility';
import { VestingInfo } from '@polkadot/types/interfaces/vesting';
declare module '@polkadot/types/types/registry' {
@@ -994,6 +994,9 @@ declare module '@polkadot/types/types/registry' {
Multiplier: Multiplier;
'Option<Multiplier>': Option<Multiplier>;
'Vec<Multiplier>': Vec<Multiplier>;
CallHash: CallHash;
'Option<CallHash>': Option<CallHash>;
'Vec<CallHash>': Vec<CallHash>;
Multisig: Multisig;
'Option<Multisig>': Option<Multisig>;
'Vec<Multisig>': Vec<Multisig>;
@@ -10,6 +10,7 @@ import { Definitions } from '../../types';
export default {
rpc: {},
types: {
CallHash: 'H256',
Multisig: {
when: 'Timepoint',
deposit: 'Balance',
@@ -3,7 +3,10 @@
import { Struct, Vec } from '@polkadot/types/codec';
import { u32 } from '@polkadot/types/primitive';
import { AccountId, Balance, BlockNumber } from '@polkadot/types/interfaces/runtime';
import { AccountId, Balance, BlockNumber, H256 } from '@polkadot/types/interfaces/runtime';
/** @name CallHash */
export interface CallHash extends H256 {}
/** @name Multisig */
export interface Multisig extends Struct {