arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.06029cs.SEcs.CR
收藏

当规范遇见现实:揭示以太坊基础设施中的API不一致

When Specifications Meet Reality: Uncovering API Inconsistencies in Ethereum Infrastructure

Beihang University(北京航空航天大学);Zhongguancun Laboratory(中关村实验室);The Hong Kong Polytechnic University(香港理工大学);Beijing Institute of Technology(北京理工大学);Amber Group(安比集团);Huazhong University of Science and Technology(华中科技大学)

Jie Ma, Ningyu He, Jinwen Xi, Mingzhe Xing, Liangxin Liu, Jiushenzi Luo, Xiaopeng Fu, Chiachih Wu, Haoyu Wang, Ying Gao, Yinliang Yue

AI总结:

本文提出APIDiffer框架,通过规范引导的测试输入生成和虚假阳性过滤,自动检测以太坊客户端API不一致,发现72个bug,提升代码覆盖率并降低误报率,获得社区认可。

摘要:

以太坊生态系统通过客户端API与区块链交互,但这些关键API存在广泛实现不一致,导致财务问题和网络可靠性威胁。现有测试方法手动且不完整。本文提出APIDiffer,通过规范引导的测试输入生成和虚假阳性过滤,自动检测API不一致。评估显示,APIDiffer发现72个bug,其中90.28%已确认或修复,代码覆盖率提升89.67%,误报率降低37.38%。社区响应验证了其影响:开发者整合测试用例,表达对方法的兴趣,并将一个bug提交至官方会议。

英文摘要:

The Ethereum ecosystem, which secures over $381 billion in assets, fundamentally relies on client APIs as the sole interface between users and the blockchain. However, these critical APIs suffer from widespread implementation inconsistencies, which can lead to financial discrepancies, degraded user experiences, and threats to network reliability. Despite this criticality, existing testing approaches remain manual and incomplete: they require extensive domain expertise, struggle to keep pace with Ethereum's rapid evolution, and fail to distinguish genuine bugs from acceptable implementation variations. We present APIDiffer, the first specification-guided differential testing framework designed to automatically detect API inconsistencies across Ethereum's diverse client ecosystem. APIDiffer transforms API specifications into comprehensive test suites through two key innovations: (1) specification-guided test input generation that creates both syntactically valid and invalid requests enriched with real-time blockchain data, and (2) specification-aware false positive filtering that leverages large language models to distinguish genuine bugs from acceptable variations. Our evaluation across all 11 major Ethereum clients reveals the pervasiveness of API bugs in production systems. APIDiffer uncovered 72 bugs, with 90.28% already confirmed or fixed by developers. Beyond these raw numbers, APIDiffer achieves up to 89.67% higher code coverage than existing tools and reduces false positive rates by 37.38%. The Ethereum community's response validates our impact: developers have integrated our test cases, expressed interest in adopting our methodology, and escalated one bug to the official Ethereum Project Management meeting.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑