Lune

FSE2023顶会

Understanding Solidity Event Logging Practices in the Wild

Lantian Li, Yejian Liang, Zhihao Liu, Zhongxing Yu

摘要

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.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 2 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • EventSpec: Defining and Detecting Event-Semantic Issues in Blockchain Ecosystems 引用了 Making Smart Contracts Smarter
  • EventSpec: Defining and Detecting Event-Semantic Issues in Blockchain Ecosystems 引用了 Securify: Practical Security Analysis of Smart Contracts
  • Ethainter: a smart contract security analyzer for composite vulnerabilities 引用了 Making Smart Contracts Smarter
  • Ethainter: a smart contract security analyzer for composite vulnerabilities 引用了 Securify: Practical Security Analysis of Smart Contracts
  • Empirical review of automated analysis tools on 47, 587 Ethereum smart contracts 引用了 Making Smart Contracts Smarter
  • Empirical review of automated analysis tools on 47, 587 Ethereum smart contracts 引用了 Securify: Practical Security Analysis of Smart Contracts
  • Securify: Practical Security Analysis of Smart Contracts 引用了 Making Smart Contracts Smarter
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper2

  1. SolContractEval: A Benchmark for Evaluating Contract-Level Solidity Code GenerationZhifan Ye, Jiachi Chen, Zhenzhe Shao, Lingfeng Bao 等ASE 2025
  2. EventSpec: Defining and Detecting Event-Semantic Issues in Blockchain EcosystemsYixuan Liu, Yuxin Dong, Ye Liu, Yin Wu 等ISSTA 2026

它引用的 Paper14

  1. Making Smart Contracts SmarterLoi Luu, Duc-Hiep Chu, Hrishi Olickel, Prateek Saxena 等CCS 2016 · 2,306 次引用
  2. Securify: Practical Security Analysis of Smart ContractsPetar Tsankov, Andrei Marian Dan, Dana Drachsler-Cohen, Arthur Gervais 等CCS 2018 · 1,108 次引用
  3. Empirical review of automated analysis tools on 47, 587 Ethereum smart contractsThomas Durieux, João F. Ferreira, Rui Abreu, Pedro CruzICSE 2020 · 373 次引用
  4. Log-based Anomaly Detection Without Log ParsingVan-Hoang Le, Hongyu ZhangASE 2021 · 249 次引用
  5. Ethainter: a smart contract security analyzer for composite vulnerabilitiesLexi Brent, Neville Grech, Sifis Lagouvardos, Bernhard Scholz 等PLDI 2020 · 163 次引用

相关 Paper

  1. Code Cloning in Solidity Smart Contracts: Prevalence, Evolution, and Impact on DevelopmentRan Mo, Haopeng Song, Wei Ding, Chaochao WuICSE 2025 · 1 次引用
  2. Studying the use of Java logging utilities in the wildBoyuan Chen, Zhen Ming (Jack) JiangICSE 2020 · 28 次引用
  3. A study of inline assembly in solidity smart contractsStefanos Chaliasos, Arthur Gervais, Benjamin LivshitsOOPSLA 2022 · 22 次引用
  4. Towards Understanding the Bugs in Solidity CompilerHaoyang Ma, Wuqi Zhang, Qingchao Shen, Yongqiang Tian 等ISSTA 2024 · 9 次引用
  5. Clone Detection for Smart Contracts: How Far Are We?Zuobin Wang, Zhiyuan Wan, Yujing Chen, Yun Zhang 等FSE 2025 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖