Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HRMP Channel Establishment with System chains #6116

Merged
merged 7 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 10 additions & 30 deletions docs/build/build-hrmp-channels.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,40 +59,20 @@ of the `XcmExecutor`, which handles notifications of channel requests and accept

## Opening HRMP Channels with System Parachains

HRMP channel management involving system parachains takes place entirely on the Relay Chain. No
action is required from the parachain origin.
The [`establish_channel_with_system`](https://paritytech.github.io/polkadot-sdk/master/polkadot_runtime_parachains/hrmp/pallet/dispatchables/fn.establish_channel_with_system.html)
call can be used to establish a bi-directional channel between any parachain and a system chain.
This call needs to be dispatched from the parachain via an XCM program to execute on the Relay Chain.

Opening an HRMP channel with a system parachain requires an
[OpenGov referendum](../learn/learn-guides-polkadot-opengov.md) using the
[General Admin Track](../learn/learn-polkadot-opengov-origins.md#general-admin).
For instance, the call to be executed on the relay chain to establish bi-directional channel between
CrackTheCode016 marked this conversation as resolved.
Show resolved Hide resolved
a parachain and the Asset Hub with `ParaID` 1000 is `0x3c0ae8030000`

Proposals should generally be a `batchAll` call containing two `forceOpenHrmpChannel` calls (one for
each direction of the channel).
![asset-hub-hrmp-channel](../assets/asset-hub/establish-channel-asset-hub.png)

As an example, see [Referendum 280](https://polkadot.polkassembly.io/referenda/280), which opened
two bi-directional channels with Asset Hub (one for Zeitgeist and one for Composable).
Here is an example call with XCM message sent from the parachain to Rococo relay
CrackTheCode016 marked this conversation as resolved.
Show resolved Hide resolved
chain to establish channel a bi-directional channel with Rococo Asset Hub -
`0x0f001f000301000314000400000000070010a5d4e81300000000070010a5d4e80006000300c16678419c183c0ae8030000140d01000001003145`
CrackTheCode016 marked this conversation as resolved.
Show resolved Hide resolved

:::caution

Please ensure that you use the new `forceOpenHrmpChannel` directly on the Relay Chain, rather than
the old two-phase channel request/accept method.

:::

:::info

As of Polkadot and Kusama runtimes 1,001,000, channel establishment with system chains will not
require a deposit. However, for lower spec versions, each chain in the channel will need a free
balance of at least the required channel deposits plus the existential deposit.

For example, on Polkadot the sender and recipient deposit are both 10 DOT and the existential
deposit is 1 DOT. Each chain, as in both the system chain and its interlocutor, will need 21 DOT; 10
as a channel sender, 10 as a channel recipient, and 1 as existential.

Someone must transfer this DOT to the parachain sovereign accounts prior to the execution of the
`forceOpenHrmpChannel` calls.

:::
![asset-hub-hrmp-channel-xcm](../assets/asset-hub/asset-hub-establish-channel-xcm.png)

## Opening HRMP Channels Between Two System Parachains

Expand Down
Loading