paperbot · PL 论文追踪

全部论文 待读 收藏

P2 SpecTrum: Specification-Guided Differential Fuzzing for Ethereum Consensus Clients

SpecTrum:面向以太坊共识客户端的规范引导差分模糊测试
ASE Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering2026匹配度 3/10 · 论文属于形式化规范与差分模糊测试方向,虽在方法论风格(机械化规范、覆盖率度量、以规范为 oracle 的测试生成、工业级落地)上与用户偏好契合,但与用户核心关注点(LLM/Agent 与静态分析、浮点程序分析、贝叶斯程序分析的交叉)没有实质关联,且完全不涉及 LLM。引用 0 inbox
Seokhun Jeong, Gyeongmin Dan, Sukyoung Ryu, Sungjae Hwang
crossref: 2026-10-09

AI 速览

一句话:提出机械化规范与前提覆盖度量,引导生成测试,发现以太坊共识客户端的 27 例跨实现分歧。

以太坊共识安全依赖多个独立共识客户端在每个状态转换上保持一致;实现错误会导致分叉、终局性停滞乃至严重攻击。以太坊虽提供 Python 参考实现(consensus-spec)与官方测试集(spectests),但作为可执行实现,其有效性条件隐含在运行时行为中,缺乏系统性手段保证所有有效性条件都被充分求值。本文提出 SpecTrum 框架,分三步解决该问题:首先给出 Consensus-SpecTec——以太坊共识算法的机械化规范,将有效性条件显式表示为 if 前提;其次定义前提覆盖(premise coverage),度量 spectests 中各前提被求值为真和假的情况;最后实现基于规范的测试生成器,提取未被 spectests 覆盖为假的前提约束并生成输入以触发它们。作者将 SpecTrum 应用于五个主流以太坊共识客户端,发现 27 个跨客户端分歧,其中 22 个若没有机械化规范中插入的前提便无法发现;全部 27 例可在各 fork 版本复现,且将机械化规范扩展到新 fork 的工作量与规范差异成正比。

问题
以太坊共识规范以可执行 Python 参考实现形式给出,有效性条件隐式定义,难以保证官方测试集充分覆盖所有有效性条件,从而导致客户端实现分歧。
方法
提出 SpecTrum:将共识规范机械化为显式 if 前提的 Consensus-SpecTec,定义 premise coverage 度量测试覆盖,并据此提取未被取假覆盖的前提约束来自动生成差分模糊测试输入。
评估
在五个主流以太坊共识客户端上运行,发现 27 个跨客户端分歧(22 个依赖机械化插入的前提),并验证全部案例跨 fork 版本复现,扩展新 fork 的成本与规范差异成正比。
原文摘要(Abstract)

Ethereum's consensus safety relies on independent consensus client implementations agreeing on every state transition. When they diverge due to implementation errors, the network can fork, finality can stall, and severe attacks are possible. To prevent such consensus divergences, Ethereum provides a Python reference implementation (consensus-spec), which acts as a specification, and a hand-crafted official test suite (spectests). However, as an executable implementation, Ethereum's specification defines validity implicitly through runtime behavior. As a result, it lacks a systematic way to ensure that all validity conditions are thoroughly evaluated. We present SpecTrum, a framework that addresses this problem in three stages. First, we introduce Consensus-SpecTec, a mechanized specification of the Ethereum consensus algorithm, which makes validity conditions explicit as if-premises. Second, we define premise coverage, a metric that measures which if-premises are evaluated to true and false across spectests. Third, we develop a specification-based test generator that extracts constraints on premises not evaluated to false by spectests and generates inputs to evaluate them. Applying SpecTrum to five major Ethereum consensus clients, we identify 27 cross-client divergence cases, 22 of which cannot be found without the premises inserted in our mechanization. All 27 cases reproduce across fork versions, and extending the mechanized specification to a new fork takes modest effort proportional to the specification difference.

链接与引用

DOI 原文 · arXiv ·

BibTeX
@inproceedings{paperbot12411,
  title = {SpecTrum: Specification-Guided Differential Fuzzing for Ethereum Consensus Clients},
  author = {Seokhun Jeong and Gyeongmin Dan and Sukyoung Ryu and Sungjae Hwang},
  booktitle = {ASE},
  year = {2026},
  doi = {10.1145/3832783.3834406}
}