This paper presents Twins, an automated unit test generator of Byzantine attacks. Twins implements three types of Byzantine behaviors: (i) leader equivocation, (ii) double voting, and (iii) losing internal state such as forgetting 'locks' guarding voted values. To emulate interesting attacks by a Byzantine node, it instantiates twin copies of the node instead of one, giving both twins the same identities and network credentials. To the rest of the system, the twins appear indistinguishable from a single node behaving in a 'questionable' manner. Twins can systematically generate Byzantine attack scenarios at scale, execute them in a controlled manner, and examine their behavior. Twins scenarios iterate over protocol rounds and vary the communication patterns among nodes. Twins runs in a production setting within DiemBFT where it can execute 44M Twins-generated scenarios daily. Whereas the system at hand did not manifest errors, subtle safety bugs that were deliberately injected for the purpose of validating the implementation of Twins itself were exposed within minutes. Twins can prevent developers from regressing correctness when updating the codebase, introducing new features, or performing routine maintenance tasks. Twins only requires a thin wrapper over DiemBFT, we thus envision other systems using it. Building on this idea, one new attack and several known attacks against other BFT protocols were materialized as Twins scenarios. In all cases, the target protocols break within fewer than a dozen protocol rounds, hence it is realistic for the Twins approach to expose the problems.
翻译:本文展示双胞胎, 这是拜占庭攻击的自动单元测试生成器。 双胞胎执行三种类型的拜占庭行为:(一) 领导人对准, (二) 双重投票, (三) 失去内部状态, 比如忘记“ 锁” 保护投票的价值观。 为了模仿拜占庭节点的有趣攻击, 双胞胎在DiemBFT内运行双胞胎双倍的节点副本, 给双胞胎提供相同的身份和网络证书。 在系统其余部分, 双胞胎似乎无法与单一节点以“ 令人质疑” 的方式区分开来。 双胞胎可以系统系统地生成 Byantine 攻击的场景, 以控制的方式执行, 双胞胎袭击, 并检查它们的行为。 双胞胎在协议回合中, 双胞胎在DiemBFT的场景环境中运行, 每天可以执行44M Twins 生成的场景。 而手的系统并没有显示错误, 所有为验证双胞赛本身执行而故意输入的隐性的安全漏洞。 在几分钟内, 将双胞胎执行双胞胎攻击的操作中, 只能在不断更新的操作中, 运行中要求更新新的规则。