Skip to content

Added foreign locations to local accounts converter to all the parachains#5765

Merged
x3c41a merged 38 commits into
masterfrom
location-converter
Oct 2, 2024
Merged

Added foreign locations to local accounts converter to all the parachains#5765
x3c41a merged 38 commits into
masterfrom
location-converter

Conversation

@x3c41a

@x3c41a x3c41a commented Sep 19, 2024

Copy link
Copy Markdown
Contributor

Added HashedDescription<AccountId, DescribeFamily<DescribeAllTerminal>> foreign locations to local accounts converter to all the parachains.

Comment thread prdoc/pr_5765.prdoc Outdated
Comment thread prdoc/pr_5765.prdoc Outdated
Comment thread prdoc/pr_5765.prdoc

@acatangiu acatangiu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes

Do not remove existing converters to maintain backwards compatibility (see following comments)

Testing

For each chain/runtime, please add unit tests (faster/easier than emulated tests) that cover the newly supported conversions.

E.g. you can add new test for asset-hub-westend here, then run it with cargo test -r -p asset-hub-westend-runtime. Do the same for other runtimes too.

In terms of how to test, very easy way is using LocationToAccountHelper::convert_location()` and pass it locations that use to fail conversion, but with your change now succeed.

You can see an example of how to call LocationToAccountHelper here.

Comment thread cumulus/parachains/runtimes/people/people-rococo/src/xcm_config.rs
Comment thread cumulus/parachains/runtimes/people/people-westend/src/xcm_config.rs
Comment thread cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs Outdated
@bkontur

bkontur commented Sep 19, 2024

Copy link
Copy Markdown
Contributor

bot fmt

@paritytech paritytech deleted a comment from command-bot Bot Sep 19, 2024
@paritytech paritytech deleted a comment from command-bot Bot Sep 19, 2024
@x3c41a

x3c41a commented Sep 20, 2024

Copy link
Copy Markdown
Contributor Author

Request changes

Do not remove existing converters to maintain backwards compatibility (see following comments)

Testing

For each chain/runtime, please add unit tests (faster/easier than emulated tests) that cover the newly supported conversions.

E.g. you can add new test for asset-hub-westend here, then run it with cargo test -r -p asset-hub-westend-runtime. Do the same for other runtimes too.

In terms of how to test, very easy way is using LocationToAccountHelper::convert_location()` and pass it locations that use to fail conversion, but with your change now succeed.

You can see an example of how to call LocationToAccountHelper here.

Added the tests. Additionally removed my change and made sure that the tests fail.

@x3c41a x3c41a added A0-needs_burnin Pull request needs to be tested on a live validator node before merge. DevOps is notified via matrix T6-XCM This PR/Issue is related to XCM. and removed A0-needs_burnin Pull request needs to be tested on a live validator node before merge. DevOps is notified via matrix labels Sep 20, 2024
Comment thread cumulus/parachains/runtimes/assets/asset-hub-rococo/tests/tests.rs Outdated
Comment thread cumulus/parachains/runtimes/assets/asset-hub-rococo/tests/tests.rs Outdated
Comment thread cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/tests/tests.rs Outdated
@github-actions github-actions Bot requested a review from acatangiu September 30, 2024 17:09
@x3c41a x3c41a enabled auto-merge September 30, 2024 17:44
@x3c41a x3c41a disabled auto-merge October 1, 2024 11:45
@github-actions github-actions Bot requested a review from acatangiu October 1, 2024 14:10
@x3c41a x3c41a enabled auto-merge October 1, 2024 16:13
@github-actions github-actions Bot requested a review from acatangiu October 2, 2024 11:25
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

None yet

Development

Successfully merging this pull request may close these issues.

5 participants