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

XCM paid execution barrier supports more origin altering instructions #5917

Merged
merged 3 commits into from
Oct 5, 2024

Conversation

acatangiu
Copy link
Contributor

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.

@acatangiu acatangiu added the T6-XCM This PR/Issue is related to XCM. label Oct 3, 2024
@acatangiu acatangiu self-assigned this Oct 3, 2024
@acatangiu acatangiu requested a review from a team as a code owner October 3, 2024 15:35
@acatangiu acatangiu changed the title xcm-barriers: paid execution barrier supports more origin altering instructions XCM paid execution barrier supports more origin altering instructions 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 acatangiu added this pull request to the merge queue Oct 5, 2024
Merged via the queue into paritytech:master with commit d968c94 Oct 5, 2024
204 of 206 checks passed
@acatangiu acatangiu deleted the prepare-barrier-for-v5 branch October 5, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T6-XCM This PR/Issue is related to XCM.
Projects
Status: Done
Status: Audited
Development

Successfully merging this pull request may close these issues.

3 participants