Glosario

Tendermint

Hard

Tendermint is a consensus mechanism that allows applications to launch across different machines securely and consistently.

What Is Tendermint?

Tendermint is a consensus mechanism that allows applications to launch across different machines securely and consistently. It works with a Byzantine Fault Tolerance of up to 33%. That means applications on Tendermint work even if up to one of the three machines they run on fails.
Tendermint uses a proof-of-stake consensus, where a random node from a validator set is selected in each period. The node proposes a new block, which is added to the chain with instant transaction finality. The blockchain has a modular architecture, meaning its consensus and network layers are separate from its application layer. That allows developers to build blockchain applications without having to worry about bootstrapping a consensus mechanism.

How Does Tendermint Work?

There are two components to Tendermint: the blockchain consensus engine and a generic application interface. The consensus engine is called Tendermint Core and ensures transactions are recorded on all nodes in the same order. The application interface is called Application BlockChain Interface (ABCI), which enables transactions to be processed in any programming language. Developers can use Tendermint to build applications on top of it. Moreover, unlike monolithic blockchains, they are free to choose the programming language and development environment. 

Learn: Modular vs Monolithic Blockchains: What’s the Difference?

Tendermint Core

Tendermint Core is an asynchronous BFT consensus protocol. Validators take turns proposing and voting on blocks. If a block is not committed, the protocol moves on to the next round and a new block is proposed. Voting happens in two blocks, with a pre-commit and a pre-vote stage. If two-thirds of validators pre-commit to a block, it is committed.


Source: tendermint.com

A block can fail commitment because the proposer is offline or the network is slow. Before moving on to the next block, validators wait for a brief period of time to receive a complete block proposal. This timeout reliance defines Tendermint as a weakly synchronous protocol. Validators then continue after they have heard from two-thirds of all validators.

Safety is guaranteed as long as less than one-third of the validators are Byzantine. Therefore, validators can not commit conflicting blocks at the same height. Once a validator pre-commits a block, it is locked. The block is then pre-voted on or can be unlocked and pre-committed for a new block.

ABCI

With ABCI, developers can write Byzantine fault-tolerant applications in any programming language. ABCI bridges the Tendermint Core consensus layer and the Cosmos software development kit (SDK). It consists of three message types that get delivered from Tendermit Core to the application layer. ABCI relays three corresponding response messages from the application layer:

  • The DeliverTX message delivers each transaction in the blockchain. Applications validate each received transaction with this message.

  • The CheckTX message is for validating transactions. The mempool checks a transaction's validity and relays it.
  • The Commit message is placed into the following block header and is used to compute a cryptographic commitment to the current application state.

Tendermint Core creates three ABCI connections to the application; one for the validation of transactions when broadcasting in the mempool, one for the consensus engine to run block proposals, and one more for querying the application state.


Source: tendermint.com

Tendermint Consensus and Cosmos

Cosmos is a layer-1 blockchain with three layers:
  • An application layer for processing transactions and maintaining the network state.
  • A networking layer for relaying communication between the transactions and the chain.

  • A consensus layer for determining the state of the network. 

The Tendermint consensus is the backbone of the Cosmos consensus layer. The ABCI application layer allows developers to build either on top of the Cosmos blockchain or use the Cosmos SDK to build on one of the IBC-compatible blockchains. The Cosmos SDK is the implementation of the ABCI and stands for the modular part of the Cosmos ecosystem. 

To illustrate the above with an example: a developer team could choose to build a new DApp for decentralized finance. They lack the means and motivation to build their own chain. At the same time, the team is looking for a flexible programming solution to maximize interoperability. It could use the Cosmos SDK as a plug-and-play option to build a decentralized app compatible with Cosmos and other IBC chains. It would be connected to the Tendermint Core consensus mechanism through the ABCI. 

The Future of Tendermint

As a core contributor to the Cosmos ecosystem, Tendermint (the company behind the eponymous consensus) provides software and development kits to Cosmos. It is also developing a crypto app store (Emeris) that will serve as a single platform to interact with decentralized applications. 

Furthermore, Cosmos is branching out its ecosystem with an update to a Cosmos 2.0 version. The Cosmos blockchain will serve as the connective layer between the different IBC chains and add value to the Cosmos economic system.

You can read more about Cosmos in our Deep Dive Into The Cosmos 2.0 Network