What is Tendermint? How does Tendermint consensus work?
The world of blockchain can be a confusing place even when looking at the “simplest” of protocols like Bitcoin. Things get quite a bit more complicated when we move onto newer protocols like Ethereum, or even newer ones that take what generations 1 and 2 taught us and look to build upon that with new ideas and concepts.
One such project that looks to revolutionize the way we approach blockchain technology development and usage is Tendermint.
Tendermint is a new protocol that helps order events in a distributed network under adversarial conditions. More commonly known as Byzantine Fault Tolerant (BFT) consensus algorithm or atomic broadcast, the problem has attracted significant attention in recent years due to the widespread success of blockchain-based digital currencies such as Bitcoin and Ethereum.
These two currencies successfully solved the problem of managing such a network in a public setting without a central authority, creating what we now call decentralized public blockchains. Tendermint modernizes classic academic work on the subject and simplifies the design of the BFT algorithm by relying on a peer-to-peer gossip protocol among nodes.
What you’ll learn 👉
A Closer Look At Tendermint
Tendermint exists in a stack with Cosmos, a blockchain platform that serves as a mediator and self-described “Internet of Blockchains”; this platform launched its blockchain just a couple of days ago, initiating the Cosmos/Tendermint ecosystem’s practical existence. The entire ecosystem operates similarly to Ethereum, except it’s more modular, flexible and easier to develop on.
Cosmos SDK acts as the application layer of the ecosystem (similar to Ethereum’s EVM) while Tendermint represents both the consensus layer (BFT tolerant Proof-of-Stake consensus algorithm) and the networking layer (Tendermint Core).
Consensus algorithm + p2p networking protocol which are conjoined under Tendermint Core stack are connected to the Cosmos SDK though another separate element of the ecosystem called Application Blockchain Interface (ABCI).
Cosmos SDK is the basic implementation of ABCI and represents the modular part of the ecosystem; it is a barebones application layer which developers can take and enhance with custom features. This lets already existing blockchains build Tendermint-based applications that can connect to the ecosystem and exchange messages and value between eachother.
This is why Tendermint and Cosmos use the “Internet of Blockchains” moniker; the entire system wants to become a hub that would allow interoperability between different blockchains.
A for-profit Californian company behind the project (also called Tendermint), separated the three main elements mentioned above and then connected the networking/consensus layer under the Tendermint stack.
This is done in order to make the components of the technology easier to use and fix, without having to develop for the entire ecosystem when you want to change something. Main developers Jae Kwon as Ethan Buchman wanted to create something that is easy to understand, implement, and develop for, and Tendermint is the final result of their efforts.
⚡️ Before Tendermint, building a blockchain required building all three layers (networking, consensus, application) from the ground up. Ethereum simplified this by providing a Virtual-Machine blockchain on which anyone could deploy custom logic in the form of Smart Contracts. One problem remained: the development of the blockchain itself. Tendermint simplifies the process significantly, as developers on it only need to worry about the application layer.
Networking and consensus layers are already provided through the Tendermint Core engine; all you need to do is adapt the ABCI through a programming language of choice, develop your unique application and start using the features of Tendermint.
Tendermint team did something like this by taking Ethereum’s code base, stripping out PoW and plugging the final result on top of their Tendermint Core. This created Ethermint, Ethereum-like protocol which had Proof of Stake capabilities. All the existing Ethereum tools (Truffle, Metamask, ..) are compatible with Ethermint, and you can port your smart contracts there without any additional work.
One important element of the entire equation that we still didn’t mention but is very important for blockchain interoperability is the Inter-Blockchain Communication protocol (IBC). IBC allows heterogenous chains to transfer value and data between eachother, ultimately unlocking interoperability between blockchains that have different applications and validator sets.
To avoid scalability issues that can come with hundreds or thousands of future blockchains, Cosmos proposes a modular architecture with two classes of blockchain: Hubs and Zones.
Zones are regular heterogenous blockchains and Hubs are blockchains specifically designed to connect Zones together. When a Zone creates an IBC connection with a Hub, it can automatically access (i.e. send to and receive from) every other Zone that is connected to it. As a result, each Zone only needs to establish a limited number of connections with a restricted set of Hubs.
Hubs also prevent double spending among Zones. This means that when a Zone receives a token from a Hub, it only needs to trust the origin Zone of this token and the Hub. The first hub (Cosmos Hub) was already launched a couple of days ago. Some chains won’t be completely Tendermint-compatible; the developers envisioned so-called peg zones to deal with this issue.
Tendermint’s cryptography itself isn’t that advanced, with ECDSA signatures being the most “exotic” piece of technology in the ecosystem. BLS signature aggregation, zero-knowledge proofs and Ristretto accounts were mentioned during the recent post-launch livestream but none of those seem to be on the horizon just yet.
The technology can be used for creation of both public and private chains with former operating through PoS and latter through permissioned nodes; both systems will be BFT. Blocks on the Tendermint Core can have a block time of one second and are considered instantly final; otherwise it would be safe to assume that the network is suffering a 33% attack (more than a third of validators are malicious).
Malicious Nodes and Byzantine Fault Tolerance
A blockchain needs to be Byzantine Fault Tolerant, aka capable of tolerating potentially malicious nodes that are communicating false states and messages to the network and endangering the consensus. The science was scarce on Byzantine Fault Tolerant systems as this topic wasn’t that popular in academia.
What little research was done focused on small sample size networks of up to 7 nodes; Tendermint developers wanted something that could scale on a higher level. Even when Bitcoin introduced a system capable of supporting thousands of independent nodes, the system had (and still has) a single administrative domain which significantly limits its scalability.
Kwon and his partners envisioned a BFT protocol that could scale to the tune of hundreds of nodes in the permissionless setting with Proof-of-Stake (PoS) as the underlying security mechanism. They came up with the BFT-based system which has two key elements that we already named: Tendermint Core which is used for consensus reaching and “gossiping” and Cosmos SDK that serves as the application layer.
Their BFT Proof-of-Stake algorithm overcomes the Byzantine Generals Problem by using a partially synchronous network model, which means that the validators voting on a block don’t need to act at the same time. Blocks in this system aren’t voted on a schedule nor do they have a determined size.
⚡️ In Bitcoin, which is considered “fully synchronous”, we have a set 10 minute time frame that the nodes have to look for, collect, validate and add transactions to a block. With Ethereum, this timeframe is only 15 seconds. This is all well and good until the synchrony is broken; some of the nodes can go offline and suffer latency issues, in which case the chain can either stop or get forked.
Tendermint aims to implement a more centralized model, one which refuses these timing limitations on the account of its nodes operating in an asynchronous manner.
The protocol is more asynchronous: instead of each round taking a predetermined period of time, each step of a round progresses after more than 2/3 of the nodes reach a consensus. This lack of synchronization is partial and the project refers to it as “weakly asynchronous”. Validators are well-known and can communicate between eachother to coordinate their efforts and ensure that network consensus is always reached. All of this implies that their network will, in fact, never fork.
Tendermint regularly re-assigns validators the right to propose a block to slightly mitigate potential issues with centralization of this process. After blocks are proposed, validators vote in a multi-round deterministic process.
To expand on this we need to realize that in the world of protocols, we have non-deterministic and deterministic ones. Nondeterministic protocols are the ones that we see in completely asynchronous systems. The consensus of a purely asynchronous case can depend on random oracles and generally incurs high message complexity overhead, as they depend on reliable broadcasting for all communication.
Tendermint avoids this high overhead by going the deterministic route; nothing is actually random but rather done through a defined mathematical function which allows us to make a prediction that the protocol is guaranteed to make decisions.
With Tendermint, validators are rotated with the help of a deterministic weighted round-robin format. The more stake a validator has, the more times they may be elected as a leader. Currently, the protocol is capped at one hundred validators, however, the team will possibly consider adding more validators if needed. This ensures that the system is safe in asynchronous environments and lively in weakly synchronous environments. Overall, the consensus mechanism sacrifices a degree of liveness for consensus safety and instant finality.
Making Sense Of It All…
Tendermint is an interesting concept that perhaps looks and sounds more complicated on paper than it actually is in reality. It’s basically EOS of interoperability and has plenty of similarities with Ethereum and a whole host of its clone projects. Tendermint’s main goal is to tackle the issue of blockchain interoperability, and it faces a strong opposition in that market. Ark, ICON, Polkadot, AION and similar projects all have that same goal in mind so it remains to be seen who will come out on top.
Disclaimer:
-
This article is reprinted from captainaltcoin]. All copyrights belong to the original author [Dobrica Blagojevic]. If there are objections to this reprint, please contact the Gate Learn team, and they will handle it promptly.
-
Liability Disclaimer: The views and opinions expressed in this article are solely those of the author and do not constitute any investment advice.
-
Translations of the article into other languages are done by the Gate Learn team. Unless mentioned, copying, distributing, or plagiarizing the translated articles is prohibited.