From 1f4286a20b83be6dbeaa83c84c6ec607dea511d3 Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Wed, 17 Jan 2024 18:27:17 +0100 Subject: [PATCH 1/6] add check-migrations workflow --- .github/workflows/check-migrations.yml | 102 +++++++++++++++++++++++++ .github/workflows/runtimes-matrix.json | 9 +++ 2 files changed, 111 insertions(+) create mode 100644 .github/workflows/check-migrations.yml create mode 100644 .github/workflows/runtimes-matrix.json diff --git a/.github/workflows/check-migrations.yml b/.github/workflows/check-migrations.yml new file mode 100644 index 00000000..153dc68a --- /dev/null +++ b/.github/workflows/check-migrations.yml @@ -0,0 +1,102 @@ +name: Check Migrations + +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + workflow_dispatch: + +# Cancel a currently running workflow from the same PR, branch or tag when a new workflow is +# triggered (ref https://stackoverflow.com/a/72408109) +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + runtime-matrix: + runs-on: ubuntu-latest + outputs: + runtime: ${{ steps.runtime.outputs.runtime }} + name: Extract tasks from matrix + steps: + - uses: actions/checkout@v2 + - id: runtime + run: | + # Filter out runtimes that don't have a URI + TASKS=$(jq '[.[] | select(.uri != null)]' .github/workflows/runtimes-matrix.json) + SKIPPED_TASKS=$(jq '[.[] | select(.uri == null)]' .github/workflows/runtimes-matrix.json) + echo --- Running the following tasks --- + echo $TASKS + echo --- Skipping the following tasks due to not having a uri field --- + echo $SKIPPED_TASKS + # Strip whitespace from Tasks now that we've logged it + TASKS=$(echo $TASKS | jq -c .) + echo "runtime=$TASKS" >> $GITHUB_OUTPUT + + check-migrations: + needs: [runtime-matrix] + continue-on-error: true + runs-on: ubuntu-latest + strategy: + matrix: + runtime: ${{ fromJSON(needs.runtime-matrix.outputs.runtime) }} + steps: + - name: Checkout sources + uses: actions/checkout@v3 + + - name: Download try-runtime-cli + run: | + curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.5.2/try-runtime-x86_64-unknown-linux-musl -o try-runtime + chmod +x ./try-runtime + + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + version: "3.6.1" + + - name: Add wasm32-unknown-unknown target + run: rustup target add wasm32-unknown-unknown + + - name: Build ${{ matrix.runtime.name }} + run: | + cargo build --profile production -p ${{ matrix.runtime.package }} --features try-runtime -q --locked + + - name: Check migrations + run: | + PACKAGE_NAME=${{ matrix.runtime.package }} + RUNTIME_BLOB_NAME=$(echo $PACKAGE_NAME | sed 's/-/_/g').compact.compressed.wasm + RUNTIME_BLOB_PATH=./target/production/wbuild/$PACKAGE_NAME/$RUNTIME_BLOB_NAME + + # When running on relay, we don't need weight checks. + EXTRA_FLAGS="" + if [[ "${{ matrix.runtime.is_relay }}" == "true" ]]; then + EXTRA_FLAGS+="--no-weight-warnings" + echo "Disabling weight checks since we are on a relay" + else + echo "Enabling weight checks since we are not on a relay" + fi + + # Disable the spec version check when we dont want to release. + if ! .github/changelog-processor.py CHANGELOG.md --should-release ; then + EXTRA_FLAGS+=" --disable-spec-version-check" + echo "Disabling the spec version check since we are not releasing" + else + echo "Enabling the spec version check since we are releasing" + fi + + # Disable idemepotency checks on Polkadot until we enact them. + if [[ "${{ matrix.runtime.name }}" == "polkadot" ]]; then + echo "Disabling the idempotency check since we are on Polkadot" + EXTRA_FLAGS+=" --disable-idempotency-checks" + else + echo "Enabling the idempotency check since we are not on Polkadot" + fi + + echo "Flags: $EXTRA_FLAGS" + + ./try-runtime \ + --runtime $RUNTIME_BLOB_PATH \ + on-runtime-upgrade --checks=pre-and-post \ + $EXTRA_FLAGS \ + live --uri ${{ matrix.runtime.uri }} diff --git a/.github/workflows/runtimes-matrix.json b/.github/workflows/runtimes-matrix.json new file mode 100644 index 00000000..4bd84cfb --- /dev/null +++ b/.github/workflows/runtimes-matrix.json @@ -0,0 +1,9 @@ +[ + { + "name": "integritee", + "package": "integritee-runtime", + "path": "polkadot-parachains/integritee-runtime", + "uri": "wss://kusama.api.integritee.network:443", + "is_relay": false + } +] From 78ee9974320ef7e636440b541e45f93be2069c52 Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Wed, 17 Jan 2024 18:33:18 +0100 Subject: [PATCH 2/6] build release profile --- .github/workflows/check-migrations.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-migrations.yml b/.github/workflows/check-migrations.yml index 153dc68a..ad578d2f 100644 --- a/.github/workflows/check-migrations.yml +++ b/.github/workflows/check-migrations.yml @@ -60,13 +60,13 @@ jobs: - name: Build ${{ matrix.runtime.name }} run: | - cargo build --profile production -p ${{ matrix.runtime.package }} --features try-runtime -q --locked + cargo build --release -p ${{ matrix.runtime.package }} --features try-runtime -q --locked - name: Check migrations run: | PACKAGE_NAME=${{ matrix.runtime.package }} RUNTIME_BLOB_NAME=$(echo $PACKAGE_NAME | sed 's/-/_/g').compact.compressed.wasm - RUNTIME_BLOB_PATH=./target/production/wbuild/$PACKAGE_NAME/$RUNTIME_BLOB_NAME + RUNTIME_BLOB_PATH=./target/release/wbuild/$PACKAGE_NAME/$RUNTIME_BLOB_NAME # When running on relay, we don't need weight checks. EXTRA_FLAGS="" From 42ddb41b62d57aff2a8019ccbbc12cbc61b738c5 Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Wed, 17 Jan 2024 21:55:54 +0100 Subject: [PATCH 3/6] add migrations --- .../integritee-runtime/src/lib.rs | 48 ++++- .../integritee-runtime/src/migrations_fix.rs | 189 ++++++++++++++++++ .../integritee-runtime/src/xcm_config.rs | 1 + zombienet/rococo-local-with-integritee.toml | 4 +- ...cal-with-privacy-sidechain-demo-setup.toml | 10 +- 5 files changed, 241 insertions(+), 11 deletions(-) create mode 100644 polkadot-parachains/integritee-runtime/src/migrations_fix.rs diff --git a/polkadot-parachains/integritee-runtime/src/lib.rs b/polkadot-parachains/integritee-runtime/src/lib.rs index 655b9e42..eb324577 100644 --- a/polkadot-parachains/integritee-runtime/src/lib.rs +++ b/polkadot-parachains/integritee-runtime/src/lib.rs @@ -90,6 +90,9 @@ pub use pallet_teerex::Call as TeerexCall; mod helpers; mod weights; +// todo: temporary. remove after fixing +mod migrations_fix; + pub mod xcm_config; pub type SessionHandlers = (); @@ -802,6 +805,46 @@ pub type UncheckedExtrinsic = /// Extrinsic type that has already been checked. pub type CheckedExtrinsic = generic::CheckedExtrinsic; +/// Migrations to apply on runtime upgrade. +pub type Migrations = ( + // Scheduler + // fixing the scheduler with a local migration is necessary because we have missed intermediate + // migrations. mainnet at V0, jumping to V4 here + // future: v1.6.0 is still at V4. + migrations_fix::scheduler::v4::MigrateToV4, + // XcmpQueue + // code says it's V2, but we have V3 onchain. how come? + // v1.0.0: V3 (can migrate V1/V2 to V3) from here onwards we should be consistent + // v1.4.0: V4 + //cumulus_pallet_xcmp_queue::migration::migrate_to_v3, + + // DmpQueue + // code says it's V1 but we have V2 onchain. how come? + // at spec_version 29 it was at 1. (release https://github.com/integritee-network/parachain/releases/tag/1.5.33) (polkadot-v0.9.36) + // next spec_version was v35 where it went to 2 + // v35 is https://github.com/integritee-network/parachain/releases/tag/1.5.40 (polkadot-v0.9.42) + // v1.0.0: V2 (can migrate V0 and V1 to V2) from here onwards we should be consistent + // v1.6.0 is still V2 + + // PolkadotXcm + // mainnet is at V0 + pallet_xcm::migration::v1::MigrateToV1, + // Collective + // migration changes the pallet name prefix (back in 2021). no need to touch this. I guess this has been left untouched when we migrated solo to para + // for consistency, we will bruteforce to V4 + // future: v1.6.0 is still at V4. + // as we have no issues with collectives, we won't change a running system ! + // migrations_fix::collective::v4::MigrateToV4, + // + // Democracy + pallet_democracy::migrations::v1::Migration, + // Multisig + pallet_multisig::migrations::v1::MigrateToV1, + // Balances: mainnet at V0. this here brings us to V1 + // future: v1.6.0 is still at V1 + pallet_balances::migration::MigrateToTrackInactive, +); + /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -809,10 +852,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, // Solochain: AllPalletsReversedWithSystemFirst, Statemint: AllPallets. Which one to take? - ( - pallet_teerex::migrations::v1::MigrateV0toV1, - pallet_teerex::migrations::v2::MigrateV1toV2, - ), + Migrations, >; #[cfg(feature = "runtime-benchmarks")] diff --git a/polkadot-parachains/integritee-runtime/src/migrations_fix.rs b/polkadot-parachains/integritee-runtime/src/migrations_fix.rs new file mode 100644 index 00000000..782ade9c --- /dev/null +++ b/polkadot-parachains/integritee-runtime/src/migrations_fix.rs @@ -0,0 +1,189 @@ +// Copyright (c) 2023 Encointer Association +// This file is part of Encointer +// +// Encointer is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Encointer is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Encointer. If not, see . + +// the following are temporary local migration fixes to solve inconsistencies caused by not +// migrating Storage at the time of migrating runtime code + +pub mod scheduler { + // this is necessary because migrations from v0 to v3 are no longer available in the scheduler + // pallet code and migrating is only possible from v3. The strategy here is to empty the agenda + // (has been empty since genesis) + use frame_support::traits::OnRuntimeUpgrade; + use frame_system::pallet_prelude::BlockNumberFor; + use pallet_scheduler::*; + use sp_std::vec::Vec; + + /// The log target. + const TARGET: &'static str = "runtime::fix::scheduler::migration"; + + pub mod v1 { + use super::*; + use frame_support::{pallet_prelude::*, traits::schedule}; + + #[cfg_attr(any(feature = "std", test), derive(PartialEq, Eq))] + #[derive(Clone, RuntimeDebug, Encode, Decode)] + pub(crate) struct ScheduledV1 { + maybe_id: Option>, + priority: schedule::Priority, + call: Call, + maybe_periodic: Option>, + } + + #[frame_support::storage_alias] + pub(crate) type Agenda = StorageMap< + Pallet, + Twox64Concat, + BlockNumberFor, + Vec::RuntimeCall, BlockNumberFor>>>, + ValueQuery, + >; + + #[frame_support::storage_alias] + pub(crate) type Lookup = + StorageMap, Twox64Concat, Vec, TaskAddress>>; + } + + pub mod v3 { + use super::*; + use frame_support::pallet_prelude::*; + + #[frame_support::storage_alias] + pub(crate) type Agenda = StorageMap< + Pallet, + Twox64Concat, + BlockNumberFor, + Vec>>, + ValueQuery, + >; + + #[frame_support::storage_alias] + pub(crate) type Lookup = + StorageMap, Twox64Concat, Vec, TaskAddress>>; + } + + pub mod v4 { + use super::*; + use frame_support::pallet_prelude::*; + + #[frame_support::storage_alias] + pub type Agenda = StorageMap< + Pallet, + Twox64Concat, + BlockNumberFor, + BoundedVec< + Option>, + ::MaxScheduledPerBlock, + >, + ValueQuery, + >; + + pub(crate) type TaskName = [u8; 32]; + + #[frame_support::storage_alias] + pub(crate) type Lookup = + StorageMap, Twox64Concat, TaskName, TaskAddress>>; + + /// Migrate the scheduler pallet from V0 to V4 without changing storage. the only active schedule has been submitted already in V4 + pub struct MigrateToV4(sp_std::marker::PhantomData); + + impl OnRuntimeUpgrade for MigrateToV4 { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, &'static str> { + let agendas = v1::Agenda::::iter_keys().count() as u32; + let lookups = v1::Lookup::::iter_keys().count() as u32; + log::info!(target: TARGET, "agendas present which will be left untouched: {}/{}...", agendas, lookups); + Ok((agendas, lookups).encode()) + } + + fn on_runtime_upgrade() -> Weight { + let onchain_version = Pallet::::on_chain_storage_version(); + if onchain_version >= 3 { + log::warn!( + target: TARGET, + "skipping v0 to v4 migration: executed on wrong storage version.\ + Expected version < 3, found {:?}", + onchain_version, + ); + return T::DbWeight::get().reads(1) + } + log::info!(target: TARGET, "migrating from {:?} to 4", onchain_version); + StorageVersion::new(4).put::>(); + + T::DbWeight::get().reads_writes(1, 1) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_state: Vec) -> Result<(), &'static str> { + ensure!(StorageVersion::get::>() == 4, "Must upgrade"); + + let agendas = Agenda::::iter_keys().count() as u32; + let lookups = Lookup::::iter_keys().count() as u32; + log::info!(target: TARGET, "agendas present a posteriori: {}/{}...", agendas, lookups); + Ok(()) + } + } + } +} + +pub mod collective { + // this is necessary because migrations from v0 to v3 are no longer available in the scheduler + // pallet code and migrating is only possible from v3. The strategy here is to empty the agenda + // (has been empty since genesis) + use frame_support::traits::OnRuntimeUpgrade; + use pallet_collective::*; + use sp_std::vec::Vec; + + /// The log target. + const TARGET: &'static str = "runtime::fix::collective::migration"; + + pub mod v4 { + use super::*; + use frame_support::pallet_prelude::*; + + /// Migrate the scheduler pallet from V0 to V4 without changing storage. the only active schedule has been submitted already in V4 + pub struct MigrateToV4(sp_std::marker::PhantomData); + + impl OnRuntimeUpgrade for MigrateToV4 { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, &'static str> { + Ok((0u32).encode()) + } + + fn on_runtime_upgrade() -> Weight { + let onchain_version = Pallet::::on_chain_storage_version(); + if onchain_version >= 3 { + log::warn!( + target: TARGET, + "skipping v0 to v4 migration: executed on wrong storage version.\ + Expected version < 3, found {:?}", + onchain_version, + ); + return T::DbWeight::get().reads(1) + } + log::info!(target: TARGET, "migrating from {:?} to 4", onchain_version); + StorageVersion::new(4).put::>(); + + T::DbWeight::get().reads_writes(1, 1) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_state: Vec) -> Result<(), &'static str> { + ensure!(StorageVersion::get::>() == 4, "Must upgrade"); + Ok(()) + } + } + } +} diff --git a/polkadot-parachains/integritee-runtime/src/xcm_config.rs b/polkadot-parachains/integritee-runtime/src/xcm_config.rs index 9e51d23b..18984a6c 100644 --- a/polkadot-parachains/integritee-runtime/src/xcm_config.rs +++ b/polkadot-parachains/integritee-runtime/src/xcm_config.rs @@ -79,6 +79,7 @@ parameter_types! { parents:0, interior: Junctions::X1(TEER_GENERAL_KEY) }; + pub CheckingAccount: AccountId = PolkadotXcm::check_account(); } // Supported Currencies. diff --git a/zombienet/rococo-local-with-integritee.toml b/zombienet/rococo-local-with-integritee.toml index 9d9870df..644ea805 100644 --- a/zombienet/rococo-local-with-integritee.toml +++ b/zombienet/rococo-local-with-integritee.toml @@ -29,11 +29,11 @@ chain = "integritee-rococo-local-dev" [[parachains.collators]] name = "integritee-collator01" -command = "./target/release/integritee-collator" +command = "~/bin/integritee-collator-v1.6.4" ws_port = 9944 [[parachains.collators]] name = "integritee-collator02" -command = "./target/release/integritee-collator" +command = "~/bin/integritee-collator-v1.6.4" ws_port = 9945 diff --git a/zombienet/rococo-local-with-privacy-sidechain-demo-setup.toml b/zombienet/rococo-local-with-privacy-sidechain-demo-setup.toml index 4b551dc4..3de0f7d9 100644 --- a/zombienet/rococo-local-with-privacy-sidechain-demo-setup.toml +++ b/zombienet/rococo-local-with-privacy-sidechain-demo-setup.toml @@ -3,7 +3,7 @@ timeout = 10000 [relaychain] default_command = "~/bin/polkadot-v0.9.42" -default_args = [ "-lparachain=debug" ] +default_args = [ "-lparachain=debug --state-pruning=archive --blocks-pruning=archive" ] chain = "rococo-local" [[relaychain.nodes]] @@ -29,12 +29,12 @@ chain = "integritee-rococo-local-dev" [[parachains.collators]] name = "integritee-collator-1" - command = "./target/release/integritee-collator" + command = "~/bin/integritee-collator-v1.6.4" ws_port = 9944 [[parachains.collators]] name = "integritee-collator-2" - command = "./target/release/integritee-collator" + command = "~/bin/integritee-collator-v1.6.4" ws_port = 9945 [[parachains]] @@ -46,13 +46,13 @@ chain = "integritee-rococo-local-dev" [[parachains.collators]] name = "asset-hub-collator-1" validator = true - command = "./target/release/integritee-collator" + command = "~/bin/integritee-collator-v1.6.4" ws_port = 9954 [[parachains.collators]] name = "asset-hub-collator-2" validator = true - command = "./target/release/integritee-collator" + command = "~/bin/integritee-collator-v1.6.4" ws_port = 9955 [[hrmp_channels]] From cd47529ce3cf36024b07cb809876194563023fac Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Thu, 18 Jan 2024 09:37:15 +0100 Subject: [PATCH 4/6] migration defined and commented --- .../integritee-runtime/src/lib.rs | 10 ++- .../integritee-runtime/src/migrations_fix.rs | 72 +++++++++++++++++++ 2 files changed, 79 insertions(+), 3 deletions(-) diff --git a/polkadot-parachains/integritee-runtime/src/lib.rs b/polkadot-parachains/integritee-runtime/src/lib.rs index eb324577..d2a717af 100644 --- a/polkadot-parachains/integritee-runtime/src/lib.rs +++ b/polkadot-parachains/integritee-runtime/src/lib.rs @@ -827,8 +827,10 @@ pub type Migrations = ( // v1.6.0 is still V2 // PolkadotXcm - // mainnet is at V0 - pallet_xcm::migration::v1::MigrateToV1, + // mainnet is at V0. migration fails with corrupt storage because the the entries have been written with the new version already + // therefore it should be safe to just bruteforce the storageVersion to 1 + //pallet_xcm::migration::v1::MigrateToV1, + migrations_fix::xcm::v1::MigrateToV1, // Collective // migration changes the pallet name prefix (back in 2021). no need to touch this. I guess this has been left untouched when we migrated solo to para // for consistency, we will bruteforce to V4 @@ -837,9 +839,11 @@ pub type Migrations = ( // migrations_fix::collective::v4::MigrateToV4, // // Democracy + // as we don't have issues with this, let's not change a running system. we will simply bump StorageVersion pallet_democracy::migrations::v1::Migration, // Multisig - pallet_multisig::migrations::v1::MigrateToV1, + // this migration takes 500ms. We'll skip this until we have async backing + //pallet_multisig::migrations::v1::MigrateToV1, // Balances: mainnet at V0. this here brings us to V1 // future: v1.6.0 is still at V1 pallet_balances::migration::MigrateToTrackInactive, diff --git a/polkadot-parachains/integritee-runtime/src/migrations_fix.rs b/polkadot-parachains/integritee-runtime/src/migrations_fix.rs index 782ade9c..d1995bab 100644 --- a/polkadot-parachains/integritee-runtime/src/migrations_fix.rs +++ b/polkadot-parachains/integritee-runtime/src/migrations_fix.rs @@ -187,3 +187,75 @@ pub mod collective { } } } + +//PolkadotXcm pallet +pub mod xcm { + // this is necessary because migrations from v0 to v3 are no longer available in the scheduler + // pallet code and migrating is only possible from v3. The strategy here is to empty the agenda + // (has been empty since genesis) + use frame_support::traits::OnRuntimeUpgrade; + use pallet_xcm::*; + use sp_std::vec::Vec; + + /// The log target. + const TARGET: &'static str = "runtime::fix::xcm::migration"; + + pub mod v1 { + use super::*; + use frame_support::pallet_prelude::*; + use xcm::{prelude::XcmVersion, v3::QueryId, VersionedMultiLocation}; + + #[frame_support::storage_alias] + pub(super) type VersionNotifyTargets = StorageDoubleMap< + Pallet, + Twox64Concat, + XcmVersion, + Blake2_128Concat, + VersionedMultiLocation, + (QueryId, Weight, XcmVersion), + OptionQuery, + >; + + pub struct MigrateToV1(sp_std::marker::PhantomData); + + impl OnRuntimeUpgrade for MigrateToV1 { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, &'static str> { + let targets = VersionNotifyTargets::::iter_prefix_values(3).count() as u32; + log::info!(target: TARGET, "found {} VersionNotifyTargets", targets); + Ok(targets.encode()) + } + + fn on_runtime_upgrade() -> Weight { + let onchain_version = Pallet::::on_chain_storage_version(); + if onchain_version > 0 { + log::warn!( + target: TARGET, + "skipping v0 to v1 migration: executed on wrong storage version.\ + Expected version 0, found {:?}", + onchain_version, + ); + return T::DbWeight::get().reads(1) + } + log::info!(target: TARGET, "migrating from {:?} to 1", onchain_version); + StorageVersion::new(1).put::>(); + + T::DbWeight::get().reads_writes(1, 1) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(state: Vec) -> Result<(), &'static str> { + ensure!(StorageVersion::get::>() == 1, "Must upgrade"); + let old_targets: u32 = Decode::decode(&mut &state[..]) + .expect("pre_upgrade provides a valid state; qed"); + let targets = VersionNotifyTargets::::iter_prefix_values(3); + assert_eq!( + old_targets, + targets.count() as u32, + "must preserve all targets and be able to decode storage" + ); + Ok(()) + } + } + } +} From bbca928e5766f4eec16ed99a4c419fd1be0cb096 Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Thu, 18 Jan 2024 09:38:44 +0100 Subject: [PATCH 5/6] bump spec-version --- polkadot-parachains/Cargo.toml | 2 +- polkadot-parachains/integritee-runtime/Cargo.toml | 2 +- polkadot-parachains/integritee-runtime/src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/polkadot-parachains/Cargo.toml b/polkadot-parachains/Cargo.toml index edea43c2..078cb3aa 100644 --- a/polkadot-parachains/Cargo.toml +++ b/polkadot-parachains/Cargo.toml @@ -2,7 +2,7 @@ name = "integritee-collator" description = "The Integritee parachain collator binary" # align major.minor revision with the runtimes. bump patch revision ad lib. make this the github release tag -version = "1.6.4" +version = "1.6.5" authors = ["Integritee AG "] homepage = "https://integritee.network/" repository = "https://github.com/integritee-network/parachain" diff --git a/polkadot-parachains/integritee-runtime/Cargo.toml b/polkadot-parachains/integritee-runtime/Cargo.toml index fc345111..5ee2b649 100644 --- a/polkadot-parachains/integritee-runtime/Cargo.toml +++ b/polkadot-parachains/integritee-runtime/Cargo.toml @@ -2,7 +2,7 @@ name = "integritee-runtime" description = "The Integritee parachain runtime" # patch revision must match runtime spec_version -version = "1.6.40" +version = "1.6.41" authors = ["Integritee AG "] homepage = "https://integritee.network/" repository = "https://github.com/integritee-network/parachain" diff --git a/polkadot-parachains/integritee-runtime/src/lib.rs b/polkadot-parachains/integritee-runtime/src/lib.rs index d2a717af..0965a2c3 100644 --- a/polkadot-parachains/integritee-runtime/src/lib.rs +++ b/polkadot-parachains/integritee-runtime/src/lib.rs @@ -108,7 +108,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("integritee-parachain"), impl_name: create_runtime_str!("integritee-full"), authoring_version: 2, - spec_version: 40, + spec_version: 41, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 6, From c48d822cd323d0ee7f9b5b38036c1820df67ab1b Mon Sep 17 00:00:00 2001 From: Alain Brenzikofer Date: Thu, 18 Jan 2024 09:48:17 +0100 Subject: [PATCH 6/6] cosmetics --- Cargo.lock | 4 ++-- polkadot-parachains/integritee-runtime/src/lib.rs | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ab19e29e..c284f241 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3874,7 +3874,7 @@ dependencies = [ [[package]] name = "integritee-collator" -version = "1.6.4" +version = "1.6.5" dependencies = [ "assert_cmd", "async-trait", @@ -3957,7 +3957,7 @@ dependencies = [ [[package]] name = "integritee-runtime" -version = "1.6.40" +version = "1.6.41" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", diff --git a/polkadot-parachains/integritee-runtime/src/lib.rs b/polkadot-parachains/integritee-runtime/src/lib.rs index 0965a2c3..da180f84 100644 --- a/polkadot-parachains/integritee-runtime/src/lib.rs +++ b/polkadot-parachains/integritee-runtime/src/lib.rs @@ -812,10 +812,12 @@ pub type Migrations = ( // migrations. mainnet at V0, jumping to V4 here // future: v1.6.0 is still at V4. migrations_fix::scheduler::v4::MigrateToV4, + // // XcmpQueue // code says it's V2, but we have V3 onchain. how come? // v1.0.0: V3 (can migrate V1/V2 to V3) from here onwards we should be consistent // v1.4.0: V4 + // Plan: upgrade to v1.0.0. then we're aligned //cumulus_pallet_xcmp_queue::migration::migrate_to_v3, // DmpQueue @@ -825,25 +827,26 @@ pub type Migrations = ( // v35 is https://github.com/integritee-network/parachain/releases/tag/1.5.40 (polkadot-v0.9.42) // v1.0.0: V2 (can migrate V0 and V1 to V2) from here onwards we should be consistent // v1.6.0 is still V2 + // Plan: upgrade to v1.0.0. then we're aligned // PolkadotXcm // mainnet is at V0. migration fails with corrupt storage because the the entries have been written with the new version already - // therefore it should be safe to just bruteforce the storageVersion to 1 - //pallet_xcm::migration::v1::MigrateToV1, + // therefore it should be safe to just bruteforce the storageVersion to 1 and then test that we can still decode VersionNotifyTargets (only thing the original migration changes) migrations_fix::xcm::v1::MigrateToV1, // Collective // migration changes the pallet name prefix (back in 2021). no need to touch this. I guess this has been left untouched when we migrated solo to para // for consistency, we will bruteforce to V4 // future: v1.6.0 is still at V4. - // as we have no issues with collectives, we won't change a running system ! + // Plan: as we have no issues with collectives, we won't change a running system ! // migrations_fix::collective::v4::MigrateToV4, // // Democracy - // as we don't have issues with this, let's not change a running system. we will simply bump StorageVersion pallet_democracy::migrations::v1::Migration, + // // Multisig // this migration takes 500ms. We'll skip this until we have async backing //pallet_multisig::migrations::v1::MigrateToV1, + // // Balances: mainnet at V0. this here brings us to V1 // future: v1.6.0 is still at V1 pallet_balances::migration::MigrateToTrackInactive,