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

Conflating Filtering and Identifying in XCM v0 NetworkId and MultiAsset #3409

Closed
apopiak opened this issue Jul 5, 2021 · 3 comments
Closed
Labels
I8-refactor Code needs refactoring. J1-meta A specific issue for grouping tasks or bugs of a specific category. T6-XCM This PR/Issue is related to XCM.

Comments

@apopiak
Copy link
Contributor

apopiak commented Jul 5, 2021

I would like to raise an issue I see with XCM v0:
I see a difference between NetworkId and MultiAsset on the one hand and other enums/"identifiers" like MultiLocation or BodyPart. The latter separate the identifying and filtering parts. Identifying is done by the enum instance (e.g. a multilocation might be X2(Parachain(1), GeneralIndex(42))) while filtering is done in the XCM implementation (e.g. the IsTeleporter filter). This IMO is a good pattern.
NetworkId and MultiAsset combine an identifying function with a filter function within the enum which leads to non-filtering code having to manage the case when we get MultiAsset::AllFungible even though that is not its purpose. I think we should avoid this in v1 and separate filtering and identifying completely.

@apopiak apopiak added I8-refactor Code needs refactoring. J1-meta A specific issue for grouping tasks or bugs of a specific category. labels Jul 5, 2021
@apopiak apopiak changed the title Issue with XCM v0 NetworkId and MultiAsset Conflating Filtering and Identifying in XCM v0 NetworkId and MultiAsset Jul 5, 2021
@apopiak
Copy link
Contributor Author

apopiak commented Jul 5, 2021

related to #3168

@gavofyork
Copy link
Member

Consider creating an XCM v1 tracking issue so when the time comes to move from v0 we have a single place with all the gripes.

@KiChjang
Copy link
Contributor

With the introduction of MultiAssetFilter, I think this is fixed in v1 and later.

@KiChjang KiChjang added the T6-XCM This PR/Issue is related to XCM. label Dec 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I8-refactor Code needs refactoring. J1-meta A specific issue for grouping tasks or bugs of a specific category. T6-XCM This PR/Issue is related to XCM.
Projects
None yet
Development

No branches or pull requests

3 participants