Agora: Toward Autonomous Bug Detection in Production-Level Consensus Protocols with LLM Agents
Xiang Liu, Sa Song, Zhaowei Zhang, Huiying Lan, Jason Zeng, Ming Wu, Michael Heinrich, Yong Sun, Ceyao Zhang
Abstract
Consensus protocols form the backbone of distributed systems and blockchains, where implementation bugs can cause data corruption and financial losses. While LLM-based approaches show promise in code analysis, they struggle with deep protocol-level logic bugs involving complex state-dependent behaviors across multiple execution stages. We present Agora, a domain-aware multi-agent framework that integrates hypothesis-driven testing with LLM capabilities for systematic protocol verification. Agora employs specialized agents that collaboratively explore protocol state spaces, synthesize attack scenarios using domain-specific constraints, and validate findings through iterative refinement. This explicit role separation enables reasoning about global protocol invariants beyond single-function code analysis. We evaluate Agora on four consensus implementations (Raft, EPaxos, HotStuff, BullShark) using four state-of-the-art LLMs. Agora discovers 15 previously unknown protocol-level logic bugs that violate safety properties, while existing LLM-based agents fail to detect any such protocol-level logic bugs. Our results demonstrate that domain-aware multi-agent collaboration is essential for detecting deep logic bugs in complex protocols.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext c1014b5e-689f-4d5a-9e49-b6cac76d5ab7Builds on13
- Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning et al.NeurIPS 2023 · 10,924 citations
- Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu et al.ICLR 2022 · 4,966 citations
- CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model SocietyGuohao Li, Hasan Hammoud, Hani Itani, Dmitrii Khizbullin et al.NeurIPS 2023 · 1,975 citations
- Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code ContributionsHammond Pearce, Baleegh Ahmad, Benjamin Tan, Brendan Dolan-Gavitt et al.S&P 2022 · 725 citations
- Narwhal and Tusk: a DAG-based mempool and efficient BFT consensusGeorge Danezis, Lefteris Kokoris-Kogias, Alberto Sonnino, Alexander SpiegelmanEuroSys 2022 · 259 citations
Related papers
- LOKI: State-Aware Fuzzing Framework for the Implementation of Blockchain Consensus ProtocolsFuchen Ma, Yuanliang Chen, Meng Ren, Yuanhang Zhou et al.NDSS 2023
- Tyr: Finding Consensus Failure Bugs in Blockchain System with Behaviour Divergent ModelYuanliang Chen, Fuchen Ma, Yuanhang Zhou, Yu Jiang et al.S&P 2023
- Agora: Trust Less and Open More in Verification for Confidential ComputingHongbo Chen, Quan Zhou, Sen Yang, Sixuan Dang et al.OOPSLA 2025
- LiDO-DAG: A Framework for Verifying Safety and Liveness of DAG-Based Consensus ProtocolsLongfei Qiu, Jingqi Xiao, Ji-Yong Shin, Zhong ShaoPLDI 2025 · 3 citations
- PRDTs: Composable Design and Verification of Consensus Protocols using Replicated Data TypesJulian Haas, Ragnar Mogk, Annette Bieniusa, Mira MeziniOOPSLA 2026 · 1 citation
