Skip to content

Commit 6076d78

Browse files
TDemecoffarall
andauthored
feat: ⏫ upgrade to Polkadot SDK v1.13.0 (#216)
* 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 * feat: 📦 initial update to polkadot sdk v1.11.0 * feat: ⬆️ finish upgrade to polkadot sdk v1.11.0 * chore: 🏷️ run typegen * chore: 🏷️ run typegen * fix: ✅ fix node tests after rebenchmark of balances pallet in v1.11.0 * feat: ⬆️ update to Polkadot SDK v1.12.0 * feat: ⬆️ update to Polkadot SDK v1.13.0 * fix: ⬆️ finish upgrading to Polkadot SDK v1.13.0 * fix: 🐛 add missing imports (and run typegen) * fix: ⬇️ rollback polkadotjs api dependencies * chore: 🏷️ rerun pnpm typegen * fix: 🚨 format and lint * fix: 🚨 remove trailing whitespace * Update runtime/src/configs/mod.rs Co-authored-by: Facundo Farall <[email protected]> * Update mod.rs * chore: 🏷️ run typegen --------- Co-authored-by: Facundo Farall <[email protected]>
1 parent 41c24ec commit 6076d78

Some content is hidden

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

43 files changed

+2398
-2173
lines changed

Cargo.lock

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

Cargo.toml

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

api-augment/dist/interfaces/lookup.js

Lines changed: 120 additions & 103 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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,17 @@ declare module "@polkadot/api-base/types/consts" {
526526
[key: string]: Codec;
527527
};
528528
xcmpQueue: {
529+
/**
530+
* Maximal number of outbound XCMP channels that can have messages queued at the same time.
531+
*
532+
* If this is reached, then no further messages can be sent to channels that do not yet
533+
* have a message queued. This should be set to the expected maximum of outbound channels
534+
* which is determined by [`Self::ChannelInfo`]. It is important to set this large enough,
535+
* since otherwise the congestion control protocol will not work as intended and messages
536+
* may be dropped. This value increases the PoV and should therefore not be picked too
537+
* high. Governance needs to pay attention to not open more channels than this value.
538+
**/
539+
maxActiveOutboundChannels: u32 & AugmentedConst<ApiType>;
529540
/**
530541
* The maximum number of inbound XCMP channels that can be suspended simultaneously.
531542
*
@@ -534,6 +545,14 @@ declare module "@polkadot/api-base/types/consts" {
534545
* [`InboundXcmpSuspended`] still applies at that scale.
535546
**/
536547
maxInboundSuspended: u32 & AugmentedConst<ApiType>;
548+
/**
549+
* The maximal page size for HRMP message pages.
550+
*
551+
* A lower limit can be set dynamically, but this is the hard-limit for the PoV worst case
552+
* benchmarking. The limit for the size of a message is slightly below this, since some
553+
* overhead is incurred for encoding the format.
554+
**/
555+
maxPageSize: u32 & AugmentedConst<ApiType>;
537556
/**
538557
* Generic const
539558
**/

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,6 +1178,14 @@ declare module "@polkadot/api-base/types/errors" {
11781178
* Setting the queue config failed since one of its values was invalid.
11791179
**/
11801180
BadQueueConfig: AugmentedError<ApiType>;
1181+
/**
1182+
* The message is too big.
1183+
**/
1184+
TooBig: AugmentedError<ApiType>;
1185+
/**
1186+
* There are too many active outbound channels.
1187+
**/
1188+
TooManyActiveOutboundChannels: AugmentedError<ApiType>;
11811189
/**
11821190
* Generic error
11831191
**/

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ import type {
7171
SpRuntimeDigest,
7272
SpTrieStorageProof,
7373
SpWeightsWeightV2Weight,
74+
StagingXcmV4Instruction,
7475
StorageHubRuntimeConfigsRuntimeParamsRuntimeParametersKey,
7576
StorageHubRuntimeConfigsRuntimeParamsRuntimeParametersValue,
7677
StorageHubRuntimeRuntimeHoldReason,
@@ -1172,6 +1173,20 @@ declare module "@polkadot/api-base/types/storage" {
11721173
**/
11731174
queryCounter: AugmentedQuery<ApiType, () => Observable<u64>, []> &
11741175
QueryableStorageEntry<ApiType, []>;
1176+
/**
1177+
* If [`ShouldRecordXcm`] is set to true, then the last XCM program executed locally
1178+
* will be stored here.
1179+
* Runtime APIs can fetch the XCM that was executed by accessing this value.
1180+
*
1181+
* Only relevant if this pallet is being used as the [`xcm_executor::traits::RecordXcm`]
1182+
* implementation in the XCM executor configuration.
1183+
**/
1184+
recordedXcm: AugmentedQuery<
1185+
ApiType,
1186+
() => Observable<Option<Vec<StagingXcmV4Instruction>>>,
1187+
[]
1188+
> &
1189+
QueryableStorageEntry<ApiType, []>;
11751190
/**
11761191
* Fungible assets which we know are locked on a remote chain.
11771192
**/
@@ -1200,6 +1215,17 @@ declare module "@polkadot/api-base/types/storage" {
12001215
**/
12011216
safeXcmVersion: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> &
12021217
QueryableStorageEntry<ApiType, []>;
1218+
/**
1219+
* Whether or not incoming XCMs (both executed locally and received) should be recorded.
1220+
* Only one XCM program will be recorded at a time.
1221+
* This is meant to be used in runtime APIs, and it's advised it stays false
1222+
* for all other use cases, so as to not degrade regular performance.
1223+
*
1224+
* Only relevant if this pallet is being used as the [`xcm_executor::traits::RecordXcm`]
1225+
* implementation in the XCM executor configuration.
1226+
**/
1227+
shouldRecordXcm: AugmentedQuery<ApiType, () => Observable<bool>, []> &
1228+
QueryableStorageEntry<ApiType, []>;
12031229
/**
12041230
* The Latest versions that we know various locations support.
12051231
**/

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

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import "@polkadot/api-base/types/calls";
22
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from "@polkadot/api-base/types";
3-
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from "@polkadot/types-codec";
3+
import type { Bytes, Null, Option, Result, Vec, bool, u128, u32 } from "@polkadot/types-codec";
44
import type { AnyNumber, IMethod, ITuple } from "@polkadot/types-codec/types";
55
import type { CheckInherentsResult, InherentData } from "@polkadot/types/interfaces/blockbuilder";
66
import type { BlockHash } from "@polkadot/types/interfaces/chain";
@@ -23,11 +23,14 @@ import type {
2323
KeyTypeId,
2424
Slot,
2525
SlotDuration,
26-
Weight
26+
Weight,
27+
WeightV2
2728
} from "@polkadot/types/interfaces/runtime";
2829
import type { RuntimeVersion } from "@polkadot/types/interfaces/state";
2930
import type { ApplyExtrinsicResult, Key } from "@polkadot/types/interfaces/system";
3031
import type { TransactionSource, TransactionValidity } from "@polkadot/types/interfaces/txqueue";
32+
import type { XcmPaymentApiError } from "@polkadot/types/interfaces/xcmPaymentApi";
33+
import type { XcmVersionedAssetId, XcmVersionedXcm } from "@polkadot/types/lookup";
3134
import type { IExtrinsic, Observable } from "@polkadot/types/types";
3235
import type {
3336
BackupStorageProvider,
@@ -659,5 +662,68 @@ declare module "@polkadot/api-base/types/calls" {
659662
**/
660663
[key: string]: DecoratedCallBase<ApiType>;
661664
};
665+
/** 0x6ff52ee858e6c5bd/1 */
666+
xcmPaymentApi: {
667+
/**
668+
* The API to query acceptable payment assets
669+
**/
670+
queryAcceptablePaymentAssets: AugmentedCall<
671+
ApiType,
672+
(
673+
version: u32 | AnyNumber | Uint8Array
674+
) => Observable<Result<Vec<XcmVersionedAssetId>, XcmPaymentApiError>>
675+
>;
676+
/**
677+
*
678+
**/
679+
queryWeightToAssetFee: AugmentedCall<
680+
ApiType,
681+
(
682+
weight:
683+
| WeightV2
684+
| {
685+
refTime?: any;
686+
proofSize?: any;
687+
}
688+
| string
689+
| Uint8Array,
690+
asset:
691+
| XcmVersionedAssetId
692+
| {
693+
V3: any;
694+
}
695+
| {
696+
V4: any;
697+
}
698+
| string
699+
| Uint8Array
700+
) => Observable<Result<u128, XcmPaymentApiError>>
701+
>;
702+
/**
703+
*
704+
**/
705+
queryXcmWeight: AugmentedCall<
706+
ApiType,
707+
(
708+
message:
709+
| XcmVersionedXcm
710+
| {
711+
V2: any;
712+
}
713+
| {
714+
V3: any;
715+
}
716+
| {
717+
V4: any;
718+
}
719+
| string
720+
| Uint8Array
721+
) => Observable<Result<WeightV2, XcmPaymentApiError>>
722+
>;
723+
/**
724+
* Generic call
725+
**/
726+
[key: string]: DecoratedCallBase<ApiType>;
727+
};
662728
}
663729
}

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,22 @@ export type __SubmittableExtrinsicFunction<ApiType extends ApiTypes> =
4848
declare module "@polkadot/api-base/types/submittable" {
4949
interface AugmentedSubmittables<ApiType extends ApiTypes> {
5050
balances: {
51+
/**
52+
* Burn the specified liquid free balance from the origin account.
53+
*
54+
* If the origin's account ends up below the existential deposit as a result
55+
* of the burn and `keep_alive` is false, the account will be reaped.
56+
*
57+
* Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible,
58+
* this `burn` operation will reduce total issuance by the amount _burned_.
59+
**/
60+
burn: AugmentedSubmittable<
61+
(
62+
value: Compact<u128> | AnyNumber | Uint8Array,
63+
keepAlive: bool | boolean | Uint8Array
64+
) => SubmittableExtrinsic<ApiType>,
65+
[Compact<u128>, bool]
66+
>;
5167
/**
5268
* Adjust the total issuance in a saturating way.
5369
*

0 commit comments

Comments
 (0)