paperbot · PL 论文追踪

全部论文 待读 收藏

P2 FunRedisp: A Function Redispatch Tool to Reduce Invocation Gas Fees in Solidity Smart Contracts

FunRedisp:在 Solidity 智能合约中降低调用 Gas 费用的函数重分派工具
ISSTA Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis2024匹配度 2/10 · 该论文属于机器学习辅助程序优化/编译器重构,任务在 Solidity Gas 优化,使用 TextCNN 预测高频调用函数;与用户关注的静态分析、LLM/Agent 程序分析、浮点程序分析与贝叶斯程序分析均无直接交集。引用 1 inbox
Yunqi Liu, Wei Song
crossref: 2026-09-12

AI 速览

一句话:提出 FunRedisp,用 TextCNN 预测高频外部函数并将其前移,降低 Solidity 合约调用 Gas。

论文针对 Solidity 智能合约调用 Gas 费用较高的问题,提出函数分派重构工具 FunRedisp。该工具首先在源码层面提取合约的所有外部函数,随后利用预训练的 TextCNN 模型识别这些函数中被调用的概率较高的函数,并在字节码层面将其移动到函数分派逻辑的前部,以降低交易执行时的分派开销。作者从以太坊随机选取 50 个真实智能合约进行评估,结果显示平均每笔合约交易可节省约 125.17 单位 Gas,且每个合约重构的平均时间开销仅为 0.37 秒,表明该工具兼具有效性与效率。

问题
Solidity 智能合约的函数调用会消耗 Gas,函数分派顺序可能影响整体调用开销,如何在不改变语义的前提下降低调用 Gas 费用是待解决的问题。
方法
FunRedisp 在源码层提取外部函数,用预训练 TextCNN 预测高概率被调用的函数,并在字节码层将这些函数前移到函数分派逻辑前部。
评估
在从以太坊随机选取的 50 个真实智能合约上评估,平均每笔合约交易节省约 125.17 单位 Gas,平均重构时间仅 0.37 秒。
原文摘要(Abstract)

FunRedisp is a function dispatch refactoring tool to reduce the overall invocation gas consumption of Solidity smart contracts. It initially extracts all external functions in a contract at the source code level. After identifying the functions which are highly likely to be invoked among these functions by a pre-trained TextCNN model, FunRedisp moves them to the front of the function dispatch at the bytecode level. FunRedisp saves about 125.17 units of gas per contract transaction on the 50 real-world smart contracts, which are randomly selected from Ethereum. The time overhead for refactoring each contract is only 0.37 seconds on average, demonstrating its effectiveness and efficiency.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8499,
  title = {FunRedisp: A Function Redispatch Tool to Reduce Invocation Gas Fees in Solidity Smart Contracts},
  author = {Yunqi Liu and Wei Song},
  booktitle = {ISSTA},
  year = {2024},
  doi = {10.1145/3650212.3685312}
}