internet

Distributed Systems Consensus Protocols

Posted On
Posted By admin

With the introduction of many types of cryptocurrencies and the public’s acceptance of them in recent years, experts have focused on distributed ledger technology (DLT) as the basic foundation of digital tokens such as Bitcoin. It has resulted in the invention and execution of diverse ideas in this field, each with its own set of benefits and drawbacks. The public consensus in a distrustful environment is one of the most difficult difficulties in DLT. True information is determined by public consensus, and the network is protected from malevolent activity. The “consensus protocol” refers to the procedures used in DLT to achieve this consensus. Two algorithms, Proof of Work (PoW) and Proof of Stake (PoS), make up one of the most basic means of attaining consensus in DLTs based on Blockchain.

In contrast to Blockchain, a structure known as Tangle has been proposed to form DLT. Tangle, unlike Blockchain, does not have a chain of blocks and achieves agreement in a different way. Tangle offers certain advantages and disadvantages when compared to Blockchain, which will be discussed in the following sections.

Blockchain Consensus

Each block in the Blockchain structure contains some transactions. Miners create blocks, which are then added to the block chain. The connections between the blocks (i.e., the chain between the blocks) are provided by the preceding block’s outcome in constructing the current block. PoS and PoW are two well-known methods for achieving agreement and consensus in these organizations. As of now, Bitcoin and Litecoin employ PoW as agreement protocols in Blockchain architecture, while Ethereum and Dash use PoS. In the Blockchain construction, a portion of the chain of blocks is represented in figure (1). Each transaction is represented by a circle in this diagram, and the block’s transaction integrity is calculated using Merkle root.

x

Protocol Pow

The miners compete in this protocol to determine the answer to a math problem. The miner that solves the difficulty announces his or her solution along with the new block. In this protocol, finding the answer to a math problem is costly and time-consuming, but investigating the correctness of the result is simple. To keep the rate of generating new blocks consistent, the difficulty level of this challenge can be adjusted. For Bitcoin, this rate is ten minutes, and for Litecoin, it is two and a half minutes. The odds, in addition to difficulty, have a role in determining the response, and the miner, which will generate a new block, cannot be defined ahead of time. The miners in this competition must identify the amount that, after applying the PoW protocol function to it, produces the defined conditions as the target. Different variants of the hash algorithm are utilised in PoW’s functions. Various versions of this protocol have been created and implemented at this time, the most well-known of which is Hashcash. Hashcash is used by both Bitcoin and Litecoin; however, Bitcoin uses the SHA-256 hash algorithm, while Litecoin uses the scrypt hash algorithm. It is evident from what has been discussed that substantial calculation resources are spent in PoW protocols on confirming transactions, producing new coins, and adding a block to the Blockchain.

On the one hand, as the difficulty of issues grows over time, more calculation power is required. When there are more cost-effective techniques, experts believe PoW is a waste of resources. On the other hand, the attacker’s ability to tamper with Blockchain is nearly impossible because to the tremendous calculation power. In PoW, different Blockchain branches may be created; in this instance, the branch that is longer will be more reliable.

PoS Protocol

It is one of the most widely used Blockchain protocols, and it uses a different way than PoW to reach an agreement on the generation of a new block. The agreement condition for creating new blocks is the quantity of miners’ assets (the amount of digital tokens possessed). As a result, miners should participate in the competition by purchasing digital tokens as part of the process of confirming transactions and generating new blocks via investment. As a miner’s asset grows, so does his or her likelihood of mining a new block and getting a reward and fee.

Learn the basics of blockchain technology. From Zeppelin to Address and everything in between. Here’s the full list of terms you need to be aware of.

Overall, a miner with the biggest asset has no assurance of being chosen. The most significant distinction between PoW and PoS is that the mining operation does not require any calculation resources. As a result, PoS is referred to as “Environment-Friendly.” This structure’s competitiveness criterion in PoS will make it more profitable for whales.

Tangle

Tangle is seen as the next generation of distributed ledger technology. The Directed Acyclic Graph (DAG) has been used to develop this technology (DAG). Because it lacks a block-like structure, it is also known as Blockless Blockchain. In DLT, such graphs allow a lot of flexibility without adding any further costs. Railblocks and Hedera-Hashgraph are two notable implementations of this concept that are currently in use. IOTA is the most well-known coin created using the Tangle topology.

Cyclic graphs are those that can be begun at one node and then returned to that node after going through the other nodes. Given this, acyclic graphs aren’t fond of such paths. By directed graph, we mean that its edges are directed in such a way that you may only go in one direction; the directions are one-way. Figure 2 depicts an example of acyclic directed graphs.

az

The nodes of Tangle’s DAGs are transactions, while the edges are their confirmations. The new transaction is added to the graph as a new node. This new node is linked to two existing nodes in the graph. The direction of this link is from the new node to the two previously confirmed nodes. This link implies that those two transactions, as well as all subsequent transactions, are confirmed. The confirmation process is carried out by the person who requests the new transaction, and it ensures that the balance of all accounts is not negative. The earliest transactions in this framework are referred to as “Genesis” and are concerned with the creation of digital tokens. As a result, no new blocks will be introduced to the network under such a configuration. “Parent transactions” are transactions that a transaction confirms directly (by connecting directly), while “child transactions” are transactions that they confirm. Before confirming his or her transaction, the user must confirm two unconfirmed transactions from the graph; the process of picking these two transactions is known as “Tip selection.” This procedure begins with the selection of a genesis and concludes with a random movement at the edge’s tip. To add his or her transaction to the graph, it is natural for the user to execute tip selection twice. According to what has been stated, the Tangle structures do not have a miner, hence no fee is deducted for transaction confirmation. In the Tangle structure graph depicted in figure (3), an example of communications between transactions is shown.

Green nodes represent genesis transactions, red nodes represent tips (transactions awaiting confirmation), and blue nodes represent confirmed transactions. When a transaction is confirmed directly or indirectly by other transactions, it becomes part of the consensus and cannot be tampered with.

xx

 

Transactions that have been confirmed directly and indirectly via purple transactions are shown in orange in figure (4). The cumulative weight of a transaction is determined by the number of transactions that confirm it, and the transactions become more valid as this number grows. In Tangle, this feature greatly minimises the probability of a double-spending strike.

c

 

Finally, based on the characteristics of Blockchain and Tangle, the following benefits for Tangle technology as a special type of distributed system may be identified:

  • There is no limit to adding a new user to Tangle, and growing the number of requests contributes to an improvement in its speed, because new transactions confirm previous transactions, whereas increasing the number of requests in Blockchain stretches the waiting line to be confirmed.
  • Because each block in Blockchain can only hold a certain amount of transactions, the network’s transaction confirmation rate is limited. The transaction confirmation rate in a blockless Tangle structure, on the other hand, is unconstrained.
  • Confirming transactions and maintaining account balances is done with the help of all users. Each user that requests the execution of a new transaction should check the validity of previous transactions. Because of this approach, the network will no longer require a miner due to network public involvement, and there will be no need to pay fees to confirm the transaction.
  • In Blockchains such as Bitcoin, paying a charge allows transactions with extremely little amounts to confront the problem. The transaction fee for paying for a cup of coffee with Bitcoin, for example, may be higher than the charges for the original commodity (or service). Because of this, the use of a cryptocurrency for simple daily transactions is uneconomical (transactions with the very little amount, which are called micro-transactions). As a result, Tangle will be a more cost-effective alternative to Blockchain.
  • One of the developers’ claims to fame as the most recent well-known structure is its resistance to quantum attacks. Such attacks make use of quantum computers’ extreme processing power and give the attacker the ability to reverse the hash function. As a result, many experts believe that creating quantum computers in the future will increase the likelihood of tampering with Blockchain, while IOTA developers claim that employing the Winternitz One-Time signature in this structure will reduce the risk of quantum assaults on IOTA.

Despite all of Tangle’s good attributes, IOTA’s implementation sample contains a critical flaw. An attacker who controls 33% of the network’s hash rate can do whatever he wants with it. To address this flaw, IOTA uses a unique node called “Coordinator” to broadcast transactions called “Milestone.” This node is part of the IOTA Foundation and is responsible for network security. The presence of a coordinator raises concerns about a distributed network and, in some ways, creates a central management structure for it. Increasing the network hash rate by increasing the number of users is the simplest way to eliminate the coordinator. IOTA founder, on the other hand, succeeded in reducing reliance on coordinator in May 2019 by creating a research council and presenting a solution called as Coordicide. Offering this solution elicited a good response from the market, increasing the value of each IOTA digital token.

Written by Pooyan Ghamari

Founder of Counos Platform

Other projects;

Counos Exchange

Xbit Project