-
Notifications
You must be signed in to change notification settings - Fork 739
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
[asset-hubs] Investigate usage of MultiLocation vs VersionedMultiLocation #1130
Comments
We have to be careful here, because if/when XCMv4 comes out, it will be a huge pain if all the asset IDs change. Hopefully the
This seems sensible in any case. |
I also wrote in #1230 (comment) but we should definitely use |
@franciscoaguirre We just need to think that this two locations below are not the same - they point to the same but have different encodings because of
So maybe we will need something like And the other thing is that xcm stuff like |
If we use |
I think there are different cases, for example for treasury In case with assets pallet, I see it different way. Some assets will be there for a while, and if we use versioned type, that asset can be identified only be specific version and that xcm version has to be supported "forever". In addition we can have some label for the new version which can tell the clients if encodings are changed with new version. And tests proofing it. |
yeah, this seems simple way to go, but maybe not used But I am not sure about consequences and how this could affect e.g. external wallets, if versions wont be compatible. |
Just some hints for the future (when XCMv5 will come): What about changing
This could escalate to enable setting up the runtime like this:
The second problem concerns data retrieval. I'm unsure about how wallets are currently accessing or reading data, such as However, for data retrieval, we have the runtime API, which already utilizes
|
dapps are usually subscribing to storage directly because it allows subscription, which is not yet possible for runtime API calls |
Summary
Investigate and setup proper usage of
MultiLocation
for storage items.Problem 1 - ForeignAssets - asset_id as
xcm::prelude::MultiLocation
MultiLocation is used as pallet_assets::AssetId.
Problem 2 - asset-conversion uses
Box<xcm::opaque::v3::MultiLocation>
for storage itemSee asset conversion pallet
MultiAssetId
definition:Problem 3 - asset-conversion uses
Box<xcm::opaque::v3::MultiLocation>
for public runtime apiSee more description here.
Questions:
How should we handle
MultiLocation
vsVersionedMultiLocation
in proper way?TODO
xcm::prelude::MultiLocation
toxcm::VersionedMultiLocation
?xcm::v3::MultiLocation
againstxcm::prelude::MultiLocation
?The text was updated successfully, but these errors were encountered: