Skip to content

Manage Cross-Chain Communication Channels

Introduction

All Tanssi appchains have an inherent capability to communicate and interoperate with any other appchain in the ecosystem. This native cross-chain communication feature is possible thanks to the unique infrastructure the appchains are built on top of, leveraging the Cross-Consensus Message format (XCM for short), which facilitates communication between different consensus systems.

The first step to enable communication between appchains is opening a channel. The process of opening a channel starts by sending a request to the appchain you want to establish communications with. Once the request has been accepted by the destination chain's governor, a channel will be opened.

In this guide, you'll learn how to use the Tanssi dApp to manage your appchain's cross-chain communication channels.

Checking Prerequisites

For the examples in this guide, you will need to have the following:

  • A Tanssi appchain (Snap or Dedicated)
  • The account you used when registering the appchain, imported in any of the supported wallets
  • Your appchain's Sudo account, also imported in any of the supported wallets

Note

The appchain's registration account is always a Substrate one, whereas the appchain's Sudo account depends on the chain type. If the chain is EVM-compatible, then the Sudo account will be an Ethereum type and, otherwise, a Substrate type.

Retrieving the Registration Account

If you're unsure what your registration account is, you can query it directly from the Tanssi orchestrator chain, which keeps records of every registered appchain. To do so, head to the Chain state section on the Polkadot.js Apps connected to the orchestrator chain for snap appchains or dedicated appchains, and take the following steps:

  1. Select the registrar storage module
  2. Select registrarDeposit
  3. Insert your appchain ID
  4. Press + icon

You'll see the registration account at the bottom.

Locating your registration account

Note

The dApp will show your appchain in the dashboard only if you have the registration account properly set.

Retrieving the Sudo Account

If you're unsure what your Tanssi appchain's Sudo account is, you can find it in your Tanssi Dashboard underneath the Properties section.

Locating your Sudo address on apps.tanssi.network

Warning

It's critical to protect your Sudo account key with the utmost security precautions, as it grants privileged access to your Tanssi appchain.

Accessing the Channel Management Panel

The Tanssi dApp makes it easy for the appchain governor to manage cross-chain communication channels. It allows requesting new channels, accepting incoming channel opening requests, closing existing channels, and more. To access the channel management panel, head to the Tanssi dApp, and then:

  1. Click on the Manage button
  2. Click on the XCM button.

Accessing the channel management panel

Note

If you don't see your appchain's details on the dashboard, make sure to comply with the prerequisites.

The panel will show your appchain's communication channels status along with several available actions. The elements you are presented with are:

  1. Sovereign account - is a keyless account that belongs to the appchain in a different consensus system, the relay chain in this case. It can only be used by the appchain's governor.

    Before opening a new channel, the appchain's sovereign account in the relay chain must be funded with enough tokens to be locked as a channel deposit.

    In this section, you can see your appchain's sovereign account balance, copy its address, and deposit tokens

    Note

    Your appchain's sovereign account in the relay chain must be funded with relay chain tokens. On Dancebox, the relay chain uses UNIT tokens, and the required amount is currently configured to zero.

  2. Incoming/Outgoing channel requests - every channel request needs to be accepted by the counterpart before any message can be sent.

    In this section, you can see the list of pending outgoing requests and cancel them. You can also see any incoming channel requests your appchain might have received and accept the channel

  3. Established channels - Once the destination chain's governor has accepted the channel request, the channel becomes open and available for message transmission.

    In this section, you can see the list of accepted channels your appchain has, the direction in which the messages flow through the channel, and cancel the channel

  4. Request to open new channels - this option allows you to select an existing appchain within the ecosystem and request a channel to be opened. The next section explains how to do it

The channel management panel

Request to Open New Channel

Provided that your appchain has enough funds for the deposit in its relay chain's sovereign account, the appchain governor can request to open a new channel with any other appchain.

To do so, click on HRMP Channels and then:

  1. Select the appchain you want to establish a channel with
  2. Click on Request Channel

You'll be asked to sign the transaction, and once it's gone through, the destination chain will receive the request.

Channel opening request

Last update: June 20, 2024
| Created: June 7, 2024