A blockchain facilitates secure and atomic transactions between mutually untrusting parties on that chain. Today, there are multiple blockchains with differing interfaces and security properties. Programming in this multi-blockchain world is hindered by the lack of general and convenient abstractions for cross-chain communication and computation. Current cross-chain communication bridges have varied and low-level interfaces, making it difficult to develop portable applications. Current methods for multi-chain atomic transactions are limited in scope to cryptocurrency swaps. This work addresses these issues. We first define a uniform, high-level interface for communication between chains. Building on this interface, we formulate a protocol that guarantees atomicity for general transactions whose operations may span several chains. We formulate and prove the desired correctness and security properties of these protocols. Our prototype implementation is built using the LayerZero cross-chain bridge. Experience with this implementation shows that the new abstractions considerably simplify the design and implementation of multi-chain transactions. Experimental evaluation with multi-chain swap transactions demonstrates performance comparable to that of custom-built implementations.
翻译:区块链能够在该链上互不信任的各方之间实现安全且原子性的交易。如今存在多个具有不同接口和安全属性的区块链。在这种多区块链环境下编程因缺乏通用且便捷的跨链通信与计算抽象而受到阻碍。当前的跨链通信桥接口多样且层级较低,使得可移植应用的开发变得困难。现有的多链原子交易方法在范围上局限于加密货币交换。本研究解决了这些问题。我们首先定义了统一的、高层次的链间通信接口。在此基础上,我们设计了一个协议,该协议能保证操作可能跨越多条链的通用交易的原子性。我们阐述并证明了这些协议所期望的正确性和安全属性。我们的原型实现基于LayerZero跨链桥构建。实际使用经验表明,新抽象极大简化了多链交易的设计与实现。使用多链交换交易进行的实验评估显示其性能可与定制化实现相媲美。