paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Understanding Solidity Event Logging Practices in the Wild

理解真实世界中的 Solidity 事件日志实践
FSE Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2023匹配度 2/10 · 该论文是 Solidity 事件日志实践的实证研究,并实现了一个检测高 gas 日志问题的检查器,虽涉及静态检查与工业场景,但与用户核心方向(PL 与 AI/LLM 交叉、浮点程序分析、贝叶斯程序分析)几乎无交集。引用 17 inbox
Lantian Li, Yejian Liang, Zhihao Liu, Zhongxing Yu
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:首个基于 2,915 个 GitHub Solidity 项目的事件日志实践实证研究,并实现检查器发现高 gas 日志问题。

事件日志是 Solidity 中由高层 event 特性提供的日志机制,但此前缺乏对其真实项目实践的系统理解。本文首次对 GitHub 上 2,915 个流行 Solidity 项目进行定量特征研究,考察事件日志的普遍性、当前实践质量,尤其关注事件日志代码演化的原因,并得出 8 项重要发现。这些发现包括大量独立的事件日志代码修改,且不同类别独立修改的动因多样,例如修复缺陷和节省 gas。作者进一步给出对开发者、研究者、工具构建者和语言设计者的启示。为展示研究价值,作者基于其中一项发现实现了一个概念验证检查器,在 35 个流行 GitHub 项目中有效检测出消耗额外 gas 的问题事件日志代码,其中 9 个项目维护者已确认相关问题。

问题
当前缺乏对真实 Solidity 项目中事件日志实践的系统性理解,特别是事件日志代码为何演化以及常见质量问题。
方法
对 GitHub 上 2,915 个流行 Solidity 项目进行定量实证分析,研究事件日志的普遍性、实践质量与代码演化原因,并基于发现实现概念验证检查器。
评估
在真实 GitHub 项目上评估检查器,于 35 个流行项目中检测到消耗额外 gas 的问题事件日志代码,并有 9 个项目维护者确认所报告问题。
原文摘要(Abstract)

Writing logging messages is a well-established conventional programming practice, and it is of vital importance for a wide variety of software development activities. The logging mechanism in Solidity programming is enabled by the high-level event feature, but up to now there lacks study for understanding Solidity event logging practices in the wild. To fill this gap, we in this paper provide the first quantitative characteristic study of the current Solidity event logging practices using 2,915 popular Solidity projects hosted on GitHub. The study methodically explores the pervasiveness of event logging, the goodness of current event logging practices, and in particular the reasons for event logging code evolution, and delivers 8 original and important findings. The findings notably include the existence of a large percentage of independent event logging code modifications, and the underlying reasons for different categories of independent event logging code modifications are diverse (for instance, bug fixing and gas saving). We additionally give the implications of our findings, and these implications can enlighten developers, researchers, tool builders, and language designers to improve the event logging practices. To illustrate the potential benefits of our study, we develop a proof-of-concept checker on top of one of our findings and the checker effectively detects problematic event logging code that consumes extra gas in 35 popular GitHub projects and 9 project owners have already confirmed the detected issues.

链接与引用

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

BibTeX
@inproceedings{abs-2308-12788,
  title = {Understanding Solidity Event Logging Practices in the Wild},
  author = {Lantian Li and Yejian Liang and Zhihao Liu and Zhongxing Yu},
  booktitle = {FSE},
  year = {2023},
  doi = {10.1145/3611643.3616342}
}