Skip to content

Commit

Permalink
feat: ⏫ upgrade to Polkadot SDK stable2409 (#228)
Browse files Browse the repository at this point in the history
* 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

* feat: 🚧 start upgrade to Polkadot SDK 1.14.0

* fix: 🚨 format and lint

* fix: 🚨 remove trailing whitespace

* feat: ⬆️ upgrade to Polkadot SDK v1.14.0

* chore: 🏷️ run typegen

* fix: 🚨 run cargo fmt

* docs: 🔥 remove wrong license docs

* feat: ⬆️ update Polkadot SDK to stable2407

* chore: 🏷️ run typegen

* chore: 🏷️ run typegen

* fix: ✅ fix bsp-threshold test

* fix: 💚 try to fix tests in CI

* fix: ✅ try again to fix the integration tests in the CI

* test: 🧪 fix batch file confirm storing test

* fix: ✅ remove unused imports from volunteer test

* fix: ✅ add wait for file in file storage success and fix volunteer test

* fix: ✅ wait more time for bsp volunteering

* test: 🧪 fix a few issues

* fix: ✅ maybe (hopefully) finish fixing tests

* fix: ✅ fix new bsps not catching up to the tip of the chain and missing events in tests

* test: ✅ disconnect api

* test: 🐛 fix timeout bug

* test: ✅ add initialization wait + fix single bsp initialized network

* chore: 🚨 removed unused variables

* test: 🐛 initialised bsp net now correctly waits for bsp to store file

* test: 🐛 add missing wait for chain tip sync on test

* fix: 🩹 Remove sleeps from single tests, in favour of putting it in setup

* feat: 🚧 start update to stable2409

* feat: ⬆️ update to Polkadot SDK stable2409

* chore: 🏷️ run typegen

---------

Co-authored-by: Facundo Farall <[email protected]>
  • Loading branch information
TDemeco and ffarall authored Oct 15, 2024
1 parent 85e28c8 commit 12e3982
Show file tree
Hide file tree
Showing 37 changed files with 2,020 additions and 2,026 deletions.
2,800 changes: 1,392 additions & 1,408 deletions Cargo.lock

Large diffs are not rendered by default.

209 changes: 105 additions & 104 deletions Cargo.toml

Large diffs are not rendered by default.

43 changes: 18 additions & 25 deletions api-augment/dist/interfaces/lookup.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

Large diffs are not rendered by default.

16 changes: 8 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,
PolkadotPrimitivesV7AbridgedHostConfiguration,
PolkadotPrimitivesV7PersistedValidationData,
PolkadotPrimitivesV7UpgradeGoAhead,
PolkadotPrimitivesV7UpgradeRestriction,
PolkadotPrimitivesV8AbridgedHostConfiguration,
PolkadotPrimitivesV8PersistedValidationData,
PolkadotPrimitivesV8UpgradeGoAhead,
PolkadotPrimitivesV8UpgradeRestriction,
ShpTraitsTrieRemoveMutation,
SpConsensusAuraSr25519AppSr25519Public,
SpCoreCryptoKeyTypeId,
Expand Down Expand Up @@ -773,7 +773,7 @@ declare module "@polkadot/api-base/types/storage" {
**/
hostConfiguration: AugmentedQuery<
ApiType,
() => Observable<Option<PolkadotPrimitivesV7AbridgedHostConfiguration>>,
() => Observable<Option<PolkadotPrimitivesV8AbridgedHostConfiguration>>,
[]
> &
QueryableStorageEntry<ApiType, []>;
Expand Down Expand Up @@ -919,7 +919,7 @@ declare module "@polkadot/api-base/types/storage" {
**/
upgradeGoAhead: AugmentedQuery<
ApiType,
() => Observable<Option<PolkadotPrimitivesV7UpgradeGoAhead>>,
() => Observable<Option<PolkadotPrimitivesV8UpgradeGoAhead>>,
[]
> &
QueryableStorageEntry<ApiType, []>;
Expand All @@ -934,7 +934,7 @@ declare module "@polkadot/api-base/types/storage" {
**/
upgradeRestrictionSignal: AugmentedQuery<
ApiType,
() => Observable<Option<PolkadotPrimitivesV7UpgradeRestriction>>,
() => Observable<Option<PolkadotPrimitivesV8UpgradeRestriction>>,
[]
> &
QueryableStorageEntry<ApiType, []>;
Expand All @@ -957,7 +957,7 @@ declare module "@polkadot/api-base/types/storage" {
**/
validationData: AugmentedQuery<
ApiType,
() => Observable<Option<PolkadotPrimitivesV7PersistedValidationData>>,
() => Observable<Option<PolkadotPrimitivesV8PersistedValidationData>>,
[]
> &
QueryableStorageEntry<ApiType, []>;
Expand Down
32 changes: 0 additions & 32 deletions api-augment/dist/types/interfaces/augment-api-tx.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2184,38 +2184,6 @@ declare module "@polkadot/api-base/types/submittable" {
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
parachainSystem: {
/**
* Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied
* later.
*
* The `check_version` parameter sets a boolean flag for whether or not the runtime's spec
* version and name should be verified on upgrade. Since the authorization only has a hash,
* it cannot actually perform the verification.
*
* This call requires Root origin.
**/
authorizeUpgrade: AugmentedSubmittable<
(
codeHash: H256 | string | Uint8Array,
checkVersion: bool | boolean | Uint8Array
) => SubmittableExtrinsic<ApiType>,
[H256, bool]
>;
/**
* Provide the preimage (runtime binary) `code` for an upgrade that has been authorized.
*
* If the authorization required a version check, this call will ensure the spec name
* remains unchanged and that the spec version has increased.
*
* Note that this function will not apply the new `code`, but only attempt to schedule the
* upgrade with the Relay Chain.
*
* All origins are allowed.
**/
enactAuthorizedUpgrade: AugmentedSubmittable<
(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
[Bytes]
>;
/**
* Set the current validation data.
*
Expand Down
31 changes: 12 additions & 19 deletions api-augment/dist/types/interfaces/lookup.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2211,9 +2211,9 @@ declare const _default: {
totalBytes: string;
};
/**
* Lookup222: polkadot_primitives::v7::UpgradeGoAhead
* Lookup222: polkadot_primitives::v8::UpgradeGoAhead
**/
PolkadotPrimitivesV7UpgradeGoAhead: {
PolkadotPrimitivesV8UpgradeGoAhead: {
_enum: string[];
};
/**
Expand All @@ -2225,18 +2225,18 @@ declare const _default: {
consumedGoAheadSignal: string;
};
/**
* Lookup224: polkadot_primitives::v7::PersistedValidationData<primitive_types::H256, N>
* Lookup224: polkadot_primitives::v8::PersistedValidationData<primitive_types::H256, N>
**/
PolkadotPrimitivesV7PersistedValidationData: {
PolkadotPrimitivesV8PersistedValidationData: {
parentHead: string;
relayParentNumber: string;
relayParentStorageRoot: string;
maxPovSize: string;
};
/**
* Lookup227: polkadot_primitives::v7::UpgradeRestriction
* Lookup227: polkadot_primitives::v8::UpgradeRestriction
**/
PolkadotPrimitivesV7UpgradeRestriction: {
PolkadotPrimitivesV8UpgradeRestriction: {
_enum: string[];
};
/**
Expand All @@ -2262,9 +2262,9 @@ declare const _default: {
remainingSize: string;
};
/**
* Lookup234: polkadot_primitives::v7::AbridgedHrmpChannel
* Lookup234: polkadot_primitives::v8::AbridgedHrmpChannel
**/
PolkadotPrimitivesV7AbridgedHrmpChannel: {
PolkadotPrimitivesV8AbridgedHrmpChannel: {
maxCapacity: string;
maxTotalSize: string;
maxMessageSize: string;
Expand All @@ -2273,9 +2273,9 @@ declare const _default: {
mqcHead: string;
};
/**
* Lookup235: polkadot_primitives::v7::AbridgedHostConfiguration
* Lookup235: polkadot_primitives::v8::AbridgedHostConfiguration
**/
PolkadotPrimitivesV7AbridgedHostConfiguration: {
PolkadotPrimitivesV8AbridgedHostConfiguration: {
maxCodeSize: string;
maxHeadDataSize: string;
maxUpwardQueueCount: string;
Expand All @@ -2288,9 +2288,9 @@ declare const _default: {
asyncBackingParams: string;
};
/**
* Lookup236: polkadot_primitives::v7::async_backing::AsyncBackingParams
* Lookup236: polkadot_primitives::v8::async_backing::AsyncBackingParams
**/
PolkadotPrimitivesV7AsyncBackingAsyncBackingParams: {
PolkadotPrimitivesV8AsyncBackingAsyncBackingParams: {
maxCandidateDepth: string;
allowedAncestryLen: string;
};
Expand All @@ -2312,13 +2312,6 @@ declare const _default: {
sudo_send_upward_message: {
message: string;
};
authorize_upgrade: {
codeHash: string;
checkVersion: string;
};
enact_authorized_upgrade: {
code: string;
};
};
};
/**
Expand Down
24 changes: 12 additions & 12 deletions api-augment/dist/types/interfaces/registry.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,12 @@ import type {
PolkadotCorePrimitivesInboundDownwardMessage,
PolkadotCorePrimitivesInboundHrmpMessage,
PolkadotCorePrimitivesOutboundHrmpMessage,
PolkadotPrimitivesV7AbridgedHostConfiguration,
PolkadotPrimitivesV7AbridgedHrmpChannel,
PolkadotPrimitivesV7AsyncBackingAsyncBackingParams,
PolkadotPrimitivesV7PersistedValidationData,
PolkadotPrimitivesV7UpgradeGoAhead,
PolkadotPrimitivesV7UpgradeRestriction,
PolkadotPrimitivesV8AbridgedHostConfiguration,
PolkadotPrimitivesV8AbridgedHrmpChannel,
PolkadotPrimitivesV8AsyncBackingAsyncBackingParams,
PolkadotPrimitivesV8PersistedValidationData,
PolkadotPrimitivesV8UpgradeGoAhead,
PolkadotPrimitivesV8UpgradeRestriction,
ShpFileKeyVerifierFileKeyProof,
ShpFileMetadataFileMetadata,
ShpFileMetadataFingerprint,
Expand Down Expand Up @@ -428,12 +428,12 @@ declare module "@polkadot/types/types/registry" {
PolkadotCorePrimitivesInboundDownwardMessage: PolkadotCorePrimitivesInboundDownwardMessage;
PolkadotCorePrimitivesInboundHrmpMessage: PolkadotCorePrimitivesInboundHrmpMessage;
PolkadotCorePrimitivesOutboundHrmpMessage: PolkadotCorePrimitivesOutboundHrmpMessage;
PolkadotPrimitivesV7AbridgedHostConfiguration: PolkadotPrimitivesV7AbridgedHostConfiguration;
PolkadotPrimitivesV7AbridgedHrmpChannel: PolkadotPrimitivesV7AbridgedHrmpChannel;
PolkadotPrimitivesV7AsyncBackingAsyncBackingParams: PolkadotPrimitivesV7AsyncBackingAsyncBackingParams;
PolkadotPrimitivesV7PersistedValidationData: PolkadotPrimitivesV7PersistedValidationData;
PolkadotPrimitivesV7UpgradeGoAhead: PolkadotPrimitivesV7UpgradeGoAhead;
PolkadotPrimitivesV7UpgradeRestriction: PolkadotPrimitivesV7UpgradeRestriction;
PolkadotPrimitivesV8AbridgedHostConfiguration: PolkadotPrimitivesV8AbridgedHostConfiguration;
PolkadotPrimitivesV8AbridgedHrmpChannel: PolkadotPrimitivesV8AbridgedHrmpChannel;
PolkadotPrimitivesV8AsyncBackingAsyncBackingParams: PolkadotPrimitivesV8AsyncBackingAsyncBackingParams;
PolkadotPrimitivesV8PersistedValidationData: PolkadotPrimitivesV8PersistedValidationData;
PolkadotPrimitivesV8UpgradeGoAhead: PolkadotPrimitivesV8UpgradeGoAhead;
PolkadotPrimitivesV8UpgradeRestriction: PolkadotPrimitivesV8UpgradeRestriction;
ShpFileKeyVerifierFileKeyProof: ShpFileKeyVerifierFileKeyProof;
ShpFileMetadataFileMetadata: ShpFileMetadataFileMetadata;
ShpFileMetadataFingerprint: ShpFileMetadataFingerprint;
Expand Down
Loading

0 comments on commit 12e3982

Please sign in to comment.