A consensus mechanism is a fault-tolerant mechanism that is used in computer and blockchain systems to achieve the necessary agreement on a single data value or a single state of the network among distributed processes or multi-agent systems, such as with cryptocurrencies.
The consensus mechanism works to solve a fundamental problem in distributed computing and multi-agent systems, which is to achieve system reliability in the presence of faulty processes, which requires coordinating processes to reach consensus. With blockchain generally being a distributed compute environment, a mechanism to achieve consensus that is also fault-tolerant is necessary. These protocols work to synchronize all nodes in a network and achieve consensus among those nodes on transactions to ensure legitimacy and add to the blockchain. Further, consensus mechanisms work to ensure validity and authenticity of transactions on the network.
The consensus mechanism works to solve a fundamental problem in distributed computing and multi-agent systems, which is to achieve system reliability in the presence of faulty processes, which requiredrequires coordinating processes to reach consensus. With blockchain generally being, generally, a distributed compute environment, a mechanism to achieve consensus, that is also fault-tolerant, is necessary. These protocols work to synchronize all nodes in a network and achieve consensus among those nodes on transactions to ensure legitimacy and add to the blockchain. Further, consensus mechanisms work to ensure validity and authenticity of transactions on the network.
This is in contrast to a centralized system, wherein which any administrator or related authorized role is given authority by the system to maintain and update the database, and maintain genuine records. But in a public blockchain, the system is decentralized and intended to be self-regulating, without a single authority, and involving contributions from hundreds of thousands of participants working on verification and authentication of transactions across the network. The consensus mechanism is thus necessary to ensure the transactions are genuine and all participants agree on the authenticity, or provide a consensus.
From the perspective of consensus mechanisms, there are essentially two types of blockchains. The first is a permissionless blockchain, which allows anyone to read the chain and make legitimate changes. This offers an open, permissionless, or public blockchain that does not need to guard against bad actors and has no access control, allowing anyone to add to the network without approval or trust of others.
The second type, broadly speaking, is the permissioned blockchain, which is a closed ecosystem that invites members to keep a copy of the ledger. This type of blockchain uses access control layers to govern access to the network, and validators on a private blockchain are vetted by the network owner. Instead of relying on network effect, a permissioned blockchain relies on consensus mechanisms to validate and authenticate the truth.
This means the consensus protocol has three basic steps: theThe first step is endorsement, which determines whether to accept or reject a transaction;. The second is ordering, which sorts transactions into a sequence based on a first-come basis;. And andthe third is validation, which verifies and validates the transaction. Further, this in part describes what the objectives of a consensus mechanism are:
The advantages of a consensus mechanism isare the chance to form agreements foundational in some ways to the cryptocurrency market, as consensus mechanisms synchronize data between users to enable trust in the blockchain. The consensus mechanism creates a secure environment. And a consensus mechanism allows anyone to participate, with most mechanisms having very low barriers to individuals participating as a miner or operating their own node.
The disadvantages of a consensus mechanism include the energy usage of the process, which can be an energy-intensive process, requiring a large amount of electricity, whichand can in turn raise fees on a blockchain and increase the emissions of the blockchain. As well, depending on the consensus mechanism, and the way in which it is used, there is a chance for a type of hack called a "51 percent attack," among other minor weaknesses.
The Byzantine Generals' Problem described communication problems generals may have when deciding their next move. In the problem, each general is assumed to have their own army which is situated in different locations around the city they are attacking. In the problem, the generals either need to attack or retreat, with the problem not caring which action is taken, but rather concerned with the generals reaching consensus to execute in coordination. Therefore, the problem requires each general to decide whether to attack or retreat, without possibility for changing the decisions, and has to be agreed on and executed in a synchronized manner.
The Byzantine Generals' Problem describes communication problems generals may have when deciding their next move. In the problem, each general has its own army, which is situated in different locations around the city they are attacking. In the problem, the generals either need to attack or retreat. The problem is not regarding which action is taken, but rather it is concerned with the generals reaching consensus to execute in coordination. Therefore, the problem requires each general to decide whether to attack or retreat, without possibility for changing the decisions, and has to be agreed on and executed in a synchronized manner.
And, forFor a transaction to be successfully registered on the ledger and added to a block, a consensus has to be achieved betwenamong all nodes, which distributes responsibility across all nodes and node operators. This allows the mechanism to work even in the evenevent of one or more nodes failing to accomplish their tasks.
There are various types of mechanisms, and the mechanism used tends to depend on what the blockchain is attempting to achieve, and who the blockchain may cater to. For example, a blockchain trying to be as open as possible may choose a consensus mechanism that is as open and egalitarian as possible, while a blockchain trying to scale and offer faster transaction times to compete with centralized payment processors may choose a consensus mechanism that enables those capabilities and use authorized validators. Further, blockchains being developed by foundations or companies may develop their own proprietary mechanisms, which may be very similar to the below mechanisms, to achieve a specific result.
In a Proof of Work (PoW) network, miners are the entities who achieve consensus. These individuals collect transactions that are forwarded to them through the P2P network and save them in a memory pool. While collecting those transactions, they verify them according to the protocol and add them to the block they are working on a the time. As part of the PoW consensus mechanism, the miner also has to solve a computationally expensive puzzle. The miner in the network who solves the puzzle first broadcasts the block to the network to extend the blockchain by that one block. The miner then receives a coin for their work, and writes the history of the blockchain.
In a Proof of Stake (PoS) blockchain, there are entities collecting transactions and creating new blocks, but through a different process than PoW. In a PoS blockchain, validators forge blocks, rather than miners. The chance of validating a new block is proportional to the stake a validator has, with the stake referring to the coins the validatoruser has locked up to be validator. To become a validator, a user sends funds to be locked into a deposit called the validator pool, and the funds are only released if the validator acts according to the rules of the protocol, which means. ifIf the validator includes fraudulent transactions in their block, they lose their stake and the right to forge blocks in the future.
While computational power is the limited resource in the PoW environment, in PoS the limited resourcesresource is the native currency of the blockchain. The more money a validator stakes, the highergreater chancesthe chance of validating, while most PoS stake blockchains do not provide a block rewardsreward, with the incentive for the validator being on the collection of transaction fees of each transaction.
Proof of Activity (PoA) is a combination of the Proof of Work and Proof of Stake protocols. thatIt allows participants to mine and stake tokens to validate blocks. Under most PoA setups, miners compete to mine new blocks for token rewards but; these blocks do not include transactions, but instead are empty templates embedded with a transaction title and block reward address. The information is in the transaction title and block reward address. This is then used to randomly select a validator node to sign the block and confirm it to the blockchain ledger, with only valid token holders eligible to act as validators. The resulting network security fee is split between miners and validators in processing and signing the block.
Not to be confused with Proof of Activity, Proof of Authority (PoA) uses what is called a reputation-based model to help validate transactions and generate new blocks. In the mechanism, a validator is selected and approved by other network participants to act as moderators of the system. Validators are typically institutional investors or other strategic partners in the blockchain ecosystem who have a stated and vested interest in the long-term success of the network, and, further, are willing to disclose their identities for the sake of accountability. Some reframe this as, rather than staking financial capital, PoA requires validators to stake social capital.
Due to the selection process for validators, PoA blockchain areis often considered semi-centralized by nature, with the number of validators being limited by nature, but allowing these blockchain to achieve a high level of scalability.
Proof of Burn (PoB) is a consensus mechanism that requires miners to "burn" the coins held by miners to grant them mining rights. This gives the miners a proportional right to mine new blocks and verify transactions, with the more tokens burned, the highergreater chance the miner is picked as the next block validator. This is intended to demonstrate a dedication to the network through the token destruction rather than computational power. Miners in a PoB blockchain are able to operate using less energy than classic PoW systems require.
Proof of Capacity (PoC) is a consensus mechanism that allows mining devices in the network to use available hard drive space to decide mining rights and validate transactions, rather than using computational power as in PoW or the miner's stake as in PoS. Under PoC, a list of possible mining solutions areis stored in a mining device's hard drive before any activity occurs, and the more storage capacity a miner has the higher the chance the miner is able to match the required hash value of a new block generation cycle. The protocol was designed to avoid the energy inefficiencies of PoW mechanisms, and to avoid the hoarding incentives in PoS configurations.
Proof of Contribution (PoCo) relyrelies on specialized algorithms to monitor the contributions of active nodes within a network during each consensus round, and awards the right to generate the next block the node or nodes with the highest contribution value. Within PoCo, everevery action is assigned a specific confidence threshold required for the calculation tied to the action to be validated by the network.
The Proof of Elapsed Time is a process that decides the producer of a new block based on the time the individual has spent waiting. The mechanism provides a random wait time for each user, and the user whose wait time finishes earliest produces a new block. The consensus mechanism works best when the system can verify that users are not able to run multiple nodes and the wait time is truly random.
Proof of Identity uses a private key of a user, which is compared to an authorized identity. This mechanism essentially uses cryptographic evidence for a user's private key, which is in turn cryptographically attached to a specific transaction. Any identified user from a blockchain node can create a block of data that can be presented to anyone in the network, while the Proof of Identity mechanism ensures the integrity and authenticity of created data. This mechanism has been suggested to be used in smart cities in blockchain consensus mechanisms to verify the identity of citizens.
The Proof of Importance (PoI) mechanism incorporates additional factors, other than capital requirements as in a traditional PoS consensus, when weighing a node's level of on-chain influence. The exact criteria for this varies between PoI mechanisms,; many borrow features from consensus algorithms used in network clustering and page ranking, such as the number of transfers a node has participated in over a period of time, and the degree to which different nodes are interlinked via clusters. PoI is intended to help mitigate the risk of excess concentration of agency and wealth on a blockchain network. Since each node's importance score is dynamic and based on network activity, it also works to discourage wasteful forks, which would require users to expand resources to remain active on both forked networks in order to maintain their score.
Proof of Storage relies on data instead of financial staking, with the protocol mainly used in networks wherein which decentralized data storage capabilities are most important. Under Proof of Storage, a new node being selected to mine new blocks is determined by the amount of data storage the node has actively contributed to the network. This is a similar protocol to Proof of Stake, using data storage services rather than tokens to reward users.
A consensus mechanism is a fault-tolerant mechanism that is used in computer and blockchain systems to achieve the necessary agreement on a single data value or a single state of the network among distributed processes or multi-agent systems, such as with cryptocurrencies.
The consensus mechanism works to solve a fundamental problem in distributed computing and multi-agent systems, which is to achieve system reliability in the presence of faulty processes, which required coordinating processes to reach consensus. With blockchain being, generally, a distributed compute environment, a mechanism to achieve consensus, that is also fault-tolerant, is necessary. These protocols work to synchronize all nodes in a network and achieve consensus among those nodes on transactions to ensure legitimacy and add to the blockchain. Further, consensus mechanisms work to ensure validity and authenticity of transactions on the network.
This is in contrast to a centralized system, where any administrator or related authorized role is given authority by the system to maintain and update the database, and maintain genuine records. But in a public blockchain, the system is decentralized and intended to be self-regulating, without a single authority, and involving contributions from hundreds of thousands of participants working on verification and authentication of transactions across the network. The consensus mechanism is thus necessary to ensure the transactions are genuine and all participants agree on the authenticity, or provide a consensus.
From the perspective of consensus mechanisms, there are essentially two types of blockchains. The first is a permissionless blockchain, which allows anyone to read the chain and make legitimate changes. This offers an open, permissionless, or public blockchain that does not need to guard against bad actors and has no access control, allowing anyone to add to the network without approval or trust of others.
The second type, broadly speaking, is the permissioned blockchain, which is a closed ecosystem that invites members to keep a copy of the ledger. This type of blockchain uses access control layers to govern access to the network, and validators on a private blockchain are vetted by the network owner. Instead of relying on network effect, a permissioned blockchain relies on consensus mechanisms to validate and authenticate the truth.
This means the consensus protocol has three basic steps: the first step is endorsement, which determines whether to accept or reject a transaction; ordering, which sorts transactions into a sequence based on a first-come basis; and validation, which verifies and validates the transaction. Further, this in part describes what the objectives of a consensus mechanism are:
The advantages of a consensus mechanism is the chance to form agreements foundational in some ways to the cryptocurrency market, as consensus mechanisms synchronize data between users to enable trust in the blockchain. The consensus mechanism creates a secure environment. And a consensus mechanism allows anyone to participate, with most mechanisms having very low barriers to individuals participating as a miner or operating their own node.
The disadvantages of a consensus mechanism include the energy usage of the process, which can be an energy-intensive process, requiring a large amount of electricity, which can in turn raise fees on a blockchain and increase the emissions of the blockchain. As well, depending on the consensus mechanism, and the way in which it is used, there is a chance for a type of hack called a "51 percent attack" among other minor weaknesses.
The technology and concept behind the consensus mechanism is based on the theoretical Byzantine Generals' Problem outlined by computer scientists in 1982. The problem asks whether it is possible to form a consensus in a computer network composed of independent, geographically distributed nodes.
The Byzantine Generals' Problem described communication problems generals may have when deciding their next move. In the problem, each general is assumed to have their own army which is situated in different locations around the city they are attacking. In the problem, the generals either need to attack or retreat, with the problem not caring which action is taken, but rather concerned with the generals reaching consensus to execute in coordination. Therefore, the problem requires each general to decide whether to attack or retreat, without possibility for changing the decisions, and has to be agreed on and executed in a synchronized manner.
Another wrinkle in the problem is that it assumes one general is only able to communicate with another through messages forwarded by a courier, which in turn can see those messages delayed, destroyed, or lost. Perhaps worse, the problem also considers the possibility that a general may choose to act maliciously and send a fraudulent message to confuse other generals and cause failure.
The consensus mechanism or consensus algorithm is blockchain's solution to the Byzantine Generals' Problem, offering what is known as Byzantine fault tolerance (BFT), which can be described as the property of a system that is able to resist the class of failures derived from the problem. Which means a BFT system should be able to continue operating even if some nodes fail or act maliciously. There are different approaches to solve this problem, which leads to the plethora of consensus mechanisms.
Consensus mechanisms are a part of the security of a blockchain network, as they allow for the distributed management and validation of numerous transactions in a matter of seconds, while also reducing the need of a vulnerability such as a centralized database or a single authority. The consensus mechanism instead uses systems of validators responsible for weeding out invalid transactions.
And, for a transaction to be successfully registered on the ledger and added to a block, a consensus has to be achieved betwen all nodes, which distributes responsibility across all nodes and node operators. This allows the mechanism to work even in the even of one or more nodes failing to accomplish their tasks.
In a cryptoeconomic system, a consensus mechanism also can help prevent certain types of economic attacks. In theory, such an attack can occur if an attacker controls 51 percent of the network. However, the consensus mechanism is designed to make this kind of "51 percent attack" unfeasible.
There are various types of mechanisms, and the mechanism used tends to depend on what the blockchain is attempting to achieve, and who the blockchain may cater to. For example, a blockchain trying to be as open as possible may choose a consensus mechanism that is as open and egalitarian as possible, while a blockchain trying to scale and offer faster transaction times to compete with centralized payment processors may choose a consensus mechanism that enables those capabilities and use authorized validators. Further, blockchains being developed by foundations or companies may develop their own proprietary mechanisms, which may be very similar to the below mechanisms, to achieve a specific result.
In a Proof of Work (PoW) network, miners are the entities who achieve consensus. These individuals collect transactions that are forwarded to them through the P2P network and save them in a memory pool. While collecting those transactions, they verify them according to the protocol and add them to the block they are working on a the time. As part of the PoW consensus mechanism, the miner also has to solve a computationally expensive puzzle. The miner in the network who solves the puzzle first broadcasts the block to the network to extend the blockchain by that one block. The miner then receives a coin for their work, and writes the history of the blockchain.
This means the computational power of the PoW-based blockchain is a limited resource. It takes real-world resources, such as computational hardware and electricity, to mine a cryptocurrency. It also creates a highly competitive environment, in which each miner works to increase their computational power or hash rate, but this also keeps the chances of a single actor controlling the majority of the hash rate low. PoW works then because the puzzle is optimization-free and approximation-free, meaning there is no shortcut to find the correct answer, and because it is not possible to have a part of the solution or to be close to solving the problem, making the problem a binary situation.
In a Proof of Stake (PoS) blockchain, there are entities collecting transactions and creating new blocks, but through a different process than PoW. In a PoS blockchain, validators forge blocks, rather than miners. The chance of validating a new block is proportional to the stake a validator has, with the stake referring to the coins the validator has locked up to be validator. To become a validator, a user sends funds to be locked into a deposit called the validator pool and only released if the validator acts according to the rules of the protocol, which means if the validator includes fraudulent transactions in their block, they lose their stake and the right to forge blocks in the future.
While computational power is the limited resource in the PoW environment, in PoS the limited resources is the native currency of the blockchain. The more money a validator stakes, the higher chances of validating, while most PoS stake blockchains do not provide a block rewards, with the incentive for the validator being on the collection of transaction fees of each transaction.
The Delegated Proof of Stake (DPoS) mechanism has been considered a more democratic development of the PoS mechanism. In DPoS, those with the highest amount of tokens are not authorized to confirm or validate transactions. Instead, all token owners select a group of delegates to perform this task, with the mechanism remaining decentralized as all users in the network have a chance to select the validators responsible for confirming transactions. This mechanism is also considered to have a higher speed of verification and transactions than traditional PoS, although this comes at the higher amount of centralization in the mechanism.
Proof of Activity (PoA) is a combination of the Proof of Work and Proof of Stake protocols that allows participants to mine and stake tokens to validate blocks. Under most PoA setups, miners compete to mine new blocks for token rewards but these blocks do not include transactions, but instead are empty templates embedded with a transaction title and block reward address. The information in the transaction title and block reward address. This is then used to randomly select a validator node to sign the block and confirm it to the blockchain ledger, with only valid token holders eligible to act as validators. The resulting network security fee is split between miners and validators in processing and signing the block.
The PoA mechanism is intended to lower the chance of a 51 percent attack, as it is almost impossible to predict which validators will sign a block in a future iteration, and competition between miners and validators helps to strike an effective balance between network participants. However, the system still suffers some of the criticisms of PoW and PoS, such as the amount of energy required to mine blocks and the major token holders still having a higher chance of signing new transactions.
Not to be confused with Proof of Activity, Proof of Authority (PoA) uses what is called a reputation-based model to help validate transactions and generate new blocks. In the mechanism, a validator is selected and approved by other network participants to act as moderators of the system. Validators are typically institutional investors or other strategic partners in the blockchain ecosystem who have a stated and vested interest in the long-term success of the network, and, further, are willing to disclose their identities for the sake of accountability. Some reframe this as, rather than staking financial capital, PoA requires validators to stake social capital.
Due to the selection process for validators, PoA blockchain are often considered semi-centralized by nature, with the number of validators being limited by nature, but allowing these blockchain to achieve a high level of scalability.
Proof of Burn (PoB) is a consensus mechanism that requires miners to "burn" the coins held by miners to grant them mining rights. This gives the miners a proportional right to mine new blocks and verify transactions, with the more tokens burned, the higher chance the miner is picked as the next block validator. This is intended to demonstrate a dedication to the network through the token destruction rather than computational power. Miners in a PoB blockchain are able to operate using less energy than classic PoW systems require.
Proof of Capacity (PoC) is a consensus mechanism that allows mining devices in the network use available hard drive space to decide mining rights and validate transactions, rather than using computational power as in PoW or the miner's stake as in PoS. Under PoC, a list of possible mining solutions are stored in a mining device's hard drive before any activity occurs, and the more storage capacity a miner has the higher the chance the miner is able to match the required hash value of a new block generation cycle. The protocol was designed to avoid the energy inefficiencies of PoW mechanisms, and to avoid the hoarding incentives in PoS configurations.
Proof of Contribution (PoCo) rely on specialized algorithms to monitor the contributions of active nodes within a network during each consensus round, and awards the right to generate the next block the node or nodes with the highest contribution value. Within PoCo, ever action is assigned a specific confidence threshold required for the calculation tied to the action to be validated by the network.
Within the PoCo mechanism, users wishing to perform an on-chain computation must stake a security deposit, and each contribution is a function of that user's historical track record and staking amount, and the accuracy of the user's calculated result for any given action. For each consensus round, the computation results are proposed by a series of eligible users until a result with a confidence level required by the computation's requisite confidence threshold is proposed. The nodes that compute the validated results are then rewarded with the transaction fee from the user who requested the on-chain action.
The Proof of Elapsed Time is a process that decides the producer of a new block based on the time the individual has spent waiting. The mechanism provides a random wait time for each user and the user whose wait time finishes earliest produces a new block. The consensus mechanism works best when the system can verify that users are not able to run multiple nodes and the wait time is truly random.
The Proof of History protocol uses a built-in historical record to prove the moment in time at which every on-chain event occurred. Rather than requiring multiple validators to agree on when each transaction has taken place, the PoH maintains an internal clock by encoding the passage of time in a simple SHA-256 sequential hashing verifiable delay function. This allows the network to ignore local clocks and accommodate all potential network delays on their own time, which can allow for the efficient delivery and reassembly of transaction data without requiring block confirmations across the network. This can give a blockchain fast confirmation times without sacrificing security.
Proof of Identity uses a private key of a user which is compared to an authorized identity. This mechanism essentially uses cryptographic evidence for a user's private key, which is in turn cryptographically attached to a specific transaction. Any identified user from a blockchain node can create a block of data that can be presented to anyone in the network, while the Proof of Identity mechanism ensures the integrity and authenticity of created data. This mechanism has been suggested to be used in smart cities in blockchain consensus mechanisms to verify the identity of citizens.
The Proof of Importance (PoI) mechanism incorporates additional factors, other than capital requirements as in a traditional PoS consensus, when weighing a node's level of on-chain influence. The exact criteria for this varies between PoI mechanisms, many borrow features from consensus algorithms used in network clustering and page ranking, such as the number of transfers a node has participated in over a period of time, and the degree to which different nodes are interlinked via clusters. PoI is intended to help mitigate the risk of excess concentration of agency and wealth on a blockchain network. Since each node's importance score is dynamic and based on network activity, it also works to discourage wasteful forks, which would require users to expand resources to remain active on both forked networks in order to maintain their score.
Proof of Storage relies on data instead of financial staking, with the protocol mainly used in networks where decentralized data storage capabilities are most important. Under Proof of Storage, a new node being selected to mine new blocks is determined by the amount of data storage the node has actively contributed to the network. This is a similar protocol to Proof of Stake, using data storage services rather than tokens to reward users.
A consensus mechanism is a fault-tolerant mechanism that is used in computer and blockchain systems to achieve the necessary agreement on a single data value or a single state of the network among distributed processes or multi-agent systems, such as with cryptocurrencies.
A consensus mechanism is a fault-tolerant mechanism that is used in computer and blockchain systems to achieve the necessary agreement on a single data value or a single state of the network among distributed processes or multi-agent systems, such as with cryptocurrencies.