Future of Blockchain: Will Hashgraph make Blockchain obsolete?
A lot has been written about blockchain, the technology that underpins cryptocurrencies. The concept of Blockchain emerged from a whitepaper written by Satoshi Nakamoto titled: “Bitcoin: A Peer-to-Peer Electronic Cash System.” The 9-page whitepaper was written as part of Nakamoto’s response to the collapse and the fallout from the 2008 banking institutions. He was very active on cryptography forums, where he discussed Bitcoin freely, and published a 9-page paper outlining the details of his project where the two words “block” and “chain” appeared together. The word “blockchain” was not mentioned in the article.
In 2015, the idea of blockchain as a distributed general ledger technology started gaining popularity as organizations and technologists discovered many application of the technology. However, blockchain is not without challenges and limitations –performance and scaling problems. Due to its chain or linked storage structure, blocks can’t be created simultaneously. Each new record inserted into a blockchain has to be serialized with only one single block created about every 10 minutes. This makes that the rate of updates in blockchain slower than traditional databases, which can update data in parallel. The linked storage structure allows for only one chain on the whole network. All the transactions occurring around the same time are kept in the same block. Blockchain’s limitation is also by design. It is good especially in a global network where all participants may potentially be malicious. Miners then have to compete for the block validation. Bitcoin has always been inefficient due to the hashcash proof-of-work (POW) system. A proof of work is a piece of data which is difficult, expensive and time-consuming to produce but easy for others to verify and which satisfies certain requirements. Producing a proof of work can be a random process with low probability so that a lot of trial and error is required on average before a valid proof of work is generated. Bitcoin uses the Hashcash proof of work system.
The Ethereum Foundation tries to solve the performance issue native to blockchain and its inability to sufficiently scale. Ethereum came up with two possible fixes to the problem. The first, “sharding,” requires a small percentage of nodes to see and process every transaction, allowing many more transactions to be processed in parallel at the same time; sharding also isn’t expected to diminish the native security of a blockchain because it maintains “most of the desired decentralization and security properties of a blockchain,” Ethereum creator Vitalik Buterin, wrote in a blog post. The second solution involves creating data-link layers or “layer 2” protocols that send most transactions off-chain and only interact with the underlying blockchain in order to enter and exit from the layer-2 system, as well as in the case of attacks on the system. Layer 2 protocols transfer data between nodes within a LAN or an adjacent WAN. That said, Ethereum’s open software platform is still based on blockchain technology.
So the question now becomes, is it possible to have a distributed ledger technology (DLT) like blockchain, that is secure, safer, faster and scaleable? This is the problem that hashgraph solves. Hashgraph is a revolutionary new distributed ledger technology created by Leemon Baird. Hashgraph is superior to the blockchain in every way. Unlike the blockchain, it is fast with a high throughput (250,000+ transactions per second pre-sharding), fair (mathematically proven fairness with consensus time stamping), and secure (asynchronous byzantine fault tolerant). These properties expand its use to complex markets, auctions, crypto-currency micro payments, live games (even MMOs). Leemon Baird. He received a PhD in Computer Science from Carnegie Mellon University. He is currently co-founder and CTO of Swirlds Inc, which builds software for distributed consensus based on the hashgraph consensus algorithm. He is also a Professor of Computer Science at the Air Force Academy.
What exactly is Hashgraph?
A “hashgraph” is a data structure, storing a certain type of information, and updated according to a certain algorithm. The data structure is a directed acyclic graph (DAG), where each vertex contains the hash of its two parent vertices. The concept of hashgraph first appeared in Leemon Baird’s white paper published in 2016 titled: “The Swirlds Hashgraph Consensus algorithm: Fair, Fast, Byzantine Fault Tolerance.” The new hashgraph consensus algorithm allows a group to come to agreement on an ordering for transactions, and to on the outcome of running code (smart contracts). It is Byzantine Fault Tolerant, and yields a database that is ACID compliant. Past approaches to this problem have included blockchain, leader-based systems, and voting-based systems. Hashgraph is different in that it ensures fairness of the ordering of events, and fairness in the consensus timestamps. It is more resistant to DDoS attacks than leader-based systems, more computationally efficient than proof-of-work blockchains, and more bandwidth efficient than voting-based systems.
Hashgraph depends on “directed acyclic graphs” to track information. Hashgraph’s DAG stores information in a timed series so that the record of each transaction is dependent on the ordering of all the previous transactions in the series. In blockchain, only one record of a transaction exists. If two miners create blocks at the same time, the community will chose the one transaction to go with, and dump the other. Unlike blockchain, no transaction is descarded in hashgraph. There can be many branches to the transaction record, and they all can continue to grow until a consensus can be determined. Hashgraph is a superior distributed ledger technology system that eliminates the need for massive computation and unsustainable energy consumption like those of Bitcoin and Ethereum.
From Leemon Baird’s whitepaper, the hashgraph consensus algorithm is based on the following core concepts.
- Transactions – any member can create a signed transaction at any time. All members get a copy of it, and the community reaches Byzantine agreement on the order of those transactions.
- Fairness – it should be difficult for a small group of attackers to unfairly influence the order of transactions that is chosen as the consensus.
- Gossip – information spreads by each member repeatedly choosing another member at random, and telling them all they know
- Hashgraph – a data structure that records who gossiped to whom, and in what order.
- Gossip about gossip – the hashgraph is spread through the gossip protocol. The information being gossiped is the history of the gossip itself, so it is “gossip about gossip”. This uses very little bandwidth overhead beyond simply gossiping the transactions alone.
- Virtual voting – every member has a copy of the hashgraph, so Alice can calculate what vote Bob would have sent her, if they had been running a traditional Byzantine agreement protocol that involved sending votes (see diagram below). So Bob doesn’t need to actually her the vote. Every member can reach Byzantine agreement on any number of decisions, without a single vote ever being sent. The hashgraph alone is sufficient. So zero bandwidth is used, beyond simply gossiping the hashgraph.
- Famous witnesses – 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?” A much faster approach is to pick just a few events (vertices in the hashgraph), to be called witnesses, and define a witness to be famous if the hashgraph shows that most members received it fairly soon after it was created. Then it’s sufficient to run the Byzantine agreement protocol only for witnesses, deciding for each witness the single question “is this witness famous?” Once 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.
- Strongly seeing – given any two vertices x and y in the hashgraph, it can be immediately calculated whether x can strongly see y, which is defined to be true if they are connected by multiple directed paths passing through enough members. This concept allows the key lemma to be proved: that if Alice and Bob are both able to calculate Carol’s virtual vote on a given question, then Alice and Bob get the same answer. That lemma forms the foundation for the rest of the mathematical proof of Byzantine agreement with probability one.
Why is hashgraph better than blockchain?
- Speed: It is 50,000 times Faster: limited only by bandwidth – 250,000+ Transactions Per Second (Pre-Sharding). For now, Bitcoin is limited to 7 transactions per second.
- Fair: It uses consensus time-stamping which makes the system fair.
- Improved Security: It is an asynchronous Byzantine Fault Tolerant system. Meaning it can still work even if some of its nodes aren’t participating prop. No member can prevent the community from reaching a consensus, nor can they change the consensus once it has been reached.
- More Fair: mathematically proven fairness (via consensus time stamping) meaning no individual can manipulate the order of the transactions.
- Hashgraph can achieve consensus with no Proof of Work. So it can be used as an open system (non-permissioned) using Proof of Stake, or it can be used as a permissioned system without POW or POS.
As discussed earlier, hashgraph is based on DAG. DAGs have no mining, no blocks and no transaction fees. The security and consensus of the network is not divided among miners, validators, and users. Users of the network validate a number of old transactions (via proof of work) in order to be able to conduct one of their own. No one receives a reward and no one has to pay transaction fees. It also eliminates the need for a miner-centralization like in Bitcoins or in Ethereums network. All users of a given DAG-based ledger confirm transactions for one another rather than rely on outside “miners.” Hashgraph’s ledger doesn’t bundle transactions, while Bitcoin blockchain requires them to be packaged in 1 megabyte blocks, which, during days of heavy traffic, can take days of work by miners to confirm and record.
So why isn’t everyone rushing to start hashgraph?
First, it is way too early to say that hashgraph will replace blockchain. Hashgraph is nascent and does not benefits from incumbency and familiarity of blockchain. Except for the early adopters, a lot of organizations are not willing to take the risk on a not-so-tested technology with potential vulnerabilities that are yet to be discovered. In addition, hashgraph is patented and not open source like blockchain. Openness may also be another issue. Blockchain is based on open ledger while hashgraph is based on private ledger.
Below is a video of a simple explanation of Hashgraph with pictures
Tangle is another decentralized general ledger system. However, Tangle does not use “blocks” in the conventional sense. Instead, if you want to carry out a new transaction on Tangle, you have to approve of two previous transactions. When depicting this in a graph it means that you add a new transaction to the Tangle tip and you are randomly allotted two previous transactions that you need to validate. By doing so the initiator of a new transaction indirectly confirms that a subsection of the Tangle is valid and that it conforms to the protocol rules. It is the Tangle’s “proof of work”.
Below is a diagram of comparisons of major consensus algorithm based distributed ledger systems
In the end, Hashgraph is a viable technology with potential to replace Blockchain. However, since Hashgraph is not open source many details of Hashgraph still remain unknown to the community of developers.