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

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 <[email protected]>
@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 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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
@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

Copy link

PR can be merged.

Write the following command to trigger the bot

/rfc process 0x50a25bef04b8c6f1a542a31f1383728272ea5819b1c1844d563663ae72e36a1c

@acatangiu
Copy link
Contributor Author

/rfc process 0x50a25bef04b8c6f1a542a31f1383728272ea5819b1c1844d563663ae72e36a1c

@paritytech-rfc-bot paritytech-rfc-bot bot merged commit d39ca4b into polkadot-fellows:main Oct 15, 2024
@paritytech-rfc-bot
Copy link
Contributor

The on-chain referendum has approved the RFC.

@Uralwiki
Copy link

Uralwiki commented Nov 1, 2024

open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Has passed on-chain voting.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants