-
Notifications
You must be signed in to change notification settings - Fork 710
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
Fix migrations for pallet-xcm #6148
Conversation
# Conflicts: # polkadot/runtime/westend/src/lib.rs
…RemoteLockedFungibles`
bot fmt |
@bkontur https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7624303 was started for your command Comment |
@bkontur Command |
/cmd prdoc |
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
@@ -1258,6 +1262,168 @@ fn multistage_migration_works() { | |||
}) | |||
} | |||
|
|||
#[test] | |||
fn migrate_data_to_xcm_version_works() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice test! 👍
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-6148-to-stable2407
git worktree add --checkout .worktree/backport-6148-to-stable2407 backport-6148-to-stable2407
cd .worktree/backport-6148-to-stable2407
git reset --hard HEAD^
git cherry-pick -x efd660309f2ee944718a6302627bbb956ada3729
git push --force-with-lease |
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-6148-to-stable2409
git worktree add --checkout .worktree/backport-6148-to-stable2409 backport-6148-to-stable2409
cd .worktree/backport-6148-to-stable2409
git reset --hard HEAD^
git cherry-pick -x efd660309f2ee944718a6302627bbb956ada3729
git push --force-with-lease |
Relates to: #4826 Relates to: #3214 `pallet-xcm` stores some operational data that uses `Versioned*` XCM types. When we add a new XCM version (XV), we deprecate XV-2 and remove XV-3. Without proper migration, this can lead to issues with [undecodable storage](https://github.com/paritytech/polkadot-sdk/actions/runs/11381324568/job/31662577532?pr=6092), as was identified on the XCMv5 branch where XCMv2 was removed. This PR extends the existing `MigrateToLatestXcmVersion` to include migration for the `Queries`, `LockedFungibles`, and `RemoteLockedFungibles` storage types. Additionally, more checks were added to `try_state` for these types. - [x] create tracking issue for `polkadot-fellows` polkadot-fellows/runtimes#492 - [x] Add missing `MigrateToLatestXcmVersion` for westend - [x] fix pallet-xcm `Queries` - fails for Westend https://github.com/paritytech/polkadot-sdk/actions/runs/11381324568/job/31662577532?pr=6092 - `V2` was removed from `Versioned*` stuff, but we have a live data with V2 e.g. Queries - e.g. Kusama or Polkadot relay chains ``` VersionNotifier: { origin: { V2: { parents: 0 interior: { X1: { Parachain: 2,124 } } } } isActive: true } ``` ![image](https://github.com/user-attachments/assets/f59f761b-46a7-4def-8aea-45c4e41c0a00) - [x] fix also for `RemoteLockedFungibles` - [x] fix also for `LockedFungibles` - [ ] deploy on Westend chains before XCMv5 - [ ] #6188 --------- Co-authored-by: command-bot <> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com> (cherry picked from commit efd6603)
Relates to: #4826 Relates to: #3214 `pallet-xcm` stores some operational data that uses `Versioned*` XCM types. When we add a new XCM version (XV), we deprecate XV-2 and remove XV-3. Without proper migration, this can lead to issues with [undecodable storage](https://github.com/paritytech/polkadot-sdk/actions/runs/11381324568/job/31662577532?pr=6092), as was identified on the XCMv5 branch where XCMv2 was removed. This PR extends the existing `MigrateToLatestXcmVersion` to include migration for the `Queries`, `LockedFungibles`, and `RemoteLockedFungibles` storage types. Additionally, more checks were added to `try_state` for these types. - [x] create tracking issue for `polkadot-fellows` polkadot-fellows/runtimes#492 - [x] Add missing `MigrateToLatestXcmVersion` for westend - [x] fix pallet-xcm `Queries` - fails for Westend https://github.com/paritytech/polkadot-sdk/actions/runs/11381324568/job/31662577532?pr=6092 - `V2` was removed from `Versioned*` stuff, but we have a live data with V2 e.g. Queries - e.g. Kusama or Polkadot relay chains ``` VersionNotifier: { origin: { V2: { parents: 0 interior: { X1: { Parachain: 2,124 } } } } isActive: true } ``` ![image](https://github.com/user-attachments/assets/f59f761b-46a7-4def-8aea-45c4e41c0a00) - [x] fix also for `RemoteLockedFungibles` - [x] fix also for `LockedFungibles` - [ ] deploy on Westend chains before XCMv5 - [ ] #6188 --------- Co-authored-by: command-bot <> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com> (cherry picked from commit efd6603)
Relates to: paritytech#4826 Relates to: paritytech#3214 ## Description `pallet-xcm` stores some operational data that uses `Versioned*` XCM types. When we add a new XCM version (XV), we deprecate XV-2 and remove XV-3. Without proper migration, this can lead to issues with [undecodable storage](https://github.com/paritytech/polkadot-sdk/actions/runs/11381324568/job/31662577532?pr=6092), as was identified on the XCMv5 branch where XCMv2 was removed. This PR extends the existing `MigrateToLatestXcmVersion` to include migration for the `Queries`, `LockedFungibles`, and `RemoteLockedFungibles` storage types. Additionally, more checks were added to `try_state` for these types. ## TODO - [x] create tracking issue for `polkadot-fellows` polkadot-fellows/runtimes#492 - [x] Add missing `MigrateToLatestXcmVersion` for westend - [x] fix pallet-xcm `Queries` - fails for Westend https://github.com/paritytech/polkadot-sdk/actions/runs/11381324568/job/31662577532?pr=6092 - `V2` was removed from `Versioned*` stuff, but we have a live data with V2 e.g. Queries - e.g. Kusama or Polkadot relay chains ``` VersionNotifier: { origin: { V2: { parents: 0 interior: { X1: { Parachain: 2,124 } } } } isActive: true } ``` ![image](https://github.com/user-attachments/assets/f59f761b-46a7-4def-8aea-45c4e41c0a00) - [x] fix also for `RemoteLockedFungibles` - [x] fix also for `LockedFungibles` ## Follow-ups - [ ] deploy on Westend chains before XCMv5 - [ ] paritytech#6188 --------- Co-authored-by: command-bot <> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Relates to: paritytech#4826 Relates to: paritytech#3214 ## Description `pallet-xcm` stores some operational data that uses `Versioned*` XCM types. When we add a new XCM version (XV), we deprecate XV-2 and remove XV-3. Without proper migration, this can lead to issues with [undecodable storage](https://github.com/paritytech/polkadot-sdk/actions/runs/11381324568/job/31662577532?pr=6092), as was identified on the XCMv5 branch where XCMv2 was removed. This PR extends the existing `MigrateToLatestXcmVersion` to include migration for the `Queries`, `LockedFungibles`, and `RemoteLockedFungibles` storage types. Additionally, more checks were added to `try_state` for these types. ## TODO - [x] create tracking issue for `polkadot-fellows` polkadot-fellows/runtimes#492 - [x] Add missing `MigrateToLatestXcmVersion` for westend - [x] fix pallet-xcm `Queries` - fails for Westend https://github.com/paritytech/polkadot-sdk/actions/runs/11381324568/job/31662577532?pr=6092 - `V2` was removed from `Versioned*` stuff, but we have a live data with V2 e.g. Queries - e.g. Kusama or Polkadot relay chains ``` VersionNotifier: { origin: { V2: { parents: 0 interior: { X1: { Parachain: 2,124 } } } } isActive: true } ``` ![image](https://github.com/user-attachments/assets/f59f761b-46a7-4def-8aea-45c4e41c0a00) - [x] fix also for `RemoteLockedFungibles` - [x] fix also for `LockedFungibles` ## Follow-ups - [ ] deploy on Westend chains before XCMv5 - [ ] paritytech#6188 --------- Co-authored-by: command-bot <> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Backport #6148 into `stable2409` from bkontur. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> --------- Co-authored-by: Branislav Kontur <bkontur@gmail.com>
# Context This PR aims to introduce XCMv5, for now it's in progress and will be updated over time. This branch will serve as a milestone branch for merging in all features we want to add to XCM, roughly outlined [here](polkadot-fellows/xcm-format#60). More features could be added. ## TODO - [x] Migrate foreign assets from v3 to v4 - [x] Setup v5 skeleton - [x] Remove XCMv2 - [x] #5390 - [x] #5585 - [x] #5420 - [x] #5876 - [x] #5971 - [x] #6148 - [x] #6228 Fixes #3434 Fixes #4190 Fixes #5209 Fixes #5241 Fixes #4284 --------- Signed-off-by: Adrian Catangiu <adrian@parity.io> Co-authored-by: Adrian Catangiu <adrian@parity.io> Co-authored-by: Andrii <ndk@parity.io> Co-authored-by: Branislav Kontur <bkontur@gmail.com> Co-authored-by: Joseph Zhao <65984904+programskillforverification@users.noreply.github.com> Co-authored-by: Nazar Mokrynskyi <nazar@mokrynskyi.com> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: command-bot <> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Serban Iorga <serban@parity.io>
Backport #6148 into `stable2407` from bkontur. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> --------- Co-authored-by: Branislav Kontur <bkontur@gmail.com>
Relates to: #4826
Relates to: #3214
Description
pallet-xcm
stores some operational data that usesVersioned*
XCM types. When we add a new XCM version (XV), we deprecate XV-2 and remove XV-3. Without proper migration, this can lead to issues with undecodable storage, as was identified on the XCMv5 branch where XCMv2 was removed.This PR extends the existing
MigrateToLatestXcmVersion
to include migration for theQueries
,LockedFungibles
, andRemoteLockedFungibles
storage types. Additionally, more checks were added totry_state
for these types.TODO
polkadot-fellows
Migration forpallet_xcm
data:Queries
,LockedFungibles
, andRemoteLockedFungibles
polkadot-fellows/runtimes#492MigrateToLatestXcmVersion
for westendQueries
V2
was removed fromVersioned*
stuff, but we have a live data with V2 e.g. Queries - e.g. Kusama or Polkadot relay chainsRemoteLockedFungibles
LockedFungibles
Follow-ups
pallet_xcm
internal data changes proposal #6188