Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

LocationToAccountId reverse AccountId to Location can't distinguish #4296

Closed
zqhxuyuan opened this issue Nov 16, 2021 · 1 comment
Closed
Labels
T6-XCM This PR/Issue is related to XCM.

Comments

@zqhxuyuan
Copy link
Contributor

current there're AccountId32Aliases inside LocationToAccountId, we add another RelayChainAccountId32Aliases type in orml PR.

both of those two struct type can reverse AccountId to MultiLocation, thus only the first one will take effect. for example: if we configure with order (AccountId32Aliases, RelayChainAccountId32Aliases), then reverse AccountId on LocationToAccountId resulting (0, AccountId32). there'er no chance to get into (1, AccountId32) only if we configured with order (RelayChainAccountId32Aliases, AccountId32Aliases), but at the same time, the latter configure also cause no chance to get into (0, AccountId32).

Also I've checked polkadot codebase, seems there're no usercase invoking reverse() method on LocationToAccountId, Am I right?

@KiChjang
Copy link
Contributor

KiChjang commented Feb 9, 2022

This sounds like it's an issue that can be solved on your chain with a custom implementation of Convert<MultiLocation, AccountId>. You must come up with a heuristic that allows you to determine whether or not the resulting MultiLocation must have 1 parent or not.

Closing as I don't think there's anything that needs to be done on the Polkadot side.

@KiChjang KiChjang closed this as completed Feb 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T6-XCM This PR/Issue is related to XCM.
Projects
None yet
Development

No branches or pull requests

2 participants