Skip to content

Commit 63711c9

Browse files
Add result
1 parent 9eb6bde commit 63711c9

File tree

3 files changed

+41
-82
lines changed

3 files changed

+41
-82
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div class="termynal" data-termynal>
2+
<span data-ty="input">npx tsx limited-reserve-transfer-assets.ts</span>
3+
<span data-ty>✅ Local dry run successful.</span>
4+
<span data-ty>📦 Finalised on Polkadot Asset Hub in block #9079592: 0x6de0cd268f07ec040a69dbbcb81f86c6fc4954dfa7fc914edd5dae1e3f235083</span>
5+
<span data-ty>📣 Last message Sent on Polkadot Asset Hub: 0xb4b8d2c87622cbad983d8f2c92bfe28e12d587e13d15ea4fdabe8f771bf86bce</span>
6+
<span data-ty>📦 Finalised on Acala in block #8826386: 0xfda51e7e411ee59c569fc051ef51431b04edebcc5d45d7b1d1bdfcce9627638a</span>
7+
<span data-ty>📣 Last message Processed on Acala: 0xb4b8d2c87622cbad983d8f2c92bfe28e12d587e13d15ea4fdabe8f771bf86bce</span>
8+
<span data-ty>✅ Message ID matched.</span>
9+
</div>

llms.txt

Lines changed: 20 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -28149,55 +28149,34 @@ During execution, the runtime adds a `SetTopic` instruction automatically. This
2814928149

2815028150
This forwarded message is then processed on Acala, where the `message_id` is emitted in the `MessageQueue.Processed` event.
2815128151

28152-
## Step 3: Track the Message Across Chains
28152+
### Track the Message Across Chains
2815328153

28154-
Once submitted, use the `message_id` to match the `Sent` event on the origin chain with the `Processed` event on the destination chain.
28154+
After submitting the transfer, use the `message_id` to correlate the origin and destination events.
2815528155

28156-
| Chain | Event | Field | Description |
28157-
| ------------------ | ------------------------ | ------------ | ----------------------------------------------------- |
28158-
| Polkadot Asset Hub | `PolkadotXcm.Sent` | `message_id` | Generated automatically or derived from `SetTopic` |
28159-
| Acala | `MessageQueue.Processed` | `id` | Should match the original `message_id` from Asset Hub |
28156+
The runtime automatically inserts a `SetTopic` instruction (if not manually provided), and the resulting topic is emitted as `message_id` in:
2816028157

28161-
### Example Log Output
28158+
| Chain | Event | Field | Description |
28159+
|-------------------------------------|--------------------------|--------------|----------------------------------------------------------------------------|
28160+
| Origin (e.g. Asset Hub) | `PolkadotXcm.Sent` | `message_id` | Message ID from `SetTopic`. Appended automatically if missing. |
28161+
| Destination (e.g. Acala, Hydration) | `MessageQueue.Processed` | `id` | Matches `message_id` from the origin chain, enabling reliable correlation. |
2816228162

28163-
```bash
28164-
📣 Sent: 0xb4b8d2c8...
28165-
📣 Processed: 0xb4b8d2c8...
28166-
✅ Message ID matched.
28167-
```
28168-
28169-
Matching confirms the XCM was executed on the destination chain.
28170-
28171-
---
28172-
28173-
## Understand the Message Flow
28174-
28175-
28176-
## 🔍 Event Correlation Flow
28163+
**These two fields now match** on new runtimes (`stable2503-5` or later).
2817728164

28178-
| Chain | Event | Field | Description |
28179-
| ------------------------ | ------------------------ | ------------ | ------------------------------------------------------- |
28180-
| Origin (e.g. Asset Hub) | `PolkadotXcm.Sent` | `message_id` | Set from `SetTopic`, automatically added if not present |
28181-
| Destination (e.g. Acala) | `MessageQueue.Processed` | `id` | Matches the `message_id` from the origin chain |
28165+
> ⚠️ Do not rely on [`XcmpQueue.XcmpMessageSent`](https://paritytech.github.io/polkadot-sdk/master/cumulus_pallet_xcmp_queue/pallet/enum.Event.html#variant.XcmpMessageSent){target=\_blank}. Its `message_hash` is not derived from `SetTopic` and is not suitable for cross-chain tracking.
2818228166

28183-
✅ These fields are consistent on newer runtimes (`stable2503-5` or later).
28167+
#### Example: Message Trace Output
2818428168

28185-
> ⚠️ **Avoid relying on [`XcmpQueue.XcmpMessageSent`](https://paritytech.github.io/polkadot-sdk/master/cumulus_pallet_xcmp_queue/pallet/enum.Event.html#variant.XcmpMessageSent)**. Its `message_hash` is not linked to `message_id` and cannot be used for cross-chain tracing.
28186-
28187-
---
28188-
28189-
## 🛠 Example: Message Trace Output
28190-
28191-
```console
28192-
✅ Local dry run successful.
28193-
📦 Finalised on Polkadot Asset Hub in block #9079592: 0x6de0cd...
28194-
📣 Last message Sent on Polkadot Asset Hub: 0xb4b8d2c87622cbad983d8f2c92bfe28e12d587e13d15ea4fdabe8f771bf86bce
28195-
📦 Finalised on Acala in block #8826386: 0xfda51e...
28196-
📣 Last message Processed on Acala: 0xb4b8d2c87622cbad983d8f2c92bfe28e12d587e13d15ea4fdabe8f771bf86bce
28197-
✅ Message ID matched.
28198-
```
28169+
<div class="termynal" data-termynal>
28170+
<span data-ty="input">npx tsx limited-reserve-transfer-assets.ts</span>
28171+
<span data-ty>✅ Local dry run successful.</span>
28172+
<span data-ty>📦 Finalised on Polkadot Asset Hub in block #9079592: 0x6de0cd268f07ec040a69dbbcb81f86c6fc4954dfa7fc914edd5dae1e3f235083</span>
28173+
<span data-ty>📣 Last message Sent on Polkadot Asset Hub: 0xb4b8d2c87622cbad983d8f2c92bfe28e12d587e13d15ea4fdabe8f771bf86bce</span>
28174+
<span data-ty>📦 Finalised on Acala in block #8826386: 0xfda51e7e411ee59c569fc051ef51431b04edebcc5d45d7b1d1bdfcce9627638a</span>
28175+
<span data-ty>📣 Last message Processed on Acala: 0xb4b8d2c87622cbad983d8f2c92bfe28e12d587e13d15ea4fdabe8f771bf86bce</span>
28176+
<span data-ty>✅ Message ID matched.</span>
28177+
</div>
2819928178

28200-
## Step 4: Debug Failures
28179+
### Failure Event Handling
2820128180

2820228181
If your XCM fails, you can debug using one of the following:
2820328182

tutorials/interoperability/xcm-observability.md

Lines changed: 12 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -111,55 +111,26 @@ During execution, the runtime adds a `SetTopic` instruction automatically. This
111111

112112
This forwarded message is then processed on Acala, where the `message_id` is emitted in the `MessageQueue.Processed` event.
113113

114-
## Step 3: Track the Message Across Chains
114+
### Track the Message Across Chains
115115

116-
Once submitted, use the `message_id` to match the `Sent` event on the origin chain with the `Processed` event on the destination chain.
116+
After submitting the transfer, use the `message_id` to correlate the origin and destination events.
117117

118-
| Chain | Event | Field | Description |
119-
| ------------------ | ------------------------ | ------------ | ----------------------------------------------------- |
120-
| Polkadot Asset Hub | `PolkadotXcm.Sent` | `message_id` | Generated automatically or derived from `SetTopic` |
121-
| Acala | `MessageQueue.Processed` | `id` | Should match the original `message_id` from Asset Hub |
118+
The runtime automatically inserts a `SetTopic` instruction (if not manually provided), and the resulting topic is emitted as `message_id` in:
122119

123-
### Example Log Output
124-
125-
```bash
126-
📣 Sent: 0xb4b8d2c8...
127-
📣 Processed: 0xb4b8d2c8...
128-
✅ Message ID matched.
129-
```
130-
131-
Matching confirms the XCM was executed on the destination chain.
132-
133-
---
134-
135-
## Understand the Message Flow
120+
| Chain | Event | Field | Description |
121+
|-------------------------------------|--------------------------|--------------|----------------------------------------------------------------------------|
122+
| Origin (e.g. Asset Hub) | `PolkadotXcm.Sent` | `message_id` | Message ID from `SetTopic`. Appended automatically if missing. |
123+
| Destination (e.g. Acala, Hydration) | `MessageQueue.Processed` | `id` | Matches `message_id` from the origin chain, enabling reliable correlation. |
136124

125+
**These two fields now match** on new runtimes (`stable2503-5` or later).
137126

138-
## 🔍 Event Correlation Flow
127+
> ⚠️ Do not rely on [`XcmpQueue.XcmpMessageSent`](https://paritytech.github.io/polkadot-sdk/master/cumulus_pallet_xcmp_queue/pallet/enum.Event.html#variant.XcmpMessageSent){target=\_blank}. Its `message_hash` is not derived from `SetTopic` and is not suitable for cross-chain tracking.
139128
140-
| Chain | Event | Field | Description |
141-
| ------------------------ | ------------------------ | ------------ | ------------------------------------------------------- |
142-
| Origin (e.g. Asset Hub) | `PolkadotXcm.Sent` | `message_id` | Set from `SetTopic`, automatically added if not present |
143-
| Destination (e.g. Acala) | `MessageQueue.Processed` | `id` | Matches the `message_id` from the origin chain |
129+
#### Example: Message Trace Output
144130

145-
✅ These fields are consistent on newer runtimes (`stable2503-5` or later).
146-
147-
> ⚠️ **Avoid relying on [`XcmpQueue.XcmpMessageSent`](https://paritytech.github.io/polkadot-sdk/master/cumulus_pallet_xcmp_queue/pallet/enum.Event.html#variant.XcmpMessageSent)**. Its `message_hash` is not linked to `message_id` and cannot be used for cross-chain tracing.
148-
149-
---
150-
151-
## 🛠 Example: Message Trace Output
152-
153-
```console
154-
✅ Local dry run successful.
155-
📦 Finalised on Polkadot Asset Hub in block #9079592: 0x6de0cd...
156-
📣 Last message Sent on Polkadot Asset Hub: 0xb4b8d2c87622cbad983d8f2c92bfe28e12d587e13d15ea4fdabe8f771bf86bce
157-
📦 Finalised on Acala in block #8826386: 0xfda51e...
158-
📣 Last message Processed on Acala: 0xb4b8d2c87622cbad983d8f2c92bfe28e12d587e13d15ea4fdabe8f771bf86bce
159-
✅ Message ID matched.
160-
```
131+
--8<-- 'code/tutorials/interoperability/xcm-observability/limited-reserve-transfer-assets-result.html'
161132

162-
## Step 4: Debug Failures
133+
### Failure Event Handling
163134

164135
If your XCM fails, you can debug using one of the following:
165136

0 commit comments

Comments
 (0)