-
Notifications
You must be signed in to change notification settings - Fork 373
Use Message Queue as DMP and XCMP dispatch queue
#2157
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
This reverts commit c238c51. Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Message Queue pallet for DMP queue dispatchMessage Queue for DMP dispatch queue
Message Queue for DMP dispatch queueMessage Queue as DMP dispatch queue
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Message Queue as DMP dispatch queueMessage Queue as dispatch queue DMP and XCMP
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Message Queue as dispatch queue DMP and XCMPMessage Queue as DMP and XCMP dispatch queue
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Yes... i added |
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
|
The CI pipeline was cancelled due to failure one of the required jobs. |
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
|
@xlc the migration that i added for the DMP messages has the problem that it migrates them all at once. Maybe we can do a multi-block migration in the DMP pallet without locking the runtime since the storage is inaccessible anyway. |
Changes
This MR refactores the XCMP, Parachains System and DMP pallets to use the MessageQueue for delayed execution of incoming messages. The DMP pallet is entirely replaced by the MQ and thereby removed. This allows for PoV-bounded execution and resolves a number of issues that stem from the current work-around.
All System Parachains adopt this change.
The most important changes are in
primitives/core/src/lib.rs,parachains/common/src/process_xcm_message.rs,pallets/parachain-system/src/lib.rs,pallets/xcmp-queue/src/lib.rsand the runtime configs.DMP Queue Pallet
The pallet got removed and its logic refactored into parachain-system. Overweight message management can be done directly through the MQ pallet.
Final undeployment migrations are provided by
cumulus_pallet_dmp_queue::UndeployDmpQueueandDeleteDmpQueuethat can be configured with an aux config trait like:XCMP Queue pallet
Removed all dispatch queue functionality. Incoming XCMP messages are now either: Immediately handled if they are Signals, enqueued into the MQ pallet otherwise.
New config items for the XCMP queue pallet:
How to configure those:
The
InboundXcmpStatusstorage item was replaced byInboundXcmpSuspendedsince it now only tracks inbound queue suspension and no message indices anymore.Parachain System pallet
For
DMPmessages instead of forwarding them to theDMPpallet, it now pushes them to the configuredDmpQueue. The message processing which was triggered inset_validation_datais now being done by the MQ palleton_initialize.XCMP messages are still handed off to the
XcmpMessageHandler(XCMP-Queue pallet) - no change here.New config items for the parachain system pallet:
How to configure:
Message Flow
The flow of messages on the parachain side. Messages come in from the left via the
Validation Dataand finally end up at theXcm Executoron the right.Further changes
QueueConfigData::default().XcmpQueue::{suspend_xcm_execution, resume_xcm_execution}errors when they would be a noop.QueueConfigDatabefore setting it.Questions:
#[cfg(feature = "runtime-benchmarks")]in the runtimes? Not sure how to best fix. Just having them like this makes tests fail that rely on the real message processor when the feature is enabled.MessageQueueServiceWeight. The scheduler already takes 80% so I put it to 10% but that is quite low.TODO:
HandleMessageonce it is public in Substrateruntime-benchmarksfeature Propagateruntime-benchmarksfeature polkadot#6966InboundXcmpStatustoInboundXcmpSuspendedTransformProcessMessageOriginin Substrate and replaceProcessFromSibling