zkBridge: Trustless Cross-chain Bridges Made Practical

发表信息

作者

笔记

Blockchains have seen growing traction with cryptocurrencies reaching a market cap of over 1 trillion dollars, major institution investors taking interests, and global impacts on governments, businesses, and individuals. Also growing significantly is the heterogeneity of the ecosystem where a variety of blockchains co-exist. Cross-chain bridge is a necessary building block in this multi-chain ecosystem. Existing solutions, however, either suffer from performance issues or rely on honesty assumptions of committees that significantly lower the security. Recurring attacks against bridges have cost users more than 1.5 billion USD. In this paper, we introduce zkBridge, an efficient cross-chain bridge that guarantees strong security without extra trust assumptions. With succinct proofs, zkBridge not only guarantees correctness, but also significantly reduces on-chain verification cost. We propose novel succinct proof protocols that are orders-of-magnitude faster than existing solutions for workload in zkBridge. With a modular design, zkBridge enables a few useful capabilities, including message passing, token transferring, and other computational logic operating on state changes from different chains. We fully implemented zkBridge between Cosmos and Ethereum and evaluated the end-to-end performance. The experiment shows that zkBridge achieves practical performance: it can generate a block header proof within 2 minutes, while verifying proofs on-chain costs less than 220K gas (the same as Groth16). Relaying a transaction from Cosmos to Ethereum costs 210K gas.

区块链在加密货币市场的推动下,正受到越来越多的关注,市场总值已超过1万亿美元,主要机构投资者也开始对此表现出兴趣,并对政府、企业和个人产生了全球性的影响。与此同时,生态系统的异质性也在显著增加,各种区块链共存于此。在这个多链生态系统中,跨链桥(cross-chain bridge)是一个必要的基础构件。然而,现有的解决方案要么存在性能问题,要么依赖于委员会的诚实假设,这显著降低了安全性。针对桥的重复攻击已经导致用户损失超过15亿美元。在本文中,我们介绍了zkBridge,这是一种高效的跨链桥,能够在没有额外信任假设的情况下保证强安全性。通过简洁的证明,zkBridge不仅保证了正确性,还显著降低了链上验证成本。我们提出了新颖的简洁证明协议,其速度比现有解决方案快几个数量级,适用于zkBridge中的工作负载。凭借模块化设计,zkBridge实现了一些有用的功能,包括消息传递、代币转移以及其他基于不同链的状态变化进行的计算逻辑。我们在Cosmos和Ethereum之间全面实现了zkBridge,并评估了端到端性能。实验结果表明,zkBridge实现了实用性能:它能够在2分钟内生成区块头证明,而链上验证证明的成本低于220K gas(与Groth16相同)。将交易从Cosmos中转发到Ethereum的成本为210K gas。

问题描述:跨链交易存在性能差或依赖中心化参与方的情况

性能差:C2部署一个智能合约来追踪和验证C1上的区块头,通过merkle proof来验证交易,存在巨大的存储和计算开销。

依赖中心化参与方:验证者委员会签署状态转移,基于诚实多数假设,中心化架构存在信任和安全问题。

核心思路: 基于zkSNARK生成零知识证明,高效验证另一条链的状态转移。

zk-SNARK(如Groth16) proof 的生成并不高效。广泛使用的EdDSA签名算法表示为zk-SNARK中的算数电路需要超过200万个逻辑门,而每个状态转移可能需要验证数百个签名,需要降低零知识证明的生成时间

针对此问题,基于Virgo提出了分布式的deVirgo,然而deVirgo在链上验证也很昂贵,因此使用proof size 为大小的Groth16协议将proof size 相对更大的deVirgo proof进行了递归证明。

解决方案:

  • 区块链交易中的电路包含大量相同的小型电路