Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ⏫ upgrade to Polkadot SDK v1.10.0 #210

Merged
merged 20 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2eff08b
refactor: :art: moved runtime apis into their own file
TDemeco Sep 27, 2024
303feb3
fix: :arrow_up: fix upgrade to polkadot-sdk v1.10.0
TDemeco Sep 27, 2024
e5ba5bd
Merge branch 'main' into update/polkadot-sdk-1.10.0
TDemeco Sep 27, 2024
3e4328d
fix: :bug: add removed runtime api `get_worst_case_scenario_slashable…
TDemeco Sep 27, 2024
3605611
fix: :bug: add missing generic in storage providers runtime api
TDemeco Sep 27, 2024
3659377
chore: :label: run typegen
TDemeco Sep 27, 2024
c1219f1
style: :rotating_light: run cargo fmt
TDemeco Sep 27, 2024
5ac0258
fix: :art: fix cargo clippy
TDemeco Sep 28, 2024
e82a113
Merge branch 'main' into update/polkadot-sdk-1.10.0
TDemeco Sep 28, 2024
91ae601
fix: :ambulance: fix mocked relay chain randomness
TDemeco Sep 28, 2024
97c0b64
style: :rotating_light: run cargo fmt
TDemeco Sep 28, 2024
787d1df
chore: :rotating_light: temporary remove unused import (until v1.13.0)
TDemeco Sep 28, 2024
9653a4e
Merge branch 'main' into update/polkadot-sdk-1.10.0
TDemeco Sep 28, 2024
6fb8bd4
fix: :adhesive_bandage: update `query_earliest_file_volunteer_tick` r…
TDemeco Sep 28, 2024
cde6b90
fix: :ambulance: fix issues with merge from main
TDemeco Sep 28, 2024
570e548
style: :rotating_light: run cargo fmt
TDemeco Sep 28, 2024
2947b01
Merge branch 'main' into update/polkadot-sdk-1.10.0
TDemeco Sep 30, 2024
5c07140
chore: :label: run typegen
TDemeco Sep 30, 2024
bed97cf
Merge branch 'main' into update/polkadot-sdk-1.10.0
TDemeco Oct 3, 2024
260172f
fix: :adhesive_bandage: fix merge from main
TDemeco Oct 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,415 changes: 1,207 additions & 1,208 deletions Cargo.lock

Large diffs are not rendered by default.

196 changes: 98 additions & 98 deletions Cargo.toml

Large diffs are not rendered by default.

220 changes: 107 additions & 113 deletions api-augment/dist/interfaces/lookup.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api-augment/dist/interfaces/lookup.js.map

Large diffs are not rendered by default.

30 changes: 28 additions & 2 deletions api-augment/dist/types/interfaces/augment-api-consts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ import type {
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
declare module "@polkadot/api-base/types/consts" {
interface AugmentedConsts<ApiType extends ApiTypes> {
aura: {
/**
* The slot duration Aura should run with, expressed in milliseconds.
* The effective value of this type should not change while the chain is running.
*
* For backwards compatibility either use [`MinimumPeriodTimesTwo`] or a const.
**/
slotDuration: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
balances: {
/**
* The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!
Expand All @@ -32,10 +45,14 @@ declare module "@polkadot/api-base/types/consts" {
/**
* The maximum number of locks that should exist on an account.
* Not strictly enforced, but used for weight estimation.
*
* Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
**/
maxLocks: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of named reserves that can exist on an account.
*
* Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
**/
maxReserves: u32 & AugmentedConst<ApiType>;
/**
Expand Down Expand Up @@ -113,6 +130,14 @@ declare module "@polkadot/api-base/types/consts" {
* size is slightly lower than this as defined by [`MaxMessageLenOf`].
**/
heapSize: u32 & AugmentedConst<ApiType>;
/**
* The maximum amount of weight (if any) to be used from remaining weight `on_idle` which
* should be provided to the message queue for servicing enqueued items `on_idle`.
* Useful for parachains to process messages at the same block they are received.
*
* If `None`, it will not call `ServiceQueues::service_queues` in `on_idle`.
**/
idleMaxServiceWeight: Option<SpWeightsWeightV2Weight> & AugmentedConst<ApiType>;
/**
* The maximum number of stale pages (i.e. of overweight messages) allowed before culling
* can happen. Once there are more stale pages than this, then historical pages may be
Expand All @@ -121,10 +146,11 @@ declare module "@polkadot/api-base/types/consts" {
maxStale: u32 & AugmentedConst<ApiType>;
/**
* The amount of weight (if any) which should be provided to the message queue for
* servicing enqueued items.
* servicing enqueued items `on_initialize`.
*
* This may be legitimately `None` in the case that you will call
* `ServiceQueues::service_queues` manually.
* `ServiceQueues::service_queues` manually or set [`Self::IdleMaxServiceWeight`] to have
* it run in `on_idle`.
**/
serviceWeight: Option<SpWeightsWeightV2Weight> & AugmentedConst<ApiType>;
/**
Expand Down
9 changes: 9 additions & 0 deletions api-augment/dist/types/interfaces/augment-api-errors.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,10 @@ declare module "@polkadot/api-base/types/errors" {
* Too many assets with different reserve locations have been attempted for transfer.
**/
TooManyReserves: AugmentedError<ApiType>;
/**
* Could not decode XCM.
**/
UnableToDecode: AugmentedError<ApiType>;
/**
* The desired destination was unreachable, generally because there is a no way of routing
* to it.
Expand All @@ -835,6 +839,11 @@ declare module "@polkadot/api-base/types/errors" {
* The message's weight could not be determined.
**/
UnweighableMessage: AugmentedError<ApiType>;
/**
* XCM encoded length is too large.
* Returned when an XCM encoded length is larger than `MaxXcmEncodedSize`.
**/
XcmTooLarge: AugmentedError<ApiType>;
/**
* Generic error
**/
Expand Down
20 changes: 12 additions & 8 deletions api-augment/dist/types/interfaces/augment-api-query.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ import type {
PalletXcmRemoteLockedFungibleRecord,
PalletXcmVersionMigrationStage,
PolkadotCorePrimitivesOutboundHrmpMessage,
PolkadotPrimitivesV6AbridgedHostConfiguration,
PolkadotPrimitivesV6PersistedValidationData,
PolkadotPrimitivesV6UpgradeGoAhead,
PolkadotPrimitivesV6UpgradeRestriction,
PolkadotPrimitivesV7AbridgedHostConfiguration,
PolkadotPrimitivesV7PersistedValidationData,
PolkadotPrimitivesV7UpgradeGoAhead,
PolkadotPrimitivesV7UpgradeRestriction,
ShpTraitsTrieRemoveMutation,
SpConsensusAuraSr25519AppSr25519Public,
SpCoreCryptoKeyTypeId,
Expand Down Expand Up @@ -206,6 +206,8 @@ declare module "@polkadot/api-base/types/storage" {
/**
* Any liquidity locks on some account balances.
* NOTE: Should only be accessed when setting, changing and freeing a lock.
*
* Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
**/
locks: AugmentedQuery<
ApiType,
Expand All @@ -215,6 +217,8 @@ declare module "@polkadot/api-base/types/storage" {
QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Named reserves on some account balances.
*
* Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
**/
reserves: AugmentedQuery<
ApiType,
Expand Down Expand Up @@ -766,7 +770,7 @@ declare module "@polkadot/api-base/types/storage" {
**/
hostConfiguration: AugmentedQuery<
ApiType,
() => Observable<Option<PolkadotPrimitivesV6AbridgedHostConfiguration>>,
() => Observable<Option<PolkadotPrimitivesV7AbridgedHostConfiguration>>,
[]
> &
QueryableStorageEntry<ApiType, []>;
Expand Down Expand Up @@ -912,7 +916,7 @@ declare module "@polkadot/api-base/types/storage" {
**/
upgradeGoAhead: AugmentedQuery<
ApiType,
() => Observable<Option<PolkadotPrimitivesV6UpgradeGoAhead>>,
() => Observable<Option<PolkadotPrimitivesV7UpgradeGoAhead>>,
[]
> &
QueryableStorageEntry<ApiType, []>;
Expand All @@ -927,7 +931,7 @@ declare module "@polkadot/api-base/types/storage" {
**/
upgradeRestrictionSignal: AugmentedQuery<
ApiType,
() => Observable<Option<PolkadotPrimitivesV6UpgradeRestriction>>,
() => Observable<Option<PolkadotPrimitivesV7UpgradeRestriction>>,
[]
> &
QueryableStorageEntry<ApiType, []>;
Expand All @@ -950,7 +954,7 @@ declare module "@polkadot/api-base/types/storage" {
**/
validationData: AugmentedQuery<
ApiType,
() => Observable<Option<PolkadotPrimitivesV6PersistedValidationData>>,
() => Observable<Option<PolkadotPrimitivesV7PersistedValidationData>>,
[]
> &
QueryableStorageEntry<ApiType, []>;
Expand Down
67 changes: 63 additions & 4 deletions api-augment/dist/types/interfaces/augment-api-tx.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ declare module "@polkadot/api-base/types/submittable" {
*
* This will waive the transaction fee if at least all but 10% of the accounts needed to
* be upgraded. (We let some not have to be upgraded just in order to allow for the
* possibililty of churn).
* possibility of churn).
**/
upgradeAccounts: AugmentedSubmittable<
(
Expand Down Expand Up @@ -2521,6 +2521,9 @@ declare module "@polkadot/api-base/types/submittable" {
* No more than `max_weight` will be used in its attempted execution. If this is less than
* the maximum amount of weight that the message could take to be executed, then no
* execution attempt will be made.
*
* WARNING: DEPRECATED. `execute` will be removed after June 2024. Use `execute_blob`
* instead.
**/
execute: AugmentedSubmittable<
(
Expand Down Expand Up @@ -2548,6 +2551,32 @@ declare module "@polkadot/api-base/types/submittable" {
) => SubmittableExtrinsic<ApiType>,
[XcmVersionedXcm, SpWeightsWeightV2Weight]
>;
/**
* Execute an XCM from a local, signed, origin.
*
* An event is deposited indicating whether the message could be executed completely
* or only partially.
*
* No more than `max_weight` will be used in its attempted execution. If this is less than
* the maximum amount of weight that the message could take to be executed, then no
* execution attempt will be made.
*
* The message is passed in encoded. It needs to be decodable as a [`VersionedXcm`].
**/
executeBlob: AugmentedSubmittable<
(
encodedMessage: Bytes | string | Uint8Array,
maxWeight:
| SpWeightsWeightV2Weight
| {
refTime?: any;
proofSize?: any;
}
| string
| Uint8Array
) => SubmittableExtrinsic<ApiType>,
[Bytes, SpWeightsWeightV2Weight]
>;
/**
* Set a safe XCM version (the version that XCM should be encoded with if the most recent
* version a destination can accept is unknown).
Expand Down Expand Up @@ -2660,7 +2689,7 @@ declare module "@polkadot/api-base/types/submittable" {
*
* Fee payment on the destination side is made from the asset in the `assets` vector of
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
* is needed than `weight_limit`, then the operation will fail and the assets send may be
* is needed than `weight_limit`, then the operation will fail and the sent assets may be
* at risk.
*
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
Expand Down Expand Up @@ -2735,7 +2764,7 @@ declare module "@polkadot/api-base/types/submittable" {
*
* Fee payment on the destination side is made from the asset in the `assets` vector of
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
* is needed than `weight_limit`, then the operation will fail and the assets send may be
* is needed than `weight_limit`, then the operation will fail and the sent assets may be
* at risk.
*
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
Expand Down Expand Up @@ -2882,6 +2911,9 @@ declare module "@polkadot/api-base/types/submittable" {
) => SubmittableExtrinsic<ApiType>,
[XcmVersionedLocation, XcmVersionedLocation, XcmVersionedAssets, u32]
>;
/**
* WARNING: DEPRECATED. `send` will be removed after June 2024. Use `send_blob` instead.
**/
send: AugmentedSubmittable<
(
dest:
Expand Down Expand Up @@ -2913,6 +2945,33 @@ declare module "@polkadot/api-base/types/submittable" {
) => SubmittableExtrinsic<ApiType>,
[XcmVersionedLocation, XcmVersionedXcm]
>;
/**
* Send an XCM from a local, signed, origin.
*
* The destination, `dest`, will receive this message with a `DescendOrigin` instruction
* that makes the origin of the message be the origin on this system.
*
* The message is passed in encoded. It needs to be decodable as a [`VersionedXcm`].
**/
sendBlob: AugmentedSubmittable<
(
dest:
| XcmVersionedLocation
| {
V2: any;
}
| {
V3: any;
}
| {
V4: any;
}
| string
| Uint8Array,
encodedMessage: Bytes | string | Uint8Array
) => SubmittableExtrinsic<ApiType>,
[XcmVersionedLocation, Bytes]
>;
/**
* Teleport some assets from the local chain to some destination chain.
*
Expand Down Expand Up @@ -2985,7 +3044,7 @@ declare module "@polkadot/api-base/types/submittable" {
* Fee payment on the destination side is made from the asset in the `assets` vector of
* index `fee_asset_item` (hence referred to as `fees`), up to enough to pay for
* `weight_limit` of weight. If more weight is needed than `weight_limit`, then the
* operation will fail and the assets sent may be at risk.
* operation will fail and the sent assets may be at risk.
*
* `assets` (excluding `fees`) must have same reserve location or otherwise be teleportable
* to `dest`, no limitations imposed on `fees`.
Expand Down
Loading
Loading