Abstract
The Bitcoin system only provides eventual consistency. For everyday life, the time to confirm a Bitcoin transaction is prohibitively slow. In this paper we propose a new system, built on the Bitcoin blockchain, which enables strong consistency. Our system, PeerCensus, acts as a certification authority, manages peer identities in a peer-to-peer network, and ultimately enhances Bitcoin and similar systems with strong consistency. Our extensive analysis shows that PeerCensus is in a secure state with high probability. We also show how Discoin, a Bitcoin variant that decouples block creation and transaction confirmation, can be built on top of PeerCensus, enabling real-time payments. Unlike Bitcoin, once transactions in Discoin are committed, they stay committed.
Introduction: The "Coffee Shop" Problem
Buying a coffee with Bitcoin sounds simple, but it presents a significant security challenge for merchants. Because Bitcoin relies on "eventual consistency," a merchant must wait anywhere from ten minutes to several hours to be reasonably certain a transaction will not be reversed via a fork or double-spend attack. For a barista, this delay is prohibitively slow; for a fraudster, it is an invitation to exploit the confirmation window.
The core issue lies in the trade-off between openness and consistency. Bitcoin is an open system where anyone can join or leave. To prevent Sybil attacks—where one actor creates numerous fake identities—Bitcoin employs Proof-of-Work (PoW). While effective for security, PoW leads to a probabilistic consensus where transactions are only "confirmed" once buried under sufficient subsequent blocks. In contrast, traditional consensus algorithms like Practical Byzantine Fault Tolerance (PBFT) provide "strong consistency"—immediate finality—but require a fixed, known set of participants, making them unsuitable for the dynamic, anonymous environment of public peer-to-peer networks.
PeerCensus: A Two-Layered Architecture
To bridge this gap, we propose PeerCensus, a system that uses the Bitcoin blockchain as a decentralized certification authority to manage a set of "voting" identities. PeerCensus decouples the slow process of identity creation from the high-speed process of transaction agreement through a two-layered approach:
- The Blockchain (BC) Layer: Instead of recording every transaction, this layer manages identities. To become a "voter" in the consensus group, a node must successfully mine a block. This uses PoW to throttle the rate of new identities, effectively mitigating Sybil attacks while maintaining openness.
- The Chain Agreement (CA) Layer: This layer tracks which identities are currently online and active. It executes a Byzantine agreement protocol among these identities to reach consensus on the system's state.
By running a Byzantine agreement protocol among a membership set derived from the blockchain, PeerCensus enables Discoin, a cryptocurrency variant that decouples block creation from transaction confirmation. In Discoin, transactions are proposed to the CA layer, assigned a sequence number, and committed with absolute finality. This property, known as forward security, ensures that once a transaction is committed, it cannot be reversed.
Security and Real-World Feasibility
The security of PeerCensus rests on the distribution of computational power within the network. Our probabilistic analysis demonstrates that the system remains in a secure state as long as a malicious attacker controls less than one-third of the total computational resources.
To evaluate the feasibility of this system in the current landscape, we analyzed the distribution of Bitcoin mining pools. Using data from 333,000 blocks, we examined whether existing pools could collude to subvert the system.
Our findings indicate that even if the 13 largest mining pools were to collude, they would not possess enough power to compromise a properly bootstrapped PeerCensus system. Furthermore, using current Bitcoin network parameters, the expected failure probability of the system is extremely low—less than once every seven million years.
Conclusion
PeerCensus offers a compelling path toward making decentralized ledgers practical for real-time, everyday use. By utilizing the blockchain as a gatekeeper for a high-speed consensus group, it provides the strong consistency required for point-of-sale transactions without sacrificing the decentralized nature of the network. While challenges remain regarding the initial bootstrapping phase and privacy implications of identity tracking, PeerCensus represents a significant step toward a cryptocurrency that can finally solve the "coffee shop" problem.
Summary updated