Skip to content
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

Migration from v3::Location to v4::Location for ForeignAssets #4128

Closed
franciscoaguirre opened this issue Apr 15, 2024 · 1 comment · Fixed by #4129
Closed

Migration from v3::Location to v4::Location for ForeignAssets #4128

franciscoaguirre opened this issue Apr 15, 2024 · 1 comment · Fixed by #4129
Assignees
Labels
T6-XCM This PR/Issue is related to XCM.

Comments

@franciscoaguirre
Copy link
Contributor

ForeignAssets in the asset hubs use XCM Locations.
They don't use VersionedLocation, they are fixed to v3::Location.
When we introduced XCMv4, we left the assets using v3::Location instead of moving them to v4::Location, since they needed a migration.
We should migrate them.

@franciscoaguirre franciscoaguirre added the T6-XCM This PR/Issue is related to XCM. label Apr 15, 2024
@acatangiu acatangiu moved this to Todo in Bridges + XCM Apr 15, 2024
@acatangiu
Copy link
Contributor

To be clear, migrate to VersionedLocation

github-merge-queue bot pushed a commit that referenced this issue Aug 14, 2024
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](paritytech/polkadot#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](polkadot-fellows/RFCs#108).
I'll configure MBMs (Multi-Block Migrations) then and make the actual
migration.

Fixes #4128

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
@github-project-automation github-project-automation bot moved this from Todo to Done in Bridges + XCM Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T6-XCM This PR/Issue is related to XCM.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants