Evolution of consensus mechanisms: from classical methods to local consensus
Part 2: Nakamoto Consensus Mechanisms
The consensus mechanism is the cornerstone of distributed technology, such as the blockchain. Since the decentralized nature of systems based on such technologies does not provide for a single center to validate transactions, we must have a mechanism that, on the one hand, allows us to reliably perform this function, and on the other, has a distributed nature. In other words, such a mechanism should provide confirmation of the validity of the transaction each time by reaching an agreement between all network participants (or rather all active participants — full nodes) on this issue, providing protection against a possible double-spend problem, and ideally providing the immutability of blockchain’s distributed ledger.
In the first part of this series of articles, we examined in detail the classical methods of achieving consensus. Here we will consider the Nakamoto consensus mechanism used in the modern decentralized blockchain systems.
Nakamoto Consensus Mechanisms
Here we will discuss different ways to achieve consensus in the modern blockchain systems. Their main shared feature is the presence of some kind of “difficulty” (work, resource, asset, etc.), which a network member must “invest” in order to be able to create a new block. At the same time, other members of the network should be able to easily verify that the work was actually done. The presence of this “difficulty” or spent resource, as well as its verifiability, must guarantee the security of the network by increasing the price of a possible attack.
Now let’s look deeper into various approaches to solving this problem.
Proof of Work (PoW)
The Proof of Work is one of the first and still the most widely implemented consensus algorithms for modern blockchain systems. It’s used, in particular, in the Bitcoin, Ethereum and Litecoin networks, among many others. Theoretical substantiations of the method appeared in the late 1990s.
The essence of the mechanism is that to confirm the transaction, the network participant (the miner) must solve a complex cryptographic puzzle that requires significant computational resources; but which, however, other participants can easily verify. The block generation process is random and competitive, and it’s impossible to predict which of the participants will be the first to generate the necessary data. This is influenced by the variable complexity of finding the right solution to the puzzle (automatically adjusted to limit the generation rate of a new blocks to, for example, no more than once per every 10 minutes, as it is the case with Bitcoin), as well as the amount of computational resources that a particular miner applies.
Thus, each generated block is the evidence that some computational work has been done to create it. In addition, each generated block contains a hash of the preceding block. So, the latest block in the blockchain represents the entire preceding blockchain in its clear linear sequence of blocks. This is what protects the system from an unauthorized changes, because, in order to be able to change something in a past transaction, it would be necessary not only to re-do the work of calculating the required block but also to recalculate all the following blocks, which seems nearly impossible (or rather very difficult) to perform because of the high costs of such a task.
Incentivization of the participants who perform this work for the network goes like this: a miner receives a reward for a successful operation in the form of coins issued by the system (this is how cryptocurrency issuance happens in the Bitcoin and other blockchain systems based on the Proof of Work), and also with the help of transaction fees (this, however, is optional and not a fundamental part of actual PoW method).
Despite its effectiveness and reliability, this method of reaching a consensus requires a large amount of both computational resources and electrical energy. And alongside the increase in the number of network participants, transactions, and competition among miners, (and hence the difficulty of finding the right solution), the amount of resources spent on the functioning of the consensus based on PoW is constantly growing.
This leads to the fact that systems based on the Proof of Work method have serious problems with scalability. It’s quite possible that its use will be very difficult (or even impossible) to sustain in the future, due to the increase in the number of resources required for it.
There is also the argument that the use of pure Proof of Work can lead to a decrease in network security with a decreasing mining award over time (as is the case with Bitcoin). Even with transaction fees in place, many miners will find it unprofitable to support the network and will remove their processing power, which will reduce the complexity of performing PoW tasks and therefore the cost of potential attacks. This includes, for example, the “51% attack”, when a miner theoretically gains control over more than 51% of the hash rate and is thereby able to arbitrarily make changes to the blockchain.
Given these factors, some blockchain systems are moving in the direction of implementing alternative consensus mechanisms or their combinations.
Proof of Stake (PoS)
The Proof of Stake is another type of consensus-building algorithms in the blockchain systems, which appeared in response to the above-mentioned challenges associated with the more common Proof of Work method.
The idea here is based on the assumption that the one who owns the largest number of coins of a blockchain is most interested- in the proper functioning of the corresponding system. Additionally, violators can be punished by confiscating their stakes.
The PoS method works like this: if someone wants to become a block producer (a participant that confirms the validity of transactions), he/she “freezes” a certain amount of his/her own coins for a certain time. Further, a certain process determines which of those who have frozen their coins will sign the next block. The exact mechanism of this process depends on the design of a particular blockchain. In general, it is to some extent random, while also taking into account various factors such as the size of the stake, the time during which the stake remains “frozen”, etc. In other words, a participant with a larger amount of funds, held in the “frozen” state for a longer time, is more likely to produce the next block.
Incentivization of the block producers is carried out similarly to the classical method of PoW: the participant receives his/her reward either in the form of a transaction fee or in the form of a fixed reward created through inflation (the issue of new coins).
The advantage of this method of consensus is that it is much less demanding on external resources, such as computing power and energy, and at the same time provides quite good protection: to make an attack, one would have to acquire ownership rights to the majority (51% or more) of the blockchain’s monetary supply. So, by messing with the system, the attacker risks suffering the greatest consequences, since there is a risk of the blockchain’s cryptocurrency losing value.
In the case of PoW, the miner may not own a portion of the coins of the system, so his/her motivation is only to maximize his/her own profits. But with POS the block producer is obliged to own some of the coins, and therefore is more invested in the correct functioning and development of the corresponding ecosystem.
At the same time, it is believed that using the PoS method in its pure form (i.e. based solely on the use of the internal values of a particular blockchain and without spending external resources) will not provide an adequate level of protection due to the costless simulation problem. The problem is that the coins underlying the stake exist only in this blockchain itself, to which they actually belong. This means that if a party can create a blockchain cheaply, then it can create several copies of the blockchain and then choose one that will be beneficial to it.
Proof of Importance (PoI)
The Proof of Importance is a consensus blockchain mechanism, represented in particular by the NEM project. It works similarly to Proof of Stake: nodes must “freeze” a certain amount of currency in order to have the right to create blocks. The selection of candidates for creating a block is carried out in proportion to the score assigned to them. In PoS, the role of such a ‘score’ is essentially played by the total amount of the stake, but in PoI this scoring system contains more variables. Its calculation is borrowed from the mathematics of network clustering and page ranking.
At a high level, the main variables affecting the rating are the following:
- Net transfers: how much has been spent in the last 30 days, with more recent transactions having more weight.
- Amount of currency allocated to block creation purposes.
- Cluster nodes: accounts that are part of interconnected activity clusters have a slightly greater weight than outbound channels or hubs (which simply link clusters, but are not a part of them).
The goal of introducing the score of importance is to provide an answer to the main problems of the Proof of Stake mechanism.
One risk is that in PoS participants tend to simply accumulate as many coins as possible in order to maximize earnings for blocks production. This contributes to excessive wealth accumulation (hoarding), unneeded “freezing” of value, and overly discourages the use of currency for actual transactions within the network. Therefore, the Proof of Importance method is designed to make so that hoarding leads to the score downgrade, while the actual use of currency — on the contrary, would increase it.
Another risk of conventional PoS is the so-called nothing-at-stake problem. The essence of the problem is the following: since the creation of a block does not require additional resources, in the case of a fork, someone can freely create blocks in both versions of the split blockchain. The PoI method is designed to protect against this kind of development.
Delegated Proof of Stake (DPoS)
The Delegated Proof Of Stake is a faster and more efficient variation of conventional PoS as well as classic BFT algorithms (see Part 1). It is often called “digital democracy” because of its stake-weighted voting system. Such a system is used in EOS, Cardano, BitShares, Steam, WAX, Tezos, and others.
Unlike pure PoS, in DPoS block producers cannot be any single participant, but must rather consist of a limited number of delegates to which other participants can delegate their votes, supported by the number of coins in their possession.
The delegates are individual members or organizations that want to produce blocks and receive appropriate remuneration for this. In general, delegates within the current epoch are those to whom the largest number of votes have been cast (taking into account their stake-reinforced weight); a random queue to issue blocks is set for them. Their number also depends on the design of a particular blockchain using this method: it is either a fixed number (top 101, for instance), or all participants for whom the total number of stake-supported votes exceeds a certain threshold. Such a scheme also provides for a certain rotation of the delegates after the epoch.
The advantage of this consensus mechanism over conventional Proof of Stake is that delegates are not only interested in receiving their payment for performing their immediate functions of new blocks production, but they can also spend these funds on other functions beneficial for the ecosystem’s community (such as, for example, marketing, lobbying the interests of a project, developers’ functions, etc.) This, in turn, encourages ordinary participants to cast their votes precisely to those delegates who, in addition to performing basic functions, bring the greatest benefits to the development of the project, and therefore to the entire community.
Due to the fact that the number of nodes involved in the generation and validation of blocks is limited by certain rules, the capacity of such a network increases significantly, but decentralization suffers. Because of this, in particular, it becomes easier to organize a “51% attack”, which is one of the drawbacks of the DPoS method.
Other disadvantages of the method include the fact that “the rich get richer.” Since the influence on the network depends on how many tokens the participant has, participants with a large amount of currency have more influence on the system than those who have just a few of those. Also, insufficient user activity can lead to the fact that the whole system will not function as it designed to (this, however, applies to any democracy based system, both digital and real-life).
However, the greatest disadvantage of a system based on the DPoS consensus method is the possibility of forming cartels. Delegates can organize themselves in cartels, concentrating on the role of block producers. This makes the system not only less decentralized but also less flexible.
A case in point is the Lisk project, where currently 85% of the total production of the blocks is controlled by two cartels, formed mainly due to the concentration of the power of votes, the high barrier to joining the ranks of delegates, and also the extremely high remuneration for delegates. Thus, delegates have a very high financial motivation, as well as opportunities to influence their own re-election. As a result, largely the same pool of people become delegates, again and again, effectively controlling the creation of new blocks. This led to the formation of an actual oligopoly in this project.
A similar situation is found in the EOS project, where the top 100 accounts own 75% of EOS tokens, and the top 10 accounts own 50%. Analysis of the accounts in question, as well as some public leaks of confidential info, shows that there are also cartel alliances in this project, who de facto control new blocks’ production, as well as other aspects of the network functionality.
Proof of Authority (PoA)
An interesting version of the consensus mechanism, in some sense similar to the Proof of Stake, but rather than relying on the anonymous monetary component, the validator puts his/her real identity at stake — and, accordingly, his/her reputation. This method is suitable for both private and public blockchains.
For the system to work, it must comply with several rules, in particular:
- Identity must be authentic: this means that there must be a standard and reliable process for verifying that validators are really who they say they are.
- The right to be a validator should be difficult to obtain, and therefore be perceived as deserved, valuable and unpleasant to lose.
- The procedure for establishing authority must be the same for all validators so that the network understands the process and can trust its integrity.
To ensure these principles of operation projects employing this consensus mechanism use various systems of on-chain authentication and identity verification, involving legal mechanisms and external databases, rather complex mechanisms and procedures for issuing special licenses for carrying out validation (block production) activities, etc. In cases of identity theft, the system can detect and prevent such abuses; which, moreover, supposedly cannot be widespread.
The disadvantage of this mechanism is its obvious craving for centralization and control because the concept of reputation is in many ways subjective. The question arises: who will evaluate it objectively and how. Of course, it could be the community itself, but this could be quite difficult to achieve for a very large and very distributed anonymous community (as almost all cryptocurrency communities tend to be). However, for smaller and more closed systems such a model may be suitable, although in this case there are questions around whether it would be better to use simpler verification methods for databases.
On the other hand, it is possible that for some special use cases this model could be quite relevant, in particular for those where reputation itself plays an important role and is of particular value.
Proof of Burn (PoB)
Another alternative to the Proof of Work as well as to (D)PoS is the Proof of Burn mechanism. The idea is that the miners must provide evidence of the “burning” a part of their coins (performed in the form of sending them to a special address from which it is impossible to make outbound payments). This action is expensive from the block producer’s individual point of view, therefore it can serve as a PoW analog, which also consumes their resources. However, from the point of view of the real economy, no external resources are spent, except for the underlying digital asset itself.
The existing cryptocurrencies that use this consensus algorithm do not apply it in pure form, but in conjunction with the traditional PoW: a portion of the coins extracted with the help of PoW is “burned”. Thus, in this case, PoW still remains the ultimate source of “work” here; however, the PoB method facilitates the system to balance and optimize the use of real-life resources in the process of reaching consensus.
Proof of Capacity (PoC)
The Proof of Capacity is a consensus mechanism that uses a method called plotting. When using traditional PoW method, miners use computational resources to find solutions to a cryptographic puzzle. In the case of the Proof of Capacity, possible ready-made solutions have already been created in advance and are only stored on a digital medium (such as hard disks). When the local storage of a miner is filled (plotted) with ready-made solutions, it can take part in the process of creating blocks. The block is created by the one who finds the required solution earliest. The larger the size of the storage a miner utilizes, the more possible solutions it can store, and so the more chances to create a new block the miner has.
Proof of Elapsed Time (PoET)
The goal of the Proof of Elapsed Time consensus mechanism is a fair random decision about who can create a new block based on the amount of time he waited. To do this, the system assigns an arbitrary waiting time to each node. A node whose wait time ends first gets the right to create the next block.
This consensus mechanism can work only if there is a system in place that ensures that none of the participants can support the work of multiple nodes at the same time, and also that the assignment of the waiting time is really arbitrary.
In the next part, we will look at sharding and the local consensus, which are forming part of the main Layer 2 and Layer 3 multi-hop projects based on state channels and trustlines.