(BEING CONTINUED FROM 1/08/18)
A hashgraph is a patented algorithm that promises the benefits of the blockchain (decentralization, distribution, and security through the use of hashing) without the drawback of low transaction speed. It was created by Leemon Baird and is the intellectual property of the Swirlds Corporation, which Baird founded.
While Bitcoin allows for approximately 5 transactions per second and Ethereum allows for approximately 15 transactions per second, a hashgraph can process thousands of transactions per second. This article will discuss how the hashgraph works and if it could rise as an alternative to the blockchain.
Gossip about Gossip
The hashgraph algorithm operates through two techniques.
The first technique is used to share information and is called 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.
The graph of these events looks like a tree:
The second technique of the hashgraph is Virtual Voting, and 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. Here, for the sake of simplicity, imagine that a round has approximately ten events. Now, each member votes to determine which event should qualify as a ‘famous witness’. 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.
Private and Permissioned
As discussed earlier, the hashgraph algorithm has one major advantage over blockchain technology: speed. However, the hashgraph is used in a private, permissioned setting. Anybody can join Bitcoin, Ethereum, and other major public blockchains as a node. On the other hand, each node on the hashgraph has been approved by the network’s administrator. Additionally, unlike the number of nodes on a blockchain at any given time, the number of nodes on the hashgraph is known by the network. Therefore, each node’s identity is known, and can be trusted. This is why the hashgraph is so fast.
However, critics note that it is unfair to compare the speed of the hashgraph algorithm and blockchain protocols, since many of the latter are public and permissionless.
Hedera Hashgraph is the Public Version of the Hashgraph
The Hedera Hashgraph project is the most prominent effort to open the hashgraph algorithm to the public. Swirlds has licensed the hashgraph algorithm to Hedera Hashgraph. Swirlds will receive a 10% licensing fee from Hedera Hashgraph’s revenue.
By creating a public network, Hedera Hashgraph will lose the speed advantage of a private, permissioned setting. It will compensate for this by adopting a consensus mechanism that is very similar to the Delegated Proof of Stake mechanism, which I wrote about earlier:
The Difference Between Traditional and Delegated Proof of Stake
As the Proof of Stake consensus mechanism gains popularity (often displacing the Proof of Work consensus mechanism), blockchain developers have innovated on the traditional Proof of Stake mechanism, resulting in the Delegated Proof of Stake mechanism. This post will analyze the differences between traditional Proof of Stake and Delegated Proof of Stake consensus mechanisms.
Traditional Proof of Stake
A Proof of Stake system requires a user to put a certain number of cryptocurrency units at stake to be able to verify transactions. The creator of a new block is chosen pseudo-randomly, depending on the user’s wealth and coins at stake. In the Proof of Stake system, blocks are ‘forged’ or ‘minted’, not mined. Users who validate transactions and create new blocks in this system are ‘forgers’.
In most Proof of Stake virtual currencies, digital currency units are created at the launch of the currency and their number is fixed. Therefore, rather than receiving cryptocurrency units as rewards, forgers receive transaction fees. In a few cases, new currency units can be created by inflating the coin supply, and can be used to reward forgers.
To validate transactions and create blocks, a forger must first put their own coins at stake. Think of stake as an escrow account: if a forger validates a fraudulent transaction, they lose their holdings, as well as their future rights to participate as a forger. Forgers are therefore incentivized to validate only correct transactions.
The Proof of Stake system does not provide a way to distribute coins at the initial, founding phase of a cryptocurrency. So, cryptocurrencies that use this system either begin with an ICO and sell their pre-mined coins, or begin with the Proof of Work system, and switch over later.
Most Proof of Stake coins that pay a transaction fee reward for verifying transactions and creating new blocks set a target interest rate that users can expect to earn from staking their coins. For cryptocurrencies in which forgers create new coins, this rate also becomes the maximum rate at which currency supply is inflated over time.
Cyptocurrencies that currently run the proof of stake system are BlackCoin, Lisk, Nxt and Peercoin, among others.
Delegated Proof of Stake
The blockchain engineer Daniel Larimer is credited with creating the Delegated Proof of Stake (DPoS) system. DPoS seeks to by speed up transactions and block creation, while not compromising the decentralized incentive structure at the heart of the blockchain. DPoS is the next step in the evolution of consensus mechanisms. It builds on the original Proof of Stake consensus mechanism and drastically increases speed and scalability.
In the traditional Proof of Stake consensus mechanism, a user can put their coins at stake, thereby earning the right to validate transactions, forge blocks, and earn associated rewards. DPoS, a variation of the Proof of Stake consensus, seeks to reach consensus more efficiently.
In DPoS systems, users ‘vote’ to select ‘witnesses’ (other users they trust to validate transactions), and the top tier of witnesses (who have collected the most votes) earn the right to validate transactions. Users can even delegate their voting power to other users, whom they trust to vote for witnesses on their behalf.
Votes are weighed according to the size of each voter’s stake. A user need not have a large stake to enter the top tier of witnesses. Rather, votes from users with large stakes can result in users with relatively small stakes being elevated to the top tier of witnesses.
The number of witnesses in the top tier is capped at a certain number. These witnesses are responsible for validating transactions and creating blocks, and are in return awarded the associated fees.
Though witnesses in the top tier can prevent specific transactions from being included in an upcoming block, they cannot change the details of any transaction. They are thus equivalent to miners in a Proof of Work system.
Voting is a continuous process and each witness in the top tier is always at risk of being replaced by a user who gets more votes and is therefore considered more trusted. As a blockchain grows, it becomes increasingly competitive to become or remain a witness in the top tier. Users can also vote to remove a witness in the top tier who has lost their trust.
For a witness in the top tier, threat of loss of income and reputation is the primary incentive against malicious behavior.
Users in DPoS systems also vote for a group of ‘delegates’ (trusted parties responsible for maintaining the network). The delegates oversee the governance and performance of the entire blockchain protocol, but do not play a role in transaction validation and block production.
For example, the delegates can propose changing the size of a block, or the amount a witness should be paid in return for validating a block. Once the delegates propose such changes, the blockchain’s users vote on whether to adopt them.
Blockchains including Lisk, EOS, Steem, BitShares and Ark have adopted the DPoS consensus mechanism.
Summary of Differences between Proof of Stake and DPoS
1. Block creation: in Proof of Stake systems, the creator of a new block is chosen in a pseudo-random way, depending on the user’s coins at stake. In DPoS systems, users vote to elect a number of witnesses. The top tier of witnesses (typically 20) are rewarded for verifying transactions and creating blocks. DPoS is much faster due to a significantly smaller number of users verifying transactions and creating blocks; DPoS is therefore more scalable.
2. Governance: Proof of Stake systems have the blockchain’s rules and parameters programmed into the genesis block. Consequently, any changes mean a fork in the protocol. On the other hand, DPoS systems have an elected panel of delegates who actively govern the blockchain and can propose changes to the protocol, though the changes must be approved by the users for them to come into effect.
DPoS aims to create better incentives and a fast, scalable, more distributed and more efficient consensus mechanism.
The network will be governed by a council of 39 trusted members, from various industries and geographies.
The hashgraph is an innovative new take on using decentralization and hashing to create a fast, distributed ledger than 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 that it will open to developers. In adapting the hashgraph algorithm for public use, Hedera Hashgraph adopted a consensus mechanism that is similar to the Delegated Proof of Stake mechanism on the blockchain.
Once up, Hedera Hashgraph’s network will be governed by a trusted council and will offer the ability to create decentralized applications using Java. These traits will likely attract interest from enterprise users and crypto enthusiasts alike.
(TO BE CONTINUED)
SOURCE https://hackernoon.com /2018