Since the introduction of Bitcoin back in 2009, blockchain networks have started a revolution in computing. Today, blockchain networks power social media websites such as dtube (video hosting website) and dlive (video streaming website), supply chain management, etc.
People are finding new use cases for this technology every day, and there are good chances all future transaction will be done via the blockchain.
However, the blockchain network does have its disadvantages in the form of low amounts of transactions per second, scalability and vulnerability to DDoS attacks.
Recently introduced Hedera Hashgraph aims to fix these issues, boasting “hundreds of thousands of transactions per second” and infinite scalability.
Both of these are distributed ledger technologies, and both rely on peer-to-peer networks. However, they are based on completely different algorithms.
In this article, we’ll give you a somewhat quick rundown on how both of these technologies work, at what they excel, and where do they fail.
To understand how hashgraphs work, first you have to understand how blockchains work. So, let’s jump right into it!
What Are Blockchains And How Do They Work
The invention of blockchain isn’t as recent as you may think. The first concept of cryptographically secured chain of blocks of data was described back in ’91 by Stuart Haber and W. Scott Storrnetta.
Stuart and Scott wanted to make a completely secure document timestamp system. The system didn’t allow for one block to contain multiple document certificates at first. They managed to solve this issue by implementing the Merkle trees into their design. This not only allowed for storing multiple document certificates in one block of data but also improved the efficiency of the whole system.
Even though the blockchain technology continued to develop, not much was heard about it for nearly two decades until a person under a pseudonym of Satoshi Nakamoto released the whitepaper titled Bitcoin: A Peer to Peer Electronic Cash System. This whitepaper described “A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution.” The blockchain that powered Bitcoin provided the answer to digital trust because it stores important data on public space and no one has the ability to alter it once it’s stored. The stored information is transparent, time-stamped and completely decentralized.
Not long after the invention of Bitcoin did the people realize that they can utilize the blockchain for other purposes such as managing supply chains, insurance, transportation, voting and much more. It is speculated that almost fifteen percent of institutions use blockchain technology.
Distributed Ledger Database
Before we begin explaining what a blockchain is, first you must be familiar with the term distributed ledger database. This type of database can be described as a ledger of contracts or transactions. The database is synchronized and maintained in decentralized form across a great number of different computers, which eliminates the need for a central institution.
All data in this digital ledger is stored securely and accurately and is completely immutable thanks to cryptography. While it’s somewhat easy for a hacker to compromise a centralized ledger, the distributed ledger is difficult to compromise because all nodes on the network would have to be attacked simultaneously.
Both the blockchain and hashgraph technologies are essentially distributed public ledger databases. Where they differ is the data structure and the consensus mechanisms they employ to maintain the database.
Now we can go into the meat of the matter.
What is Blockchain Technology?
On the most basic level, the blockchain can be understood as a new type of database. What’s different about this new type of database is that it’s distributed. Databases are as old as the computers, however, until recently they have been designed to centralize data on one computer storage or within one organization.
The blockchain utilizes a network of computers to maintain a shared database. This means that we can define a blockchain as a set of protocols and cryptographic methods that enable a computer network to securely record data on an open database.
The database consists of a series of encrypted blocks that contain data. The blockchain is a continuously growing list of these blocks of data which are linked and secured using cryptography. Because the blocks are secured with cryptographic algorithms, the blockchain represents a trusted database. The trust is maintained by open and secure computer code and encryption instead of any single company or institution.
The database stores information in blocks that are linked together through hash values, with entries to this database being made by computers that all have a copy of this database and all must come to a consensus about its state before it can be updated.
So there are three main concepts that will help you understand how a blockchain works. Those concepts are blocks and hashing, mining and proof of work, and distributed consensus.
Let’s go over each of these concepts in more depth.
What are Blocks in a Blockchain
In terms of its structure, a blockchain can be viewed as a series of blocks of data that are securely chained together. New blocks are created when participants create new data or wish to update existing data.
These blocks are encrypted and given a hash value that represents a unique identifier of the data that’s contained in a particular block. The hashing works by running a standard algorithm over the block’s data to compress it into a string of 64 characters. This string is called the hash value and is unique for every block.
The hash value can be recalculated from the underlying file to confirm that the contents of the block haven’t been changed. However, the reverse operation is not possible because the data in the block is encrypted.
All blocks, after the first one, are securely chained to the previous one making the dependent on one another. Along with the hash value, the blocks also contain a timestamp which allows you to know what happened and when.
The hashing and linking of the blocks makes it impossible to tamper with the data. You can only write data to this type of database, and when it’s there, you can’t alter it without altering every block that came before the one you wanted to alter.
What is Blockchain Network Consensus
The blockchain is a distributed system which means there is no centralized institution that maintains and verifies the entries in the database.
The blockchain database is maintained by a large network of computers that are incentivized to provide computer resources by earning some form of tokens in exchange.
However, these nodes in the network cannot be trusted individually. So every blockchain utilizes a system that provides a mechanism for creating consensus between these nodes. The nodes don’t have to trust each other but trust the mechanism by which the consensus has been reached.
There are several types of consensus mechanisms:
Proof of Work mechanism
Requires solving a complicated mathematical puzzle by computation to bring a consensus in the network and secure the block in the chain. Bitcoin utilizes this system to reach a consensus, it’s very hardware intensive and in most cases requires special mining rigs.
Proof of stake mechanism
Works by choosing a creator to verify and add the block to the blockchain on the basis of the tokens they own. This system is much less hardware intensive and allows for more transactions per second. The system is utilized by the Ethereum. In fact, the Ethereum blockchain came into existence in order to move away from the costly proof of work system.
Proof of Elapsed Time
Works by following a fair lottery system. This system prevents the blockchain network from intense hardware use and high energy consumption. It is commonly used on networks where members have to identify themselves before they actually join the network. This system was pioneered by none other than the IT giant Intel. It is utilized by a Hyperledger, a Linux based open-source project that offers various toolsets and frameworks for developers and business that want to build or experiment with blockchain technology.
Practical Byzantine Fault Tolerance, or PBFT
Works by focusing on providing a practical Byzantine state machine replication that tolerates Byzantine faults by assuming there are independent node failures and manipulated messages generated by specific nodes. The strength of this system lies in the ability to validate a transaction without any confirmation unlike with proof of work systems.
A Brief Word on Smart Contracts
One of the most recent developments in blockchain networks is smart contracts. A smart contract is basically a computer code that runs on the top of the blockchain and contains a set of strict rules under which two parties agree to interact with each other.
When a set of predefined rules are met, the agreement is automatically enforced. The smart contract code expedites, confirms, and enforces the negotiation of the transaction.
Smart contracts that are deployed on a blockchain network are immutable. This means that neither the code nor the address of the contract can be altered once it’s written on the blockchain.
Because smart contracts cannot be modified once they are deployed, in order to fix a bug or add a new feature in the contract’s code, you have to deploy a new contract to replace the old one.
Hashgraphs have optional mechanisms that enable developers to have a choice of choosing the contracts subsequent mutability.
What are Hashgraphs and how are they different from Blockchains?
Hashgraph represents a new approach to the blockchain technology and its mechanisms. Hashgraph networks differ greatly from blockchains in the way in which the consensus is reached between the nodes. This difference can be viewed as an “upgrade” on the current types of distributed ledger technologies.
Hashgraph relies on two techniques to beat it the blockchain. The techniques in question are Gossip About Gossip and Virtual Voting.
The way Gossip About Gossip works is by attaching a tiny amount of additional information to a pair of hash values. These two hashes contain information about the last two people that node communicated with. This way, a hashgraph can be built and updated whenever additional information has been gossiped on each node.
When a hashgraph is read, its users will also be informed about the information contained on each of the nodes, as well as when they learned it. Because of this, it’s very easy to determine how a node will vote. Moreover, it can be used as a part of the voting algorithm, and to find whichever transactions have reached consensus.
Hashgraph boasts about being able to process transactions quicker than ever, and more securely than blockchain networks.
Is there any proof to any of these two claims? let’s take a look!
How is Hashgraph Structured
By now you should be fairly familiar with how blockchains work. Blocks of data are stored in a chain with new blocks forming whenever new data is added to it.
Hashgraphs, on the other hand, are built to look more like spider webs. When an alteration is made on a hashgraph, one node will inform two other nodes about the new information. These two nodes will then tell two other nodes about each of the changes.
Because of this gossip protocol, the hashgraphs have a structure similar to multiple streets that are connected together by the gossip each node initiates when alerting other nodes to a change.
The beauty behind the gossip protocol is that it can be compressed to just two bytes of data. Not only that, but the scaling involved in alerting other nodes toa transaction makes it much faster than blockchain.
How does a Hashgraph reach Consensus
Blockchain powered cryptocurrencies like Bitcoin have the power of processing transaction at a staggering speed of around seven per second. Blockchains process transactions slowly because they consist of several nodes which are all required to process the changes in tandem before a transaction can be confirmed.
This is where Hashgraph completely blows Blockchain out of the park. Because hashgraphs rely on the gossip protocol where each node has to communicate with two other nodes, with the rate of communication growing exponentially the more nodes are added to the network, there is almost no waiting time.
Hashgraphs are able to process up to 250,000 transactions per second. This is a colossal leap forward when compared to a Blockchain.
Hashgraph Crypto Mining
The most notable difference between a hashgraph and a blockchain is the latter’s reliance on miners. A Blockchain requires proofs such as Proof of Work and Proof of Stake to process transactions.
Hashgraphs, on the other hand, don’t require the need for such proofs. Because all nodes contribute to the validation of a transaction, there is no need to incentivize miners through transaction fees. The lack of incentivization ups many possibilities for micropayments to be backed through hashgraphs.
What this all means is that you could make small-scale transactions through hashgraphs with no processing fees. This was practically impossible before because blockchain miners are aiming to take as high a fee as possible for microtransactions.
Open Source VS Closed Source
One of the key features of a Blockchain is that it’s completely open source. This means that anyone can make a fork of the original project and create their own cryptocurrency or a blockchain powered app.
Unfortunately, this is not the case with Hashgraphs. The inventor of this technology, Dr. Leemon Baird, has patented the code. This means that Dr. Baird decides who can use this technology and who cannot.
It’s still too early to determine in which direction will hashgraph technology go, however, as things stand it’s pretty sure it’s intended for IT industry giants like Intel and Google.
The closed source nature of Hashgraph is a big win for Blockchain, that’s for sure.
Are Hashgraphs Decentralized?
Both Blockchain and Hashgraph technologies support decentralization. However, both of these technologies are unable to achieve complete decentralization, regardless of what people say.
When it comes to Blockchains, there will always exist a trade-off between decentralization and the rate of transactions it can support. As the blockchain network grows, so does the storage, bandwidth, and the computing power needed to maintain it. In the end, the network will become too cumbersome and only a couple of nodes will be able to process the block, completely defeating its original purpose.
Hashgraph has a great potential of becoming a truly decentralized distributed ledger database. The implementation of the gossip protocol means that the hashgraph doesn’t suffer from blockchain trade-offs. However, because of the closed source nature of this technology, there is a chance that the distributed ledger could become a centralized entity in the years to come.
Which is Better: Hashgraph or Blockchain
As things stand, hashgraph is well-suited to help develop the cryptocurrency in ways blockchain never could. Hashgraph boasts faster processing times and eliminates processing fees. This has great potential in the ever-growing microtransaction market that some people see as necessary in making cryptocurrencies more accessible.
On the other hand, blockchain technology already has a significant number of high profile adopters and it’s earned widespread recognition for its crucial role in the rise of Bitcoin. Hashgraph still has a long way to go, and its closed source nature leaves a lot to be desired.
What do you think about the current state of cryptocurrencies and blockchains in general? Leave us a comment below!