Tendermint This engine serves as a flexible, low-level tool that ensures secure state replication on many machines. It's predominantly asynchronous, with a Byzantine Fault Tolerant nature, tailored for diverse application states and distributed systems.
Initially developed as a faster and safer alternative consensus mechanism to Bitcoin’s approach, proof of work protocol through its progressive development, Tendermint has become the key consensus engine within the Cosmos Network.
Background of Tendermint
Tendermint started as an open-source concept by Jae Kwon back in 2014, introduced initially through an academic paper, publication which, while outdated now, still offers interesting insights into how to achieve secure and consistent state replication in complex systems.
For blockchain platforms, being able to handle potentially malicious nodes and false communications is vital for maintaining an honest consensus. Bitcoin’s proof of work is often cumbersome, prompting a shift toward Tendermint's innovative BFT model that harmonizes with various blockchain technologies and programming languages.
Read: What is Nakamoto Consensus?
Over the years, the original blueprint for Tendermint has undergone several enhancements, making it a versatile, general-purpose blockchain consensus engine with a unique application interface. Now, it's the backbone of Cosmos Network, recognized as the ‘Internet of Blockchains’ because of its multi-chain framework.
Tendermint's innovative features make it a fascinating piece of technology. So, how exactly does it operate?
How Does it Work?
Designed as a multi-faceted blockchain engine, Tendermint hosts a plethora of application states and has two central components:
- Tendermint Core, which serves as the functional Tendermint BFT consensus engine,
- The ABCI, or Application BlockChain Interface, which empowers BFT app replication in various programming languages.
Functioning as a proof-of-stake protocol, Tendermint stands out for its BFT methodology. Its design promotes straightforward interoperability and is user-friendly, adaptable for serving as the consensus mechanism across blockchain landscapes. ABCI separates consensus processes from the P2P application layer, promoting a clear interface between logic and consensus layers.
Tendermint uses a proof of stake mechanism This distinction is crucial when examining the subsequent segments. Now, let's delve into the basic components.
Tendermint Core
The engine driving Tendermint, Tendermint Core, guarantees uniform transaction recording across networked machines. As a BFT consensus mechanism, it presumes that under a third of the nodes can act malevolently at any point.
Adopting a vote-based structure similar to other BFT systems, it offers a comparable approach for selecting leaders with each voting cycle:
- In Practical BFT, a round-robin strategy is used for picking a leader for each sequence.
- Proof of Elapsed Time employs a randomized timer within SGX for leader selection.
- Meanwhile, Bitcoin solves computational challenges in a lottery style through Nakamoto Consensus, determining the leader in each round.
Tendermint, on the other hand, boasts an optimized approach capable of processing thousands of transactions per second, complemented by easy plug-and-play capabilities, broken into three crucial stages:
- Block Proposal
- Pre-vote
- Pre-commit
In this framework, validators are tasked with proposing and voting on network blocks based on their stake in the ongoing cycle. Consequently, the ⅓ BFT premise depends more on the ‘weight’ or stake of validators rather than a third of participating nodes.
Each validator manages a full-client node, holding a blockchain replica, utilizing public keys for ID. When a validator suggests a new block, it's called the block proposal phase.
Then, there’s the pre-vote stage, where validators assess the proposed block. With a ⅔ pre-vote majority, it transitions to pre-commit — a process known as a polka.
If pre-committed by over ⅔ of validators, the block is adopted into the blockchain. Critically, each pre-commit needs a polka for validation.
Validators endorsing faulty or unsuitable blocks could have their stakes cut. The three-step routine above represents a solitary cycle.
Tendermint is mainly asynchronous (or mildly synchronous); multiple rounds might be necessary before finalizing a block. While the proposal phase is somewhat synchronous, the voting remains asynchronous. As outlined by Tendermint:
“A host of reasons might impede a validator's ability to commit, such as an unresponsive proposer or network delays. Tendermint accommodates skipped ones. Validators briefly wait for a full proposal from the proposer before moving forward. This timeout reliance classifies Tendermint as weakly synchronous, contrasting its otherwise asynchronous operations, progressing solely with inputs from over ⅔ of validators.”
Tendermint’s design ensures unmatched safety, preventing blockchain forking. Yet, continuous validator uptime is necessary, or network halts may occur.
In terms of its foundation, the consensus model trades slight liveness for the sake of safety and near-instant finality.
Application BlockChain Interface, or ABCI for short.
Crucially, the ABCI allows Tendermint unparalleled flexibility, facilitating application replication across any programming language within a BFT context.
The ABCI stems from observations on how existing monolithic cryptocurrency platforms, like Bitcoin and Ethereum, complicate maintenance and hinder other languages’ interoperability. Ethereum’s Turing-complete bytecode system is limited to compatible languages like Solidity and Vyper.
The primary method of ABCI deployment is through Tendermint Socket Protocol, allowing Tendermint Core to communicate with applications. While Tendermint Core organizes and authenticates block transactions, the ABCI takes care of cryptographic validation, transaction databases, and facilitates client queries.
The ABCI uses 3 primary message types:
- DeliverTX
- CheckTX
- Commit
Every blockchain transaction includes a DeliverTX message, which only updates an application post-validation.
The CheckTX message verifies transactions, initially through Tendermint Core's mempool. Only verified transactions spread across the network.
Commit messages cement the application state, verifying Merkle proofs with signed block hashes. quorum .
The ABCI’s connection focus is reflected in the three Tendermint-Core-maintained connections to applications.
- Mempool Connection
- Consensus Connection
- Query Connection
The Mempool Connection relies on CheckTX messages to decide transaction relay validity.
Consensus Connection implements validated transaction executions.
Query Connection grants clients access to application state inquiries.
Dynamic by design, the ABCI is pivotal in the Cosmos Network’s multi-chain framework, acting as the network’s engine.
Image provided courtesy of Tendermint’s official documentation.
Tendermint & The Cosmos Network
The Cosmos Network Aiming to tackle the core challenges of blockchain — scalability, and interconnectivity — the multi-chain framework performs well. .
Read: Strategies for Blockchain Interoperability: Issues and Potential Solutions.
Powered by Tendermint's classical BFT, it forms a broad platform where independent blockchains connect within a standardized communication arena. Creating seamless public and private blockchain communication and value exchanges is simple, driven by Tendermint’s scalable proof of stake consensus.
Complementing this, ABCI allows developers to craft new and varied blockchains for the ecosystem, regardless of language choice. Cosmos SDK The Go programming language hosts an ABCI framework. Lotion JS JavaScript supports another ABCI framework.
There's palpable excitement around multi-chain frameworks like Cosmos and Polkadot, with more info available in their resources documentation .
Conclusion
Tendermint sets a new benchmark in Byzantine Fault Tolerance development for decentralized networks and blockchains. Such advancements pave the way for the emergence of scale-advanced and interconnected blockchain networks like Cosmos.
Exploring Tendermint: The Engine Behind Byzantine Fault Tolerant Blockchain Systems