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 to be able to use distinct origins based on different calls #808

Closed
girazoki opened this issue Jun 9, 2022 · 3 comments
Closed

Xcm to be able to use distinct origins based on different calls #808

girazoki opened this issue Jun 9, 2022 · 3 comments

Comments

@girazoki
Copy link
Contributor

girazoki commented Jun 9, 2022

We are facing a current limitation in Moonbeam with the xcm-executor. We want to be able to execute the Transact instruction with our pallets but we are encountering a problem with pallet-ethereum from Frontier. This pallet requires a specific origin (not the regular RawOrigin::Signed).

The xcm-executor currently converts a MultiLocation to a dispatch Origin in https://github.com/paritytech/polkadot/blob/016dc7297101710db0483ab6ef199e244dff711d/xcm/xcm-executor/src/lib.rs#L343 through the ConvertOrigin trait, but it does not take into account the call being made and therefore it is not possible for us to append a customized origin in the case of pallet-ethereum.

We have a few ideas to solve this:

  • Allows to customize how calls are dispatched from XCM polkadot#5657. This allows us to control how the dispatchable is dispatched, and therefore we can append the desired origin based on the call made.
  • Another possibility is to add the call to the ConvertOrigin::convert_origin.
  • We tried circumventing this by using custom filters in our custom CheckedExtrinsic and our custom Applyable frait implementation but this does not work with pallet-proxy or pallet-multisig, since both of them clear the filters before dispatching.

Any ideas besides those already commented? Thanks in advance!

@crystalin
Copy link

Maybe having an "authorization-based" mechanism attached to the origin could also be used for a safe check (considering some pallets are resetting the origin) but that would require some heavy rework I think.

@bkchr what do you think overall?

@bkchr
Copy link
Member

bkchr commented Jun 9, 2022

This looks like a reasonable approach to me.

CC @gavofyork @KiChjang

@paritytech paritytech deleted a comment Jun 13, 2022
@Sophia-Gold Sophia-Gold transferred this issue from paritytech/polkadot Aug 24, 2023
@KiChjang
Copy link
Contributor

paritytech/polkadot#5657 is merged, so this issue can be considered fixed. Closing.

claravanstaden pushed a commit to Snowfork/polkadot-sdk that referenced this issue Dec 8, 2023
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* Move chain primitives to a sub-folder.

* Update workspace members.

* Extract core parts of polkadot.

* cargo fmt --all

* Remove TODO.

* cargo fmt --all

* Fix crate names.

* Add to the latest API.

* cargo fmt --all

* Add nested lock files to ignore (generated during cargo fmt)

* Fix compilation.

* cargo fmt --all

* Fix ignore pattern.

* Address review comments.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* Move chain primitives to a sub-folder.

* Update workspace members.

* Extract core parts of polkadot.

* cargo fmt --all

* Remove TODO.

* cargo fmt --all

* Fix crate names.

* Add to the latest API.

* cargo fmt --all

* Add nested lock files to ignore (generated during cargo fmt)

* Fix compilation.

* cargo fmt --all

* Fix ignore pattern.

* Address review comments.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* Move chain primitives to a sub-folder.

* Update workspace members.

* Extract core parts of polkadot.

* cargo fmt --all

* Remove TODO.

* cargo fmt --all

* Fix crate names.

* Add to the latest API.

* cargo fmt --all

* Add nested lock files to ignore (generated during cargo fmt)

* Fix compilation.

* cargo fmt --all

* Fix ignore pattern.

* Address review comments.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* Move chain primitives to a sub-folder.

* Update workspace members.

* Extract core parts of polkadot.

* cargo fmt --all

* Remove TODO.

* cargo fmt --all

* Fix crate names.

* Add to the latest API.

* cargo fmt --all

* Add nested lock files to ignore (generated during cargo fmt)

* Fix compilation.

* cargo fmt --all

* Fix ignore pattern.

* Address review comments.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* Move chain primitives to a sub-folder.

* Update workspace members.

* Extract core parts of polkadot.

* cargo fmt --all

* Remove TODO.

* cargo fmt --all

* Fix crate names.

* Add to the latest API.

* cargo fmt --all

* Add nested lock files to ignore (generated during cargo fmt)

* Fix compilation.

* cargo fmt --all

* Fix ignore pattern.

* Address review comments.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* Move chain primitives to a sub-folder.

* Update workspace members.

* Extract core parts of polkadot.

* cargo fmt --all

* Remove TODO.

* cargo fmt --all

* Fix crate names.

* Add to the latest API.

* cargo fmt --all

* Add nested lock files to ignore (generated during cargo fmt)

* Fix compilation.

* cargo fmt --all

* Fix ignore pattern.

* Address review comments.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* Move chain primitives to a sub-folder.

* Update workspace members.

* Extract core parts of polkadot.

* cargo fmt --all

* Remove TODO.

* cargo fmt --all

* Fix crate names.

* Add to the latest API.

* cargo fmt --all

* Add nested lock files to ignore (generated during cargo fmt)

* Fix compilation.

* cargo fmt --all

* Fix ignore pattern.

* Address review comments.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* Move chain primitives to a sub-folder.

* Update workspace members.

* Extract core parts of polkadot.

* cargo fmt --all

* Remove TODO.

* cargo fmt --all

* Fix crate names.

* Add to the latest API.

* cargo fmt --all

* Add nested lock files to ignore (generated during cargo fmt)

* Fix compilation.

* cargo fmt --all

* Fix ignore pattern.

* Address review comments.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* Move chain primitives to a sub-folder.

* Update workspace members.

* Extract core parts of polkadot.

* cargo fmt --all

* Remove TODO.

* cargo fmt --all

* Fix crate names.

* Add to the latest API.

* cargo fmt --all

* Add nested lock files to ignore (generated during cargo fmt)

* Fix compilation.

* cargo fmt --all

* Fix ignore pattern.

* Address review comments.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* Move chain primitives to a sub-folder.

* Update workspace members.

* Extract core parts of polkadot.

* cargo fmt --all

* Remove TODO.

* cargo fmt --all

* Fix crate names.

* Add to the latest API.

* cargo fmt --all

* Add nested lock files to ignore (generated during cargo fmt)

* Fix compilation.

* cargo fmt --all

* Fix ignore pattern.

* Address review comments.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
* Move chain primitives to a sub-folder.

* Update workspace members.

* Extract core parts of polkadot.

* cargo fmt --all

* Remove TODO.

* cargo fmt --all

* Fix crate names.

* Add to the latest API.

* cargo fmt --all

* Add nested lock files to ignore (generated during cargo fmt)

* Fix compilation.

* cargo fmt --all

* Fix ignore pattern.

* Address review comments.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
* Move chain primitives to a sub-folder.

* Update workspace members.

* Extract core parts of polkadot.

* cargo fmt --all

* Remove TODO.

* cargo fmt --all

* Fix crate names.

* Add to the latest API.

* cargo fmt --all

* Add nested lock files to ignore (generated during cargo fmt)

* Fix compilation.

* cargo fmt --all

* Fix ignore pattern.

* Address review comments.
bkchr pushed a commit that referenced this issue Apr 10, 2024
* Move chain primitives to a sub-folder.

* Update workspace members.

* Extract core parts of polkadot.

* cargo fmt --all

* Remove TODO.

* cargo fmt --all

* Fix crate names.

* Add to the latest API.

* cargo fmt --all

* Add nested lock files to ignore (generated during cargo fmt)

* Fix compilation.

* cargo fmt --all

* Fix ignore pattern.

* Address review comments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@crystalin @KiChjang @bkchr @girazoki and others