Introduced events for dmp DownwardMessageSent + refactor to common MessageId for events (ump, dmp)#7161
Introduced events for dmp DownwardMessageSent + refactor to common MessageId for events (ump, dmp)#7161
DownwardMessageSent + refactor to common MessageId for events (ump, dmp)#7161Conversation
|
This will probably be helped a lot with a facility from System pallet which provides an intra-block universally unique ID, I would consider introducing a barrier to allow for - and eventually perhaps even require - a single One alternative would be to introduce versioning into the channel and send this unique-hash along with each message. The problem here is that we would need to alter the wire-formats of the various MPQ protocols, which is non-trivial and would likely take longer to get merged. Another alternative would be to alter the XCM format itself to include a message ID, basically making: This requires messages to provide an ID (which means always using these 32 bytes, but gives a little more certainty and reduces XCM configuration complexity), but the big downside is that XCMv4 would need to be released, which may not be for some months. |
|
#7234 implements the first option, and the description includes further ideas for extending the unique ID system over into bridged chains. |
@gavofyork yes, I think so, cool, thank you, but I would leave open and re-validate this PR/issue when paritytech/cumulus#2157 is merged |
This PR is trying to:
Open questions:
type MessageId / fn message_idfrom ump/dmp somewhere, e.g.polkadot-core-primitivesorpolkadot-parachainorpolkadot-runtime-parachains?MessageIdin CumulusCumulus companion: paritytech/cumulus#2504
Further suggestions/improvements (beyond the scope of this PR):
uniqueIdfor uniquess trackingMessageIdis generated from message content, so the same message means same id, it is not possible to exactly tractcontextId/processIdto group several events (maybe with this feature, we dont needuniqueId)origin_multilocation + para_id + block_number + message_id + random_noncelet em_message = xcm::ExportMesage(dest, inner_message);, so we can now trackem_message_id(ump/dmp)ExportMesageis unwrapped andinner_messageis sent over bridge, so on the other side we can track justinner_message_id(em_message_id, em_message)->(inner_message_id, inner_message)-> | BRIDGE | ->(inner_message_id, inner_message)em_message_id->inner_message_id(but neither id is unique so this is not exact solution)(contextId, em_message_id, em_message)->(contextId, inner_message_id, inner_message)-> | BRIDGE | ->(contextId, inner_message_id, inner_message)XcmContextor usetopicsomehow?