Skip to content

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

Merged
paritytech-rfc-bot[bot] merged 3 commits intopolkadot-fellows:mainfrom
acatangiu:alias-origin-on-asset-transfers
Oct 15, 2024
Merged

Asset transfers can alias XCM origin on destination to original origin#122
paritytech-rfc-bot[bot] merged 3 commits intopolkadot-fellows:mainfrom
acatangiu:alias-origin-on-asset-transfers

Conversation

@acatangiu
Copy link
Copy Markdown
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
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
Copy Markdown
Contributor Author

/rfc propose

@paritytech-rfc-bot
Copy link
Copy Markdown
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).

@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 8, 2024

Voting for this referenda is ongoing.

Vote for it here

@anaelleltd anaelleltd added Approved Has passed on-chain voting. and removed Proposed Is awaiting 3 formal reviews. labels Oct 15, 2024
@github-actions
Copy link
Copy Markdown

PR can be merged.

Write the following command to trigger the bot

/rfc process 0x50a25bef04b8c6f1a542a31f1383728272ea5819b1c1844d563663ae72e36a1c

@acatangiu
Copy link
Copy Markdown
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
Copy Markdown
Contributor

The on-chain referendum has approved the RFC.

@anaelleltd anaelleltd added Implemented Is merged or live as a feature/service. and removed Approved Has passed on-chain voting. labels Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Implemented Is merged or live as a feature/service.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants