In the previous article, we learned about the Hedera hashgraph in detail with examples. In this article, we’ll dig a bit deeper into the working of Hedera Hashgraph consensus mechanism. To brush up on the basics, a hashgraph is a decentralized ledger, similar to a blockchain. It uses “asynchronous Byzantine Fault Tolerance” consensus mechanism to create a secure, fast, and fair digital ledger. The DLT offers high-speed and low latency, which allows it to process hundreds of thousands of transactions per second.
A consensus mechanism is essential for any blockchain network. It is the method by which all participating nodes in the network agree on the current state of the network and the validity of new transactions. It ensures that the network is secure and that all participants have a shared common truth of data stored in the network. Several different types of consensus mechanism are used in blockchain networks; a few examples are:
These are some of the most common consensus mechanisms used in DLT networks. This article explores Hashgraph’s consensus mechanism – asynchronous Byzantine Fault Tolerance (aBFT).
A hashgraph is a data structure and algorithm that allows for fast, efficient, and secure consensus in distributed systems. A hashgraph network reaches consensus in a unique way that is distinct from how a blockchain does it. The Hashgraph consensus algorithm was invented by Dr. Leemon Baird in 2015. It utilizes a Directed Acyclic Graph (DAG) structure for working of Hashgraph consensus mechanism in distributed systems. The consensus algorithm uses a unique “virtual voting” and “gossip about gossip” protocol to provide fast and secure consensus without needing a centralized authority or high computational power.
A directed acyclic graph is a data structure consisting of nodes and directed edges between them. A key feature of a DAG is that the edges have a direction, and the graph doesn’t contain any cycles. You can’t follow the edges and arrive back at the starting point.
In DLTs, DAGs represent the history of transactions or events in a network. Each vertex in the DAG represents a transaction or event, and the edges represent the dependencies between them. DAGs are used to represent the state of the network and the order of the transactions.
Reach out to us today for a no-obligation consultation
Here is a video explaining in detail the working of the gossip of gossip.
We can help you out!
Gossip about Gossip is a popular concept in networking, where information is spread from one node to another. In the hashgraph, every piece of information, or “gossip,” contains the hashes of the last two people it was shared with. In this way, every node in a Hashgraph network spreads new information and transactions to randomly selected neighboring nodes. These neighboring nodes combine the new information with what they have already received, creating a new event. This process continues until all nodes in the Hashgraph network have the same information.
To understand this concept more clearly, let’s consider an example. Imagine four people named Alice (A), Bob (B), Charlie (C), and David (D), as shown in stage 1 in the diagram above. Bob decides to gossip with David randomly(stage 2). This means that Bob shares all the events that David must be aware of. David acknowledges this and creates a new event at the peak of the previous event (stage 3).
Now, suppose David decides to gossip with Bob again. Bob has now received three events, of which the first two are of Bob and David, while the third is one that David created. (Stage 4). In the diagram above, stage 4 is the state in which the nodes in the network start gossiping, and in time, the nodes start gossiping about the gossip. The end result is – by analyzing the time stamps of the gossip messages acknowledged by the nodes in the system, the system automatically comes to a conclusion about the order of the occurrence of the transactions.
Working of Hashgraph consensus – Virtual Voting
Virtual voting is a way for nodes in a network to decide if a transaction is valid or not. If 2/3rds of the nodes in the network are witnesses for a transaction, it is considered valid. This process happens in multiple rounds.
For example, there are four rounds of voting in a Hashgraph network. When a new event occurs, it is associated with one of these rounds. In this example, we will focus on Charlie’s events in each round, labeled as C1, C2, and C3. Charlie doesn’t have any events in the fourth round yet, but he will in the future (stages 1 and 2).
Charlie’s first events are also known as witnesses. To determine if a witness is “famous,” the witnesses in the next rounds need to vote. For example, to determine if B2 is a famous witness, the witnesses in the next round, A3, B3, C3, and D3, need to evaluate whether they are descendants of B2. If they can trace their link back to B2, they will vote “YES” (stage 3).
In the second part of the voting process, the next round of witnesses, B4, will collect votes from the different witnesses but will only count if they meet the “strongly seeing” condition. This means that there must be more than one path for B4 to reach the witness node, and a supermajority, or more than 2/3rds of the population, must be passed. In this case, since the population is 4, the supermajority is 3. The diagram shows that B4 can strongly see A3 and the other nodes till D3. Therefore, B2 is declared as a famous witness. This is how virtual voting works in a Hashgraph network (stage 4).
Reach out to us today for a no-obligation consultation
Hashgraph’s stroke of genius was looking at one of the fastest and most resilient ways human communication has traveled -which is through gossip. Gossip spreads like wildfire in no time! Using gossip as a blueprint, Dr. Braid created the gossip about gossip protocol behind the hashgraph algorithm.
Imagine a world where rumors could travel faster than the speed of light – where secrets and gossip spread like wildfire, reaching every corner of the globe in seconds. That’s the world of the Hedera Hashgraph network technology. When a node receives a message, it creates an event and records the details in a unique hash. These nodes are like gossipy friends, sharing the information they received and documenting the source. But unlike a group of chatty humans, the Hedera Hashgraph network can process an astounding 250,000 transactions per second. That’s faster than the blink of an eye and far faster than most blockchains, which struggle to keep up with a measly 10,000 transactions per second. So the next time you hear a juicy piece of information, just remember – it’s got nothing on the speed of the Hedera Hashgraph network.
One of the key advantages of Hedera Hashgraph’s consensus algorithm is that it uses asynchronous Byzantine Fault Tolerant (aBFT), meaning that no single node or group of nodes can disrupt or manipulate the working of hashgraph consensus process. This makes the network more secure and resistant to interference.
Additionally, Hedera’s approach to timestamping transactions is designed to be fairer than traditional blockchains. Rather than relying on a single miner or node to determine the timestamp, Hedera uses automated voting to arrive at a consensus among all nodes. This ensures that the timestamps are determined more equitably; therefore, the resulting order of transactions is also considered fair. These features of Hedera’s hashgraph technology make it a strong contender in the DLT space.
We’ve covered the principles of the working of Hashgraph consensus mechanism. To sum up, Hedera Hashgraph is a powerful technology that has the potential to develop highly scalable applications that can perform well even under heavy loads. Its unique characteristics, including speed, efficiency, and high security, make it an ideal choice for building applications that require these features. As a next-generation blockchain technology, Hedera Hashgraph could play a vital role in developing applications that demand the best performance and security.
Reach out to us today for a no-obligation consultation