XCMv5: Fix for compatibility with V4#6503
XCMv5: Fix for compatibility with V4#6503franciscoaguirre merged 17 commits intoparitytech:masterfrom
Conversation
There was a problem hiding this comment.
Can you be more specific about what the problem is? The element link does not seem to be working for me.
XCMv4 and XCMv5 each have their own NetworkId with different encoding layouts, and they need to be explicitly converted to each other using From or TryFrom traits.
So then surely BH needs to take care to send an XCM to AH that is in the correct format?
|
The PR makes sense if we have v4::NetworkId entries in storage that we want to directly interpret as v5::NetworkId entries without migrating them. Is this the case? |
Co-authored-by: Adrian Catangiu <adrian@parity.io>
Actually we don't store the call on BH, just send the encoded call to AH directly. |
|
@acatangiu For polkadot-sdk/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs Lines 417 to 418 in a77940b |
|
@franciscoaguirre Could you help to approve this PR or anything unclear that I can provide, please let me know. |
franciscoaguirre
left a comment
There was a problem hiding this comment.
Seems reasonable to keep the same indices
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Head branch was pushed to by a user without write access
AFAIK this has been discussed before and decided against because the storage still needs an upgrade every time to avoid situations of incorrect duplicate assetids registered: e.g. same ID but once with v3 and once with v4 - in the end it doesn't seem to help and makes code more complicated... |
Pull Request is not mergeable
fe4846f
## Description Our smoke tests transfer `WETH` from Sepolia to Westend-AssetHub breaks, try to reregister `WETH` on AH but fails as following: https://bridgehub-westend.subscan.io/xcm_message/westend-4796d6b3600aca32ef63b9953acf6a456cfd2fbe https://assethub-westend.subscan.io/extrinsic/9731267-0?event=9731267-2 The reason is that the transact call encoded on BH to register the asset https://github.com/paritytech/polkadot-sdk/blob/a77940bac783108fcae783c553528c8d5328e5b2/bridges/snowbridge/primitives/router/src/inbound/mod.rs#L282-L289 ``` 0x3500020209079edaa8020300fff9976782d46cc05630d1f6ebab18b2324d6b1400ce796ae65569a670d0c1cc1ac12515a3ce21b5fbf729d63d7b289baad070139d01000000000000000000000000000000 ``` the `asset_id` which is the xcm location can't be decoded on AH in V5 Issue initial post in https://matrix.to/#/!qUtSTcfMJzBdPmpFKa:parity.io/$RNMAxIIOKGtBAqkgwiFuQf4eNaYpmOK-Pfw4d6vv1aU?via=parity.io&via=matrix.org&via=web3.foundation --------- Co-authored-by: Adrian Catangiu <adrian@parity.io> Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
## Description Our smoke tests transfer `WETH` from Sepolia to Westend-AssetHub breaks, try to reregister `WETH` on AH but fails as following: https://bridgehub-westend.subscan.io/xcm_message/westend-4796d6b3600aca32ef63b9953acf6a456cfd2fbe https://assethub-westend.subscan.io/extrinsic/9731267-0?event=9731267-2 The reason is that the transact call encoded on BH to register the asset https://github.com/paritytech/polkadot-sdk/blob/a77940bac783108fcae783c553528c8d5328e5b2/bridges/snowbridge/primitives/router/src/inbound/mod.rs#L282-L289 ``` 0x3500020209079edaa8020300fff9976782d46cc05630d1f6ebab18b2324d6b1400ce796ae65569a670d0c1cc1ac12515a3ce21b5fbf729d63d7b289baad070139d01000000000000000000000000000000 ``` the `asset_id` which is the xcm location can't be decoded on AH in V5 Issue initial post in https://matrix.to/#/!qUtSTcfMJzBdPmpFKa:parity.io/$RNMAxIIOKGtBAqkgwiFuQf4eNaYpmOK-Pfw4d6vv1aU?via=parity.io&via=matrix.org&via=web3.foundation --------- Co-authored-by: Adrian Catangiu <adrian@parity.io> Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Backporting #6503 in order to fix snowbridge. Needed for polkadot-fellows/runtimes#606 --------- Co-authored-by: Ron <yrong1997@gmail.com> Co-authored-by: Adrian Catangiu <adrian@parity.io> Co-authored-by: Dónal Murray <donal.murray@parity.io> Co-authored-by: alvicsam <alvicsam@gmail.com>
Description
Our smoke tests transfer
WETHfrom Sepolia to Westend-AssetHub breaks, try to reregisterWETHon AH but fails as following:https://bridgehub-westend.subscan.io/xcm_message/westend-4796d6b3600aca32ef63b9953acf6a456cfd2fbe
https://assethub-westend.subscan.io/extrinsic/9731267-0?event=9731267-2
The reason is that the transact call encoded on BH to register the asset
polkadot-sdk/bridges/snowbridge/primitives/router/src/inbound/mod.rs
Lines 282 to 289 in a77940b
the
asset_idwhich is the xcm location can't be decoded on AH in V5Issue initial post in https://matrix.to/#/!qUtSTcfMJzBdPmpFKa:parity.io/$RNMAxIIOKGtBAqkgwiFuQf4eNaYpmOK-Pfw4d6vv1aU?via=parity.io&via=matrix.org&via=web3.foundation