Skip to content
Unverified Commit be74fe92 authored by Francisco Aguirre's avatar Francisco Aguirre Committed by GitHub
Browse files

Migrate foreign assets v3::Location to v4::Location (#4129)



In the move from XCMv3 to XCMv4, the `AssetId` for `ForeignAssets` in
`asset-hub-rococo` and `asset-hub-westend` was left as `v3::Location` to
be later migrated to `v4::Location`.

This is that migration PR.

Because the encoding of `v3::Location` and `v4::Location` is the same,
we don't need to do any data migration, the keys will still be
decodable.
The [original idea by
Jan](https://github.com/paritytech/polkadot/pull/7236) was to make the
v4 changes in v3 since the ABI (the encoding/decoding) didn't change.
Corroborated the ABI is the same iterating over all storage, the code is
on [another
branch](https://github.com/paritytech/polkadot-sdk/blob/cisco-assert-v3-v4-encodings-equal/cumulus/parachains/runtimes/assets/migrations/src/foreign_assets_to_v4/mod.rs).

We will need a data migration when we want to update from `v4::Location`
to `v5::Location` because of [the accepted RFC changing the NetworkId
enum](https://github.com/polkadot-fellows/RFCs/pull/108).
I'll configure MBMs (Multi-Block Migrations) then and make the actual
migration.

Fixes https://github.com/paritytech/polkadot-sdk/issues/4128

---------

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
Co-authored-by: command-bot <>
parent 0cd577ba
Pipeline #489856 waiting for manual action with stages
in 25 minutes and 48 seconds