You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: This guide explains how to trace, correlate, and debug cross-chain XCMs using observability features introduced in the Polkadot SDK.
27823
+
description: This guide explains how to trace, correlate and debug cross-chain XCMs using observability features introduced in the Polkadot SDK.
27824
27824
---
27825
27825
27826
27826
# XCM Observability
27827
27827
27828
27828
## Introduction
27829
27829
27830
-
This guide explains how to **trace, correlate, and debug cross-chain XCMs** using observability features introduced in the Polkadot SDK.
27830
+
This guide explains how to **trace, correlate and debug cross-chain XCMs** using observability features introduced in the Polkadot SDK.
27831
27831
27832
27832
You will learn how to:
27833
27833
27834
-
* Understand and use `SetTopic` and `message_id` for tracking
27835
-
* Replay and dry-run XCMs across parachains
27836
-
* Match `Sent` and `Processed` events across chains
27837
-
* Debug failed or incomplete messages using Chopsticks logs
27834
+
* Use `SetTopic` and `message_id` to track XCMs across multiple chains
27835
+
* Match `PolkadotXcm.Sent` and `MessageQueue.Processed` events to understand message flow
27836
+
* Interpret and handle failed or incomplete messages
27837
+
* Apply manual topic tagging for reliable tracking across hops
27838
+
* Use the workaround for older runtimes that emit derived message identifiers
27838
27839
27839
-
This tutorial is essential for developers working on multi-hop XCMs, custom integrations, or bridges where traceability and debuggability are critical.
27840
+
To demonstrate these techniques, the guide introduces a complete example scenario involving a multi-chain XCM transfer. This scenario will serve as the foundation for explaining message lifecycle, event tracking and failure debugging in context.
27840
27841
27841
27842
## Prerequisites
27842
27843
@@ -27850,8 +27851,6 @@ To follow this tutorial, you should have:
27850
27851
27851
27852
You should also be familiar with forking chains using Chopsticks. If not, see [Fork a Chain with Chopsticks](https://docs.polkadot.com/tutorials/polkadot-sdk/testing/fork-live-chains/).
27852
27853
27853
-
---
27854
-
27855
27854
## Define a Scenario: DOT to Acala Transfer with Tracing
27856
27855
27857
27856
We will explore the full lifecycle of a cross-chain message from Polkadot Asset Hub to Acala, using the `limited_reserve_transfer_assets` extrinsic.
@@ -27863,8 +27862,6 @@ We will explore the full lifecycle of a cross-chain message from Polkadot Asset
27863
27862
27864
27863
This scenario will demonstrate how `SetTopic` is added (or generated), how to find matching `Sent` and `Processed` events, and how to debug execution failures if they occur.
27865
27864
27866
-
---
27867
-
27868
27865
## Step 1: Launch a Fork with Logging Enabled
27869
27866
27870
27867
To view full logs and track `SetTopic`, override the runtime with a locally built Wasm.
@@ -27875,8 +27872,6 @@ To view full logs and track `SetTopic`, override the runtime with a locally buil
27875
27872
27876
27873
→ See the detailed steps in [Replay and Dry Run XCMs Guide](https://docs.polkadot.com/tutorials/interoperability/replay-and-dry-run-xcms/).
27877
27874
27878
-
---
27879
-
27880
27875
## Step 2: Execute the Transfer with `SetTopic`
27881
27876
27882
27877
We execute a script that sends DOT to Acala with an optional manually defined `SetTopic`.
@@ -27891,8 +27886,6 @@ You can run this script with:
27891
27886
npx tsx limited-reserve-transfer-assets.ts
27892
27887
```
27893
27888
27894
-
---
27895
-
27896
27889
## Step 3: Track the Message Across Chains
27897
27890
27898
27891
After submission, you can match events using the `message_id`:
@@ -27912,8 +27905,6 @@ After submission, you can match events using the `message_id`:
27912
27905
27913
27906
→ Matching confirms that the message was received and executed on the destination chain.
27914
27907
27915
-
---
27916
-
27917
27908
## Step 4: Debug Failures
27918
27909
27919
27910
If your XCM fails, you can debug using one of the following:
@@ -27932,8 +27923,6 @@ With logging enabled, Chopsticks will show:
27932
27923
27933
27924
→ Useful for understanding weight failures, malformed assets, or execution mismatches.
27934
27925
27935
-
---
27936
-
27937
27926
## Step 5: Handle Older Runtimes
27938
27927
27939
27928
Older runtimes use a **derived `forwarded_id`** in `Processed` events instead of the original topic hash.
Copy file name to clipboardExpand all lines: tutorials/interoperability/xcm-observability.md
+8-23Lines changed: 8 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,23 @@
1
1
---
2
2
title: XCM Observability
3
-
description: This guide explains how to trace, correlate, and debug cross-chain XCMs using observability features introduced in the Polkadot SDK.
3
+
description: This guide explains how to trace, correlate and debug cross-chain XCMs using observability features introduced in the Polkadot SDK.
4
4
---
5
5
6
6
# XCM Observability
7
7
8
8
## Introduction
9
9
10
-
This guide explains how to **trace, correlate, and debug cross-chain XCMs** using observability features introduced in the Polkadot SDK.
10
+
This guide explains how to **trace, correlate and debug cross-chain XCMs** using observability features introduced in the Polkadot SDK.
11
11
12
12
You will learn how to:
13
13
14
-
* Understand and use `SetTopic` and `message_id` for tracking
15
-
* Replay and dry-run XCMs across parachains
16
-
* Match `Sent` and `Processed` events across chains
17
-
* Debug failed or incomplete messages using Chopsticks logs
14
+
* Use `SetTopic` and `message_id` to track XCMs across multiple chains
15
+
* Match `PolkadotXcm.Sent` and `MessageQueue.Processed` events to understand message flow
16
+
* Interpret and handle failed or incomplete messages
17
+
* Apply manual topic tagging for reliable tracking across hops
18
+
* Use the workaround for older runtimes that emit derived message identifiers
18
19
19
-
This tutorial is essential for developers working on multi-hop XCMs, custom integrations, or bridges where traceability and debuggability are critical.
20
+
To demonstrate these techniques, the guide introduces a complete example scenario involving a multi-chain XCM transfer. This scenario will serve as the foundation for explaining message lifecycle, event tracking and failure debugging in context.
20
21
21
22
## Prerequisites
22
23
@@ -30,8 +31,6 @@ To follow this tutorial, you should have:
30
31
31
32
You should also be familiar with forking chains using Chopsticks. If not, see [Fork a Chain with Chopsticks](https://docs.polkadot.com/tutorials/polkadot-sdk/testing/fork-live-chains/).
32
33
33
-
---
34
-
35
34
## Define a Scenario: DOT to Acala Transfer with Tracing
36
35
37
36
We will explore the full lifecycle of a cross-chain message from Polkadot Asset Hub to Acala, using the `limited_reserve_transfer_assets` extrinsic.
@@ -43,8 +42,6 @@ We will explore the full lifecycle of a cross-chain message from Polkadot Asset
43
42
44
43
This scenario will demonstrate how `SetTopic` is added (or generated), how to find matching `Sent` and `Processed` events, and how to debug execution failures if they occur.
45
44
46
-
---
47
-
48
45
## Step 1: Launch a Fork with Logging Enabled
49
46
50
47
To view full logs and track `SetTopic`, override the runtime with a locally built Wasm.
@@ -55,8 +52,6 @@ To view full logs and track `SetTopic`, override the runtime with a locally buil
55
52
56
53
→ See the detailed steps in [Replay and Dry Run XCMs Guide](https://docs.polkadot.com/tutorials/interoperability/replay-and-dry-run-xcms/).
57
54
58
-
---
59
-
60
55
## Step 2: Execute the Transfer with `SetTopic`
61
56
62
57
We execute a script that sends DOT to Acala with an optional manually defined `SetTopic`.
@@ -71,8 +66,6 @@ You can run this script with:
71
66
npx tsx limited-reserve-transfer-assets.ts
72
67
```
73
68
74
-
---
75
-
76
69
## Step 3: Track the Message Across Chains
77
70
78
71
After submission, you can match events using the `message_id`:
@@ -92,8 +85,6 @@ After submission, you can match events using the `message_id`:
92
85
93
86
→ Matching confirms that the message was received and executed on the destination chain.
94
87
95
-
---
96
-
97
88
## Step 4: Debug Failures
98
89
99
90
If your XCM fails, you can debug using one of the following:
@@ -112,8 +103,6 @@ With logging enabled, Chopsticks will show:
112
103
113
104
→ Useful for understanding weight failures, malformed assets, or execution mismatches.
114
105
115
-
---
116
-
117
106
## Step 5: Handle Older Runtimes
118
107
119
108
Older runtimes use a **derived `forwarded_id`** in `Processed` events instead of the original topic hash.
0 commit comments