0

Is it possible to trace XCM messages (origin para and account id, destination para and account id, instruction and parameters) just utilizing the relay chain storage? If not, what is the simplest way to do it?

1 Answer 1

-1

Yes, it is possible to trace XCM messages using the relay chain storage. The XCM pallet stores all XCM messages in the relay chain, including the origin parachain and account ID, destination parachain and account ID, instruction, and parameters.

To trace XCM messages using the relay chain storage, you can use the following steps:

  1. Find the block height of the XCM message you want to trace.
  2. Get the XCM message from the relay chain storage for that block height.
  3. Parse the XCM message to extract the origin parachain and account ID, destination parachain and account ID, instruction, and parameters.

There are a few tools that can help you trace XCM messages using the relay chain storage. One tool is polkaholic.io, which provides a block indexer that allows you to monitor every XCM message sent and received from/in the relay chain. Another tool is Subscan, which provides a beautiful interface to keep track of every XCM message sent between parachain-parachain and parachain-relay chain.

In addition to using the relay chain storage, you can also trace XCM messages using a bridge. A bridge is a third-party service that allows you to send messages between different blockchains. Bridges typically store a copy of the XCM messages that have been sent between the blockchains they connect. This means that you can use a bridge to trace XCM messages even if the relay chain storage does not contain them.

The simplest way to trace XCM messages is to use a tool like Polkaholic.io or Subscan. These tools make it easy to find the block height of an XCM message and then get the XCM message from the relay chain storage. Once you have the XCM message, you can parse it to extract the origin parachain and account ID, destination parachain and account ID, instruction, and parameters.

I hope this helps!

2
  • Can you please give more details? For example for this message Subscan gives Kusama block 18781810, extrinsic 18781810-1 and event 18781810-2. But when I examine the extrinsic and event content I cannot see anything related to the XCM message. XCM pallet chain storage also doesn't seem to provide access to the actual XCM messages in certain blocks.
    – kukabi
    Jul 14 at 7:57
  • It seems only possible by following the para_head block hash in the related event to find the actual block with the XCM extrinsic in the parachain block storage, but for this, I would need access to all parachain storages.
    – kukabi
    Jul 14 at 8:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.