Align static metadata with latest Substrate (#3717)
This commit is contained in:
@@ -199,10 +199,42 @@ declare module '@polkadot/api/types/consts' {
|
||||
* to submit the worker's solution.
|
||||
**/
|
||||
offchainRepeat: BlockNumber & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Base deposit for a signed solution.
|
||||
**/
|
||||
signedDepositBase: BalanceOf & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Per-byte deposit for a signed solution.
|
||||
**/
|
||||
signedDepositByte: BalanceOf & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Per-weight deposit for a signed solution.
|
||||
**/
|
||||
signedDepositWeight: BalanceOf & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum number of signed submissions that can be queued.
|
||||
*
|
||||
* It is best to avoid adjusting this during an election, as it impacts downstream data
|
||||
* structures. In particular, `SignedSubmissionIndices<T>` is bounded on this value. If you
|
||||
* update this value during an election, you _must_ ensure that
|
||||
* `SignedSubmissionIndices.len()` is less than or equal to the new value. Otherwise,
|
||||
* attempts to submit new solutions may cause a runtime panic.
|
||||
**/
|
||||
signedMaxSubmissions: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum weight of a signed solution.
|
||||
*
|
||||
* This should probably be similar to [`Config::MinerMaxWeight`].
|
||||
**/
|
||||
signedMaxWeight: Weight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Duration of the signed phase.
|
||||
**/
|
||||
signedPhase: BlockNumber & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Base reward for a signed solution
|
||||
**/
|
||||
signedRewardBase: BalanceOf & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum amount of improvement to the solution score that defines a solution as
|
||||
* "better" (in any phase).
|
||||
|
||||
@@ -555,6 +555,14 @@ declare module '@polkadot/api/types/errors' {
|
||||
* The call is not allowed at this point.
|
||||
**/
|
||||
CallNotAllowed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* `Self::insert_submission` returned an invalid index.
|
||||
**/
|
||||
InvalidSubmissionIndex: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Snapshot metadata should exist but didn't.
|
||||
**/
|
||||
MissingSnapshotMetadata: AugmentedError<ApiType>;
|
||||
/**
|
||||
* OCW submitted solution for wrong round
|
||||
**/
|
||||
@@ -571,6 +579,22 @@ declare module '@polkadot/api/types/errors' {
|
||||
* Wrong number of winners presented.
|
||||
**/
|
||||
PreDispatchWrongWinnerCount: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The origin failed to pay the deposit.
|
||||
**/
|
||||
SignedCannotPayDeposit: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Witness data to dispatchable is invalid.
|
||||
**/
|
||||
SignedInvalidWitness: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The queue was full, and the solution was not better than any of the existing ones.
|
||||
**/
|
||||
SignedQueueFull: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The signed submission consumes too much weight
|
||||
**/
|
||||
SignedTooMuchWeight: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
|
||||
@@ -391,7 +391,7 @@ declare module '@polkadot/api/types/events' {
|
||||
/**
|
||||
* An account has been rewarded for their signed submission being finalized.
|
||||
**/
|
||||
Rewarded: AugmentedEvent<ApiType, [AccountId]>;
|
||||
Rewarded: AugmentedEvent<ApiType, [AccountId, Balance]>;
|
||||
/**
|
||||
* The signed phase of the given round has started.
|
||||
**/
|
||||
@@ -399,14 +399,16 @@ declare module '@polkadot/api/types/events' {
|
||||
/**
|
||||
* An account has been slashed for submitting an invalid signed submission.
|
||||
**/
|
||||
Slashed: AugmentedEvent<ApiType, [AccountId]>;
|
||||
Slashed: AugmentedEvent<ApiType, [AccountId, Balance]>;
|
||||
/**
|
||||
* A solution was stored with the given compute.
|
||||
*
|
||||
* If the solution is signed, this means that it hasn't yet been processed. If the
|
||||
* solution is unsigned, this means that it has also been processed.
|
||||
*
|
||||
* The `bool` is `true` when a previous solution was ejected to make room for this one.
|
||||
**/
|
||||
SolutionStored: AugmentedEvent<ApiType, [ElectionCompute]>;
|
||||
SolutionStored: AugmentedEvent<ApiType, [ElectionCompute, bool]>;
|
||||
/**
|
||||
* The unsigned phase of the given round has started.
|
||||
**/
|
||||
|
||||
@@ -20,11 +20,11 @@ import type { CallIndex, LotteryConfig } from '@polkadot/types/interfaces/lotter
|
||||
import type { Kind, OffenceDetails, OpaqueTimeSlot, ReportIdOf } from '@polkadot/types/interfaces/offences';
|
||||
import type { ProxyAnnouncement, ProxyDefinition } from '@polkadot/types/interfaces/proxy';
|
||||
import type { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
|
||||
import type { AccountId, AccountIndex, AssetId, Balance, BalanceOf, BlockNumber, Hash, KeyTypeId, Moment, OpaqueCall, Perbill, Releases, Slot, TransactionInfo, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||
import type { AccountId, AccountIndex, AssetId, Balance, BalanceOf, BlockNumber, Hash, KeyTypeId, Moment, OpaqueCall, Perbill, Percent, Releases, Slot, TransactionInfo, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||
import type { Scheduled, TaskAddress } from '@polkadot/types/interfaces/scheduler';
|
||||
import type { Keys, SessionIndex } from '@polkadot/types/interfaces/session';
|
||||
import type { Bid, BidKind, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
|
||||
import type { ActiveEraInfo, ElectionPhase, ElectionScore, EraIndex, EraRewardPoints, Exposure, Forcing, Nominations, ReadySolution, RewardDestination, RoundSnapshot, SeatHolder, SlashingSpans, SolutionOrSnapshotSize, SpanIndex, SpanRecord, StakingLedger, UnappliedSlash, ValidatorPrefs, Voter } from '@polkadot/types/interfaces/staking';
|
||||
import type { ActiveEraInfo, ElectionPhase, ElectionScore, EraIndex, EraRewardPoints, Exposure, Forcing, Nominations, ReadySolution, RewardDestination, RoundSnapshot, SeatHolder, SignedSubmissionOf, SlashingSpans, SolutionOrSnapshotSize, SpanIndex, SpanRecord, StakingLedger, SubmissionIndicesOf, UnappliedSlash, ValidatorPrefs, Voter } from '@polkadot/types/interfaces/staking';
|
||||
import type { AccountInfo, ConsumedWeight, DigestOf, EventIndex, EventRecord, LastRuntimeUpgradeInfo, Phase } from '@polkadot/types/interfaces/system';
|
||||
import type { Bounty, BountyIndex, OpenTip, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
|
||||
import type { Multiplier } from '@polkadot/types/interfaces/txpayment';
|
||||
@@ -403,6 +403,37 @@ declare module '@polkadot/api/types/storage' {
|
||||
* This is merely incremented once per every time that an upstream `elect` is called.
|
||||
**/
|
||||
round: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* A sorted, bounded set of `(score, index)`, where each `index` points to a value in
|
||||
* `SignedSubmissions`.
|
||||
*
|
||||
* We never need to process more than a single signed submission at a time. Signed submissions
|
||||
* can be quite large, so we're willing to pay the cost of multiple database accesses to access
|
||||
* them one at a time instead of reading and decoding all of them at once.
|
||||
**/
|
||||
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<SubmissionIndicesOf>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The next index to be assigned to an incoming signed submission.
|
||||
*
|
||||
* Every accepted submission is assigned a unique index; that index is bound to that particular
|
||||
* submission for the duration of the election. On election finalization, the next index is
|
||||
* reset to 0.
|
||||
*
|
||||
* We can't just use `SignedSubmissionIndices.len()`, because that's a bounded set; past its
|
||||
* capacity, it will simply saturate. We can't just iterate over `SignedSubmissionsMap`,
|
||||
* because iteration is slow. Instead, we store the value here.
|
||||
**/
|
||||
signedSubmissionNextIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Unchecked, signed solutions.
|
||||
*
|
||||
* Together with `SubmissionIndices`, this stores a bounded set of `SignedSubmissions` while
|
||||
* allowing us to keep only a single one in memory at a time.
|
||||
*
|
||||
* Twox note: the key of the map is an auto-incrementing index which users cannot inspect or
|
||||
* affect; we shouldn't need a cryptographically secure hasher.
|
||||
**/
|
||||
signedSubmissionsMap: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<SignedSubmissionOf>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Snapshot data of the round.
|
||||
*
|
||||
@@ -883,6 +914,12 @@ declare module '@polkadot/api/types/storage' {
|
||||
* canceled by extraordinary circumstances (e.g. governance).
|
||||
**/
|
||||
canceledSlashPayout: AugmentedQuery<ApiType, () => Observable<BalanceOf>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The threshold for when users can start calling `chill_other` for other validators / nominators.
|
||||
* The threshold is compared to the actual number of validators / nominators (`CountFor*`) in
|
||||
* the system compared to the configured max (`Max*Count`).
|
||||
**/
|
||||
chillThreshold: AugmentedQuery<ApiType, () => Observable<Option<Percent>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* A tracker to keep count of the number of items in the `Nominators` map.
|
||||
**/
|
||||
|
||||
@@ -1265,6 +1265,22 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* This check can be turned off by setting the value to `None`.
|
||||
**/
|
||||
setMinimumUntrustedScore: AugmentedSubmittable<(maybeNextScore: Option<ElectionScore> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<ElectionScore>]>;
|
||||
/**
|
||||
* Submit a solution for the signed phase.
|
||||
*
|
||||
* The dispatch origin fo this call must be __signed__.
|
||||
*
|
||||
* The solution is potentially queued, based on the claimed score and processed at the end
|
||||
* of the signed phase.
|
||||
*
|
||||
* A deposit is reserved and recorded for the solution. Based on the outcome, the solution
|
||||
* might be rewarded, slashed, or get all or a part of the deposit back.
|
||||
*
|
||||
* # <weight>
|
||||
* Queue size must be provided as witness data.
|
||||
* # </weight>
|
||||
**/
|
||||
submit: AugmentedSubmittable<(solution: RawSolution | { compact?: any; score?: any; round?: any } | string | Uint8Array, numSignedSubmissions: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [RawSolution, u32]>;
|
||||
/**
|
||||
* Submit a solution for the unsigned phase.
|
||||
*
|
||||
@@ -2997,15 +3013,24 @@ declare module '@polkadot/api/types/submittable' {
|
||||
**/
|
||||
chill: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||
/**
|
||||
* Declare a `controller` as having no desire to either validator or nominate.
|
||||
* Declare a `controller` to stop participating as either a validator or nominator.
|
||||
*
|
||||
* Effects will be felt at the beginning of the next era.
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_, but can be called by anyone.
|
||||
*
|
||||
* If the caller is the same as the controller being targeted, then no further checks
|
||||
* are enforced. However, this call can also be made by an third party user who witnesses
|
||||
* that this controller does not satisfy the minimum bond requirements to be in their role.
|
||||
* If the caller is the same as the controller being targeted, then no further checks are
|
||||
* enforced, and this function behaves just like `chill`.
|
||||
*
|
||||
* If the caller is different than the controller being targeted, the following conditions
|
||||
* must be met:
|
||||
* * A `ChillThreshold` must be set and checked which defines how close to the max
|
||||
* nominators or validators we must reach before users can start chilling one-another.
|
||||
* * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine
|
||||
* how close we are to the threshold.
|
||||
* * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines
|
||||
* if this is a person that should be chilled because they have not met the threshold
|
||||
* bond required.
|
||||
*
|
||||
* This can be helpful if bond requirements are updated, and we need to remove old users
|
||||
* who do not satisfy these requirements.
|
||||
@@ -3276,6 +3301,22 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
setPayee: AugmentedSubmittable<(payee: RewardDestination | { Staked: any } | { Stash: any } | { Controller: any } | { Account: any } | { None: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [RewardDestination]>;
|
||||
/**
|
||||
* Update the various staking limits this pallet.
|
||||
*
|
||||
* * `min_nominator_bond`: The minimum active bond needed to be a nominator.
|
||||
* * `min_validator_bond`: The minimum active bond needed to be a validator.
|
||||
* * `max_nominator_count`: The max number of users who can be a nominator at once.
|
||||
* When set to `None`, no limit is enforced.
|
||||
* * `max_validator_count`: The max number of users who can be a validator at once.
|
||||
* When set to `None`, no limit is enforced.
|
||||
*
|
||||
* Origin must be Root to call this function.
|
||||
*
|
||||
* NOTE: Existing nominators and validators will not be affected by this update.
|
||||
* to kick people under the new limits, `chill_other` should be called.
|
||||
**/
|
||||
setStakingLimits: AugmentedSubmittable<(minNominatorBond: BalanceOf | AnyNumber | Uint8Array, minValidatorBond: BalanceOf | AnyNumber | Uint8Array, maxNominatorCount: Option<u32> | null | object | string | Uint8Array, maxValidatorCount: Option<u32> | null | object | string | Uint8Array, threshold: Option<Percent> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [BalanceOf, BalanceOf, Option<u32>, Option<u32>, Option<Percent>]>;
|
||||
/**
|
||||
* Sets the ideal number of validators.
|
||||
*
|
||||
@@ -3325,22 +3366,6 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* </weight>
|
||||
**/
|
||||
unbond: AugmentedSubmittable<(value: Compact<BalanceOf> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<BalanceOf>]>;
|
||||
/**
|
||||
* Update the various staking limits this pallet.
|
||||
*
|
||||
* * `min_nominator_bond`: The minimum active bond needed to be a nominator.
|
||||
* * `min_validator_bond`: The minimum active bond needed to be a validator.
|
||||
* * `max_nominator_count`: The max number of users who can be a nominator at once.
|
||||
* When set to `None`, no limit is enforced.
|
||||
* * `max_validator_count`: The max number of users who can be a validator at once.
|
||||
* When set to `None`, no limit is enforced.
|
||||
*
|
||||
* Origin must be Root to call this function.
|
||||
*
|
||||
* NOTE: Existing nominators and validators will not be affected by this update.
|
||||
* to kick people under the new limits, `chill_other` should be called.
|
||||
**/
|
||||
updateStakingLimits: AugmentedSubmittable<(minNominatorBond: BalanceOf | AnyNumber | Uint8Array, minValidatorBond: BalanceOf | AnyNumber | Uint8Array, maxNominatorCount: Option<u32> | null | object | string | Uint8Array, maxValidatorCount: Option<u32> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [BalanceOf, BalanceOf, Option<u32>, Option<u32>]>;
|
||||
/**
|
||||
* Declare the desire to validate for the origin controller.
|
||||
*
|
||||
@@ -4138,7 +4163,7 @@ declare module '@polkadot/api/types/submittable' {
|
||||
*
|
||||
* Weight: `O(n + m)` where:
|
||||
* - `n = witness.instances`
|
||||
* - `m = witness.instance_metdadatas`
|
||||
* - `m = witness.instance_metadatas`
|
||||
* - `a = witness.attributes`
|
||||
**/
|
||||
destroy: AugmentedSubmittable<(clazz: Compact<ClassId> | AnyNumber | Uint8Array, witness: DestroyWitness | { instances?: any; instanceMetadatas?: any; attributes?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<ClassId>, DestroyWitness]>;
|
||||
|
||||
@@ -499,7 +499,7 @@
|
||||
{
|
||||
"name": "Version",
|
||||
"type": "RuntimeVersion",
|
||||
"value": "0x106e6f6465387375627374726174652d6e6f64650a0000000b0100000000000034df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1502000000f78b278be53f454c02000000ed99c5acb25eedf502000000cbca25e39f14238702000000687ad44ad37f03c201000000bc9d89904f5b923f0100000068b66ba122c93fa70100000037c8bb1350a9a2a80100000091d5df18b0d2cf5801000000ab3c0572291feb8b0100000002000000",
|
||||
"value": "0x106e6f6465387375627374726174652d6e6f64650a0000000b0100000000000034df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000ed99c5acb25eedf502000000cbca25e39f14238702000000687ad44ad37f03c201000000bc9d89904f5b923f0100000068b66ba122c93fa70100000037c8bb1350a9a2a80100000091d5df18b0d2cf5801000000ab3c0572291feb8b0100000002000000",
|
||||
"documentation": [
|
||||
" Get the chain's current version."
|
||||
]
|
||||
@@ -1954,6 +1954,63 @@
|
||||
" Only exists when [`Snapshot`] is present."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SignedSubmissionNextIndex",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"plain": "u32"
|
||||
},
|
||||
"fallback": "0x00000000",
|
||||
"documentation": [
|
||||
" The next index to be assigned to an incoming signed submission.",
|
||||
"",
|
||||
" Every accepted submission is assigned a unique index; that index is bound to that particular",
|
||||
" submission for the duration of the election. On election finalization, the next index is",
|
||||
" reset to 0.",
|
||||
"",
|
||||
" We can't just use `SignedSubmissionIndices.len()`, because that's a bounded set; past its",
|
||||
" capacity, it will simply saturate. We can't just iterate over `SignedSubmissionsMap`,",
|
||||
" because iteration is slow. Instead, we store the value here."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SignedSubmissionIndices",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"plain": "SubmissionIndicesOf"
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"documentation": [
|
||||
" A sorted, bounded set of `(score, index)`, where each `index` points to a value in",
|
||||
" `SignedSubmissions`.",
|
||||
"",
|
||||
" We never need to process more than a single signed submission at a time. Signed submissions",
|
||||
" can be quite large, so we're willing to pay the cost of multiple database accesses to access",
|
||||
" them one at a time instead of reading and decoding all of them at once."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SignedSubmissionsMap",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"map": {
|
||||
"hasher": "Twox64Concat",
|
||||
"key": "u32",
|
||||
"value": "SignedSubmissionOf",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
"fallback": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000",
|
||||
"documentation": [
|
||||
" Unchecked, signed solutions.",
|
||||
"",
|
||||
" Together with `SubmissionIndices`, this stores a bounded set of `SignedSubmissions` while",
|
||||
" allowing us to keep only a single one in memory at a time.",
|
||||
"",
|
||||
" Twox note: the key of the map is an auto-incrementing index which users cannot inspect or",
|
||||
" affect; we shouldn't need a cryptographically secure hasher."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MinimumUntrustedScore",
|
||||
"modifier": "Optional",
|
||||
@@ -2034,19 +2091,50 @@
|
||||
" feasibility check itself can in principle cause the election process to fail (due to",
|
||||
" memory/weight constrains)."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "submit",
|
||||
"args": [
|
||||
{
|
||||
"name": "solution",
|
||||
"type": "RawSolution"
|
||||
},
|
||||
{
|
||||
"name": "num_signed_submissions",
|
||||
"type": "u32"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
" Submit a solution for the signed phase.",
|
||||
"",
|
||||
" The dispatch origin fo this call must be __signed__.",
|
||||
"",
|
||||
" The solution is potentially queued, based on the claimed score and processed at the end",
|
||||
" of the signed phase.",
|
||||
"",
|
||||
" A deposit is reserved and recorded for the solution. Based on the outcome, the solution",
|
||||
" might be rewarded, slashed, or get all or a part of the deposit back.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" Queue size must be provided as witness data.",
|
||||
" # </weight>"
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "SolutionStored",
|
||||
"args": [
|
||||
"ElectionCompute"
|
||||
"ElectionCompute",
|
||||
"bool"
|
||||
],
|
||||
"documentation": [
|
||||
" A solution was stored with the given compute.",
|
||||
"",
|
||||
" If the solution is signed, this means that it hasn't yet been processed. If the",
|
||||
" solution is unsigned, this means that it has also been processed."
|
||||
" solution is unsigned, this means that it has also been processed.",
|
||||
"",
|
||||
" The `bool` is `true` when a previous solution was ejected to make room for this one."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -2062,7 +2150,8 @@
|
||||
{
|
||||
"name": "Rewarded",
|
||||
"args": [
|
||||
"AccountId"
|
||||
"AccountId",
|
||||
"Balance"
|
||||
],
|
||||
"documentation": [
|
||||
" An account has been rewarded for their signed submission being finalized."
|
||||
@@ -2071,7 +2160,8 @@
|
||||
{
|
||||
"name": "Slashed",
|
||||
"args": [
|
||||
"AccountId"
|
||||
"AccountId",
|
||||
"Balance"
|
||||
],
|
||||
"documentation": [
|
||||
" An account has been slashed for submitting an invalid signed submission."
|
||||
@@ -2132,6 +2222,62 @@
|
||||
" For example, if it is 5, that means that at least 5 blocks will elapse between attempts",
|
||||
" to submit the worker's solution."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SignedMaxSubmissions",
|
||||
"type": "u32",
|
||||
"value": "0x0a000000",
|
||||
"documentation": [
|
||||
" Maximum number of signed submissions that can be queued.",
|
||||
"",
|
||||
" It is best to avoid adjusting this during an election, as it impacts downstream data",
|
||||
" structures. In particular, `SignedSubmissionIndices<T>` is bounded on this value. If you",
|
||||
" update this value during an election, you _must_ ensure that",
|
||||
" `SignedSubmissionIndices.len()` is less than or equal to the new value. Otherwise,",
|
||||
" attempts to submit new solutions may cause a runtime panic."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SignedMaxWeight",
|
||||
"type": "Weight",
|
||||
"value": "0xc07c907c2d010000",
|
||||
"documentation": [
|
||||
" Maximum weight of a signed solution.",
|
||||
"",
|
||||
" This should probably be similar to [`Config::MinerMaxWeight`]."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SignedRewardBase",
|
||||
"type": "BalanceOf",
|
||||
"value": "0x00407a10f35a00000000000000000000",
|
||||
"documentation": [
|
||||
" Base reward for a signed solution"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SignedDepositBase",
|
||||
"type": "BalanceOf",
|
||||
"value": "0x00407a10f35a00000000000000000000",
|
||||
"documentation": [
|
||||
" Base deposit for a signed solution."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SignedDepositByte",
|
||||
"type": "BalanceOf",
|
||||
"value": "0x0010a5d4e80000000000000000000000",
|
||||
"documentation": [
|
||||
" Per-byte deposit for a signed solution."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SignedDepositWeight",
|
||||
"type": "BalanceOf",
|
||||
"value": "0x00000000000000000000000000000000",
|
||||
"documentation": [
|
||||
" Per-weight deposit for a signed solution."
|
||||
]
|
||||
}
|
||||
],
|
||||
"errors": [
|
||||
@@ -2153,12 +2299,48 @@
|
||||
" Submission was too weak, score-wise."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SignedQueueFull",
|
||||
"documentation": [
|
||||
" The queue was full, and the solution was not better than any of the existing ones."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SignedCannotPayDeposit",
|
||||
"documentation": [
|
||||
" The origin failed to pay the deposit."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SignedInvalidWitness",
|
||||
"documentation": [
|
||||
" Witness data to dispatchable is invalid."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SignedTooMuchWeight",
|
||||
"documentation": [
|
||||
" The signed submission consumes too much weight"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "OcwCallWrongEra",
|
||||
"documentation": [
|
||||
" OCW submitted solution for wrong round"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MissingSnapshotMetadata",
|
||||
"documentation": [
|
||||
" Snapshot metadata should exist but didn't."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "InvalidSubmissionIndex",
|
||||
"documentation": [
|
||||
" `Self::insert_submission` returned an invalid index."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CallNotAllowed",
|
||||
"documentation": [
|
||||
@@ -2719,6 +2901,19 @@
|
||||
"",
|
||||
" This is set to v6.0.0 for new networks."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ChillThreshold",
|
||||
"modifier": "Optional",
|
||||
"type": {
|
||||
"plain": "Percent"
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"documentation": [
|
||||
" The threshold for when users can start calling `chill_other` for other validators / nominators.",
|
||||
" The threshold is compared to the actual number of validators / nominators (`CountFor*`) in",
|
||||
" the system compared to the configured max (`Max*Count`)."
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -3368,7 +3563,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "update_staking_limits",
|
||||
"name": "set_staking_limits",
|
||||
"args": [
|
||||
{
|
||||
"name": "min_nominator_bond",
|
||||
@@ -3385,6 +3580,10 @@
|
||||
{
|
||||
"name": "max_validator_count",
|
||||
"type": "Option<u32>"
|
||||
},
|
||||
{
|
||||
"name": "threshold",
|
||||
"type": "Option<Percent>"
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
@@ -3412,15 +3611,24 @@
|
||||
}
|
||||
],
|
||||
"documentation": [
|
||||
" Declare a `controller` as having no desire to either validator or nominate.",
|
||||
" Declare a `controller` to stop participating as either a validator or nominator.",
|
||||
"",
|
||||
" Effects will be felt at the beginning of the next era.",
|
||||
"",
|
||||
" The dispatch origin for this call must be _Signed_, but can be called by anyone.",
|
||||
"",
|
||||
" If the caller is the same as the controller being targeted, then no further checks",
|
||||
" are enforced. However, this call can also be made by an third party user who witnesses",
|
||||
" that this controller does not satisfy the minimum bond requirements to be in their role.",
|
||||
" If the caller is the same as the controller being targeted, then no further checks are",
|
||||
" enforced, and this function behaves just like `chill`.",
|
||||
"",
|
||||
" If the caller is different than the controller being targeted, the following conditions",
|
||||
" must be met:",
|
||||
" * A `ChillThreshold` must be set and checked which defines how close to the max",
|
||||
" nominators or validators we must reach before users can start chilling one-another.",
|
||||
" * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine",
|
||||
" how close we are to the threshold.",
|
||||
" * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines",
|
||||
" if this is a person that should be chilled because they have not met the threshold",
|
||||
" bond required.",
|
||||
"",
|
||||
" This can be helpful if bond requirements are updated, and we need to remove old users",
|
||||
" who do not satisfy these requirements.",
|
||||
@@ -7554,7 +7762,7 @@
|
||||
{
|
||||
"name": "Schedule",
|
||||
"type": "Schedule",
|
||||
"value": "0x0400000000020000000100008000000010000000001000000001000020000000200000000040000000000200020000008e060000e2fc0100cd0f030009170000861d0000030c00001f1800005629000082000000b059010055810200c00b000029070000590800003b060000b8160000a61a0000600700000de8b607b10600007d060000e6090000dc070000d5050000d70500005b06000043090000390900001c0900004d0900001d09000030090000180900004109000038090000680900007d080000f80800008e08000003220000371e0000fd210000e71d0000a6080000ab080000d5080000db090000d8090000190a00001e0b00000c09000052f72400000000006ee52400000000009c212400000000003039500000000000702a240000000000644f240000000000ce3a240000000000dc54240000000000f0182400000000001e31240000000000b0c14700000000009a12120000000000c0406d0000000000f4000000000000007854420000000000e302000000000000f03a7d2000000000672000000000000040a9e729000000002c1e000000000000650f000000000000ac13aa09000000006c835b0000000000c229870000000000dad6c907000000009409000000000000c0681300000000007c0b1900000000000210b20900000000b502000000000000fee1300800000000c274080200000000db050000000000006c548a0a00000000aab1da0f00000000f50e000000000000608b390800000000500200000000000002030000000000008e63f022000000007e2100000000000067020000000000002c030000000000002909000000000000a41f230000000000c3120000000000007ca6230000000000020d00000000000000bd1f00000000001506000000000000a6a81f0000000000fc05000000000000",
|
||||
"value": "0x0400000000020000000100008000000010000000001000000001000020000000200000000040000000000200020000008e0f0000b04602009a8c0300a9720000767600005e380000ea5e00000753000097000000579e030088130500b60000007a170000c11100005721000099370000483a0000d0110000d8d12c08bc4300005c430000bb2e0000a942000000260000b72300009c370000ad540000de540000ca5400000354000018550000e553000011550000c053000007540000da540000a0530000e85300008d5400004a690000bd680000a56a000096670000b053000013540000055400006a5500009255000060550000f455000033550000cae32900000000007a332a00000000004041290000000000a6fb5d000000000060c02a0000000000e6d6290000000000065329000000000062002a0000000000d425290000000000b0522a00000000005cb3540000000000b41c1600000000008057640000000000000100000000000008f6380000000000710200000000000078d68a210000000098d6de2a000000007c75640900000000466d6f000000000070baac0000000000ec73de07000000007406000000000000922c190000000000fc9f1d00000000008618ee0900000000450200000000000082dc6108000000003e573102000000002704000000000000cc94430b000000009406e1100000000096fa930800000000dc010000000000009c020000000000001843c12400000000f001000000000000b80200000000000094070000000000008a9b2a0000000000561200000000000046432b0000000000ab0c000000000000c08c260000000000b005000000000000acd2260000000000b005000000000000",
|
||||
"documentation": [
|
||||
" Cost schedule and limits."
|
||||
]
|
||||
@@ -7640,7 +7848,7 @@
|
||||
{
|
||||
"name": "DeletionQueueDepth",
|
||||
"type": "u32",
|
||||
"value": "0x85040000",
|
||||
"value": "0x1a040000",
|
||||
"documentation": [
|
||||
" The maximum number of tries that can be queued for deletion."
|
||||
]
|
||||
@@ -14875,7 +15083,7 @@
|
||||
"",
|
||||
" Weight: `O(n + m)` where:",
|
||||
" - `n = witness.instances`",
|
||||
" - `m = witness.instance_metdadatas`",
|
||||
" - `m = witness.instance_metadatas`",
|
||||
" - `a = witness.attributes`"
|
||||
]
|
||||
},
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -48,7 +48,7 @@ import type { SiField, SiLookupTypeId, SiPath, SiType, SiTypeDef, SiTypeDefArray
|
||||
import type { Period, Priority, SchedulePeriod, SchedulePriority, Scheduled, ScheduledTo254, TaskAddress } from '@polkadot/types/interfaces/scheduler';
|
||||
import type { BeefyKey, FullIdentification, IdentificationTuple, Keys, MembershipProof, SessionIndex, SessionKeys1, SessionKeys10, SessionKeys10B, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6, SessionKeys6B, SessionKeys7, SessionKeys7B, SessionKeys8, SessionKeys8B, SessionKeys9, SessionKeys9B, ValidatorCount } from '@polkadot/types/interfaces/session';
|
||||
import type { Bid, BidKind, SocietyJudgement, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
|
||||
import type { ActiveEraInfo, CompactAssignments, CompactAssignmentsTo257, CompactAssignmentsTo265, CompactAssignmentsWith16, CompactAssignmentsWith24, CompactScore, CompactScoreCompact, ElectionCompute, ElectionPhase, ElectionResult, ElectionScore, ElectionSize, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, ExtendedBalance, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, NominatorIndexCompact, OffchainAccuracy, OffchainAccuracyCompact, PhragmenScore, Points, RawSolution, RawSolutionTo265, RawSolutionWith16, RawSolutionWith24, ReadySolution, RewardDestination, RewardPoint, RoundSnapshot, SeatHolder, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SolutionOrSnapshotSize, SolutionSupport, SolutionSupports, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorIndexCompact, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196, ValidatorPrefsWithBlocked, ValidatorPrefsWithCommission, VoteWeight, Voter } from '@polkadot/types/interfaces/staking';
|
||||
import type { ActiveEraInfo, CompactAssignments, CompactAssignmentsTo257, CompactAssignmentsTo265, CompactAssignmentsWith16, CompactAssignmentsWith24, CompactScore, CompactScoreCompact, ElectionCompute, ElectionPhase, ElectionResult, ElectionScore, ElectionSize, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, ExtendedBalance, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, NominatorIndexCompact, OffchainAccuracy, OffchainAccuracyCompact, PhragmenScore, Points, RawSolution, RawSolutionTo265, RawSolutionWith16, RawSolutionWith24, ReadySolution, RewardDestination, RewardPoint, RoundSnapshot, SeatHolder, SignedSubmission, SignedSubmissionOf, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SolutionOrSnapshotSize, SolutionSupport, SolutionSupports, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, SubmissionIndicesOf, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorIndexCompact, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196, ValidatorPrefsWithBlocked, ValidatorPrefsWithCommission, VoteWeight, Voter } from '@polkadot/types/interfaces/staking';
|
||||
import type { ApiId, BlockTrace, BlockTraceEvent, BlockTraceEventData, BlockTraceSpan, KeyValueOption, ReadProof, RuntimeVersion, RuntimeVersionApi, RuntimeVersionPartial, StorageChangeSet, TraceBlockResponse, TraceError } from '@polkadot/types/interfaces/state';
|
||||
import type { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
|
||||
import type { AccountInfo, AccountInfoWithDualRefCount, AccountInfoWithProviders, AccountInfoWithRefCount, AccountInfoWithRefCountU8, AccountInfoWithTripleRefCount, ApplyExtrinsicResult, ArithmeticError, BlockLength, BlockWeights, ChainProperties, ChainType, ConsumedWeight, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, DispatchOutcome, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, Health, InvalidTransaction, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, PerDispatchClassU32, PerDispatchClassWeight, PerDispatchClassWeightsPerClass, Phase, RawOrigin, RefCount, RefCountTo259, SyncState, SystemOrigin, TokenError, TransactionValidityError, UnknownTransaction, WeightPerClass } from '@polkadot/types/interfaces/system';
|
||||
@@ -842,6 +842,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<SignedBlock>': Option<SignedBlock>;
|
||||
'Option<SignedBlockWithJustification>': Option<SignedBlockWithJustification>;
|
||||
'Option<SignedBlockWithJustifications>': Option<SignedBlockWithJustifications>;
|
||||
'Option<SignedSubmission>': Option<SignedSubmission>;
|
||||
'Option<SignedSubmissionOf>': Option<SignedSubmissionOf>;
|
||||
'Option<SignerPayload>': Option<SignerPayload>;
|
||||
'Option<SigningContext>': Option<SigningContext>;
|
||||
'Option<SiLookupTypeId>': Option<SiLookupTypeId>;
|
||||
@@ -913,6 +915,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<StoredState>': Option<StoredState>;
|
||||
'Option<StrikeCount>': Option<StrikeCount>;
|
||||
'Option<SubId>': Option<SubId>;
|
||||
'Option<SubmissionIndicesOf>': Option<SubmissionIndicesOf>;
|
||||
'Option<SyncState>': Option<SyncState>;
|
||||
'Option<SystemInherentData>': Option<SystemInherentData>;
|
||||
'Option<SystemOrigin>': Option<SystemOrigin>;
|
||||
@@ -1719,6 +1722,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<SignedBlock>': Vec<SignedBlock>;
|
||||
'Vec<SignedBlockWithJustification>': Vec<SignedBlockWithJustification>;
|
||||
'Vec<SignedBlockWithJustifications>': Vec<SignedBlockWithJustifications>;
|
||||
'Vec<SignedSubmission>': Vec<SignedSubmission>;
|
||||
'Vec<SignedSubmissionOf>': Vec<SignedSubmissionOf>;
|
||||
'Vec<SignerPayload>': Vec<SignerPayload>;
|
||||
'Vec<SigningContext>': Vec<SigningContext>;
|
||||
'Vec<SiLookupTypeId>': Vec<SiLookupTypeId>;
|
||||
@@ -1790,6 +1795,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<StoredState>': Vec<StoredState>;
|
||||
'Vec<StrikeCount>': Vec<StrikeCount>;
|
||||
'Vec<SubId>': Vec<SubId>;
|
||||
'Vec<SubmissionIndicesOf>': Vec<SubmissionIndicesOf>;
|
||||
'Vec<SyncState>': Vec<SyncState>;
|
||||
'Vec<SystemInherentData>': Vec<SystemInherentData>;
|
||||
'Vec<SystemOrigin>': Vec<SystemOrigin>;
|
||||
@@ -2596,6 +2602,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
SignedBlock: SignedBlock;
|
||||
SignedBlockWithJustification: SignedBlockWithJustification;
|
||||
SignedBlockWithJustifications: SignedBlockWithJustifications;
|
||||
SignedSubmission: SignedSubmission;
|
||||
SignedSubmissionOf: SignedSubmissionOf;
|
||||
SignerPayload: SignerPayload;
|
||||
SigningContext: SigningContext;
|
||||
SiLookupTypeId: SiLookupTypeId;
|
||||
@@ -2667,6 +2675,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
StoredState: StoredState;
|
||||
StrikeCount: StrikeCount;
|
||||
SubId: SubId;
|
||||
SubmissionIndicesOf: SubmissionIndicesOf;
|
||||
SyncState: SyncState;
|
||||
SystemInherentData: SystemInherentData;
|
||||
SystemOrigin: SystemOrigin;
|
||||
|
||||
@@ -138,6 +138,12 @@ const phragmen = {
|
||||
stake: 'Balance',
|
||||
deposit: 'Balance'
|
||||
},
|
||||
SignedSubmission: {
|
||||
who: 'AccountId',
|
||||
deposit: 'Balance',
|
||||
solution: 'RawSolution'
|
||||
},
|
||||
SignedSubmissionOf: 'SignedSubmission',
|
||||
SolutionOrSnapshotSize: {
|
||||
voters: 'Compact<u32>',
|
||||
targets: 'Compact<u32>'
|
||||
@@ -147,6 +153,7 @@ const phragmen = {
|
||||
voters: 'Vec<(AccountId, ExtendedBalance)>'
|
||||
},
|
||||
SolutionSupports: 'Vec<(AccountId, SolutionSupport)>',
|
||||
SubmissionIndicesOf: 'BTreeMap<ElectionScore, u32>',
|
||||
Voter: {
|
||||
votes: 'Vec<AccountId>',
|
||||
stake: 'Balance',
|
||||
|
||||
@@ -260,6 +260,16 @@ export interface SeatHolder extends Struct {
|
||||
readonly deposit: Balance;
|
||||
}
|
||||
|
||||
/** @name SignedSubmission */
|
||||
export interface SignedSubmission extends Struct {
|
||||
readonly who: AccountId;
|
||||
readonly deposit: Balance;
|
||||
readonly solution: RawSolution;
|
||||
}
|
||||
|
||||
/** @name SignedSubmissionOf */
|
||||
export interface SignedSubmissionOf extends SignedSubmission {}
|
||||
|
||||
/** @name SlashingSpans */
|
||||
export interface SlashingSpans extends Struct {
|
||||
readonly spanIndex: SpanIndex;
|
||||
@@ -332,6 +342,9 @@ export interface StakingLedgerTo240 extends Struct {
|
||||
readonly lastReward: Option<EraIndex>;
|
||||
}
|
||||
|
||||
/** @name SubmissionIndicesOf */
|
||||
export interface SubmissionIndicesOf extends BTreeMap<ElectionScore, u32> {}
|
||||
|
||||
/** @name UnappliedSlash */
|
||||
export interface UnappliedSlash extends Struct {
|
||||
readonly validator: AccountId;
|
||||
|
||||
Reference in New Issue
Block a user