Skip to content

Disable reserve_asset_transfer for DOT#9544

Merged
franciscoaguirre merged 16 commits intomasterfrom
reserve-transfer-assets-pre-ahm-patch
Aug 28, 2025
Merged

Disable reserve_asset_transfer for DOT#9544
franciscoaguirre merged 16 commits intomasterfrom
reserve-transfer-assets-pre-ahm-patch

Conversation

@franciscoaguirre
Copy link
Copy Markdown
Contributor

@franciscoaguirre franciscoaguirre commented Aug 22, 2025

  • Add check to do_reserve_asset_transfer
  • Modify existing tests
  • Add new tests if needed

@RomarQ
Copy link
Copy Markdown
Contributor

RomarQ commented Aug 25, 2025

Hi @franciscoaguirre,

Seems to be a followup of #9137. Are more follow-up changes expected?

@franciscoaguirre
Copy link
Copy Markdown
Contributor Author

There are no more follow-ups expected. This was also unexpected. It was a case we missed.

The solution for anyone doing cross-chain transfers is the same: use transfer_assets_using_type_and_then or execute where you have to choose the reserve manually.

You can also use a tool that abstracts away these things like the Paraspell SDK

@franciscoaguirre franciscoaguirre added T6-XCM This PR/Issue is related to XCM. A4-backport-stable2409 A4-backport-stable2503 Pull request must be backported to the stable2503 release branch A4-backport-stable2506 Pull request must be backported to the stable2506 release branch A4-backport-unstable2507 Pull request must be backported to the unstable2507 release branch labels Aug 25, 2025
Comment on lines +2094 to +2102
// We check for network native asset reserve transfers in preparation for the Asset Hub
// Migration. This check will be removed after the migration and the determined
// reserve location adjusted accordingly. For more information, see https://github.com/paritytech/polkadot-sdk/issues/9054.
Self::ensure_network_asset_reserve_transfer_allowed(
&assets,
fee_asset_item,
&assets_transfer_type,
&fees_transfer_type,
)?;
Copy link
Copy Markdown
Contributor

@yrong yrong Aug 27, 2025

Choose a reason for hiding this comment

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

It looks like this change will break the following test:

cargo test -p bridge-hub-westend-integration-tests tests::snowbridge::transfer_relay_token -- --nocapture

FYI: in our WebSDK we use polkadotXcm.transferAssets, which would also be affected by this filter.

Maybe we should whitelist Ethereum as a destination?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

They will, but switching to transfer_assets_using_type_and_then would already work

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.

IIUC, the issue concerns DOT transfers between two non-reserve (system) chains. By contrast, sending DOT from AH to Ethereum doesn't involve the IsReserve configuration - it's always treated as a local reserve transfer.

Consider that the WebSDK is already in production. I'd suggest avoiding breaking changes if possible.

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.

@franciscoaguirre I've added a patch in #9585. Please review and let me know if it makes sense.

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.

Please change the Web-SDK to use the alternative extrinsic. Offchain changes/fixes are much easier to apply/revert/patch/fix/etc.

onchain we keep it simple to minimize corner cases

@franciscoaguirre franciscoaguirre marked this pull request as ready for review August 27, 2025 15:15
@franciscoaguirre franciscoaguirre requested a review from a team as a code owner August 27, 2025 15:15
@franciscoaguirre
Copy link
Copy Markdown
Contributor Author

I sadly couldn't figure out the issue with the reserve_transfer_assets benchmark on pallet-xcm. @karolk91 do you have any idea what it might be? It no longer errors but the weight is overriden.

@paritytech-workflow-stopper
Copy link
Copy Markdown

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/17290877919
Failed job name: run-frame-omni-bencher

@paritytech-release-backport-bot
Copy link
Copy Markdown

Created backport PR for stable2503:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-9544-to-stable2503
git worktree add --checkout .worktree/backport-9544-to-stable2503 backport-9544-to-stable2503
cd .worktree/backport-9544-to-stable2503
git reset --hard HEAD^
git cherry-pick -x c1a31e3505c0c4e01b9d2daad5f4d19b220345ec
git push --force-with-lease

@paritytech-release-backport-bot
Copy link
Copy Markdown

Created backport PR for stable2506:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-9544-to-stable2506
git worktree add --checkout .worktree/backport-9544-to-stable2506 backport-9544-to-stable2506
cd .worktree/backport-9544-to-stable2506
git reset --hard HEAD^
git cherry-pick -x c1a31e3505c0c4e01b9d2daad5f4d19b220345ec
git push --force-with-lease

@paritytech-release-backport-bot
Copy link
Copy Markdown

Created backport PR for unstable2507:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-9544-to-unstable2507
git worktree add --checkout .worktree/backport-9544-to-unstable2507 backport-9544-to-unstable2507
cd .worktree/backport-9544-to-unstable2507
git reset --hard HEAD^
git cherry-pick -x c1a31e3505c0c4e01b9d2daad5f4d19b220345ec
git push --force-with-lease

RomarQ pushed a commit to moonbeam-foundation/polkadot-sdk that referenced this pull request Aug 29, 2025
- [x] Add check to `do_reserve_asset_transfer`
- [x] Modify existing tests
- [ ] Add new tests if needed

---------

Co-authored-by: Karol Kokoszka <karol@parity.io>
karolk91 added a commit that referenced this pull request Aug 31, 2025
- [x] Add check to `do_reserve_asset_transfer`
- [x] Modify existing tests
- [ ] Add new tests if needed

---------

Co-authored-by: Karol Kokoszka <karol@parity.io>
(cherry picked from commit c1a31e3)
karolk91 added a commit that referenced this pull request Aug 31, 2025
- [x] Add check to `do_reserve_asset_transfer`
- [x] Modify existing tests
- [ ] Add new tests if needed

---------

Co-authored-by: Karol Kokoszka <karol@parity.io>
(cherry picked from commit c1a31e3)
karolk91 added a commit that referenced this pull request Aug 31, 2025
- [x] Add check to `do_reserve_asset_transfer`
- [x] Modify existing tests
- [ ] Add new tests if needed

---------

Co-authored-by: Karol Kokoszka <karol@parity.io>
(cherry picked from commit c1a31e3)
karolk91 added a commit that referenced this pull request Aug 31, 2025
- [x] Add check to `do_reserve_asset_transfer`
- [x] Modify existing tests
- [ ] Add new tests if needed

---------

Co-authored-by: Karol Kokoszka <karol@parity.io>
(cherry picked from commit c1a31e3)
karolk91 added a commit that referenced this pull request Aug 31, 2025
- [x] Add check to `do_reserve_asset_transfer`
- [x] Modify existing tests
- [ ] Add new tests if needed

---------

Co-authored-by: Karol Kokoszka <karol@parity.io>
(cherry picked from commit c1a31e3)
karolk91 added a commit that referenced this pull request Sep 1, 2025
Backport #9544 into `stable2506` from franciscoaguirre.

See the
[documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md)
on how to use this bot.

<!--
  # To be used by other automation, do not modify:
  original-pr-number: #${pull_number}
-->

Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Co-authored-by: Karol Kokoszka <karol@parity.io>
EgorPopelyaev pushed a commit that referenced this pull request Sep 2, 2025
Backport #9544 into `stable2503` from franciscoaguirre.

See the
[documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md)
on how to use this bot.

<!--
  # To be used by other automation, do not modify:
  original-pr-number: #${pull_number}
-->

Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Co-authored-by: Karol Kokoszka <karol@parity.io>
EgorPopelyaev pushed a commit that referenced this pull request Sep 2, 2025
Backport #9544 into `stable2412` from franciscoaguirre.

See the
[documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md)
on how to use this bot.

<!--
  # To be used by other automation, do not modify:
  original-pr-number: #${pull_number}
-->

Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Co-authored-by: Karol Kokoszka <karol@parity.io>
EgorPopelyaev pushed a commit that referenced this pull request Sep 2, 2025
Backport #9544 into `stable2409` from franciscoaguirre.

See the
[documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md)
on how to use this bot.

<!--
  # To be used by other automation, do not modify:
  original-pr-number: #${pull_number}
-->

Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Co-authored-by: Karol Kokoszka <karol@parity.io>
bkchr pushed a commit that referenced this pull request Sep 3, 2025
Backport #9544 into `unstable2507` from franciscoaguirre.

See the
[documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md)
on how to use this bot.

<!--
  # To be used by other automation, do not modify:
  original-pr-number: #${pull_number}
-->

---------

Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Co-authored-by: Karol Kokoszka <karol@parity.io>
fellowship-merge-bot bot pushed a commit to polkadot-fellows/runtimes that referenced this pull request Sep 5, 2025
Update of pallet-xcm in order integrate changes from
paritytech/polkadot-sdk#9544

New version of `pallet-xcm` was published from `unstable2507`
(paritytech/polkadot-sdk#9643)

TODO:
- [x] migrate tests using `reserve_transfer_assets`,
`limited_reserve_transfer_assets` to
`transfer_assets_using_type_and_then`
- [x] fix `reserve_transferable_asset_and_dest` benchmarks to use USDT
instead of DOT
- [x] update `reserve_transfer_assets` weights to `Weight::MAX` for
relays
- [x] add changelog entry

---------

Co-authored-by: Adrian Catangiu <adrian@parity.io>
alvicsam pushed a commit that referenced this pull request Oct 17, 2025
- [x] Add check to `do_reserve_asset_transfer`
- [x] Modify existing tests
- [ ] Add new tests if needed

---------

Co-authored-by: Karol Kokoszka <karol@parity.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A4-backport-stable2503 Pull request must be backported to the stable2503 release branch A4-backport-stable2506 Pull request must be backported to the stable2506 release branch A4-backport-unstable2507 Pull request must be backported to the unstable2507 release branch T6-XCM This PR/Issue is related to XCM.

Projects

Status: Done
Status: To be released (SDK)

Development

Successfully merging this pull request may close these issues.

6 participants