What maintains the Hashgraph network?

Pablo Peillard
Hashing Systems
5 min readJun 6, 2019

--

The element that creates the network directly is the nodes. These nodes, which at first will only come from council members, stake Hbar in order to build the network. As the governing body sees that it is safe to continue, more parties will be allowed to run nodes. This slowness to open up does have a reason. What Hedera wants is a safe and stable network, something not seen in the blockchain. This is vital for the adopting of HH by large companies and the mainstream user. Later in the growth of HH, Hedera will allow anyone to run a node. This is the ultimate goal as it will allow HH to grow much faster than it would if it were merely relying on a group of council members. It also plays into the strive to empower the everyday user to own and contribute to the network they use.

What does it mean when you run a node?

Before I discuss why someone would want to run a node, let’s dive into what running a node entails. The node is part of a network of nodes which together agree on what events have happened, and what events are happening. When Marie send Hbar to Bob, for example, the node making that transaction makes sure that Marie has Hbar to send to Bob and then transfers that amount. That node the gossips the fact that the transaction happened to the other nodes on the network. These nodes then add that transaction to their ledgers, which are all the same. The idea that all of the nodes have the same leger always end up agreeing with what is added to the ledgers is called consensus. This consensus is helpful for when a user is looking for information about previous or current events: information such as who has sent money to whom, how much money is on the user’s wallet, has a certain smart contract been running or has been accessed, as well as other insight into the network. These questions asked by the user to the nodes are queries. Since every node has the same information, users can make the same queries to every node and get the same answer. This means that making a query only involves the user initiating the query and the node being used, saving resources by not bothering the other nodes in the network.

Nodes Gossiping around

Why would someone run a node?

Now, why would someone run a node? What incentives does the network provide for people to stake Hbar? First, let’s recap what a node does: it stakes Hbar to grow the network, it processes transactions, connects users to smart contracts, and it enables users to make queries. Each of these services has different incentives. In the case of staking, for example, the network gives nodes a reward that is proportional to the benefit they provide to the network: the more you stake, the more you are rewarded. There is a limit on how much can be staked per node. This ensures that there is a large number of nodes, rather than a few large ones. Why do this? Well, the whole point of making a decentralized network is for it to be decentralized. If the network is made up of very few large nodes, how decentralized is it really? For processing transactions, the node is given a fee from the user for the resources spent. This fee is given to the node beforehand, and the node does not compete with other nodes to make a transaction (as is done in the blockchain). You can read more about the transactions business model here. When a node gives user access to a smart contract, the user pays the node a micropayment. The user also pays the node for the maintenance of the smart contract. Charging for smart contracts is important, as it incentivizes users to make good decisions around what contracts they make. Good decisions lead to less smart contracts which reduce the strain on the network. Charging also ensures that those spending resources on the network pay for those resources. Lastly, the nodes are paid by the user for answering their questions (making queries). The amount charged depends on what is being asked: how large or complex the information is.

What if someone wants to attack the network?

Not all nodes on the system are benevolent. As in any economy, Hedera foresees there being ill-intentioned, “malicious” nodes. These nodes could do anything from sending false transactions to other nodes to attempt to alter leger information. What false transactions entail is attempting to gossip a transaction that has not happened or that has not happened in the way that the malicious node says it did. Given the consensus procedure, in which all nodes maintain the same ledgers and agree on each others’ content, the malicious node’s information about false transactions would automatically be disproven by other nodes and would not be added to the leger.

Other types of nodes

While users must cover the costs of most of their activities on HH, there is one component that is free: mirror nodes. As their name implies, mirror nodes are copies of the nodes on the HH. They hold the same information that is held by the nodes on the mainnet. Given that they are not on the mainnet, they do not slow down the network. It is anticipated that the mirror nodes will grow much faster than the nodes on the mainnet, given the relative liberty they propose. While the nodes are free to run, in the sense that they do not have to pay anything to the network, any payable service can be built on these nodes. Mirror node runners can store specific categories of information, for example, which it can then sell to users at a lower cost than on the mainnet. This information will still have the stake proofs that verify that the nodes agreed with the information at a certain time. Users could then go to these mirror nodes for information such as proof of payment which could be used in court or other arbitration.

Other mirror node runners might be interested in doing data analytics on the historical trends on the HH. In order to minimize cost for the mirror node runners, mirror nodes could share information queried from the mainnet based on a mutual help understanding. Those mirror nodes who don’t share information, consequently, would not be given free information from other mirror nodes.

Learn more about Hashing Systems

Stay up to date! For more Hashgraph insights, feel free to read more of our Medium articles, visit our website, or even join our mailing list. We look forward to connecting with you!

--

--