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

Add Polimec HRMP info #5503

Merged
merged 9 commits into from
Jan 26, 2024
10 changes: 8 additions & 2 deletions docs/build/build-hrmp-channels.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ two channels, one in each direction.
## Opening HRMP Channels

Opening a channel between two parachains is a two-phase process, with one chain first initiating a
channel request and then the second chain accepting it. When neither chain is a [system chain](../learn/learn-system-chains.md), they
will use the `hrmpInitOpenChannel` and `hrmpAcceptOpenChannel` calls, respectively.
channel request and then the second chain accepting it. When neither chain is a
[system chain](../learn/learn-system-chains.md), they will use the `hrmpInitOpenChannel` and
`hrmpAcceptOpenChannel` calls, respectively.

Each chain must dispatch the following calls on the Relay Chain from its parachain origin.

Expand All @@ -34,6 +35,11 @@ In order to dispatch a call from its sovereign origin, a parachain may use gover
encoded call in a `Transact` instruction to the Relay Chain, but it may also execute this logic
autonomously (e.g. on the notification that a channel was requested).

The xcm-executor pallet can be forked by parachains' teams and modified to include logic to handle
[high-level HRMP instructions](https://paritytech.github.io/xcm-docs/journey/channels-and-bridges.html#hrmpnewchannelopenrequest).
These instructions are not included in the default version of the pallet, but can be used for
opening, accepting, and closing channels without relying on governance.
Copy link
Member

@DrW3RK DrW3RK Jan 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this document gives concrete instructions on how to open HRMP channels between chains, this section falls short explaining what specific logic needs to be added to xcm-executor pallet to handle high-level HRMP instructions. Perhaps, a link to the forked code base and an actual project example that successfully opened channels without relying on governance would help.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This suggestion came from my comments. We're open-sourcing the code at Polimec next Monday and could include it here. However, the codebase is still in development.

The wording is very good @ filippoweb3. It should be noted that the initial opening would probably not be done by a notification from the relay, since someone needs to send the hrmpInitOpenChannel extrinsic to the relay first for this to happen.

At Polimec we expect the other parachain to first initiate the opening from whatever means they want (probably sudo), and from this notification start our logic to check if we should accept and initiate the other direction channel.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect! Yeah, just want to ensure there are concrete instructions on this page and avoid ambiguity for parachain teams. Sorry for the mix-up with Referenda 340. We will link to your implementation once it is available.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuaniRios thanks, we will leave this open until we can link to the instructions you will opensource :)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@filippoweb3 @DrW3RK Sorry for the delay. We're open sourcing sometime this week, prob tomorrow

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@filippoweb3 our legal team is now reviewing the licences. ETA around Wednesday next week

Copy link

@JuaniRios JuaniRios Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our codebase is now open source!
Here are some interesting links you might want to use:

Let me know if you have any questions :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DrW3RK I added those links above, lmk if its ok

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @JuaniRios for contributing!


## Opening HRMP Channels with System Parachains

HRMP channel management involving system parachains takes place entirely on the Relay Chain. No
Expand Down
Loading