Commit 807dc3b
Fix migrations for pallet-xcm (paritytech#6148)
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
}
```

- [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 <[email protected]>
Co-authored-by: Francisco Aguirre <[email protected]>1 parent 5482b6b commit 807dc3b
10 files changed
Lines changed: 610 additions & 14 deletions
File tree
- polkadot
- runtime/westend/src
- xcm
- docs/src/cookbook/relay_token_transactor
- parachain
- relay_chain
- pallet-xcm/src
- tests
- xcm-builder/src
- asset_exchange/single_asset_adapter
- tests/pay
- xcm-runtime-apis/tests
- prdoc
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1809 | 1809 | | |
1810 | 1810 | | |
1811 | 1811 | | |
| 1812 | + | |
| 1813 | + | |
1812 | 1814 | | |
1813 | 1815 | | |
1814 | 1816 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2807 | 2807 | | |
2808 | 2808 | | |
2809 | 2809 | | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
| 2835 | + | |
| 2836 | + | |
| 2837 | + | |
| 2838 | + | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
2810 | 2848 | | |
2811 | 2849 | | |
2812 | 2850 | | |
| |||
2887 | 2925 | | |
2888 | 2926 | | |
2889 | 2927 | | |
2890 | | - | |
| 2928 | + | |
2891 | 2929 | | |
2892 | 2930 | | |
2893 | 2931 | | |
| |||
3268 | 3306 | | |
3269 | 3307 | | |
3270 | 3308 | | |
3271 | | - | |
| 3309 | + | |
3272 | 3310 | | |
3273 | 3311 | | |
3274 | 3312 | | |
| |||
0 commit comments