Emit New Event with Message Hash and ID on DMP Message Sent #1905
Labels
I5-enhancement
An additional feature request.
I10-unconfirmed
Issue might be valid, but it's not yet known.
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Motivation
We found out that there is currently no reliable method to correlate the initiating extrinsic e.g.
xcmpallet.teleportAssets
with the corresponding DMP message, since the message hash or the message ID is not emitted in an event related to the extrinsic.Presently, we are employing some heuristics to match messages at origin and destination:
xcmpallet
. We monitor these extrinsics and parse the parameters to obtain the destination paraIdxcmpallet.Attempted
is emitted, indicating the outcome.Completed
, the message enters thedmp.downwardMessageQueues
.dmp.downwardMessageQueues
storage at the block of the originating extrinsic, using the destination paraId, to get all messages in the queue.dmpqueue.ExecutedDownward
is emitted, including the message hash, ID, and outcome. We match the emitted message hash with the one stored in step 6.These heuristics work for most of the cases, especially considering the low volume of cross-chain messages right now.
However, in the case of multiple DMP messages at the same block for the same destination chain with identical instructions and parameters, it becomes impossible to know, with the heuristics, from which extrinsic they originate.
Request
We propose emitting an event from the originating extrinsic containing both the message hash and ID. This enhancement will greatly simplify the process of matching messages while also solving the issue of correlating to the originating extrinsic.
Solution
Found this open PR that should solve the issue in the archived Polkadot repo but I couldn't find it in this repo: Introduced events for dmp DownwardMessageSent + refactor to common MessageId for events (ump, dmp)
Related work done for UMP: Add event for showing the hash of a UMP sent message
Are you willing to help with this request?
Maybe (please elaborate above)
The text was updated successfully, but these errors were encountered: