An introduction to Hashgraph

An introduction to Hashgraph

An introduction to Hashgraph

Hashgraph is a Distributed Ledger Technology (DLT) where transactions from users are grouped together into a block and once the block is validated, they join previously validated blocks to form a chain. The major difference between Hashgraph and Blockchain is that in Blockchain, when two miners mine the same block, one is validated and becomes a part of the system and the other is discarded. In Hashgraph, no block is discarded but they are woven back into the main chain.

Figure 1 – The graphical representation of Hashgraph

In Hashgraph, nodes are all computer on the network communicating by TCP/IP connections. The nodes are addressed by their IP addresses and port and not by any symbolic name. The nodes take transaction from a client and spread them by using the gossip protocol.In the gossip protocol, a node spreads information by repeatedly choosing random nodes in the network. As every member continues to choose random members in the network and shares all the information known to the member, it is assumed that the entire network is informed about any new event within a short period of time. In Figure 1, each column represents a node and each vertex represents a gossip event.

Figure 2 – Event creation in Hashgraph

Node A creates an event signified in blue when node B gossips to node A. The event in blue contains the hash of two parent events: the self-parent represented by yellow and the other parent represented by green. It also contains the digital signature of node A and a payload of transactions created by node A at that moment. The other ancestors (grey and the black) are not contained within the event in blue but are determined by a set of cryptographic hashes.

Node A then chooses another member in random and gossips about all the information that Node A knows. In our scenario, Node A gossips to Node C hence creating a gossip event in Node C.

As information is continuously gossiped from one member to other members at random, the information spreads within the network at a fast pace at a low bandwidth requirement.

Even if malicious entities have control over the network and can create, modify or delete messages from specific members, the continuous spread of information by a member to other members at random signifies that at-least one message with reach to another member sooner or later followed by another. The consensus mechanism is asynchronous and does not assume how fast this will happen. Hence, if 2/3rdof the members are honest within the network, a consensus will eventually be reached irrespective of the kind of control a malicious entity may have over the network.

The Hashgraph consensus algorithm uses the concepts of virtual votingand strongly seeing. Virtual voting is a concept in Hashgraph where a node can calculate the vote of another node without the second node physically sending the vote to the other node. This is possible as all the nodes in Hashgraph contains a copy of the Hashgraph. The concept of strongly seeing in Hashgraph is that if there are two separate vertices in Hashgraph xand y, x can strongly see yif there are they are connected by multiple paths passing through enough members. An event in Hashgraph can vote for an ancestor only if it strongly see it. If there are multiple ancestors (in case of forking) the event can at max see only one event and not everyone. As all the nodes have the same copy of the Hashgraph and behave similarly, a consensus cannot be achieved if an attacker creates two events by forking and try and get a consensus from different members. The Hashgraph Consensus algorithm is asynchronous Byzantine Fault Tolerant (aBFT).

Advantages:

Hashgraph is fast due to the gossip protocol of information transfer and the consensus algorithm that achieves consensus by virtual voting. It also requires less bandwidth. The algorithm is also aBFT hence it is considered to be extremely secure.

Challenges:

As Hashgraph is based on spreading gossip (message regarding an event) from one member to another random member and expecting eventually that the entire network is aware of the gossip. This can eventually lead to scalability and latency issues as the network continues to grow.

The security of the network is based on the assumption that no malicious entity or group can control 1/3rdof the network. If an entity is able to control 1/3rdof the network, the network will face immense security issues.