Formally Verifying the Safety of Pipelined Moonshot Consensus Protocol (2403.16637v1)
Abstract: Decentralized Finance (DeFi) has emerged as a contemporary competitive as well as complementary to traditional centralized finance systems. As of 23rd January 2024, per Defillama approximately USD 55 billion is the total value locked on the DeFi applications on all blockchains put together. A Byzantine Fault Tolerant (BFT) State Machine Replication (SMR) protocol, popularly known as the consensus protocol, is the central component of a blockchain. If forks are possible in a consensus protocol, they can be misused to carry out double spending attacks and can be catastrophic given high volumes of finance that are transacted on blockchains. Formal verification of the safety of consensus protocols is the golden standard for guaranteeing that forks are not possible. However, it is considered complex and challenging to do. This is reflected by the fact that not many complex consensus protocols are formally verified except for Tendermint and QBFT. We focus on Supra's Pipelined Moonshot consensus protocol. Similar to Tendermint's formal verification, we too model Pipelined Moonshot using IVy and formally prove that for all network sizes, as long as the number of Byzantine validators is less than one thirds, the protocol does not allow forks, thus proving that Pipelined Moonshot is safe and double spending cannot be done using forks. The IVy model and proof of safety is available on Github.
- IVy modeling of Pipelined Moonshot and its proof of safety. https://github.com/Entropy-Foundation/suprabft-fv/tree/master/suprabft.
- SPIN. https://spinroot.com/spin/whatispin.html.
- TLA+. https://lamport.azurewebsites.net/tla/tla.html.
- Defillama. https://galois.com/blog/2021/07/formally-verifying-the-tendermint-blockchain-protocol/, 2021.
- Formal Verification of QBFT Safety. https://github.com/Consensys/qbft-formal-spec-and-verification, 2021.
- Defillama. https://defillama.com, 2024.
- Moonshot Formal Verification in IVy - GitHub Repository. https://github.com/Entropy-Foundation/suprabft-fv/tree/master/suprabft, 2024.
- Z3 SMT Solver. https://www.microsoft.com/en-us/research/project/z3-3/, 2024.
- Formal Specification and Model Checking of the Tendermint Blockchain Synchronization Protocol. In Bruno Bernardo and Diego Marmsoler, editors, 2nd Workshop on Formal Methods for Blockchains (FMBC 2020), volume 84 of Open Access Series in Informatics (OASIcs), pages 10:1–10:8, Dagstuhl, Germany, 2020. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. URL: https://drops.dagstuhl.de/entities/document/10.4230/OASIcs.FMBC.2020.10, doi:10.4230/OASIcs.FMBC.2020.10.
- Ethan Buchman. Tendermint: Byzantine fault tolerance in the age of blockchains. PhD thesis, University of Guelph, 2016.
- Practical byzantine fault tolerance. In OSDI, volume 99, pages 173–186, 1999.
- Moonshot: Optimizing chain-based rotating leader bft via optimistic proposals, 2024. arXiv:2401.01791.
- Consensus in the presence of partial synchrony. J. ACM, 35(2):288–323, apr 1988. doi:10.1145/42282.42283.
- Inferring inductive invariants from phase structures. In Computer Aided Verification: 31st International Conference, CAV 2019, New York City, NY, USA, July 15-18, 2019, Proceedings, Part II 31, pages 405–425. Springer, 2019.
- Jolteon and ditto: Network-adaptive efficient consensus with asynchronous fallback. In FC, pages 296–315, 2022.
- Tla+ model checking made symbolic. Proc. ACM Program. Lang., 3(OOPSLA), oct 2019. doi:10.1145/3360549.
- A short counterexample property for safety and liveness verification of fault-tolerant distributed algorithms. In Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL ’17, page 719–734, New York, NY, USA, 2017. Association for Computing Machinery. doi:10.1145/3009837.3009860.
- K. Rustan M. Leino. Dafny: An automatic program verifier for functional correctness. In Edmund M. Clarke and Andrei Voronkov, editors, Logic for Programming, Artificial Intelligence, and Reasoning, pages 348–370, Berlin, Heidelberg, 2010. Springer Berlin Heidelberg.
- Deductive verification in decidable fragments with ivy. In Andreas Podelski, editor, Static Analysis, pages 43–55, Cham, 2018. Springer International Publishing.
- Henrique Moniz. The istanbul bft consensus algorithm, 2020. arXiv:2002.03613.
- Reducing liveness to safety in first-order logic. 2(POPL), 2017. doi:10.1145/3158114.
- Ivy: safety verification by interactive generalization. SIGPLAN Not., 51(6):614–630, jun 2016. doi:10.1145/2980983.2908118.
- Supra Research. Moonshot: Optimistic proposal for blockchain-based state machine replication. https://supraoracles.com/news/moonshot-consensus/.
- Chord: A scalable peer-to-peer lookup service for internet applications. In Proceedings of the 2001 Conference on Applications, Technologies, Architectures, and Protocols for Computer Communications, SIGCOMM ’01, page 149–160, New York, NY, USA, 2001. Association for Computing Machinery. doi:10.1145/383059.383071.
- Formal Verification of Blockchain Byzantine Fault Tolerance, pages 389–412. Springer International Publishing, Cham, 2022. doi:10.1007/978-3-031-07535-3_12.
- Pretend synchrony: synchronous verification of asynchronous distributed programs. Proc. ACM Program. Lang., 3(POPL), jan 2019. doi:10.1145/3290372.
- Hotstuff: Bft consensus with linearity and responsiveness. In PODC, pages 347–356, 2019.
- Test case generation based on program invariant and adaptive random algorithm. In Advances in Information Technology and Education: International Conference, CSE 2011, Qingdao, China, July 9-10, 2011, Proceedings, Part I, pages 274–282. Springer, 2011.
- Pamela Zave. Using lightweight modeling to understand chord. SIGCOMM Comput. Commun. Rev., 42(2):49–57, mar 2012. doi:10.1145/2185376.2185383.
- Test case generation based on invariant extraction. In 2009 5th International Conference on Wireless Communications, Networking and Mobile Computing, pages 1–4. IEEE, 2009.
Paper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.
Top Community Prompts
Collections
Sign up for free to add this paper to one or more collections.