Skip to content

Commit 59b8f27

Browse files
Update Induction
1 parent 49db54a commit 59b8f27

File tree

2 files changed

+16
-46
lines changed

2 files changed

+16
-46
lines changed

llms.txt

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27820,23 +27820,24 @@ Doc-Content: https://docs.polkadot.com/tutorials/interoperability/xcm-observabil
2782027820
--- BEGIN CONTENT ---
2782127821
---
2782227822
title: XCM Observability
27823-
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.
2782427824
---
2782527825

2782627826
# XCM Observability
2782727827

2782827828
## Introduction
2782927829

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.
2783127831

2783227832
You will learn how to:
2783327833

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
2783827839

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.
2784027841

2784127842
## Prerequisites
2784227843

@@ -27850,8 +27851,6 @@ To follow this tutorial, you should have:
2785027851

2785127852
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/).
2785227853

27853-
---
27854-
2785527854
## Define a Scenario: DOT to Acala Transfer with Tracing
2785627855

2785727856
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
2786327862

2786427863
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.
2786527864

27866-
---
27867-
2786827865
## Step 1: Launch a Fork with Logging Enabled
2786927866

2787027867
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
2787527872

2787627873
→ See the detailed steps in [Replay and Dry Run XCMs Guide](https://docs.polkadot.com/tutorials/interoperability/replay-and-dry-run-xcms/).
2787727874

27878-
---
27879-
2788027875
## Step 2: Execute the Transfer with `SetTopic`
2788127876

2788227877
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:
2789127886
npx tsx limited-reserve-transfer-assets.ts
2789227887
```
2789327888

27894-
---
27895-
2789627889
## Step 3: Track the Message Across Chains
2789727890

2789827891
After submission, you can match events using the `message_id`:
@@ -27912,8 +27905,6 @@ After submission, you can match events using the `message_id`:
2791227905

2791327906
→ Matching confirms that the message was received and executed on the destination chain.
2791427907

27915-
---
27916-
2791727908
## Step 4: Debug Failures
2791827909

2791927910
If your XCM fails, you can debug using one of the following:
@@ -27932,8 +27923,6 @@ With logging enabled, Chopsticks will show:
2793227923

2793327924
→ Useful for understanding weight failures, malformed assets, or execution mismatches.
2793427925

27935-
---
27936-
2793727926
## Step 5: Handle Older Runtimes
2793827927

2793927928
Older runtimes use a **derived `forwarded_id`** in `Processed` events instead of the original topic hash.
@@ -27946,8 +27935,6 @@ const forwardedId = blake2AsU8a(input);
2794627935

2794727936
→ Tools must check both the `original_id` and `forwarded_id` when indexing older chains.
2794827937

27949-
---
27950-
2795127938
## Additional Samples
2795227939

2795327940
After learning the concepts above, you can explore other scenarios:
@@ -27968,8 +27955,6 @@ Simulates a swap using DOT on Hydration, then returns funds back to the origin.
2796827955

2796927956
Each sample includes inline comments and tracking info relevant to its use case.
2797027957

27971-
---
27972-
2797327958
## Where to Go Next
2797427959

2797527960
* [Replay and Dry Run XCMs Guide](https://docs.polkadot.com/tutorials/interoperability/replay-and-dry-run-xcms/)

tutorials/interoperability/xcm-observability.md

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
---
22
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.
44
---
55

66
# XCM Observability
77

88
## Introduction
99

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.
1111

1212
You will learn how to:
1313

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
1819

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.
2021

2122
## Prerequisites
2223

@@ -30,8 +31,6 @@ To follow this tutorial, you should have:
3031

3132
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/).
3233

33-
---
34-
3534
## Define a Scenario: DOT to Acala Transfer with Tracing
3635

3736
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
4342

4443
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.
4544

46-
---
47-
4845
## Step 1: Launch a Fork with Logging Enabled
4946

5047
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
5552

5653
→ See the detailed steps in [Replay and Dry Run XCMs Guide](https://docs.polkadot.com/tutorials/interoperability/replay-and-dry-run-xcms/).
5754

58-
---
59-
6055
## Step 2: Execute the Transfer with `SetTopic`
6156

6257
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:
7166
npx tsx limited-reserve-transfer-assets.ts
7267
```
7368

74-
---
75-
7669
## Step 3: Track the Message Across Chains
7770

7871
After submission, you can match events using the `message_id`:
@@ -92,8 +85,6 @@ After submission, you can match events using the `message_id`:
9285

9386
→ Matching confirms that the message was received and executed on the destination chain.
9487

95-
---
96-
9788
## Step 4: Debug Failures
9889

9990
If your XCM fails, you can debug using one of the following:
@@ -112,8 +103,6 @@ With logging enabled, Chopsticks will show:
112103

113104
→ Useful for understanding weight failures, malformed assets, or execution mismatches.
114105

115-
---
116-
117106
## Step 5: Handle Older Runtimes
118107

119108
Older runtimes use a **derived `forwarded_id`** in `Processed` events instead of the original topic hash.
@@ -126,8 +115,6 @@ const forwardedId = blake2AsU8a(input);
126115

127116
→ Tools must check both the `original_id` and `forwarded_id` when indexing older chains.
128117

129-
---
130-
131118
## Additional Samples
132119

133120
After learning the concepts above, you can explore other scenarios:
@@ -148,8 +135,6 @@ Simulates a swap using DOT on Hydration, then returns funds back to the origin.
148135

149136
Each sample includes inline comments and tracking info relevant to its use case.
150137

151-
---
152-
153138
## Where to Go Next
154139

155140
* [Replay and Dry Run XCMs Guide](https://docs.polkadot.com/tutorials/interoperability/replay-and-dry-run-xcms/)

0 commit comments

Comments
 (0)