Tempo [ /ˈtɛmˌpoʊ/ ] is a consensus protocol developed as the fifth iteration of Radix. First proposed in 2017, Tempo pioneered innovations such as ledger pre-sharding to allow for the grouping of related transactions, and ‘lazy’ consensus. The ideas contained in the Tempo and Public Node Incentives papers served as a foundation for Radix's subsequent Cerberus protocol.
- Background
- Development
- State Sharding
- Lazy Consensus
- Logical Clocks
- Cryptographic Commitments
- Testing
- Problems and Transition to Cerberus
- Further Reading
DEVELOPMENT | |
Whitepapers | |
LEDGER | |
Sybil Protection | Mass |
State Model | Sharded (18.4 * 10^18 shards) |
Consensus Mechanism | |
Fault Tolerance | Byzantine Fault Deterministic |
Execution Environment | Radix Engine v1 |
Background
Tempo emerged from efforts to solve inherent scalability limitations in blockchain architectures like Bitcoin and Ethereum. While revolutionary, these early blockchain designs restricted transaction speeds to levels inadequate for worldwide adoption. Radix aimed to create a distributed ledger capable of serving global demand - potentially allowing billions of people to use decentralized applications. This required rethinking core components like network architecture, data structure, and consensus mechanisms. Inspiration came from areas like directed acyclic graphs, which demonstrated high transaction speeds but compromises in decentralization. No existing approach provided the combination of scalability, decentralization, and programmability Radix sought.
Tempo’s core innovation was allowing the ledger to be massively sharded to enable parallel transaction processing. Consensus was also optimized for scalability using a ‘lazy’ mechanism where nodes only communicate when necessary, avoiding unnecessary global coordination. Logical clocks and temporal proofs were introduced to establish consensus and order between events. Together these new techniques aimed to fulfill the vision of a fast, decentralized, and programmable global ledger capable of serving as the infrastructure for the next generation of digital applications.
On June 11th, 2019, engineers from RDX Works replayed 10 years worth of Bitcoin transactions on the Radix ledger in under 30 minutes using the Tempo consensus mechanism.
The invention of Tempo led to Dan Hughes being accepted into Y Combinator in 2017.
Development
The core ideas behind Tempo were state sharding, lazy consensus, logical clocks, temporal proofs, and cryptographic commitments.
State Sharding
Sharding involved partitioning the ledger into 18.4 quintillion () shards, with each shard deterministically corresponding to an address, consisting of a public key and a checksum. Nodes only need to store and validate a subset of shards, which allows parallel transaction processing since each shard could process requests independently. Tempo utilized "massive presharding", fixing the number of shards at the onset rather than dynamically adjusting. This enabled smooth capacity scaling tailored to each node.
Lazy Consensus
Lazy consensus further optimized performance by having nodes only communicate when necessary rather than constantly. Nodes would accept requests then only check with others if a conflict arose later. This greatly reduced coordination overhead.
Logical Clocks
Logical clocks tracked events witnessed by each node. Nodes would attach a logical clock value to each request, creating a temporal proof. These could resolve conflicts by identifying ordering between disputed events.
Cryptographic Commitments
Cryptographic commitments were also implemented to hold nodes accountable for their logical clock values, preventing manipulation. Nodes had to commit to their recent requests when contributing to proofs.
Testing
On June 11th 2019, Radix conducted a public test to demonstrate Tempo's scalability using 10 years of Bitcoin transaction history. The test replayed all Bitcoin transactions onto a Tempo test network, validating signatures and checking for double spends. The network consisted of over 1000 nodes distributed globally across data centers in North America, Europe, and Asia. Each node was assigned a subset of the massive shared state space to validate. During the test, the network exceeded 1 million transactions per second - processing the entirety of Bitcoin history in under 30 minutes. This provided proof-of-concept that Tempo could support the transaction demands of global scale applications.
The test illustrated Tempo's ability to parallelize validation and remove bottlenecks through its sharded architecture and lazy consensus approach. Despite limitations in the redundancy of the test network, it validated core components of Tempo's design.
The results did not demonstrate Tempo's theoretical maximum throughput, which could potentially be much higher based on the fixed shard size. However, processing 10 years of Bitcoin transactions in minutes showed the vast scalability improvements made possible by Tempo's innovations.
Problems and Transition to Cerberus
While the tests showed Tempo's potential for scalability, issues around finality guarantees were uncovered. Tempo's lazy consensus meant transactions could always be reverted if a conflict arose later. This meant there was no absolute finality of transactions.
Attempts were made to mitigate this by finalizing transactions after a set time period with no disputes. However, it was found that network faults could still lead to irreconcilable disagreements between nodes if conflicts were missed within the finality window.
This lack of transaction finality made Tempo unsuitable for real-world deployment. Radix realized a transition to a new consensus protocol would be needed to provide stronger finality guarantees.
As final testing was underway, two additional attack vectors on Tempo's consensus system were discovered:
- The Weak Atom Problem - Tempo could not prevent attacker control over fraudulently manufactured transactions, enabling delayed attacks.
- Sybil protection issue - Tempo's reputation system Mass was not inherently valuable, allowing attackers to cheaply acquire influence.
Extensive internal testing and third-party auditing uncovered these vulnerabilities critical to Tempo's security. Despite exhaustive research, no short-term solutions could be found that would adequately resolve the issues.
The insights from analyzing Tempo led Radix to explore combining the benefits of "traditional" BFT-style consensus with the scalability engine provided by sharding. This led to the development of Cerberus, which built upon the sharding foundations of Tempo while adopting an improved consensus algorithm known as HotStuff.
Cerberus utilized sharding and parallel instances of HotStuff consensus to retain Tempo's scalability advantages. The addition of a braiding mechanism to coordinate across shards also provided the transaction finality missing in Tempo.