Expose builder-facing bridging components on Asset Hub

I think there is a misunderstanding here.

I am aware that the bridging stack is complex, and what I’m trying to describe here is non-intuitive, but I can use an analogy which should help clear things up more:

Now

XCM parachain-to-parachain communication currently uses HRMP, messages “physically” routed through the Relay chain. Entire message payload is specifically sent to the Relay which will send it to dest parachain.
In a similar manner, BridgeHub is acting as middle-man for e.g. PolkadotParaEthereum XCM messages. Entire message payload is sent to BridgeHub which will export it to Ethereum.

Planned

In the future, we want to do XCMP instead of HRMP which will rely on state-proofs and off-chain delivery of messages between two parachains. Well, that’s exactly what is proposed here for bridges (which already use storage proofs and off-chain delivery of messages): PolkadotPara will export message directly to Ethereum without the message having to go through BridgeHub.

The plan is not to drop BridgeHub; BridgeHub will remain as the ecosystem’s common-good bridges’ chain. It is still a critical piece somewhere lower in the stack as it syncs consensus proofs and storage roots between the two ecosystems, and thus gives meaning/enables the use of direct storage proofs between e.g. PolkadotPara and Ethereum.

What we plan on moving away from BridgeHub is the XCM data layer. Bridge-specific XCM exporters can be directly deployed on AssetHub and any other parachain that wants to use the BridgeHub bridges.
These exporters will be able to directly export XCM messages to the other side of the bridge without having to “physically” route them through BridgeHub.

Usage

Most users of the bridge (individuals, contracts or even parachains) that do token transfers will use XCMs that have to go through Asset Hub, since that is the reserve location for most tokens. These are then directly exported without having to go through Bridge Hub as well.

What is also left out by this proposal is that there will be ever some kind of use case that is not solely token related. Like use cases where a parachain wants to call an ETH smart contract or vice-versa. They would also need to go through AH?

Parachains that need or want direct connectivity and don’t need or want to go through Asset Hub will:

  • include our xcm-bridge-exporter message router in their runtime,
  • subscribe to Bridge Hub for specific-bridge updates,
  • messages will be then directly exported over bridge using offchain-relayers.

Usage options are described in detail here: DotSama parachains options for using Polkadot<>Kusama bridge and here Polkadot parachains options for using Polkadot<>Ethereum bridge (Snowbridge)

System Load

The on-chain work for exporting/importing bridge XCM messages under this architecture is equivalent to exporting/importing XCM messages over XCMP. They both rely on equivalent storage proofs.
So, once we move from HRMP to XCMP, the load on e.g. Asset Hub is the same whether Asset Hub exports message directly or whether it sends it to Bridge Hub to be exported there.

Aka sending/receiving messages over bridge has equivalent on-chain processing cost to sending/receiving messages over XCMP.

Design doc

@bkontur is working on a complete-picture design doc for all of this

4 Likes