You may already have heard about Tendermint and Tendermint Core in relation to the Cosmos network, or if you’ve kept close watch on the cryptocurrency market. In essence, Tendermint looks to offer an open-source alternative for launching blockchains. What’s more, Tendermint Core is the self-proclaimed leading "Byzantine Fault Tolerant" middleware when it comes to building blockchains. It works in coordination with Cosmos and is advantageous for developers because they can write their applications in any language.
Now, we realize the first paragraph alone raises lots of questions. For instance, what is Byzantine Fault Tolerance? What is Cosmos? And if you're new to all of this, you might even be wondering what a blockchain is? Don't worry. We'll cover it all.
If you want to learn even more about various different blockchains and the cryptocurrency industry, you should enroll in Ivan on Tech Academy! The Ivan on Tech Academy blog offers daily in-depth articles covering everything there is to know about the wider blockchain ecosystem. What’s more, the Academy has dozens of blockchain courses that can take you from zero previous knowledge to becoming a full-fledged blockchain developer. What are you waiting for? Join more than 30,000 other students at Ivan on Tech Academy!
To understand the importance of what Tendermint does, we need to first go back in time to see how and why it evolved.
In 1982, a computer scientist named Leslie Lamport published a paper detailing the Byzantine generals' problem of launching a coordinated attack against an enemy city. To understand it, one must imagine divisions of Byzantine soldiers encircling a city with each division commanded by a general. The only way to communicate in those days was by messenger. So, to coordinate a simultaneous attack, the messages between the generals had to be valid. This situation naturally brought up the problem of traitors. What if traitors planted false messages to disrupt the communication between the generals?
What the generals needed was a way to guarantee that the information they received was correct. They couldn't have a small number of traitors preventing them from reaching an agreement nor tricking them into acting on a wrong plan of action. But solving the traitor problem was tricky because no one knew who the possible traitors might be.
This Byzantine generals' problem remained in academia's realm until the Cypherpunks came along in the 1990s. The Cypherpunks were all about strong cryptography and privacy-enhancing technologies. Moreover, in their zeal for social and political change, they wanted to create a decentralized global currency without any authorities or privileged class of people running the show.
Fast communication, however, was only possible through a network, and that brought up the Byzantine generals' problem once again. How could one determine consensus when there's no way to measure identities nor determine whether a high percentage of the participants in such a network wasn't all the same person?
The solution to this problem came via the creation of the blockchain. A blockchain is a digital ledger, and parties can share this ledger without relying on central authority figures. Each party stores a copy of the ledger and updates it according to the individual blockchain's protocol rules.
However, just like the Byzantine generals, how could this digital ledger protect against traitors spreading false information to enrich themselves? For the blockchain to operate correctly, it needed validators because when nodes (computers on the network) received blocks of transactions, they had to have a way to verify that each transaction was valid.
So, blockchain technology had to ensure the digital ledger replicated itself correctly so that each honest node could see the same version of the ledger at any given time.
Before moving forward, let's define some of the terms above. A "state machine" is a program that holds a state. As it receives inputs, it modifies the state. Depending on the application, a state can represent things like token balances. For example, when the program spends tokens, it changes the state to show a balance of fewer tokens.
"Deterministic" means replaying the same transactions from the genesis state always ends with the same resultant state. Lastly, "consensus safety" refers to replicating the state machine on honest nodes. Every honest node regardless of geographic location should see the same state at the same time.
Next, let's look at the three conceptual layers of a blockchain:
It updates the "state" after processing transactions.
This layer propagates transactions and messages related to consensus.
It occurs when nodes agree on the current state.
Therefore, the state machine defines the state of the application and is the same as the application layer. The other layers replicate the state machine on all the nodes.
"Replicated state" is what blockchain networks do. They replicate states across nodes. Regardless of where one runs a node across the globe, they will get the identical blockchain. Also, safety is guaranteed as long as less than a third of validators are Byzantine (malicious).
Are you ready to dig deeper into blockchain technology? Get started today with a world-class blockchain education at Ivan on Tech Academy.
Now that you understand the blockchain better, the question arises as to how we got there? We won't go through every iteration of the blockchain's evolution from the time Leslie Lamport wrote about the Byzantine generals to the Cypherpunks to the creation of the first blockchain.
Suffice it to say that Satoshi Nakamoto made the breakthrough in 2008 by bringing distributed Byzantine Fault Tolerant consensus into a blockchain scheme. Once that happened, what had primarily been an academic curiosity moved to a real-world application.
Bitcoin was the first blockchain, and it uses Proof of Work (PoW), which was a novel consensus mechanism. This solution came about in a way that Vitalik Buterin (Ethereum's co-founder) describes as "crypto-economics." It's a complex concept that involves adding basic economics and insights from the cryptocurrency space, such as cryptography, distributed systems, math, information theory, consensus algorithms, hash functions, zero-knowledge proofs, and more.
But for our purposes, we need to wrap our heads around the fact that one can use economic resources to determine identities.
This brings us to the PoW consensus, where those with enough computational power to solve complex mathematical puzzles become trusted identities. Solve one puzzle, and you get one identity. With Bitcoin's consensus mechanism, miners compete to append new blocks, and each miner's probability of success is proportional to the computational effort they expend.
The Bitcoin whitepaper proposed PoW, but the concept was invented earlier by Cynthia Dwork in 1993. Its original use case was a deterrent to denial-of-service attacks and other abuses such as combating email spam.
PoW was a revolutionary idea whose time had come whereby miners could exchange computational resources for identity. So as for the Byzantine problem of separating honest messengers from traitors, to become a traitor in Bitcoin meant having to buy a lot of hash power. Would-be malicious traitors still have to contend with other people who also have lots of hash power invested in making Bitcoin prosper, making it unaffordable to destroy it.
It wasn't long before others realized the potential of decentralized applications (dApps), but it also wasn't long before Bitcoin's limitations became apparent. For one thing, the codebase was monolithic, meaning that it mixed all three layers (application, networking, and consensus). Additionally, the Bitcoin scripting language limited what developers could do with it.
In 2014, Ethereum came along with a new way to build dApps. This blockchain didn't come with a limited scripting language like Bitcoin. Solidity is a Turing complete language that enables developers to make any application they can imagine.
Ethereum turned the application layer into the Ethereum Virtual Machine (EVM), and the EVM could process smart contracts that developers deployed to the Ethereum blockchain, thus enabling multitudes of developers to start creating the latest and greatest dApps. However, some Ethereum limitations soon became apparent as well.
EVM is a sandbox that needs to accommodate all use cases. Therefore it optimizes for the average use case, limiting developers to a few programming languages and might force them to compromise the efficiency and design of their dApp.
dApps built on Ethereum are limited by competing for their share of 30 transactions per second with all the other dApps on a single blockchain. For more information on what Ethereum is doing about the scalability problem, please read our article “Comparing Layer 2 Solutions for Ethereum.”
Every dApp shares the underlying environment of Ethereum, meaning there are essentially two layers of governance: the application layer and the underlying environment. So, if the dApp has a bug, the fix also has to meet Ethereum's governance's approval. This requirement isn't specific to Ethereum alone but to any blockchain attempting to create a single platform to fit all use cases.
Learn all about Ethereum at Ivan on Tech Academy. Start with the Ethereum 101 course!
All this background information leads us to Cosmos. Don't worry, we will get to Tendermint, but first understand that Cosmos is an ecosystem of blockchains, or as they call themselves, "the internet of blockchains."
Blockchains built on Cosmos can scale and are interoperable with each other. Before Cosmos came along, blockchains couldn't communicate with each other, they could only handle small amounts of transactions per second (TPS), and they were hard to build.
However, Cosmos' dream isn't to take over the crypto universe as other projects seek to do. Cosmos is all about connecting everything. After all, the future isn't likely to be one where a single blockchain eats everything else. The future that Cosmos is banking on is one with many application-specific blockchains uniquely adapted to meet individual developers' and users' needs.
Don’t you think it’s time to bank on your own future? Learn how to become a blockchain developer and join a red-hot job market. A good place to start is the Crypto for Beginners Course at Ivan on Tech Academy.
Cosmos wants to connect blockchains to other existing blockchains, the goal being to wire a large number of computers together to look like a single computer.
In the Cosmos ecosystem, we have what's called "hubs" and "zones." Zones are sovereign blockchains (whether they be public or private), while Hubs act as coordinators. Different zones exchange value with each other by transacting through hubs. So if one zone wants to send coins to another zone, it must connect with a shared hub. The protocol that achieves these connections is called Inter-Blockchain Communication (IBC).
Creating zones and connecting them via hubs is Cosmos' outstanding feature. And for developers, creating a zone for decentralized trading on Cosmos is relatively easy. But what happens if a zone gets too popular and congested with traffic? That's where scalability comes into play.
Cosmos features two types of scalability that can enable dApps to ramp up to millions of users.
This form involves scaling the blockchain itself.
This kind of scaling deploys multiple blockchains. It's necessary because every single chain eventually hits a wall concerning transactional throughput. The solution, therefore, is to have multiple parallel chains running the same application. These chains need to be monitored by common validators, but it theoretically makes blockchains infinitely scalable.
A developer can create a new zone that runs parallel to the first zone, and that is the horizontal scaling feature of Cosmos.
So Cosmos is a world of many zones and hubs that are all interconnected and scalable. But what does all this have to do with Tendermint? Will Tendermint can help these blockchains hit thousands of TPS.
The long lead-in was necessary because Tendermint and Cosmos cannot be separated. The two go hand-in-hand. However, to make each distinct in your mind, think of Tendermint as the software and Cosmos as the blockchain. Each makes the other more valuable.
Cosmos is the central hub for the internet of blockchains created by Tendermint developers. To more accurately describe this, Tendermint is a consensus algorithm, while Tendermint Core represents the integration of the Tendermint BFT consensus algorithm together with the Tendermint Core engine.
As mentioned earlier, blockchains conceptually come in three layers:
Before Tendermint came along, creating blockchains meant building all three layers from scratch, which took a lot of time and effort. Tendermint's goal was to provide a standard engine that took care of the networking and consensus layers, so the only thing that developers had to focus on was the application layer.
So, Tendermint is a blockchain engine that serves as the gateway to the Cosmos ecosystem. Moreover, the zones we mentioned earlier can be anything that developers can create with Tendermint.
That means Tendermint enables developers to build open, distributed, and interoperable networks. It also means that each blockchain on Cosmos is powered by Byzantine Fault Tolerant Tendermint consensus. Hence, there's no need for a single, trusted authority, and as you know by now, Byzantine Fault Tolerance means that Tendermint can handle up to 1/3 of the machines failing (which includes malicious behavior).
But let's return to Bitcoin. The problem with PoW as a consensus mechanism is that it's a huge energy waster that doesn't bode well in the modern era of climate change. Other solutions needed exploring.
The BitcoinTalk forum discussed one such solution, Proof-of-Stake (PoS), in 2011. But it was Jae Kwon (inventor of Tendermint) who first began talking about applying Byzantine Fault Tolerance research to a PoS blockchain back in 2014.
The research PoS initially sought to achieve the same security as a PoW without chewing up scarce resources (energy) to do it. So, fixing scalability issues, high overhead costs, and the environmental concerns of running PoW miners drove PoS research.
The solution to this is PoS, where the network can use high stakes rather than hard work to secure it. Cosmos Proof of Stake is a consensus mechanism built with Tendermint that allows anyone to participate in staking.
Also, developers can add Staking and Slashing modules to support a more advanced Proof of Stake system. Slashing is another idea from Jae Kwon, as a way to punish malicious actors by slashing their stake.
We won't dig deeply into PoS with its staking and slashing features in this article, but for more information, please read.
There are more features than we have time for but one of the main takeaways is that because Tendermint takes care of everything but the application logic, developers can create any blockchain they want (so long as the application is deterministic). This all adds up to making blockchain building quicker and easier which means endless possibilities for the future.
Are you ready to start your journey to become a blockchain developer? If you want to learn how to build insanely creative dApps enroll at Ivan on Tech Academy now!
Get to work in a fast growing industry. Start learning blockchain together with our 20,000+ students today.
Use coupon code BLOG20 for 20% off.