Modeling and Verification of CKB Consensus Protocol in Coq.

Xiaokun Luan,Meng Sun
DOI: https://doi.org/10.1109/qrs-c55045.2021.00100
2021-01-01
Abstract:Blockchain has been prospering for the last decade. Despite the tremendous success of block chain, it is still vulnerable due to the complexity of distributed execution environment. Malicious attacks that exploit these vulnerabilities can lead to serious losses. Common Knowledge Base (CKB) is a public permissionless blockchain and the base layer of N ervos Network, which is gaining popularity in recent years. It adopts a novel con-sensus protocol to overcome two shortcomings of Bitcoin: the low transaction processing throughput and the vulnerability to selfish mining attacks. Considering the high-security requirements in CKB application scenarios, it is essential to provide formalization and verification of the safety and security properties of the CKB blockchain. In this paper, we provide a formal model of CKB consensus protocol in the theorem prover Coq. Fundamental components of the protocol are implemented, including the block structure, the two-step transaction confirmation mechanism, and the peer-to-peer asynchronous network. We also use Coq to establish the quiescent consistency property of the consensus protocol, which is a kind of eventual consensus that all the participants agree on the same ledger when there are no inflight messages.
What problem does this paper attempt to address?