Prisma: A Tierless Language for Enforcing Contract-Client Protocols in Decentralized Applications

IF 1.5 2区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING ACM Transactions on Programming Languages and Systems Pub Date : 2023-07-18 DOI:https://dl.acm.org/doi/10.1145/3604629
David Richter, David Kretzler, Pascal Weisenburger, Guido Salvaneschi, Sebastian Faust, Mira Mezini
{"title":"Prisma: A Tierless Language for Enforcing Contract-Client Protocols in Decentralized Applications","authors":"David Richter, David Kretzler, Pascal Weisenburger, Guido Salvaneschi, Sebastian Faust, Mira Mezini","doi":"https://dl.acm.org/doi/10.1145/3604629","DOIUrl":null,"url":null,"abstract":"<p>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. </p><p>In this paper, we present <sans-serif>Prisma</sans-serif>, 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 <sans-serif>Prisma</sans-serif> with mainstream and advanced programming models for dApps and provide empirical evidence for its expressiveness and performance.</p>","PeriodicalId":50939,"journal":{"name":"ACM Transactions on Programming Languages and Systems","volume":"265 10","pages":""},"PeriodicalIF":1.5000,"publicationDate":"2023-07-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM Transactions on Programming Languages and Systems","FirstCategoryId":"94","ListUrlMain":"https://doi.org/https://dl.acm.org/doi/10.1145/3604629","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

Abstract

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.

查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Prisma:一种用于在分散应用程序中执行合约-客户端协议的无层语言
去中心化应用程序(dApps)由运行在区块链上的智能合约和为协作方建模的客户端组成。dapp用于模拟金融和法律业务功能。今天,合同和客户端被写成独立的程序——用不同的编程语言——通过发送和接收操作进行通信。这使得分布式程序流难以表达和推理,增加了客户-契约接口中不匹配的可能性,这可能被恶意客户端利用,可能导致巨大的经济损失。在本文中,我们介绍了Prisma,一种用于无层分散应用程序的语言,其中合约及其客户端被定义在一个单元中,“属于一起”的发送和接收操作对被封装到单个直接风格的操作中,该操作由发送方和接收方以不同的方式执行。这使得通过标准控制流表达分布式程序流成为可能,并使不匹配的通信成为不可能。我们正式证明,在攻击者控制客户端代码的情况下,我们的编译器可以保留程序行为。我们系统地比较了Prisma与主流和先进的dapp编程模型,并为其表现力和性能提供了经验证据。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
ACM Transactions on Programming Languages and Systems
ACM Transactions on Programming Languages and Systems 工程技术-计算机:软件工程
CiteScore
3.10
自引率
7.70%
发文量
28
审稿时长
>12 weeks
期刊介绍: ACM Transactions on Programming Languages and Systems (TOPLAS) is the premier journal for reporting recent research advances in the areas of programming languages, and systems to assist the task of programming. Papers can be either theoretical or experimental in style, but in either case, they must contain innovative and novel content that advances the state of the art of programming languages and systems. We also invite strictly experimental papers that compare existing approaches, as well as tutorial and survey papers. The scope of TOPLAS includes, but is not limited to, the following subjects: language design for sequential and parallel programming programming language implementation programming language semantics compilers and interpreters runtime systems for program execution storage allocation and garbage collection languages and methods for writing program specifications languages and methods for secure and reliable programs testing and verification of programs
期刊最新文献
Proving Correctness of Parallel Implementations of Transition System Models CFLOBDDs: Context-Free-Language Ordered Binary Decision Diagrams Adversities in Abstract Interpretation: Accommodating Robustness by Abstract Interpretation: ACM Transactions on Programming Languages and Systems: Vol 0, No ja Homeostasis: Design and Implementation of a Self-Stabilizing Compiler Locally Abstract, Globally Concrete Semantics of Concurrent Programming Languages
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1