Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable2412] Backport #7423 #7605

Merged
merged 2 commits into from
Feb 18, 2025
Merged

Conversation

paritytech-cmd-bot-polkadot-sdk[bot]

Backport #7423 into stable2412 from franciscoaguirre.

See the documentation on how to use this bot.

Fix issue where setting the `remote_fees` field of `InitiateTransfer` to
`None` could lead to unintended bypassing of fees in certain conditions.

Changes made to fix this:
- `remote_fees: None` now results in the `UnpaidExecution` instruction
being appended *after* the origin altering instruction, be it
`AliasOrigin` or `ClearOrigin`. This means `preserve_origin: true` must
be set if you want to have any chance of not paying for fees.
- The `AliasOrigin` instruction is not appended if the executor is
called with the root location (`Here`) since it would alias to itself.
Although this self-aliasing could be done, it needs the ecosystem to add
a new aliasing instruction, so we just skip it.
- Tweaked the `AllowExplicitUnpaidExecutionFrom` barrier to allow
receiving assets (via teleport or reserve asset transfer) and altering
the origin before actually using `UnpaidExecution`. This is to allow
unpaid teleports to work with `InitiateTransfer`.
- For this, the barrier now executes origin altering instructions and
keeps track of the modified origin. It then checks if this final origin
has enough permissions to not pay for fees. In order to follow the
`AliasOrigin` instruction it now takes a new generic `Aliasers` that
should be set to the XCM config item of the same name. This new generic
has a default value of `()`, effectively disallowing the use of
`AliasOrigin`.

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Adrian Catangiu <[email protected]>
(cherry picked from commit c4b4145)
Copy link
Contributor

This pull request is amending an existing release. Please proceed with extreme caution,
as to not impact downstream teams that rely on the stability of it. Some things to consider:

  • Backports are only for 'patch' or 'minor' changes. No 'major' or other breaking change.
  • Should be a legit fix for some bug, not adding tons of new features.
  • Must either be already audited or not need an audit.
Emergency Bypass

If you really need to bypass this check: add validate: false to each crate
in the Prdoc where a breaking change is introduced. This will release a new major
version of that crate and all its reverse dependencies and basically break the release.

@EgorPopelyaev EgorPopelyaev merged commit ca929c3 into stable2412 Feb 18, 2025
158 of 197 checks passed
@EgorPopelyaev EgorPopelyaev deleted the backport-7423-to-stable2412 branch February 18, 2025 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A3-backport Pull request is already reviewed well in another branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants