Hashgraph Implementation Problems

Hashgraph is a decentralized data structure that can be compared to the blockchain. It is believed, though, that Hashgraph works faster and more fairly, and is more reliable than Blockchain, which makes it a possible and realistic alternative. Let’s find out whether this statement should be considered reasonable, and whether there are proven facts behind it. We will also evaluate possible Hashgraph problems and compare the above-mentioned technologies.

Diving deep into the mathematical algorithms and functions of Hashgraph can be challenging, especially for non-technically-educated users, but the general working principles are pretty simple. Hashgraph allows network users to reach consensus on data permanently and invariably. This means that operations can be carried out safely.

In contrast to blockchain blocks of data, Hashgraph provides a graph of connected hashes in which members exchange information about data transmission over the network. Each member randomly calls another to synchronize the data until all the nodes in the system are aware of all relevant information ever created in the network. This process of data-sharing and distribution enables the system and members to achieve consensus: members agree about the fact that events have occurred and their time of occurrence. Further, the graph of events creates an immutable record of node communication.

How Does It Work?

To better understand Hashgraph technology, let’s take a closer look at examples of its use. Hashgraph technology can be visualized according to the following graph:

The members are the computers, presented as full nodes. Marked as A, B, C, and D, they stand for Alice, Bob, Carol, and Dave. The circles in the graph act as containers of transactions and are considered to be events. Additionally, events can contain several smaller transactions.

According to the picture, all nodes have created an event, and this is the very beginning of the graph. Time is now going to flow uphill. Any node (A, B, C, or D) can randomly choose and share information with another node according to gossip protocol, with which data is spread through the network very quickly to ensure that all members are aware of the event taking place.

The history of an event is illustrated in the graph above, which represents the structure of an information flow. Every event from the graphic captures that Alice has started the “gossip” and let Bob know the details. Each new event keeps the hashes and transactions from the previous two with the creator’s signature and timestamp. The graph will further illustrate and connect the full process of information-sharing between the nodes.

According to the voting concept, a special mechanism is used to allow the network perform a voting algorithm without the necessity of sending direct messages between participants. In order for all members to be aware of the event details, Hashgraph provides the above-mentioned data structure, which can be viewed and followed. Hence, all the users can evaluate event order and get all the answers without direct messaging. Further, the nodes are capable of reaching consensus about an event and/or transaction validity. If two-thirds of the nodes witness transactions and vote that an event is valid, then it is considered as such. This voting algorithm is meant to ensure transparency and reliable communication between nodes.

Hashgraph Advantages

Before moving on to Hashgraph problems and pitfalls, let’s first evaluate its best features. Speed, fairness, and security are the foremost factors that make Hashgraph an outstanding technology capable of competing with Blockchain.

Speed

Hashgraph technology is fast in terms of using the gossip protocol, which spreads and shares messages between network users. It also performs selective optimization of these messages in order to decrease communication costs. Additionally, this “gossip about gossip” produces the consensus protocol. Another reason Hashgraph is fast is that it functions in a private, permissioned network setting.

High speed and latency are guaranteed to process transactions in seconds. According to research carried out by the company, it is possible to reach consensus finality in three seconds for 32 computers functioning at 50,000 transactions per second. Depending upon the number of computers and regions, the time required to reach consensus can drop to 1.5 or even 0.75 seconds.

Fairness

Fairness is provided by consensus timestamping, which means that the transaction reaching two-thirds of the network is meant to be the first. The system is pretty fair, as the majority witnesses the transaction, and unfair decisions are eliminated. If there exists a risk of malicious behavior, nodes are authorized to stop the transaction and report the illegal or malicious behavior, thereby preventing it from reaching consensus.

Everyone has equal rights and opportunities, as no one person is in charge of everything, nor are they responsible for assigning a transaction timestamp. Therefore, users get fair access, timestamps, and fair transaction order.

Security

Several aspects provide Hashgraph users with enhanced security and safety. Among them:

Cryptography. Communications and interactions are encrypted with hashes, also used to sign various events. The algorithms used within Hashgraph technology adhere to security standards to protect private and personal information.

aBFT. Asynchronous Byzantine Fault Tolerance is used to ensure that no single individual or small group of users can prevent other nodes from reaching consensus. BFT prevents this, ensuring resilience against all kinds of attacks.

Acid compliance. In order for a transaction to be completed, all nodes must comply with atomicity, consistency, isolation, and durability.

Distributed DoS resilience. Hashgraph does not place one person or group in charge of everything, and thereby provides a fair process for reaching consensus. This eliminates the chances of nodes flooding the network or causing it to malfunction.

Additionally, Hedera Hashgraph provides its users with enhanced performance, cost, and state efficiency.
Governance, stability, and regulatory compliance are also included in the list of Hedera Hashgraph advantages.

Governance Model

The governance model comprises a set of rules to comply with the technological software policy, coin issuance, and the incentive model. Open consensus provides trust between the nodes while carrying out transaction processing. Additionally, all members can be chosen and elected within the governance model, with the opportunity to vote and decide upon policy rules and codebase changes.

Stability

Stability is another Hedera advantage. Technical and legal controls have been developed to guarantee stable functioning conditions that are not threatened by the possibility of forking. Thus, technical controls provide signed state proofs, ledger ID, and fork handling.

Legal Controls

Legal controls ensure that the codebase is:

open

transparent

accessible

This enables everyone to view the code and its sources for further verification.

Regulatory Compliance

Regulatory compliance prioritizes know-your-customer (KYC) and anti-money-laundering (AML) policies. This means that an opt-in escrowed identity mechanism offers participants the choice to tie their verified identity to other private accounts. This provides the government with the necessary supervision to prove regulatory compliance.

Hashgraph vs. Blockchain

To understand potential problems of Hashgraph implementation, let’s first compare its basic features to blockchain.

Data Storage

Comparing data storage on Hashgraph and Blockchain, the basic aspects are similar. Blockchain keeps data in a block, storing records of transactions: timestamp, current hash, and the transaction from the previous block.

Likewise, Hashgraph stores data, but in the form of an “event.” Each event also contains timestamps and transactions with regular hashes, the history of which can be viewed in the graph.

Data Structure

The data structure looks like this:

Blockchain protocol selects a node authorized to add a block of transactions to the general chain of blocks. In Hashgraph, all computers (nodes) communicate with each other, providing the latest information they possess via gossip — the connections of which are recorded in the graph. Therefore, the blockchain structure is similar to a tree with chronological continuous branches, while the Hashgraph structure looks more like a tree with branches wreathed inside.

Protocols

Blockchain uses Proof of Work (PoW) and Proof of Stake (PoS) consensus protocols.

Proof of Work

According to PoW, used by major blockchains, there is a requirement to define an expensive calculation, which is called mining. Each miner solving a block problem gets rewarded for it. This causes competition between miners, as those solving problems faster get better rewards. Block validation, on the other hand, takes additional time and consumes a large amount of energy. Nodes also run safety algorithms to validate transactions and eliminate malicious behavior. If one tries to add a block with fraudulent transactions (like double spending), the next blocks have to reject and delete it. However, if a chain of blocks has several dishonest nodes, attacks are likely to happen. With that said, it should be stressed that consensus can only be approached in PoW. That is why transaction receivers have to wait for transaction validation by other nodes.

Proof of Stake

As for PoS, a new block creator is chosen according to his or her wealth (stake). As PoS does not provide a system of rewards, miners charge fees for transactions. In addition, the cost efficiency of PoS currency is considered to be a thousand times better.

It should be emphasized, though, that PoS protocol is vulnerable to hacking attacks. The greater the stake the higher the risk of attack on the system.

Asynchronous Byzantine Fault Tolerance

Hashgraph technology runs on the aBFT protocol (Asynchronous Byzantine Fault Tolerance), which provides high security and is resistant to fraudulent activity. Based upon connections between nodes, the protocol doesn’t demand extra node effort. The process is as follows:

Step 1

Being divided into rounds, each round is created when one event is able to connect more than 2/3 of the first events of the current round by more paths than 2/3 of the node population.

Step 2

When a new round is created the first new nodes of the new round will vote to say if they agree upon the data contained in the first row of events of the preceding round. To do so they just need to verify that they are connected to these nodes.

Step 3

The last step is to collect the 3rd round node answers. To do so the 4th round nodes are required. They need to strongly see the 3rd round node. If one of the 4th round node succeed to collect a super majority (more than 2/3 of the population) of positive votes upon the data in the 2nd round then the consensus is reached.

aBFT prevents the influence of one individual or a small group of users from affecting the whole community of users. To reach common consensus, all members must approve event information, validity, and history.

Let’s compare the above-mentioned protocols on an example of the Mesh-network.

According to Wikipedia,

Speaking about the best matching protocols, it should be noted that blockchain proof of stake isn’t the best choice, as the more stake one possesses, the higher the point of failure. Therefore, to function well within the Mesh network, proof of stake should be modified, with limitations. For instance, the amount of shared data with the network has to be reasonable and equal between the nodes. With this type of limitation, the risk of attack can be eliminated.

The structure of Mesh networks is similar to star-and-tree topology, in which network nodes are connected to smaller groups of switches/bridges and infrastructure links are hierarchical. Contributing to fault tolerance proves that Hashgraph aBFT protocol is well-suited to the working mesh-network principle. Find out more about blockchain solutions with the decentralized Mesh network.

If you’re interested in which protocols to use for your project, Applicature can help you set up an ICO cabinet matching your needs and interests.

Hashgraph Problems and Pitfalls

Having discussed the major aspects of Hashgraph technology, it is clear that there are numerous benefits, such as speed, fairness, state efficiency, and advanced performance. On the other hand, the platform has not yet been launched, which is a Hashgraph disadvantage. Many experts have questioned certain aspects, and already see hidden pitfalls and Hashgraph weaknesses that have yet to be discussed. Let’s take a look at several of them.

Possible Corruption

Considering that blockchain nodes have incentives in the form of rewards preventing the option of cheating, Hashgraph’s disadvantage is that it does not provide something like this. This presents the platform as an interesting case for potentially malicious actions and fraudulent activities.

Byzantine tolerance requires the agreement of a majority of nodes in order to reach consensus. Mostly, voting decisions depend upon the council. But what happens if the council is corrupt, and wants to call system attacks? There is no way to prevent it. Another issue can occur when users deal with a corrupt messenger. The message/gossip gets spread incorrectly, and this ruins the whole data structure.

Picture this situation. Imagine a doctor is invited to attend three scientific conferences where he is nominated to receive an award. Clearly, the doctor cannot attend all three of them, and therefore, he goes to the first one. According to the situation, cellular communication isn’t possible, and the doctor sends someone (a runner) to the other conference to find out whether he has received an award and pays him $20. The issue occurs when a cheater, interested in the doctor’s failure, pays the “runner” $30 to pass the wrong message. This leads to an incorrect spread of information which further influences the whole situation; thus, the doctor may not get an award anywhere, even if he was chosen.

The same example can be applied to Hashgraph events and false gossip. Hence, corruption appears to be an issue to solve. This issue is raised in Hedera Hashgraph by implementation of non-aBFT consensus on top of Hashgraph.

“Decentralized” Centralization

Although Hashgraph is presented to the community as a decentralized distributed platform, as its algorithm is theoretically decentralized, outer governmental control still has its place. Swirlds technology and its algorithm are the intellectual property of Leemon Baird, and it has the right to control and govern the network and its development. No one can be sure how exactly this could influence the level of control, and whether there would be good or bad actors.

Security and Scalability Issue with Hashgraph PoS Outside aBFT

Systems using Byzantine Fault Tolerance require nodes, which are needed for virtual machine establishment in order to execute smart contracts. Hedera Hashgraph uses an additional layer of these requirements to increase computational power for virtual machines by implementing proof-of-work consensus. This questions security, as aBFT is considered to be fast and safe, whereas PoS consensus will be less secure, as it is more vulnerable to potential attacks. Another issue considering security arises with uncertainty about bandwidth protection from possible attacks. This problem can further influence the speed of smart-contact execution, and it’s not yet clear whether it will exceed the speed of Ethereum SC execution.

aBFT Inability to Support Turing-Complete Smart Contracts

Hashgraph does not require nodes with an efficient amount of computational power and hardware resources to execute program codes. This leads to the issue that Hashgraph itself is not a Turing-complete environment. Hedera’s solution is based upon the idea that with an additional layer of nodes connected by PoS consensus, it could gain such computational power. This means, however, that transactions must not be hashed (mutable) and processed in PoS blockchain instead of aBFT. Only after smart-contract processing will it be hashed and sent as gossip to Hashgraph for verification, which causes a major threat to security and anonymity for Hashgraph itself.
Feel free to contact us for smart-contract development and its execution within any platform you choose!

Conclusion

Though Hashgraph is similar to the blockchain, can work faster and more fairly, and is better protected in the security aspect, there are still open questions for further clarification. Thus, there exists the threat of possible corruption. Other issues include centralization, dependence upon a certain authority, security and scalability issues aside from aBFT, and the inability to support Turing-complete smart-contract execution. Let’s wait and see what the future holds, and how Hashgraph plans to solve the above-mentioned issues.

Do you want to share your thoughts with us? Don’t hesitate to comment and share! In case of any questions, feel free to contactApplicature’s team experts.