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.


翻译:以太坊生态系统承载着超过3810亿美元的资产安全,其根本依赖于客户端API作为用户与区块链之间的唯一接口。然而,这些关键API普遍存在实现不一致的问题,可能导致财务差异、用户体验下降以及对网络可靠性的威胁。尽管这一问题至关重要,现有的测试方法仍停留在手动且不完整的阶段:它们需要广泛的领域专业知识,难以跟上以太坊的快速演进,并且无法区分真正的缺陷与可接受的实现差异。我们提出了APIDiffer,这是首个基于规范指导的差分测试框架,旨在自动检测以太坊多样化客户端生态系统中的API不一致性。APIDiffer通过两项关键创新将API规范转化为全面的测试套件:(1)基于规范的测试输入生成,创建语法有效和无效的请求,并注入实时区块链数据;(2)基于规范的误报过滤,利用大语言模型区分真正的缺陷与可接受的差异。我们对所有11个主要以太坊客户端的评估揭示了生产系统中API缺陷的普遍性。APIDiffer发现了72个缺陷,其中90.28%已获得开发者确认或修复。除了这些原始数据,APIDiffer比现有工具实现了高达89.67%的代码覆盖率提升,并将误报率降低了37.38%。以太坊社区的响应验证了我们的影响力:开发者已集成我们的测试用例,表达了采用我们方法的兴趣,并将一个缺陷上报至官方以太坊项目管理会议。

0
下载
关闭预览

相关内容

应用程序接口(简称 API),又称为应用编程接口,就是软件系统不同组成部分衔接的约定。
区块链扩展技术现状与展望
专知会员服务
29+阅读 · 2024年1月2日
面向端边云协同架构的区块链技术综述
专知会员服务
49+阅读 · 2021年12月24日
区块链数据安全服务综述
专知会员服务
56+阅读 · 2021年11月10日
专知会员服务
21+阅读 · 2021年10月15日
专知会员服务
30+阅读 · 2021年9月30日
基于区块链的数据透明化:问题与挑战
专知会员服务
21+阅读 · 2021年3月4日
阿里巴巴全球化架构设计挑战
InfoQ
36+阅读 · 2019年11月25日
技术动态 | 知识图谱上的实体链接
开放知识图谱
69+阅读 · 2019年9月8日
「PPT」深度学习中的不确定性估计
专知
27+阅读 · 2019年7月20日
【边缘计算】边缘计算面临的问题
产业智能官
17+阅读 · 2019年5月31日
区块链隐私保护研究综述——祝烈煌详解
计算机研究与发展
23+阅读 · 2018年11月28日
用模型不确定性理解模型
论智
11+阅读 · 2018年9月5日
国家自然科学基金
2+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
13+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Arxiv
0+阅读 · 3月3日
Arxiv
0+阅读 · 2月27日
VIP会员
最新内容
美/以-伊战争:停火与后续情景与影响分析
专知会员服务
1+阅读 · 4月11日
美国-以色列-伊朗战争:是否会动用地面部队?
美国协同作战飞机项目新型无人机发动机
专知会员服务
0+阅读 · 4月11日
无人机在美以伊战争中的关键启示(印度视角)
相关VIP内容
区块链扩展技术现状与展望
专知会员服务
29+阅读 · 2024年1月2日
面向端边云协同架构的区块链技术综述
专知会员服务
49+阅读 · 2021年12月24日
区块链数据安全服务综述
专知会员服务
56+阅读 · 2021年11月10日
专知会员服务
21+阅读 · 2021年10月15日
专知会员服务
30+阅读 · 2021年9月30日
基于区块链的数据透明化:问题与挑战
专知会员服务
21+阅读 · 2021年3月4日
相关基金
国家自然科学基金
2+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
13+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员