高级检索
    宋书玮, 倪孝泽, 陈厅. 智能合约Gas优化综述[J]. 计算机研究与发展, 2023, 60(2): 311-325. DOI: 10.7544/issn1000-1239.202220887
    引用本文: 宋书玮, 倪孝泽, 陈厅. 智能合约Gas优化综述[J]. 计算机研究与发展, 2023, 60(2): 311-325. DOI: 10.7544/issn1000-1239.202220887
    Song Shuwei, Ni Xiaoze, Chen Ting. Gas Optimization for Smart Contracts: A Survey[J]. Journal of Computer Research and Development, 2023, 60(2): 311-325. DOI: 10.7544/issn1000-1239.202220887
    Citation: Song Shuwei, Ni Xiaoze, Chen Ting. Gas Optimization for Smart Contracts: A Survey[J]. Journal of Computer Research and Development, 2023, 60(2): 311-325. DOI: 10.7544/issn1000-1239.202220887

    智能合约Gas优化综述

    Gas Optimization for Smart Contracts: A Survey

    • 摘要: 区块链2.0最显著的特征是增加了对智能合约的支持,这使得区块链拥有了运行各种应用程序的能力. 智能合约是一种根据预先定义的代码逻辑自动运行的计算机软件. 区别于传统软件,区块链技术赋予了智能合约不依赖可信中心机构而在相互不信任的节点上正确执行的能力,使其在数字支付、共享经济等领域被广泛地应用. 为了防止滥用智能合约导致计算资源被浪费,以太坊等区块链向部署和执行智能合约这2种活动收取Gas(燃料)费用. 智能合约消耗的计算资源是决定费用高低的因素. 具有低效代码的智能合约浪费资源且易受攻击,此类智能合约的开发者和用户将承担不必要的费用. 因此,优化智能合约以节省资源已经成为开发者和研究者重点关注的问题. 首先详细分析了智能合约Gas优化所面临的主要挑战;然后回顾和总结了近年来提出的各种优化技术;最后展望了该研究方向的未来工作,旨在为智能合约的开发者和研究人员提供参考和借鉴.

       

      Abstract: The most significant feature of Blockchain 2.0 is the introduction of support for smart contracts, which enables the blockchain to run various applications. The smart contract is a type of computer software that runs automatically according to pre-defined code logic. Distinguished from traditional software, smart contracts are empowered by blockchain technology with the ability to execute correctly on mutually untrusted nodes without relying on a trusted central authority, making them widely used in areas such as digital payments and the sharing economy. To prevent the waste of computing resources caused by the abuse of smart contracts, blockchains such as Ethereum charges Gas fees for two activities, deployment and execution of smart contracts. The computing resource consumed by smart contracts is the factor that determines the cost. Smart contracts with inefficient code are wasteful of resources and vulnerable to attacks, and the developers and users of them suffer unnecessary costs. Therefore, optimizing smart contracts to save resources has become a critical issue for developers and researchers. This survey first analyzes the main challenges of Gas optimization for smart contracts in detail, and then reviews and summarizes the various optimization techniques proposed in recent years. Finally, we discuss future work, which provides references for developers and researchers who explore smart contracts.

       

    /

    返回文章
    返回