发表机构
FAU Erlangen-Nürnberg(埃尔朗根-纽伦堡大学)
机构由 AI 辅助整理,请以论文原文为准。AI 中文总结
DiverseFT利用大语言模型自动生成语义不同的代码替换参考实现,以低成本实现容错协议多样化,并在PBFT、HotStuff和Raft上验证了高达65%代码库的多样化可行性。
AI 中文摘要
容错一致性协议在副本共享一个共同缺陷,且该缺陷同时影响的副本数量超过可容忍阈值时将会失效。因此,理想情况下,副本应独立失效,这可以通过多样化来实现。然而,在实践中,所有副本通常共享同一个协议实现,这并不令人意外,因为提供多个不同的实现是困难且极其费力的。这构成了一个重大风险,因为共享的协议实现由于其复杂性,是常见缺陷的主要候选对象。通过DiverseFT,我们展示了在给定参考实现的情况下,如何利用大语言模型(LLMs)自动且可扩展地生成能够编译、通过测试,并且至关重要的是在语义/二进制层面有所不同的代码,这些代码可以替换参考实现中的代码,从而显著降低多样化成本。我们通过将三种实现(PBFT、HotStuff和Raft)进行多样化,证明了使用LLMs对复制协议实现进行多样化的可行性,展示了高达65%的代码库可以被多样化。
英文摘要
Fault-tolerant agreement protocols fail if replicas share a common flaw that simultaneously affects more replicas than the tolerable threshold. Therefore replicas should ideally fail independently, which can be achieved through diversification. However, in practice, often the same protocol implementation is shared by all replicas which is not surprising given that the provision of multiple diverse implementations is difficult and highly laborious. This poses a major risk, as a shared protocol implementation is a prime candidate for common bugs due to its complexity. With PatchyBFT, we demonstrate how, given a reference implementation, Large Language Models (LLMs) can be utilised for the automated and scalable generation of code that compiles, passes tests, and crucially differs semantically/binary-wise, that can re- place code in the reference implementation, thereby significantly reducing diversification costs. We demonstrate the feasibility of diversification of replication protocol implementations using LLMs by diversifying three implementations: PBFT, HotStuff, and Raft, showing how up to 65% of the codebase can be diversified.