Horizon - a trustless harmony to ethereum bridge

Posted mutourend

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Horizon - a trustless harmony to ethereum bridge相关的知识,希望对你有一定的参考价值。

1. 引言

Horizon Bridge 当前支持Harmony与以太坊,以及Harmony与BSC之间的跨链token转移。

相关开源代码见:

Harmony采用FBFT共识

Horizon Bridge的主要特点为:

  • A bridge with cross-chain light clients, relayers, and prover full nodes, all trustless, no additional trust assumptions beyond the two blockchains that the bridge is connected to.
  • A gas-efficient Harmony light client on Ethereum (could be generalized to other chains) that only requires checkpoint blocks (1 block every x blocks, where 1 ≤ x ≤ 16384, 16384 is the #blocks per epoch) to verify any number of Harmony transaction proofs by the clients.
  • A constant-size Harmony light client proof that any user needs to send cross-chain (e.g., Ethereum) to claim their Harmony transaction.

Horizon Bridge当前支持的token转移类型有:

  • 1)ETH bridging
    • Allows bridging native ETH from Ethereum to receive 1ETH on Harmony
  • 2)ERC721 (NFT on Ethereum) bridging
    • Allows single or in batch bridging of ERC721 (or NFTs) to Harmony to receive HRC721
  • 3)ONE & HRC20 bridging
    • Allows bridging Harmony’s native ONE token and any HRC20 issued on Harmony to Ethereum for utilizing Ethereum ecosystem and DApps
  • 4)ERC1155 bridging
    • Allows single or in batch bridging of ERC1155 to Harmony to receive HRC1155
  • 5)HRC721 (NFT on Harmony) bridging
    • Allows single or in batch bridging of HRC721 (or NFTs) to Ethereum to receive ERC721
  • 6)HRC1155 bridging
    • Allows single or in batch bridging of ERC1155 to Ethereum to receive ERC1155

各链各token的映射关系为:

Horizon Bridge当前支持Harmony<->以太坊,Harmony<->BSC之间的token转换。
以太坊上的BUSD token 映射到 Harmony上为BUSD,BSC上的BUSD token 映射到 Harmony上为bscBUSD,Harmony token仅支持将bridge来的token映射回源链上,如将Harmony上的BUSD映射回以太坊上,若映射到BSC上将可能造成token永久丢失。

2. Horizon Bridge

Horizon Bridge在Harmony链端主要有:

  • 1)Bridge合约
  • 2)Ethereum Light Client (ELC)合约
  • 3)Ethereum Verifier(EVerifier)合约
  • 4)Ethereum Prover(EProver):为一个以太坊全节点,或者为可访问一个全节点的client
  • 5)Ethereum Relayer:负责将每个以太坊区块头信息relay到ELC合约。

Horizon Bridge在以太坊链端主要有:

  • 1)Bridge合约
  • 2)Harmony Light Client (HLC)合约
  • 3)Harmony Verifier(HVerifier)合约
  • 4)Harmony Prover(HProver):为一个Harmony全节点,或者为可访问一个全节点的client
  • 5)Harmony Relayer:负责将Harmony的每个checkpoint block header信息relay到HLC合约。

2.1 由以太坊转移到Harmony

资产由以太坊转移到Harmony的流程为:

  • 1)用户将其ERC20资产发送到以太坊Bridge合约来锁定资产,并获取相应的交易hash。
  • 2)用户将该交易hash发送给EProver来获取proof-of-lock。(包含block header info, path to lock tx)
  • 3)用户将获得的proof-of-lock发送给Harmony的Bridge合约。
  • 4)Harmony上的Bridge合约会触发ELC合约和EVerifier合约,验证该proof-of-lock有效后会mint等额的HRC20。

2.2 由Harmony到以太坊

资产由Harmony赎回到以太坊的流程为:

  • 1)用户调用Harmony Bridge合约来burn HRC20,然后获取相应的交易hash。
  • 2)用户将该交易hash发送给HProver,以获取proof-of-burn。
  • 3)用户将该proof-of-burn发送到以太坊上的Bridge合约。
  • 4)以太坊上的Bridge合约会触发HLC和HVerifier合约,验证proof-of-burn有效后会unlock等额的ERC20。

参考资料

[1] Harmony Fast Byzantine Fault Tolerance (FBFT)共识
[2] All harmony one bridges
[3] Horizon Bridge
[4] Harmony<>Cosmos Bridge #73

以上是关于Horizon - a trustless harmony to ethereum bridge的主要内容,如果未能解决你的问题,请参考以下文章

Rainbow bridge:trustless bridge between NEAR and Ethereum

VMware Horizon工具箱2.1已发布支持Horizon7

VMware Horizon 7新功能--即时克隆探索

VMware Horizon view打印机出现多个副本

VMware Horizon view连接服务器不同步

Horizon View 6.0 证书替换 Setp2 申请并替换证书