Hashgraph is not a Blockchain killer!
Summary
If you don't plan to read the whole article, I suggest you scroll down to the comparison chart, and if you have some extra time, read on the properties.
Introduction
The Bitcoin blockchain?is usually considered the original blockchain of version 1.0 since this is the first modern implementation of distributed ledger technology (DLT). Over time, blockchain 1.0 has evolved into Ethereum, which is considered the?blockchain?version 2.0. And now we are probably observing the birth of blockchain 3.0 in the form of Tangle or Hashgraph.
But such a?division of blockchain technologies?into three stages is a simplification since blockchain 3.0 does not have a "blockchain". Instead, the third generation DLT uses an oriented acyclic graph (DAG). The article will learn why DAG is called?the post-blockchain concept?and how Hedera Hashgraph differs from traditional blockchains.
The HashGraph is a super cool technology that claims to be the next generation of distributed ledger technology that is recognized as an alternative public ledger technology that solves the same fundamental issues currently preventing blockchain from achieving mass adoption.
It was first conceptualized by Leemon Baird in 2015 and launched in late 2019(i.e. open access of its mainnet and launch of consensus service) and is focused on serving corporate interests, such as token/NFT creation, additional layers of consensus, quantum computer proofing via signature, and decentralized file storage.
Using the concept of 'gossip', the HashGraph promises superior performance, security, stability and fairness. Additionally, the Hedera HashGraph is an in-development platform that leverages HashGraph technology to create a virtual community with a native cryptocurrency, distributed applications, smart contracts and 'fair' governance.?
Brief into DLTs (Distributed Ledger Technologies)
A DLT can be described as a ledger of any transactions or shared contracts synchronized and maintained in decentralized form across different locations and people and allows participants to communicate to reach a consensus through the network.
A distributed network means that no single entity has the authority over transaction control and decision making. In this approach, instead of providing one entity (individual or group) with absolute power, it is distributed among the network. It ensures integrity, transparency, and security of transactions. It ensures that all participants copy their immutable records with no central authority.?
Brief into DAGs (Directed Acyclic Graphs)
The basis of the directed acyclic graph (DAG) approach is- that not all network participants need to know all the information about transaction history to maintain effective network synchronization.
When a payment is made on the?DAG network,?it creates a connection with two (or more) last payments made on the network before it checks the balance and authenticity of older payments, and if everything is fine, the new payment confirms them. Since new payments always check old ones, it is believed that the older the payment, the more “legitimate” it is and the harder it is to be cancelled.
In the case of?networks?where new payments confirm old ones, an old, already verified payment never checks a new one. Verification always goes ahead and never creates a similarity of at least some cycle—the name of the payment and?connection schedule.?In the graph below: parallel lines are the history of nodes (users) records, circles are events (transactions), and lines between events are connections from new events to old ones.
How HashGraph Works
HashGraph works on a gossip-based protocol which is fundamentally not a new idea. In gossip-based systems, nodes communicate and tell each other information. It is mathematically proven to help replicate data in a much faster fashion compared to blockchain.
Basic Structure
At an abstract level, a hashgraph is composed of columns and vertices. Each column represents a user in the network, and vertices are events. The users can perform two actions in the hashgraph, i.e. submit a transaction and Gossip about a transaction.
Event
Each event contains four pieces of information. Hash 1 is the hash of the previous event created by the user receiving the gossip, and hash 2 is the hash of the previous event of the user sending the gossip. The transaction contains any transactions submitted by the user sending the gossip, and a timestamp ?eld is used to track when the event was submitted. We note that even if a user tries to forge the timestamps, the voting algorithm used to ?nd consensus will detect it.
Gossip about Gossip
To understand how it works, imagine five members: A, B, C, D, and E. Each member starts with a transaction, which results in an ‘event’. Then, each member calls another randomly selected member and the two share their transaction history. For example, D calls B and shares D’s transaction history with B. This type of call happens repeatedly, with each member randomly calling another member and sharing its transaction history. So, B now randomly selects another member (let’s say C) and shares its transaction history, which includes D’s transaction history. Simultaneously, E may have called A, and so on. Each call results in an event, and each event holds the hashes of all previous blocks.
Virtual Voting
Its purpose is to reach a consensus on the order of transactions.
Here's how it works: first, the events are divided into rounds. The hashgraph algorithm has a definite mathematical answer for when a round is created. The community could put a list of n transactions into order by running separate Byzantine agreement protocols on O(n log n) different yes/no questions of the form "did event x come before event y?".
Here, for simplicity, imagine that one round has approximately ten events to be called witnesses, and define a witness to be famous if the hashgraph shows that most members received it reasonably soon after it was created. Each member votes to determine which event should qualify as a 'famous witness'. Once the Byzantine agreement is reached on the exact set of famous witnesses, it is easy to derive from the hashgraph a fair total order for all events.
领英推荐
To understand how this happens, imagine that each of the members with an event in the next round looks backwards to each event in the current round to see if it can trace its lineage back to the current round’s event. If it can trace its lineage back to an event, it votes yes for that event, and if not, it votes no. The current round event with the most votes is crowned the famous witness for the current round and provides the definitive order of transactions.
To simplify, since every node has a full copy of the hashgraph, no node is required to send their votes across the network; instead, they can all calculate the votes of the other nodes. The consensus algorithm also considers the cases when the network is not fully synchronized (not all nodes have the exact copy of the hashgraph).
State of Collision?
Usually, if two nodes add a transaction simultaneously in systems, we have a 'collision'. A complex voting scheme often decides the ordering of the transactions in a state of collision. Unfortunately, this also requires complex node states with high network traffic combinations.
Alternatively, Bitcoin and Ethereum use Proof of Work and avoid this issue by ensuring that blocks are infrequently added. Hence, such collisions are unlikely, but when they happen, the community will arbitrarily choose a block, prune(trim) the other block, and move on.
Hashgraph, on the other hand, achieves consensus by running a virtual voting process, where a node can decide whether or not a transaction is agreed upon by voting on behalf of all the other nodes. In a network with participants A and B, A never asks B to send him a vote because he will work out his vote for him. This is possible because all nodes know what other nodes know and can therefore speculate what the node would have voted for without transferring a single packet over the network. This not only eliminates the network traffic of voting, but it makes it impossible for nodes to vote hostilely because they never actually vote!
Because hashgraph does not concern itself with?preventing?forks (but instead reconciling them into a consensus), it is unnecessary to slow the network down with PoW to keep those forks under control. Consequently, hashgraph can deliver significantly higher throughput.
One of the main ideas that hashgraph has brought is the idea of ordering and fairness since it allows events to be ordered and are validated based on their order. This means that if two users compete to get access to some resources, the one who submitted the transaction ?rst will be considered ?rst (in blockchain, the reverse order can happen depending on the transactions selected by the miners).
(The above section is a little confusing, but it explains the working of the consensus mechanism with Hashgraph data structure and compares it with that of a Blockchain.)
Hopefully, I still have your attention, so now we can move on to discussing the properties of the HashGraph and what makes them so unique.
Properties
If you've understood how hashgraphs work, I strongly recommend you to read on some of the properties that make this DLT unique:
Performance: Hashgraph is a fast network due to the gossip protocol, reducing communication overhead. However, till now, hashgraph has been tested only in private environments. For a detailed breakdown of performance, you should see the whitepaper. If that seems a bit tedious to you, then suffice to say that HashGraph can achieve throughputs of up to 1M transactions per second and latencies of less than 10s, which is extremely impressive. In contrast, Bitcoin has latencies of at least 10 minutes and throughputs of around 7 transactions per second, and Ethereum has latencies of around 15s and throughputs of around 15 transactions per second. Hashgraph is used in a private, permissioned setting and can achieve superior performance because it eliminates a lot of the sources of wasted work that you see in 'their consensus working schemes such as proof of work:
Security: HashGraph uses cryptography to ensure that other participating nodes' transactions are secure and validated. HashGraph also guarantees field of distributed consensus: Asynchronous Byzantine Fault Tolerance (aBFT) - don't worry, I know it's a scary term. This means that so long as 2/3 of the network are legitimate, colluding adversaries will never stop or alter the final consensus reached. This is pretty much a gold standard for distributed systems.
Fairness: The timestamped consensus mechanism guarantees the correct order of handling and recording transactions. The timestamps in which transactions are assigned (after they are agreed upon by consensus) reflect the median time nodes received the transaction. If one adversarial node delays receiving a transaction for a long time, it will barely affect the consensus timestamp. Therefore, transactions will be assigned fair timestamps and fair ordering.
Fairness also refers to how transactions can’t be prevented from entering the system by any adversarial node. This is because if a node gossips to an adversary that doesn’t pass on information about some transactions, this won't matter. This is because the node will soon after gossip to a genuine node due to the random nature of gossip, and then the information will be passed on.
Comparison Chart
A quick overview of differences between the DLTs:
The future? (*thoughts)
Conclusion
The hashgraph is an innovative new take on decentralization and hashing to create a fast, distributed ledger that can process thousands of transactions per second. Though the hashgraph is a patented algorithm used in private, permissioned environments, the Hedera Hashgraph project seeks to create a public hashgraph network open to developers. In adapting the hashgraph algorithm for public use, Hedera Hashgraph adopted a consensus mechanism similar to the Delegated Proof of Stake mechanism on the blockchain.
While some consider hashgraph superior to the blockchain, there is still no objective evidence to support these claims. Based on the theoretical analysis, this claim might be valid. However, we need to consider the very active research going on by the di?erent blockchain platforms to overcome many of the discussed limitations. However, other blockchain platforms can be comparable in performance to hashgraph. For instance, Hyperledger Fabric, a permissioned blockchain, can reach up to 700 tps at the same level as the Tangle.
Based on my analysis, performance is de?nitely the biggest issue with blockchain technology. To increase security and remove spam transactions, most blockchain platforms adopt some type of Proof of Work, which a?ects the performance of the network as a whole. When discussing blockchain performance, several properties need to be considered. For instance, the number of transactions per second (fps), the number of transactions per block (i.e., how many transactions can ?t in one block) are related to the block size. The validation time (i.e., how many blocks must be added to the blockchain to ensure that the transaction will de?nitely persist). This problem arises in cases there are forks in the blockchain.
If you've read the whole post while suffering through the deficiency of visual content, a hearty thank you.
References: