Skip to content

Commit f347a67

Browse files
authored
feat: ⏫ upgrade to Polkadot SDK v1.10.0 (#210)
* refactor: 🎨 moved runtime apis into their own file * fix: ⬆️ fix upgrade to polkadot-sdk v1.10.0 * fix: 🐛 add removed runtime api `get_worst_case_scenario_slashable_amount` * fix: 🐛 add missing generic in storage providers runtime api * chore: 🏷️ run typegen * style: 🚨 run cargo fmt * fix: 🎨 fix cargo clippy * fix: 🚑 fix mocked relay chain randomness * style: 🚨 run cargo fmt * chore: 🚨 temporary remove unused import (until v1.13.0) * fix: 🩹 update `query_earliest_file_volunteer_tick` runtime api * fix: 🚑 fix issues with merge from main * style: 🚨 run cargo fmt * chore: 🏷️ run typegen * fix: 🩹 fix merge from main
1 parent 7736ab0 commit f347a67

File tree

41 files changed

+3107
-2746
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+3107
-2746
lines changed

Cargo.lock

Lines changed: 1211 additions & 1212 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 99 additions & 99 deletions
Large diffs are not rendered by default.

api-augment/dist/interfaces/lookup.js

Lines changed: 110 additions & 116 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api-augment/dist/interfaces/lookup.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api-augment/dist/types/interfaces/augment-api-consts.d.ts

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@ import type {
1313
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
1414
declare module "@polkadot/api-base/types/consts" {
1515
interface AugmentedConsts<ApiType extends ApiTypes> {
16+
aura: {
17+
/**
18+
* The slot duration Aura should run with, expressed in milliseconds.
19+
* The effective value of this type should not change while the chain is running.
20+
*
21+
* For backwards compatibility either use [`MinimumPeriodTimesTwo`] or a const.
22+
**/
23+
slotDuration: u64 & AugmentedConst<ApiType>;
24+
/**
25+
* Generic const
26+
**/
27+
[key: string]: Codec;
28+
};
1629
balances: {
1730
/**
1831
* The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!
@@ -32,10 +45,14 @@ declare module "@polkadot/api-base/types/consts" {
3245
/**
3346
* The maximum number of locks that should exist on an account.
3447
* Not strictly enforced, but used for weight estimation.
48+
*
49+
* Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
3550
**/
3651
maxLocks: u32 & AugmentedConst<ApiType>;
3752
/**
3853
* The maximum number of named reserves that can exist on an account.
54+
*
55+
* Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
3956
**/
4057
maxReserves: u32 & AugmentedConst<ApiType>;
4158
/**
@@ -117,6 +134,14 @@ declare module "@polkadot/api-base/types/consts" {
117134
* size is slightly lower than this as defined by [`MaxMessageLenOf`].
118135
**/
119136
heapSize: u32 & AugmentedConst<ApiType>;
137+
/**
138+
* The maximum amount of weight (if any) to be used from remaining weight `on_idle` which
139+
* should be provided to the message queue for servicing enqueued items `on_idle`.
140+
* Useful for parachains to process messages at the same block they are received.
141+
*
142+
* If `None`, it will not call `ServiceQueues::service_queues` in `on_idle`.
143+
**/
144+
idleMaxServiceWeight: Option<SpWeightsWeightV2Weight> & AugmentedConst<ApiType>;
120145
/**
121146
* The maximum number of stale pages (i.e. of overweight messages) allowed before culling
122147
* can happen. Once there are more stale pages than this, then historical pages may be
@@ -125,10 +150,11 @@ declare module "@polkadot/api-base/types/consts" {
125150
maxStale: u32 & AugmentedConst<ApiType>;
126151
/**
127152
* The amount of weight (if any) which should be provided to the message queue for
128-
* servicing enqueued items.
153+
* servicing enqueued items `on_initialize`.
129154
*
130155
* This may be legitimately `None` in the case that you will call
131-
* `ServiceQueues::service_queues` manually.
156+
* `ServiceQueues::service_queues` manually or set [`Self::IdleMaxServiceWeight`] to have
157+
* it run in `on_idle`.
132158
**/
133159
serviceWeight: Option<SpWeightsWeightV2Weight> & AugmentedConst<ApiType>;
134160
/**

api-augment/dist/types/interfaces/augment-api-errors.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,10 @@ declare module "@polkadot/api-base/types/errors" {
842842
* Too many assets with different reserve locations have been attempted for transfer.
843843
**/
844844
TooManyReserves: AugmentedError<ApiType>;
845+
/**
846+
* Could not decode XCM.
847+
**/
848+
UnableToDecode: AugmentedError<ApiType>;
845849
/**
846850
* The desired destination was unreachable, generally because there is a no way of routing
847851
* to it.
@@ -851,6 +855,11 @@ declare module "@polkadot/api-base/types/errors" {
851855
* The message's weight could not be determined.
852856
**/
853857
UnweighableMessage: AugmentedError<ApiType>;
858+
/**
859+
* XCM encoded length is too large.
860+
* Returned when an XCM encoded length is larger than `MaxXcmEncodedSize`.
861+
**/
862+
XcmTooLarge: AugmentedError<ApiType>;
854863
/**
855864
* Generic error
856865
**/

api-augment/dist/types/interfaces/augment-api-query.d.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ import type {
6161
PalletXcmRemoteLockedFungibleRecord,
6262
PalletXcmVersionMigrationStage,
6363
PolkadotCorePrimitivesOutboundHrmpMessage,
64-
PolkadotPrimitivesV6AbridgedHostConfiguration,
65-
PolkadotPrimitivesV6PersistedValidationData,
66-
PolkadotPrimitivesV6UpgradeGoAhead,
67-
PolkadotPrimitivesV6UpgradeRestriction,
64+
PolkadotPrimitivesV7AbridgedHostConfiguration,
65+
PolkadotPrimitivesV7PersistedValidationData,
66+
PolkadotPrimitivesV7UpgradeGoAhead,
67+
PolkadotPrimitivesV7UpgradeRestriction,
6868
ShpTraitsTrieRemoveMutation,
6969
SpConsensusAuraSr25519AppSr25519Public,
7070
SpCoreCryptoKeyTypeId,
@@ -208,6 +208,8 @@ declare module "@polkadot/api-base/types/storage" {
208208
/**
209209
* Any liquidity locks on some account balances.
210210
* NOTE: Should only be accessed when setting, changing and freeing a lock.
211+
*
212+
* Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
211213
**/
212214
locks: AugmentedQuery<
213215
ApiType,
@@ -217,6 +219,8 @@ declare module "@polkadot/api-base/types/storage" {
217219
QueryableStorageEntry<ApiType, [AccountId32]>;
218220
/**
219221
* Named reserves on some account balances.
222+
*
223+
* Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
220224
**/
221225
reserves: AugmentedQuery<
222226
ApiType,
@@ -768,7 +772,7 @@ declare module "@polkadot/api-base/types/storage" {
768772
**/
769773
hostConfiguration: AugmentedQuery<
770774
ApiType,
771-
() => Observable<Option<PolkadotPrimitivesV6AbridgedHostConfiguration>>,
775+
() => Observable<Option<PolkadotPrimitivesV7AbridgedHostConfiguration>>,
772776
[]
773777
> &
774778
QueryableStorageEntry<ApiType, []>;
@@ -914,7 +918,7 @@ declare module "@polkadot/api-base/types/storage" {
914918
**/
915919
upgradeGoAhead: AugmentedQuery<
916920
ApiType,
917-
() => Observable<Option<PolkadotPrimitivesV6UpgradeGoAhead>>,
921+
() => Observable<Option<PolkadotPrimitivesV7UpgradeGoAhead>>,
918922
[]
919923
> &
920924
QueryableStorageEntry<ApiType, []>;
@@ -929,7 +933,7 @@ declare module "@polkadot/api-base/types/storage" {
929933
**/
930934
upgradeRestrictionSignal: AugmentedQuery<
931935
ApiType,
932-
() => Observable<Option<PolkadotPrimitivesV6UpgradeRestriction>>,
936+
() => Observable<Option<PolkadotPrimitivesV7UpgradeRestriction>>,
933937
[]
934938
> &
935939
QueryableStorageEntry<ApiType, []>;
@@ -952,7 +956,7 @@ declare module "@polkadot/api-base/types/storage" {
952956
**/
953957
validationData: AugmentedQuery<
954958
ApiType,
955-
() => Observable<Option<PolkadotPrimitivesV6PersistedValidationData>>,
959+
() => Observable<Option<PolkadotPrimitivesV7PersistedValidationData>>,
956960
[]
957961
> &
958962
QueryableStorageEntry<ApiType, []>;

api-augment/dist/types/interfaces/augment-api-tx.d.ts

Lines changed: 63 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ declare module "@polkadot/api-base/types/submittable" {
290290
*
291291
* This will waive the transaction fee if at least all but 10% of the accounts needed to
292292
* be upgraded. (We let some not have to be upgraded just in order to allow for the
293-
* possibililty of churn).
293+
* possibility of churn).
294294
**/
295295
upgradeAccounts: AugmentedSubmittable<
296296
(
@@ -2548,6 +2548,9 @@ declare module "@polkadot/api-base/types/submittable" {
25482548
* No more than `max_weight` will be used in its attempted execution. If this is less than
25492549
* the maximum amount of weight that the message could take to be executed, then no
25502550
* execution attempt will be made.
2551+
*
2552+
* WARNING: DEPRECATED. `execute` will be removed after June 2024. Use `execute_blob`
2553+
* instead.
25512554
**/
25522555
execute: AugmentedSubmittable<
25532556
(
@@ -2575,6 +2578,32 @@ declare module "@polkadot/api-base/types/submittable" {
25752578
) => SubmittableExtrinsic<ApiType>,
25762579
[XcmVersionedXcm, SpWeightsWeightV2Weight]
25772580
>;
2581+
/**
2582+
* Execute an XCM from a local, signed, origin.
2583+
*
2584+
* An event is deposited indicating whether the message could be executed completely
2585+
* or only partially.
2586+
*
2587+
* No more than `max_weight` will be used in its attempted execution. If this is less than
2588+
* the maximum amount of weight that the message could take to be executed, then no
2589+
* execution attempt will be made.
2590+
*
2591+
* The message is passed in encoded. It needs to be decodable as a [`VersionedXcm`].
2592+
**/
2593+
executeBlob: AugmentedSubmittable<
2594+
(
2595+
encodedMessage: Bytes | string | Uint8Array,
2596+
maxWeight:
2597+
| SpWeightsWeightV2Weight
2598+
| {
2599+
refTime?: any;
2600+
proofSize?: any;
2601+
}
2602+
| string
2603+
| Uint8Array
2604+
) => SubmittableExtrinsic<ApiType>,
2605+
[Bytes, SpWeightsWeightV2Weight]
2606+
>;
25782607
/**
25792608
* Set a safe XCM version (the version that XCM should be encoded with if the most recent
25802609
* version a destination can accept is unknown).
@@ -2687,7 +2716,7 @@ declare module "@polkadot/api-base/types/submittable" {
26872716
*
26882717
* Fee payment on the destination side is made from the asset in the `assets` vector of
26892718
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
2690-
* is needed than `weight_limit`, then the operation will fail and the assets send may be
2719+
* is needed than `weight_limit`, then the operation will fail and the sent assets may be
26912720
* at risk.
26922721
*
26932722
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
@@ -2762,7 +2791,7 @@ declare module "@polkadot/api-base/types/submittable" {
27622791
*
27632792
* Fee payment on the destination side is made from the asset in the `assets` vector of
27642793
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
2765-
* is needed than `weight_limit`, then the operation will fail and the assets send may be
2794+
* is needed than `weight_limit`, then the operation will fail and the sent assets may be
27662795
* at risk.
27672796
*
27682797
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
@@ -2909,6 +2938,9 @@ declare module "@polkadot/api-base/types/submittable" {
29092938
) => SubmittableExtrinsic<ApiType>,
29102939
[XcmVersionedLocation, XcmVersionedLocation, XcmVersionedAssets, u32]
29112940
>;
2941+
/**
2942+
* WARNING: DEPRECATED. `send` will be removed after June 2024. Use `send_blob` instead.
2943+
**/
29122944
send: AugmentedSubmittable<
29132945
(
29142946
dest:
@@ -2940,6 +2972,33 @@ declare module "@polkadot/api-base/types/submittable" {
29402972
) => SubmittableExtrinsic<ApiType>,
29412973
[XcmVersionedLocation, XcmVersionedXcm]
29422974
>;
2975+
/**
2976+
* Send an XCM from a local, signed, origin.
2977+
*
2978+
* The destination, `dest`, will receive this message with a `DescendOrigin` instruction
2979+
* that makes the origin of the message be the origin on this system.
2980+
*
2981+
* The message is passed in encoded. It needs to be decodable as a [`VersionedXcm`].
2982+
**/
2983+
sendBlob: AugmentedSubmittable<
2984+
(
2985+
dest:
2986+
| XcmVersionedLocation
2987+
| {
2988+
V2: any;
2989+
}
2990+
| {
2991+
V3: any;
2992+
}
2993+
| {
2994+
V4: any;
2995+
}
2996+
| string
2997+
| Uint8Array,
2998+
encodedMessage: Bytes | string | Uint8Array
2999+
) => SubmittableExtrinsic<ApiType>,
3000+
[XcmVersionedLocation, Bytes]
3001+
>;
29433002
/**
29443003
* Teleport some assets from the local chain to some destination chain.
29453004
*
@@ -3012,7 +3071,7 @@ declare module "@polkadot/api-base/types/submittable" {
30123071
* Fee payment on the destination side is made from the asset in the `assets` vector of
30133072
* index `fee_asset_item` (hence referred to as `fees`), up to enough to pay for
30143073
* `weight_limit` of weight. If more weight is needed than `weight_limit`, then the
3015-
* operation will fail and the assets sent may be at risk.
3074+
* operation will fail and the sent assets may be at risk.
30163075
*
30173076
* `assets` (excluding `fees`) must have same reserve location or otherwise be teleportable
30183077
* to `dest`, no limitations imposed on `fees`.

0 commit comments

Comments
 (0)