Prisma:一种用于在去中心化应用中强制执行合约-客户端协议的无分层语言(扩展版)
Prisma: A Tierless Language for Enforcing Contract-Client Protocols in Decentralized Applications (Extended Version)
AI总结:
Prisma 是一种无分层语言,将合约与客户端统一编码,封装收发操作为直接风格操作,消除接口不匹配,并形式化证明编译器在恶意客户端下的行为保持,实证其表达性与性能。
摘要:
去中心化应用(dApps)由运行在区块链上的智能合约和模拟协作方的客户端组成。dApps 被用于建模金融和法律业务功能。如今,合约和客户端是作为独立的程序编写的——使用不同的编程语言——通过发送和接收操作进行通信。这使得分布式程序流难以表达和推理,增加了客户端-合约接口不匹配的可能性,这种不匹配可能被恶意客户端利用,可能导致巨大的财务损失。在本文中,我们提出了 Prisma,一种用于无分层去中心化应用的语言,其中合约及其客户端在一个单元中定义,并且“属于一起”的发送和接收动作对被封装为单个直接风格的操作,该操作由发送方和接收方以不同方式执行。这使得能够通过标准控制流表达分布式程序流,并使不匹配的通信变得不可能。我们形式化地证明了我们的编译器在存在控制客户端代码的攻击者的情况下保持程序行为。我们系统地比较了 Prisma 与主流的和先进的 dApps 编程模型,并为其表达性和性能提供了实证证据。
英文摘要:
Decentralized applications (dApps) consist of smart contracts that run on blockchains and clients that model collaborating parties. dApps are used to model financial and legal business functionality. Today, contracts and clients are written as separate programs -- in different programming languages -- communicating via send and receive operations. This makes distributed program flow awkward to express and reason about, increasing the potential for mismatches in the client-contract interface, which can be exploited by malicious clients, potentially leading to huge financial losses. In this paper, we present Prisma, a language for tierless decentralized applications, where the contract and its clients are defined in one unit and pairs of send and receive actions that "belong together" are encapsulated into a single direct-style operation, which is executed differently by sending and receiving parties. This enables expressing distributed program flow via standard control flow and renders mismatching communication impossible. We prove formally that our compiler preserves program behavior in presence of an attacker controlling the client code. We systematically compare Prisma with mainstream and advanced programming models for dApps and provide empirical evidence for its expressiveness and performance.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。