Open HRMP cross-chain communication between Bifrost and Karura parachain

TL:DR

This is to propose opening an HRMP tunnel, in order to support the cross-chain communication between Bifrost and Karura.

Description

There are multiple on-chain proposals including open HRMP cross-chain communication between Bifrost and Karura parachain and List BNC/kUSD pair via Bootstrap on Karura Swap. On-chain propsal will be posted once it’s ready

Summary

HRMP (Horizontally Relay-routed Message Passing) is a stop-gap that predates XCMP. Semantically, it mimics XCMP’s interface. The crucial difference from XCMP though is that all the messages are stored in the relay-chain storage. The HRMP will be expected to retire once the XCMP is available.

Opening of HRMP channel between Bifrost and Karura will initially realize the cross-chain communication between two parachains:

  • Tokens on both sides can be transferred to each other.
  • Messages can be received on both sides, calling functions by each other.

Proposal

The proposal #TBD is now available on the Polkadot App - Karura parachain - Democracy section #TBD

Read more on the democratic process and how to participate here.

Technical Details

Preimage: #TBD
Hash: #TBD
Release page: #TBD
Runtime Wasm: #TBD
You can verify the upgrade by following this guide

4 Likes

So excited about it! Cannot wait to see how everything plays out! :star_struck:

3 Likes

Some more technical parameters.

Two proposals are required on Karura and Bifrost to establish a bidirectional HRMP channel.
The whole flow will be roughly like:

  1. Initiate requests
    a. Karura propose to request to open Karura to Bifrost HRMP channel
    b. Bifrost propose to request to open Bifrost to Karura HRMP channel
  2. Wait until proposals on step 1 are approved & enacted
  3. Accept requests
    a. Karura propose to accept Bifrost to Karura HRMP channel
    b. Bifrost propose to accept Karura to Bifrost HRMP channel
  4. Wait until proposals on step 3 are approved & enacted
  5. Wait for another session on Kusama for the change to be effective
  6. Crosschain transfer BNC will be possible at this stage. Other kinds of crosschain interaction such as transfer of KAR & kUSD will be enabled at later stage via runtime upgrade of Karura & Bifrost.

Initiate open HRMP channel request

  • Encoded call: 0x3c00d1070000e803000000900100

  • Recipient: 2001

  • Proposed max capacity: 1000

  • Proposed max message size: 102400

Those are the maximum allowed value by Kusama.

  • Proposal preimage: 0x3800010000040a00070010a5d4e808070100286bee00000000005ed0b2000000000004060000ca9a3b00000000383c00d1070000e80300000090010001040101020070617261d0070000000000000000000000000000000000000000000000000000

  • Proposal hash: 0xacccc0a08412504be957c0668354e544d95016055de27685a23e49d3a5b81440

This withdraw 1 KSM to buy transaction fee, execute the call to make open channel request, and refund remaining KSM to the parachain sovereign account qqdNxymsVvG9GE8uAzNkZya6Gg8D6udwTzyXZAoZUHd2D45

Accept HRMP channel request from Bifrost

  • Encoded call: 0x3c01d1070000

  • Sender: 2001

  • Proposal preimage: 0x3800010000040a00070010a5d4e808070100286bee00000000005ed0b2000000000004060000ca9a3b00000000183c01d107000001040101020070617261d0070000000000000000000000000000000000000000000000000000

  • Proposal hash: 0x3dfe99860fe5d3431f30ccc8fc062509f583bf65f3084b09d4e1c1f66e162260

This withdraw 1 KSM to buy transaction fee, execute the call to accept open channel request, and refund remaining KSM to the parachain sovereign account qqdNxymsVvG9GE8uAzNkZya6Gg8D6udwTzyXZAoZUHd2D45

3 Likes

really anticipate that, woud be a milestone, hope it won’t take long :)

2 Likes

Some more technical parameters on Bifrost side

Initiate open HRMP channel request to Karura

  • Encoded call: 0x3c00d0070000e803000000900100
  • Recipient: 2000
  • Proposed max capacity: 1000
  • Proposed max message size: 102400
  • Proposal preimage: 0x4a00010000040a00070010a5d4e808070100ca9a3b0000000000943577000000000004060000ca9a3b00000000383c00d0070000e80300000090010001040101020070617261d1070000000000000000000000000000000000000000000000000000
  • Proposal hash: 0xcf4c1d9c144c6a47742cb771ca8f6ffd4ee80a31d8ecf73e8aa955b5128f2b56

    This withdraw 1 KSM to buy transaction fee, execute the call to accept open channel request, and refund remaining KSM to the parachain sovereign account eGJrytyJYDzMGM1uji4Bx5ntw3xF6aifJ7Xvo3mE48cgW5N

Accept HRMP channel request from Karura

  • Encoded call: 0x3c01d0070000
  • Sender: 2000
  • Proposal preimage: 0x4a00010000040a00070010a5d4e808070100ca9a3b0000000000943577000000000004060000ca9a3b00000000183c01d007000001040101020070617261d1070000000000000000000000000000000000000000000000000000
  • Proposal hash: 0xb70c6f69151a9ec19e01d2a4df1088c975e76cf6f7a1f5381b7a203799cc8655

    This withdraw 1 KSM to buy transaction fee, execute the call to accept open channel request, and refund remaining KSM to the parachain sovereign account eGJrytyJYDzMGM1uji4Bx5ntw3xF6aifJ7Xvo3mE48cgW5N
3 Likes

Parameter debt is increased from 2000000000 to 3000000000, so the new proposal content is as follows:

Initiate open HRMP channel request to Karura

  • Encoded call: 0x3c00d0070000e803000000900100
  • Recipient: 2000
  • Proposed max capacity: 1000
  • Proposed max message size: 102400
  • Proposal preimage: 0x4a00010000040a00070010a5d4e808070100ca9a3b00000000005ed0b2000000000004060000ca9a3b00000000383c00d0070000e80300000090010001040101020070617261d1070000000000000000000000000000000000000000000000000000
  • Proposal hash: 0x7ff0ede21f0f7e117fd04ad5798de4d35d9c04e3259afe7887a824e616a43b29

    This withdraw 1 KSM to buy transaction fee, execute the call to accept open channel request, and refund remaining KSM to the parachain sovereign account `eGJrytyJYDzMGM1uji4Bx5ntw3xF6aifJ7Xvo3mE48cgW5N

Accept HRMP channel request from Karura

  • Encoded call: 0x3c01d0070000
  • Sender: 2000
  • Proposal preimage: 0x4a00010000040a00070010a5d4e808070100ca9a3b00000000005ed0b2000000000004060000ca9a3b00000000183c01d007000001040101020070617261d1070000000000000000000000000000000000000000000000000000
  • Proposal hash: 0x5b8dd1125205a0b4dc6c1ea8b76bbac6f0b6b6333c13fafd7ab07c4ce936fbfe

    This withdraw 1 KSM to buy transaction fee, execute the call to accept open channel request, and refund remaining KSM to the parachain sovereign account eGJrytyJYDzMGM1uji4Bx5ntw3xF6aifJ7Xvo3mE48cgW5N

Referenda #17 is proposed to make open HRMP channel request to Bifrost.

https://www.subsquare.io/karura/democracy/referendum/17

Referenda #18 is proposed to accept the HRMP channel open request from Bifrost.

https://www.subsquare.io/karura/democracy/referendum/18