paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Synthesis-powered optimization of smart contracts via data type refactoring

基于合成的智能合约数据类型重构优化
OOPSLA 6(OOPSLA2)2022匹配度 2/10 · 论文聚焦智能合约的数据类型重构与程序合成以降低 gas 消耗,属于程序合成/编译器优化方向,与用户关注的多项核心问题(LLM/Agent 与静态分析、浮点程序分析、贝叶斯程序分析、ML/Agentic 系统静态分析)没有直接交集。虽然涉及 PL 技术,但未涉及 LLM/Agent 或静态分析,也未体现工业落地与问题驱动之外的匹配点。引用 14 inbox
Yanju Chen, Yuepeng Wang, Maruth Goyal, James Dong, Yu Feng, Işil Dillig
crossref: 2026-09-10

AI 速览

一句话:提出通过数据类型重构并用程序合成自动生成功能等价的合约,以降低 gas 消耗。

在以太坊上执行智能合约需要消耗以 gas 计量的费用,因此智能合约开发者投入大量精力降低 gas 使用。本文提出一种通过改变底层数据布局来降低智能合约 gas 消耗的新技术:给定智能合约 P 及一个类型级变换,方法能够自动合成与 P 功能等价的新合约 P'。作者提供了一种便捷的 DSL 来表达数据类型重构,并利用程序合成生成合约的新版本。该技术实现于工具 Solidare 中,并在来自 Etherscan 与 GasStation 的真实智能合约上进行了评估。实验表明,该方法能够有效自动化所期望的数据布局变换,并且对于使用丰富数据结构的智能合约,能有效降低其 gas 消耗。

问题
智能合约在以太坊区块链上执行需要消耗 gas(费用),开发者亟需在保持功能语义不变的前提下减少 gas 使用。
方法
给定合约 P 和类型级变换,提供表达数据类型重构的 DSL,并借助程序合成自动生成与 P 功能等价的新合约 P'。
评估
实现工具 Solidare,在 Etherscan 与 GasStation 的真实智能合约上评估,验证其能自动完成数据布局变换并降低使用丰富数据结构合约的 gas 消耗。
原文摘要(Abstract)

Since executing a smart contract on the Ethereum blockchain costs money (measured in gas ), smart contract developers spend significant effort in reducing gas usage. In this paper, we propose a new technique for reducing the gas usage of smart contracts by changing the underlying data layout. Given a smart contract P and a type-level transformation, our method automatically synthesizes a new contract P ′ that is functionally equivalent to P . Our approach provides a convenient DSL for expressing data type refactorings and employs program synthesis to generate the new version of the contract. We have implemented our approach in a tool called Solidare and demonstrate its capabilities on real-world smart contracts from Etherscan and GasStation. In particular, we show that our approach is effective at automating the desired data layout transformation and that it is useful for reducing gas usage of smart contracts that use rich data structures.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot1425,
  title = {Synthesis-powered optimization of smart contracts via data type refactoring},
  author = {Yanju Chen and Yuepeng Wang and Maruth Goyal and James Dong and Yu Feng and Işil Dillig},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {6},
  number = {OOPSLA2},
  year = {2022},
  doi = {10.1145/3563308}
}