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

Asset transfers can alias XCM origin on destination to original origin #122

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

acatangiu
Copy link
Contributor

XCM programs generated by the InitiateAssetTransfer instruction shall have the option to carry over the original origin all the way to the final destination. They shall do so by internally making use of AliasOrigin or ClearOrigin depending on given parameters.

This allows asset transfers to retain their original origin even across multiple hops.

Rendered

XCM programs generated by the `InitiateAssetTransfer` instruction shall
have the option to carry over the original origin all the way to the final
destination. They shall do so by internally making use of `AliasOrigin` or
`ClearOrigin` depending on given parameters.

This allows asset transfers to retain their original origin even across
multiple hops.

Signed-off-by: Adrian Catangiu <adrian@parity.io>
@anaelleltd anaelleltd added the Proposed Is awaiting 3 formal reviews. label Sep 18, 2024
text/0122-alias-origin-on-asset-transfers.md Show resolved Hide resolved
text/0122-alias-origin-on-asset-transfers.md Outdated Show resolved Hide resolved
text/0122-alias-origin-on-asset-transfers.md Outdated Show resolved Hide resolved
text/0122-alias-origin-on-asset-transfers.md Outdated Show resolved Hide resolved
acatangiu and others added 2 commits September 23, 2024 14:23
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
acatangiu added a commit to acatangiu/polkadot-sdk that referenced this pull request Oct 3, 2024
…structions

The AllowTopLevelPaidExecutionFrom allows ClearOrigin instructions before the
expected BuyExecution instruction, it also allows messages without any origin
altering instructions.

This commit enhances the barrier to also support messages that use AliasOrigin,
or DescendOrigin. This is sometimes desired in asset transfer XCM programs
that need to run the inbound assets instructions using the origin chain root
origin, but then want to drop privileges for the rest of the program.
Currently these programs drop privileges by clearing the origin completely, but
that also unnecessarily limits the range of actions available to the rest of
the program. Using DescendOrigin or AliasOrigin allows the sending chain to
instruct the receiving chain what the deprivileged real origin is.

See polkadot-fellows/RFCs#109 and
polkadot-fellows/RFCs#122 for more details on how
DescendOrigin and AliasOrigin could be used instead of ClearOrigin.

Signed-off-by: Adrian Catangiu <adrian@parity.io>
acatangiu added a commit to acatangiu/polkadot-sdk that referenced this pull request Oct 3, 2024
…structions

The AllowTopLevelPaidExecutionFrom allows ClearOrigin instructions before the
expected BuyExecution instruction, it also allows messages without any origin
altering instructions.

This commit enhances the barrier to also support messages that use AliasOrigin,
or DescendOrigin. This is sometimes desired in asset transfer XCM programs
that need to run the inbound assets instructions using the origin chain root
origin, but then want to drop privileges for the rest of the program.
Currently these programs drop privileges by clearing the origin completely, but
that also unnecessarily limits the range of actions available to the rest of
the program. Using DescendOrigin or AliasOrigin allows the sending chain to
instruct the receiving chain what the deprivileged real origin is.

See polkadot-fellows/RFCs#109 and
polkadot-fellows/RFCs#122 for more details on how
DescendOrigin and AliasOrigin could be used instead of ClearOrigin.

Signed-off-by: Adrian Catangiu <adrian@parity.io>
github-merge-queue bot pushed a commit to paritytech/polkadot-sdk that referenced this pull request Oct 5, 2024
…#5917)

The AllowTopLevelPaidExecutionFrom allows ClearOrigin instructions
before the expected BuyExecution instruction, it also allows messages
without any origin altering instructions.

This commit enhances the barrier to also support messages that use
AliasOrigin, or DescendOrigin. This is sometimes desired in asset
transfer XCM programs that need to run the inbound assets instructions
using the origin chain root origin, but then want to drop privileges for
the rest of the program. Currently these programs drop privileges by
clearing the origin completely, but that also unnecessarily limits the
range of actions available to the rest of the program. Using
DescendOrigin or AliasOrigin allows the sending chain to instruct the
receiving chain what the deprivileged real origin is.

See polkadot-fellows/RFCs#109 and
polkadot-fellows/RFCs#122 for more details on
how DescendOrigin and AliasOrigin could be used instead of ClearOrigin.

---------

Signed-off-by: Adrian Catangiu <adrian@parity.io>
@acatangiu
Copy link
Contributor Author

/rfc propose

@paritytech-rfc-bot
Copy link
Contributor

Hey @acatangiu, here is a link you can use to create the referendum aiming to approve this RFC number 0122.

Instructions
  1. Open the link.

  2. Switch to the Submission tab.

  1. Adjust the transaction if needed (for example, the proposal Origin).

  2. Submit the Transaction


It is based on commit hash 239472a0daa16b4b6c8aba1d1170f7516f554bfa.

The proposed remark text is: RFC_APPROVE(0122,450061387a0535a8f996d6f7b01dcda5d2d2c039304169908a69e3a4a1fbc2e9).

Copy link

github-actions bot commented Oct 8, 2024

Voting for this referenda is ongoing.

Vote for it here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Proposed Is awaiting 3 formal reviews.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants