What Is Hashgraph Consensus?
Hashgraph consensus is an alternative to—or the next generation of—the technology behind blockchain consensus mechanisms. Instead of using the computational power of large networks to verify transactions, transactions are recorded and confirmed via a protocol that uses node communication.
A hashgraph is a decentralized ledger in much the same way a blockchain is. It stores information, secures it with cryptography, limits access, and uses the stored data as verification. However, a hashgraph network reaches consensus in a much different way than a blockchain does.
Hashgraph consensus is reached using concepts called "gossip," "gossip about gossip," and virtual voting. Designers of the system report that it solves the problems inherent to consensus-building algorithms, such as proof of work (PoW), in terms of better speed and higher efficiency.
Learn more about hashgraph consensus and how it is different and more efficient than blockchain consensus mechanisms.
Key Takeaways
- Hashgraph consensus uses information about information rather than the content itself to create consensus.
- Primary information in the hashgraph is called "gossip," and secondary information is called "gossip about gossip."
- The hashgraph distributed ledger system has not received wide adoption by the crypto community.
Hashgraph consensus—gossip, gossip about gossip, and virtual voting—is the mechanism the Hedera distributed ledger uses to validate and confirm transactions.
Understanding Hashgraph Consensus
Hashgraph is an alternative to blockchain. Similar to a blockchain, it stores data and encrypts it. A hash is generated for transaction information, and new transactions or data are added and built upon. However, a blockchain is a ledger that consists of blocks of data. Each block is linked to the previous block using its data, verified by a network of validators to create the next block. This process creates one chain. A hashgraph isn't one chain—all information is kept in an encrypted ledger, and every user participates in the validation process, not just the validators.
For example, Alice creates a transaction with Bob, and all of the information she knows is given to him. Bob then makes a transaction with Kris. All of the information Bob has is communicated to Kris. Kris transacts with Eli, and everything she knows is transferred. This continues throughout the network, with the chain essentially gossiping about the events taking place. Every node knows what all other nodes know, so there is no need for computational validation.
As the gossip spreads from user to user, the network uses algorithms and automation to ensure the state of the hashgraph ledger is updated and the same.
Gossip
Information about data is called "gossip." The data structure contained in a transaction are:
- A timestamp
- More transactions or zeros
- Two hashes from the parent containers
- An encrypted signature.
The two hashes are the last events from two syncing nodes that compare their information. Nodes are continuously creating events and syncing.
Hashgraph—the ledger—is more efficient than blockchain because no energy is wasted on blocks that are not accepted. All information is retained in a hashgraph.
Gossip About Gossip
Information about transaction data is called "gossip about gossip." Information is synchronized in the hashgraph network using an event called a "gossip sync." A gossip sync is a collaborative history of "gossip events" throughout the hashgraph. In this way, data cannot be altered or tampered with, and there is consensus.
Virtual Voting
Virtual voting occurs when the nodes compare events and reach a consensus via a voting algorithm. Here's how it works—a transaction is assigned a timestamp as a node receives it. As it passes to the other nodes in the network, it is assigned a timestamp that is a median of all of the timestamps for that transaction received by the nodes in the network. The median acts as the result of the vote. This creates a more fair transaction system than a blockchain because the network decides, not one node.
Fault Tolerance
As with most distributed ledgers and blockchain, there is always a chance that a participant in the network is not honest. There might be delays in communication or network latency that causes nodes not to communicate properly.
Consensus mechanisms are designed to deal with these faults by setting fault tolerance criteria. Developers need to consider and account for bad actors, bad connections, network latency, and other network issues. Hashgraph consensus can tolerate one-third of the network acting maliciously. It is reportedly asynchronous Byzantine fault tolerant—the highest security level—which means that honest nodes on a network continue operating even if there are bad actors.
How Is Hashgraph Different From Blockchain?
Hashgraph is a data structure that maintains the records of who told who what and in what order they did so. It is a collaborative history of gossip events as participants add and share information, which validates transactions much faster than a blockchain.
Blockchain adds previous transaction information to new transaction information and encrypts it. A third party is needed to validate the transactions between parties. Hashgraph doesn't need this slow process because of the gossip protocol.
Hashgraph consensus is much faster than blockchain consensus mechanisms, with average transaction confirmation times in seconds rather than minutes.
Bitcoin and many other cryptocurrencies have issues with message timing. However, hashgraph's asynchronous Byzantine fault tolerance overcomes the problem of message timing by assuming that lost or delayed messages will eventually make it to their destinations.
For example, if two transactions occur simultaneously, a blockchain network chooses which order the transactions occurred. In some blockchains, transaction fees prioritize confirmation. Other networks might decide which transaction is confirmed based on how many tokens a validator has staked. In these blockchains, one node influences the outcome.
Hashgraph consensus eliminates the influence one node or a group of nodes can have on transactions. Because there is a timestamp on each transaction, and each transaction is communicated to the entire network, transaction timing issues are resolved.
What Is Hashgraph Consensus?
Hashgraph consensus is a mechanism used in a hashgraph distributed ledger to validate transactions.
How Does Hashgraph Consensus Work?
Hashgraph consensus works using consensus timestamps and "gossip," in which each node communicates everything it knows to random nodes in "gossip events."
Will Hashgraph Replace Blockchain?
Hashgraph is designed to be—and marketed as—an improvement on blockchain technology, but whether it will replace it remains to be seen. It doesn't yet have as much developer interest and adoption as blockchain technology.