Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Tracking issue for XCM Revamp #2841

Closed
47 tasks done
gavofyork opened this issue Apr 7, 2021 · 0 comments
Closed
47 tasks done

Tracking issue for XCM Revamp #2841

gavofyork opened this issue Apr 7, 2021 · 0 comments
Assignees
Labels
J1-meta A specific issue for grouping tasks or bugs of a specific category.

Comments

@gavofyork
Copy link
Member

gavofyork commented Apr 7, 2021

Follow-up issue: paritytech/polkadot-sdk#925

Priorities

Substantial features

VMP Origins

Figure out how to manage origin permissions. We want root and governance Relay-chain XCM origins to have free execution on the Statemint parachain, but not just random accounts that happen to be instructing the Relay-chain to send an XCM on their behalf to the parachain.

  • Introduce RelayedFrom XCM (XCM Revamp Continued #2865)
  • Introduce RelayedFrom into execute_xcm, checking it's a subconsensus, mutate origin, redispatch; ensure that mutating the origin doesn't create problems for relative locations in e.g. asset descriptors. (XCM Revamp Continued #2865)
  • Introduce a means of converting a Collective (pallet) Origin into a Plurality MultiLocation - this will likely be through a Origin -> MultiLocation conversion utility trait. (XCM Revamp Continued #2865)
  • Introduce XCM sender dispatchable using RelayedFrom XCM: (XCM Revamp Continued #2865)
    • Introduce an XCM dispatcher into Polkadot, equivalent of xcm-handler in Cumulus, it should allow for RelayedFrom messages to be created and sent (search fn send(origin, dest: MultiLocation).
    • Use pallet-xcm in Cumulus and remove duplicate functionality from xcm-handler.
    • Will use the new Origin -> MultiLocation converter. (XCM Revamp Continued #2865)
    • With the MultiLocation it should potentially (if non-Null) wrap the XCM in a Xcm::RelayedFrom. (XCM Revamp Continued #2865)
    • Should be configurable to have a barrier (possibly by just using existing Origin -> MultiLocation conversion) (XCM Revamp Continued #2865)
  • Introduce XCM Handler pallet a Origin::Xcm(MultiLocation)
  • Introduce ensure_xcm and EnsureXcm impl EnsureOrigin origin barrier and use EnsureXcm([Parent, Plurality(Executive, >1/2)]) for Admin in Statemint.
  • Provide Origin converter to use the Origin::Xcm Add XCM Origin and converter #2896
  • Check that AccountId origins from Relay have sensible origins on Paras when sent over DMP.

Queuing

XCMP queueing mechanisms should be largely replicated for VMP queuing.

Smaller features

  • Implement transfer_asset for FungiblesAdapter, but locate the function in a different trait to avoid the need to implement only when deposit+withdraw are implemented. (XCM Revamp Continued #2865)

Minor refactorings/additions/optimisations

XCM v3:

Things to consider:

  • Message prioritisation/QoS. Currently all messages in a channel must be executed in strict order of being sent. If the receiving system runs out of weight while processing due to a heavy message, then other channels will be tried, even if there are lighter messsages following it which could reasonably be executed. For now this is fine because a) we have an optimised data system for taking only contiguous messages from the beginning of the page stored in state and b) during execution it gives other channels with lighter messages a chance to execute.
  • Scheduling. Right now we process all channels' messages, one page at a time in a random-shuffled round-robin, incrementally making more weight available until we have made all weight available and run out of weight to process the next message on every channel. This works and is safe, but might lead to slightly unexpected stuff happening such as mesages sent much later on a lightly-used channel executing before messages sent on a heavier-used channel.
@gavofyork gavofyork added the J1-meta A specific issue for grouping tasks or bugs of a specific category. label Apr 7, 2021
@gavofyork gavofyork self-assigned this Apr 8, 2021
@paritytech paritytech deleted a comment from Geek-Lee Apr 25, 2021
@paritytech paritytech deleted a comment from Geek-Lee Apr 25, 2021
@paritytech paritytech deleted a comment from Geek-Lee Apr 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J1-meta A specific issue for grouping tasks or bugs of a specific category.
Projects
None yet
Development

No branches or pull requests

2 participants
@gavofyork and others