Skip to content

Commit 868a4a2

Browse files
authored
Bump metadata (#4527)
1 parent 3656480 commit 868a4a2

File tree

26 files changed

+2046
-1971
lines changed

26 files changed

+2046
-1971
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@
22

33
## master
44

5+
Upgrade priority: Low. Recommended for users with long-running scripts.
6+
7+
Contributed:
8+
9+
- Fix rpc-provider LRU memory leak (Thanks to https://github.com/gdethier)
10+
511
Changes:
612

713
- Don't warn on `Lookup*` types missing (these are resolvable)
814
- Don't clear injected `PortableRegistry` types on runtime upgrade
15+
- Update to latest Substrate, Kusama & Polkadot static metadata
916

1017

1118
## 7.6.1 Jan 30, 2022

packages/api-augment/src/kusama/consts.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,6 @@ declare module '@polkadot/api-base/types/consts' {
703703
* Number of eras that staked funds must remain bonded for.
704704
**/
705705
bondingDuration: u32 & AugmentedConst<ApiType>;
706-
maxNominations: u32 & AugmentedConst<ApiType>;
707706
/**
708707
* The maximum number of nominators rewarded for each validator.
709708
*

packages/api-augment/src/kusama/errors.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,10 @@ declare module '@polkadot/api-base/types/errors' {
503503
* The call is not allowed at this point.
504504
**/
505505
CallNotAllowed: AugmentedError<ApiType>;
506+
/**
507+
* The fallback failed
508+
**/
509+
FallbackFailed: AugmentedError<ApiType>;
506510
/**
507511
* `Self::insert_submission` returned an invalid index.
508512
**/

packages/api-augment/src/kusama/query.ts

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, W
77
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
88
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
99
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
10-
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppPublic, PolkadotPrimitivesV1AssignmentAppPublic, PolkadotPrimitivesV1CandidateCommitments, PolkadotPrimitivesV1CoreOccupied, PolkadotPrimitivesV1DisputeState, PolkadotPrimitivesV1ScrapedOnChainVotes, PolkadotPrimitivesV1UpgradeGoAhead, PolkadotPrimitivesV1UpgradeRestriction, PolkadotPrimitivesV2SessionInfo, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
10+
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppPublic, PolkadotPrimitivesV1AssignmentAppPublic, PolkadotPrimitivesV1CandidateCommitments, PolkadotPrimitivesV1CoreOccupied, PolkadotPrimitivesV1DisputeState, PolkadotPrimitivesV1ScrapedOnChainVotes, PolkadotPrimitivesV1UpgradeGoAhead, PolkadotPrimitivesV1UpgradeRestriction, PolkadotPrimitivesV2SessionInfo, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
1111
import type { Observable } from '@polkadot/types/types';
1212

1313
declare module '@polkadot/api-base/types/storage' {
@@ -185,8 +185,29 @@ declare module '@polkadot/api-base/types/storage' {
185185
};
186186
balances: {
187187
/**
188-
* The balance of an account.
188+
* The Balances pallet example of storing the balance of an account.
189189
*
190+
* # Example
191+
*
192+
* ```nocompile
193+
* impl pallet_balances::Config for Runtime {
194+
* type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>
195+
* }
196+
* ```
197+
*
198+
* You can also store the balance of an account in the `System` pallet.
199+
*
200+
* # Example
201+
*
202+
* ```nocompile
203+
* impl pallet_balances::Config for Runtime {
204+
* type AccountStore = System
205+
* }
206+
* ```
207+
*
208+
* But this comes with tradeoffs, storing account balances in the system pallet stores
209+
* `frame_system` data alongside the account data contrary to storing account balances in the
210+
* `Balances` pallet, which uses a `StorageMap` to store balances data only.
190211
* NOTE: This is only used in the case that this pallet is used to store balances.
191212
**/
192213
account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
@@ -1222,12 +1243,6 @@ declare module '@polkadot/api-base/types/storage' {
12221243
* Lookup from identity to the block number and index of the task.
12231244
**/
12241245
lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
1225-
/**
1226-
* Storage version of the pallet.
1227-
*
1228-
* New networks start with last version.
1229-
**/
1230-
storageVersion: AugmentedQuery<ApiType, () => Observable<PalletSchedulerReleases>, []> & QueryableStorageEntry<ApiType, []>;
12311246
/**
12321247
* Generic query
12331248
**/
@@ -1533,7 +1548,22 @@ declare module '@polkadot/api-base/types/storage' {
15331548
**/
15341549
minValidatorBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
15351550
/**
1536-
* The map from nominator stash key to the set of stash keys of all validators to nominate.
1551+
* The map from nominator stash key to their nomination preferences, namely the validators that
1552+
* they wish to support.
1553+
*
1554+
* Note that the keys of this storage map might become non-decodable in case the
1555+
* [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators
1556+
* are still existent in storage, their key is correct and retrievable (i.e. `contains_key`
1557+
* indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable
1558+
* nominators will effectively not-exist, until they re-submit their preferences such that it
1559+
* is within the bounds of the newly set `Config::MaxNominations`.
1560+
*
1561+
* This implies that `::iter_keys().count()` and `::iter().count()` might return different
1562+
* values for this map. Moreover, the main `::count()` is aligned with the former, namely the
1563+
* number of keys that exist.
1564+
*
1565+
* Lastly, if any of the nominators become non-decodable, they can be chilled immediately via
1566+
* [`Call::chill_other`] dispatchable by anyone.
15371567
**/
15381568
nominators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletStakingNominations>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
15391569
/**

packages/api-augment/src/kusama/tx.ts

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,13 @@ declare module '@polkadot/api-base/types/submittable' {
11981198
[key: string]: SubmittableExtrinsicFunction<ApiType>;
11991199
};
12001200
electionProviderMultiPhase: {
1201+
/**
1202+
* Trigger the governance fallback.
1203+
*
1204+
* This can only be called when [`Phase::Emergency`] is enabled, as an alternative to
1205+
* calling [`Call::set_emergency_election_result`].
1206+
**/
1207+
governanceFallback: AugmentedSubmittable<(maybeMaxVoters: Option<u32> | null | object | string | Uint8Array, maybeMaxTargets: Option<u32> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<u32>, Option<u32>]>;
12011208
/**
12021209
* Set a solution in the queue, to be handed out to the client of this pallet in the next
12031210
* call to `ElectionProvider::elect`.
@@ -3149,14 +3156,6 @@ declare module '@polkadot/api-base/types/submittable' {
31493156
* Can be called by the `T::SlashCancelOrigin`.
31503157
*
31513158
* Parameters: era and indices of the slashes for that era to kill.
3152-
*
3153-
* # <weight>
3154-
* Complexity: O(U + S)
3155-
* with U unapplied slashes weighted with U=1000
3156-
* and S is the number of slash indices to be canceled.
3157-
* - Read: Unapplied Slashes
3158-
* - Write: Unapplied Slashes
3159-
* # </weight>
31603159
**/
31613160
cancelDeferredSlash: AugmentedSubmittable<(era: u32 | AnyNumber | Uint8Array, slashIndices: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<u32>]>;
31623161
/**
@@ -3185,6 +3184,11 @@ declare module '@polkadot/api-base/types/submittable' {
31853184
*
31863185
* If the caller is different than the controller being targeted, the following conditions
31873186
* must be met:
3187+
*
3188+
* * `controller` must belong to a nominator who has become non-decodable,
3189+
*
3190+
* Or:
3191+
*
31883192
* * A `ChillThreshold` must be set and checked which defines how close to the max
31893193
* nominators or validators we must reach before users can start chilling one-another.
31903194
* * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine
@@ -3226,11 +3230,6 @@ declare module '@polkadot/api-base/types/submittable' {
32263230
* The election process starts multiple blocks before the end of the era.
32273231
* If this is called just before a new era is triggered, the election process may not
32283232
* have enough blocks to get a result.
3229-
*
3230-
* # <weight>
3231-
* - Weight: O(1)
3232-
* - Write: ForceEra
3233-
* # </weight>
32343233
**/
32353234
forceNewEraAlways: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
32363235
/**
@@ -3255,13 +3254,6 @@ declare module '@polkadot/api-base/types/submittable' {
32553254
* Force a current staker to become completely unstaked, immediately.
32563255
*
32573256
* The dispatch origin must be Root.
3258-
*
3259-
* # <weight>
3260-
* O(S) where S is the number of slashing spans to be removed
3261-
* Reads: Bonded, Slashing Spans, Account, Locks
3262-
* Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators,
3263-
* Account, Locks Writes Each: SpanSlash * S
3264-
* # </weight>
32653257
**/
32663258
forceUnstake: AugmentedSubmittable<(stash: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
32673259
/**
@@ -3297,7 +3289,7 @@ declare module '@polkadot/api-base/types/submittable' {
32973289
*
32983290
* # <weight>
32993291
* - The transaction's complexity is proportional to the size of `targets` (N)
3300-
* which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS).
3292+
* which is capped at CompactAssignments::LIMIT (T::MaxNominations).
33013293
* - Both the reads and writes follow a similar pattern.
33023294
* # </weight>
33033295
**/
@@ -3411,11 +3403,6 @@ declare module '@polkadot/api-base/types/submittable' {
34113403
* Set the validators who cannot be slashed (if any).
34123404
*
34133405
* The dispatch origin must be Root.
3414-
*
3415-
* # <weight>
3416-
* - O(V)
3417-
* - Write: Invulnerables
3418-
* # </weight>
34193406
**/
34203407
setInvulnerables: AugmentedSubmittable<(invulnerables: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>]>;
34213408
/**
@@ -3547,11 +3534,6 @@ declare module '@polkadot/api-base/types/submittable' {
35473534
remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
35483535
/**
35493536
* Make some on-chain remark and emit event.
3550-
*
3551-
* # <weight>
3552-
* - `O(b)` where b is the length of the remark.
3553-
* - 1 event.
3554-
* # </weight>
35553537
**/
35563538
remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
35573539
/**

packages/api-augment/src/polkadot/consts.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,6 @@ declare module '@polkadot/api-base/types/consts' {
575575
* Number of eras that staked funds must remain bonded for.
576576
**/
577577
bondingDuration: u32 & AugmentedConst<ApiType>;
578-
maxNominations: u32 & AugmentedConst<ApiType>;
579578
/**
580579
* The maximum number of nominators rewarded for each validator.
581580
*

packages/api-augment/src/polkadot/errors.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,10 @@ declare module '@polkadot/api-base/types/errors' {
503503
* The call is not allowed at this point.
504504
**/
505505
CallNotAllowed: AugmentedError<ApiType>;
506+
/**
507+
* The fallback failed
508+
**/
509+
FallbackFailed: AugmentedError<ApiType>;
506510
/**
507511
* `Self::insert_submission` returned an invalid index.
508512
**/

0 commit comments

Comments
 (0)