-
Notifications
You must be signed in to change notification settings - Fork 108
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 Topics as message IDs for improved message tracing #997
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #997 +/- ##
==========================================
+ Coverage 82.69% 82.82% +0.12%
==========================================
Files 51 51
Lines 2069 2073 +4
Branches 72 72
==========================================
+ Hits 1711 1717 +6
+ Misses 343 341 -2
Partials 15 15
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
The
SetTopic([u8; 32])
instruction can be used to associate arbitrary "topic" data with an xcm message. This is useful for tracing the message as it flows from origin to destination. Some of the XCM routing pallets interpret the topic as a message id, and fallback to hashing the message if the topic is not present.Gav describes the usage more in https://substrate.stackexchange.com/questions/1893/is-there-an-id-for-xcm-message/1906#1906.
To make full use of this feature, I have made the following changes:
InboundMessageDispatched
event.SetTopic
instruction.This can be used to trace the message as follows in the Gateway->BridgeHub->AssetHub direction:
OutboundMessageAccepted
eventethereumInboundQueue::MessageReceived
eventxcmpQueue.Success
Other changes: