Skip to main content
QUICK REVIEW

[论文解读] Twins: White-Glove Approach for BFT Testing.

Shehar Bano, Alberto Sonnino|arXiv (Cornell University)|Apr 22, 2020
Distributed systems and fault tolerance参考文献 25被引用 12
一句话总结

Twins 通过运行多个具有相同身份的同一节点实例,提出了一种新颖且系统化的拜占庭容错(BFT)系统测试方法,能够受控地生成诸如双重发言和双重投票等真实拜占庭行为。该方法可在几分钟内暴露关键协议缺陷——表明其可比传统方法更快地检测出数十年来未被发现的漏洞。

ABSTRACT

Byzantine Fault Tolerant (BFT) systems have seen extensive study for more than two decades, yet we lack a principled strategy for testing BFT implementations. This paper presents Twins, a new approach for testing BFT systems. The main idea of Twins is that we can emulate Byzantine behavior by running two (or generally up to $k$) instances of a node with the same identity. Each of the two instances (or Twins) runs unmodified, correct code. The Twins approach requires only a thin network wrapper that delivers messages to/from both Twins. To the rest of the system, the Twins appear indistinguishable from a single node behaving in a `questionable' manner. Twins generates `interesting' Byzantine behaviors, including equivocation, double voting, and losing internal state, while forgoing `uninteresting' behaviors that are trivially rejected by honest nodes, such as producing semantically invalid messages. Building on this idea, Twins can systematically generate Byzantine attack scenarios at scale, execute them in a controlled manner, and check for desired protocol properties. The paper demonstrates that Twins successfully reinstates several famous attacks on BFT protocols. In all cases, protocols break within fewer than a dozen protocol steps, hence it is realistic for the Twins approach to expose the problems. In two of these attacks, it took the community more than a decade to discover protocol flaws that Twins would have surfaced within minutes. Additionally, Twins testing was successfully incorporated into a production setting in which Twins executed 3M Twins-generated scenarios, and exposed (self-injected) subtle safety bugs within minutes of testing.

研究动机与目标

  • 解决尽管经过数十年研究,仍缺乏系统化测试拜占庭容错(BFT)系统的策略的问题。
  • 克服生成有意义的拜占庭行为的挑战,这些行为不会被诚实节点轻易过滤掉。
  • 提供一种系统化、可扩展且受控的方法,用于生成和执行 BFT 协议中的拜占庭攻击场景。
  • 通过真实故障注入,实现在生产级 BFT 系统中早期检测细微安全错误。
  • 通过重现已知历史攻击并暴露此前未被发现的缺陷,证明该方法的有效性。

提出的方法

  • 运行两个或更多具有相同身份的同一节点实例,每个实例执行未经修改的正确代码。
  • 使用轻量级网络包装器,将消息路由至所有实例,使其在系统其余部分看来表现为单个逻辑节点。
  • 利用多个实例的固有行为,生成复杂的拜占庭行为,如双重发言和双重投票。
  • 过滤掉诚实节点会立即拒绝的明显无效行为(例如语义上错误的消息)。
  • 系统性地执行生成的攻击场景,并在受控条件下验证协议属性。
  • 将 Twins 框架集成到生产环境中,以大规模测试真实世界的 BFT 实现。

实验结果

研究问题

  • RQ1能否设计一种轻量级、可扩展的方法,在不修改协议代码的前提下,生成 BFT 系统中有意义的拜占庭行为?
  • RQ2Twins 在受控且可重复的条件下,能在多大程度上重现历史上重要的 BFT 协议攻击?
  • RQ3与传统测试或人工分析相比,Twins 检测 BFT 协议中细微安全错误的速度有多快?
  • RQ4Twins 能否有效部署于生产系统中,以发现此前未知的缺陷?
  • RQ5Twins 方法是否能在极少数协议步骤内暴露协议弱点,使其适用于现实世界测试?

主要发现

  • Twins 顺利重现了多个著名的 BFT 协议攻击,所有协议失败均在十几个协议步骤内发生。
  • 在两个案例中,那些逃避检测长达十余年的协议缺陷,均在测试开始后几分钟内被 Twins 揭露。
  • Twins 框架已成功集成至生产环境,在其中执行了 300 万次场景执行,并在几分钟内检测到自注入的安全错误。
  • 该方法仅生成‘有趣’的拜占庭行为——如双重发言和双重投票——同时过滤掉诚实节点会拒绝的语义上无效消息。
  • 该方法通过使用相同身份的节点双胞胎模拟拜占庭行为,实现了系统化、可扩展且可重复的 BFT 协议测试,且基础设施开销极低。
  • Twins 方法具有高度实用性,因为它无需修改协议或节点代码,仅需一个轻量级网络包装器进行消息路由。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。