How hashgraph is different to blockchain
|Richard Harris in Blockchain Monday, May 6, 2019|
Learn the differences in blockchain and decentralized apps from Ken Anderson, Chief Developer Advocate for LinkedIn.
Hedera Hashgraph is a company which allows distributed ledger technology (DLT) to move beyond the limitations of blockchain. In simple terms, hashgraph goes further than what blockchain can do, while eliminating many blockchain’s issues. It was founded to provide a new form of distributed consensus. The platform is faster, fairer, more secure, and unrivaled by other blockchain-based platforms.
Having raised $100 million via a future token sale from institutional investors, Hedera launched an open-source SDK in October 2018, allowing developers to create Hedera-based applications for use on the Hedera platform. To date, over 100 DApps have begun building on Hedera, developing applications like changing the way we bring drugs to market or managing traditional supply chain models.
We wanted to know more about Hedera Hashgraph, so we had a conversation with Ken Anderson, Chief Developer Advocate, LinkedIn.
ADM: Developers hear a lot about blockchain technology. How is hashgraph different to blockchain?
Anderson: You can think of blockchain as a mechanism for reaching a certain level of confidence in the state of some data by selecting leaders to create blocks of data that are cryptographically linked to historical blocks. The longer the chain of blocks becomes on top of the block containing the data in question, the less likely that data is to change.
Hashgraph uses a different data structure and algorithm to reach a final consensus quickly where no leaders are necessary. This means that the concern for leader corruption or compromise is mitigated. For hashgraph, consensus is coming to agreement about the timestamps and order of transactions. This happens quickly and is final. This consensus order allows developers to address real-world requirements that depend on order, such as cryptocurrencies, markets, auctions, etc.
ADM: What are the main problems with blockchain technology for developers?
Two major challenges with blockchain are:
- How do you fairly select the next leader to create the next block?
- How do you get finality?
If you want a fast blockchain, you have to have a fast selection of leaders, but how do you do that fairly? With a proof-of-work protocol, you can select leaders quickly, but then you end up with too many forks to have definitive confidence about which chain is the “longest” and the most likely to be accepted. Leader selection, speed, and certainty are all competing objectives, so there is a balance between fairness (or pseudo-fairness), speed (or the necessity to slow things down to prevent too many forks), and growing certainty (or how long a chain needs to be before we can confidently accept it as actionable).
ADM: How does hashgraph provide a solution to these problems?
Anderson: Inspired by a pure voting model, hashgraph addresses the concerns of fairness, speed and security in a very different way. Hashgraph is a Directed Acyclic Graph (DAG) and allows transactions to be introduced to the ledger quickly, without the need for slowing or pruning. Running the deterministic hashgraph algorithm against the structure of the DAG allows each node to calculate consensus independently, which means that there is no competition for leadership or longest chain; each node is eventually getting the same data and running the same algorithm which results in the same answer.
ADM: How does hashgraph solve the Byzantine fault tolerance problem and what is the implication of this on the DLT sector?
Anderson: Hashgraph addresses byzantine fault tolerance by ‘gossiping’ the data structure as fast as possible and allowing each node to independently calculate consensus. This means that nodes are not dependent upon each other to validate or confirm consensus and as long as 2/3 of the network is keeping up with the gossip and running the same algorithm, then all of those nodes will eventually come to the same picture of what consensus is – or more accurately, all nodes will eventually calculate the same timestamps for transactions. This is the highest possible level of security for a DLT: asynchronous byzantine fault tolerance (ABFT).
In October of last year, the hashgraph consensus algorithm was validated as asynchronous Byzantine Fault Tolerant (ABFT) by a math proof checked by computer using the Coq system, a formal proof verification system. The verification was conducted through the Coq Proof Assistant, which checks that the proof is correct, and was completed by Karl Crary, Associate Professor of Computer Science at Carnegie Mellon University.
ADM: How does hashgraph achieve consensus? Why is it superior to proof-of-work?
Anderson: There are a few steps to calculate consensus. Hashgraph uses a gossip protocol to propagate events, which are packages of transactions that have the reporting node’s timestamp, hashes linking to two parents, and a signature of the creating node. As these events are gossiped from node to node and the events are cryptographically linked, we get a hashgraph structure which is not just a picture of the data being gossiped, but a history of how the data was gossiped. This hashgraph allows nodes to calculate a consensus timestamp. This timestamp is the median of the times that a subset of the community first heard of the event in question. The manner in which we select that subset is resistant to attack.
This process allows hashgraph to work near to the speed of the internet, with how quickly it can propagate and calculate consensus. There is no slowing down the network to prevent forks or other artificial mechanisms that result in slower or more expensive processes.
ADM: Does hashgraph use the gossip protocol? What does this mean for the developer experience?
Anderson: Hashgraph does use a gossip protocol under the hood. We have built on the gossip protocol by adapting a ‘Gossip about gossip’ protocol, through which the hashgraph algorithm can enable very fast cryptocurrency transactions. The ‘Gossip about gossip’ protocol is the fastest and most resilient way to get a message out, spreading information exponentially fast throughout the network of nodes. The gossip protocol is optimized for speed in a sense that there is no delay for other blockchain-related consensus mechanisms, like transaction pools. Developers don’t interact with the gossip layer directly. Developers interact with the Hedera API (HAPI) and an SDK, which provides an even higher level of abstraction.
ADM: How does Hedera work with developers as a community?
Anderson: Hedera maintains a communication channel, in use by over 6,500 developers. Beyond this, we have over 14,000 meetup members across the globe who regularly come together for our technical meetups, workshops, and hackathons, with the help of our develop advocate team and our ambassadors. We pride ourselves on supporting and creating a valued work environment for the developer community. Without them, we wouldn’t have achieved what we have done in this space.
ADM: What are the basic steps to publishing/creating a dapp using hashgraph?
- Dapps in the Hedera ecosystem are apps that interface with HAPI. HAPI can be used to deploy smart contracts or to directly interact with the cryptocurrency or file services.
- Developers can join the testnet via the Hedera portal at https://portal.hedera.com
- To deploy to the public mainnet, developers only need a mainnet account.
ADM: From a developers standpoint, how do you think DLT as a whole is changing the approach of creating platforms?
Anderson: Just like how databases, search engines, authentication servers, and other components are part of a full-stack solution, DLTs will become a component in that stack and will allow for the decentralization of of platforms. Decentralized servers will enable the creation of decentralized platforms, which in turn will disintermediate existing, centralized platforms that are leading enormous industries.
From tech giants to the largest banks in the world, large entities will be able to transform the nature of their business. DLTs will play a crucial role in building increased trust and security across sectors and optimizing data consistency, positively impacting every level of business.
ADM: Do you think that blockchain technology has a future in app development, or will other DLT platforms overtake it?
Anderson: I’m a bit biased, but I haven’t seen a blockchain that offers more speed, security or fairness than hashgraph. Everything I’ve seen blockchain do, hashgraph does better. I expect that in the next 18-24 months we’ll see many enterprise and startup production applications which will highlight the strengths of of Hedera Hashgraph.
About Ken Anderson, Chief Developer Advocate, LinkedIn.
Ken is passionate about a distributed economy, and is the Chief Developer Advocate of Hedera. He is a serial entrepreneur, with 20 years of experience in system design and software architecture. He has built a team of award-winning engineers and consulted as interim-CTO for various companies during periods of restructuring. He was also the lead contributor to the TM Forum’s REST API design guidelines, now used throughout the multi-trillion global telecom industry. Ken graduated with a BBA in Management Information Systems from California State University and was an Intelligence Sergeant in the United States Army.