Skip to content

Pallet XCM - transfer_assets pre-ahm patch#3402

Merged
RomarQ merged 28 commits intomasterfrom
rq/transfer-assets-fix
Aug 29, 2025
Merged

Pallet XCM - transfer_assets pre-ahm patch#3402
RomarQ merged 28 commits intomasterfrom
rq/transfer-assets-fix

Conversation

@RomarQ
Copy link
Copy Markdown
Contributor

@RomarQ RomarQ commented Aug 21, 2025

⚠️ Breaking Changes ⚠️

Pallet XCM's transfer_assets extrinsic now returns an error when it determines that a reserve transfer of DOT | KSM has to be done. This is a safeguard in preparation for the Asset Hub Migration (AHM), where the reserve of DOT | KSM will change from the Relay Chain to Asset Hub.

What does it do?

Ports paritytech/polkadot-sdk#9137

transfer_assets automatically figures out the reserve for a cross-chain transfer
based on on-chain configurations like IsReserve and the asset ids.
The Asset Hub Migration (AHM) will make it unable to return the correct reserve for
the network native asset (DOT, KSM, WND, PAS) since its reserve will move from the
Relay Chain to the Asset Hub.

Before the migration, it'll be disabled to do network native reserve transfers
via transfer_assets. After the migration, once everything is configured properly,
it'll be patched to use the correct reserve.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Aug 21, 2025

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • agent-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbit review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch rq/transfer-assets-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbit help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 21, 2025

WASM runtime size check:

Compared to target branch

Moonbase runtime: 2420 KB (-4 KB) 🚨

Moonbeam runtime: 2572 KB (no changes) 🚨

Moonriver runtime: 2564 KB (-8 KB) 🚨

Compared to latest release (runtime-3800)

Moonbase runtime: 2420 KB (+376 KB compared to latest release) 🚨

Moonbeam runtime: 2572 KB (+408 KB compared to latest release) 🚨

Moonriver runtime: 2564 KB (+400 KB compared to latest release) 🚨

@RomarQ RomarQ self-assigned this Aug 23, 2025
@RomarQ RomarQ added B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes breaking Needs to be mentioned in breaking changes D1-runtime-migration PR introduces code that might require downstream chains to run a runtime upgrade. labels Aug 23, 2025
@RomarQ RomarQ added the D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed. label Aug 25, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 25, 2025

Coverage Report

@@                    Coverage Diff                     @@
##           master   rq/transfer-assets-fix      +/-   ##
==========================================================
+ Coverage   74.07%                   74.17%   +0.10%     
  Files         406                      406              
+ Lines       98988                    99151     +163     
==========================================================
+ Hits        73318                    73544     +226     
- Misses      25670                    25607      -63     
Files Changed Coverage
/pallets/erc20-xcm-bridge/src/erc20_trap.rs 68.18% (+68.18%) 🔼
/runtime/moonbase/src/weights/xcm/generic.rs 5.19% (+1.50%) 🔼
/runtime/moonbase/src/weights/xcm/mod.rs 15.79% (+3.35%) 🔼
/runtime/moonbase/tests/common/mod.rs 95.38% (+0.23%) 🔼
/runtime/moonbeam/src/weights/xcm/generic.rs 10.36% (+1.53%) 🔼
/runtime/moonbeam/src/weights/xcm/mod.rs 26.79% (+3.35%) 🔼
/runtime/moonbeam/tests/common/mod.rs 95.77% (+0.26%) 🔼
/runtime/moonbeam/tests/integration_test.rs 99.40% (+0.01%) 🔼
/runtime/moonriver/src/weights/xcm/generic.rs 9.05% (+1.51%) 🔼
/runtime/moonriver/src/weights/xcm/mod.rs 25.36% (+3.35%) 🔼
/runtime/moonriver/tests/common/mod.rs 95.85% (+0.25%) 🔼
/runtime/moonriver/tests/integration_test.rs 99.38% (+0.02%) 🔼

Coverage generated Fri Aug 29 13:09:47 UTC 2025

@RomarQ RomarQ marked this pull request as ready for review August 25, 2025 10:18
@RomarQ RomarQ added D3-trivial PR contains trivial changes in a runtime directory that do not require an audit and removed D5-nicetohaveaudit⚠️ PR contains trivial changes to logic that should be properly reviewed. labels Aug 28, 2025
@RomarQ RomarQ removed the D1-runtime-migration PR introduces code that might require downstream chains to run a runtime upgrade. label Aug 29, 2025
@RomarQ RomarQ requested a review from TarekkMA August 29, 2025 11:45
TarekkMA
TarekkMA previously approved these changes Aug 29, 2025
@RomarQ RomarQ merged commit 5c1bfb3 into master Aug 29, 2025
103 of 106 checks passed
@RomarQ RomarQ deleted the rq/transfer-assets-fix branch August 29, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes breaking Needs to be mentioned in breaking changes D3-trivial PR contains trivial changes in a runtime directory that do not require an audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants