Decentralized compliance
19.10.2021

Decentralized compliance

By bit.team

There are many consensus mechanisms. Diversity also creates a lot of confusion. Some of the biggest misunderstandings around the blockchain are related to its unreliable nature, according to Ernst&Young analysts. Common misunderstandings start with terminology.

Without Sybil protection, it is impossible to reach consensus

The consensus procedure determines how self-sufficient participants of the blockchain network jointly manage the protocol of decentralized transactions. The overall goal is to identify the authoritative chain and maintain its integrity. Authorized network nodes must re-vote for the blockchain status based on available replicas. Individual participants may receive financial incentives for completing their maintenance tasks.

Proof of Work and Proof of Stake, the two most well-known blockchain-oriented approaches, are not consensus procedures at all, notes Professor Emin Gun Sirer. According to Professor Sirer,Proof-of-Work (POW) andProof-of-Stake (POS) were not consensus procedures, but Sybil’s control mechanisms.

He knows what he’s talking about. As one of the pioneers of cryptography and head of the Department of Computer Science at Cornell University, he is considered an internationally recognized expert in the field of blockchains.

In the case of the Sybil attack, they talk about an attempt to secretly manipulate the behavior of a peer-to-peer network using a series of fake identifiers (for example, using unfair voting rights or echo chamber messages). If the blockchain network reaches consensus as a result of Sybil’s attack, the immutability of the transaction protocol will no longer be guaranteed, which can have serious consequences for the ownership of blockchain-related assets. For this reason, the protection of Sybil is of paramount importance, and is an indispensable element of the consensus mechanism.

“Sybil’s control mechanism, such as PoS, would not be enough to achieve consensus,” Professor Sirer argues. The procedure must first be combined with a protocol such as Practical Byzantine Fault Tolerance (PBFT) or Ben-Or, or Tendermint/Cosmos, or Avalanche to provide a decision-making process. In BTC and BCH, for example, PoW will be applied in combination with the longest chain selection rule. Only in this, or a similar case, can a consensus be found. Even PoW itself does not lead to consensus, but only to limiting the speed of transactions (for example, a suitable measure to prevent spam).

Thus, the consensus mechanism of the blockchain platform, the “decentralized center” of decision-making, should combine two elements: the protocol and the Sybil management mechanism. In the colloquial speech of the blockchain community, outside of academia, these two terms are used interchangeably for simplification.

Between proof of work and proof of share

Sybil attacks on the network pose the greatest threat to the integrity of the blockchain, and therefore they deserve special attention in the context of consensus building.

Reaching consensus in Proof of Work means that all participants eventually agree on the longest chain that has the most computing time (marked purple in the example).

Proof of Work (abbreviated as PoW) is the oldest method of protecting the blockchain from Sybil attacks. It is used, in particular, in Bitcoin, Litecoin and Ethereum 1.0, and others that are listed on Coinmarketrate.com . They cause a lot of discontent due to high costs and inefficient transaction processing.

In order to be able to register new transactions, the participants in question, the so-called “miners”, must qualify by doing arithmetic work beforehand (if they do not have time to complete the block on time, they mine it for free).

This method of consensus search provides a very low transaction speed and requires a huge amount of energy. Global Bitcoin mining consumes as much energy as 63 percent of the Czech Republic’s economy. But today the situation has changed a little, although it is not quite “green”.

Critics also draw attention to the growing centralization of power over the network in the hands of only a few mining pools and wallets, and the associated security risks. Therefore, it is not surprising that Ethereum, the leading public blockchain for the implementation of smart contracts, wants to distance itself from the PoW process and is in the process of switching to another process – PoS.

Proof of Stake (abbreviated PoS) relies on so-called validator nodes, that is, a subset of all participants who have authenticated transactions by making a deposit to prove their legitimate interest in the integrity of the network. This consensus-building method is more energy efficient and faster than PoW, but it reduces willingness to pay because it freezes high capital contributions.

Unfortunately, PoS is also not immune from manipulation. The Casper consensus protocol, a PoS variant available for Ethereum 2.0, implements additional protection measures against common attacks. But there are also countless other options for various special requirements.

Delegated Proof of Stake or DPoS is a PoS variant that has proven itself well, for example, with Steem, Lisk and DecimalChain. With continuous voting, participants choose so-called validators, that is, network nodes that are allowed to monitor transactions. The voting rights of validators depend on the value of the tokens delegated by them. They are rewarded for their services.

Proof of Activity (POA) is a hybrid of PoW and PoS. PoA alternates these two methods in the transaction processing process to combine the best of both worlds in a single consensus mechanism. Critics object, and argue that he brings the worst of both options under one roof. The method is used, among other things, in the Decred cryptocurrency blockchain network.

Alternative methods for finding consensus on Sybil resistance

The Federative Byzantine Agreement (abbreviated FBA) is another Sybil protection measure, which, among other things, is used in the Stellar consensus mechanism. Membership in the network is open, management is decentralized, but instead of quorum, the procedure relies on quorum slices, that is, mutually overlapping subsets of authorized nodes. Individual nodes themselves choose which quorum slices they want to trust.

Individual quorum slices should preferably overlap to be able to suppress conflicting transactions (a terrible discrepancy in the block chain). Thus, consensus is achieved in a decentralized manner. In addition, it is not necessary that each of the nodes is known in advance and has been tested for reliability. Sybil’s clever defense makes this possible.

Practical Byzantine Fault Tolerance (abbreviated pBFT) is used, for example, with Hyperledger Fabric, Sawtooth and Zilliqa. The pBFT method gives the blockchain Byzantine fault tolerance (i.e. makes it immune to the actions of malicious network participants), provided that failures of independent nodes and controlled messages come from very specific independent nodes that never exceed 1/3 of all nodes are shut down.

The network essentially consists of the main node (the leader) and backup nodes (the leader changes cyclically). All nodes in the system intensively exchange data with each other, as a result of which they must confirm both the source and the integrity of the message transmission to the corresponding recipient. Then honest nodes come to a consensus. The algorithm is designed for asynchronous systems: with a small number of nodes, it is characterized by high performance with impressive overhead and only a small increase in latency.

It is more energy efficient than a pure PoW system, but is susceptible to Sybil attacks (one node can manipulate many other nodes), especially with a small network size. In the case of larger networks, the overhead increases again. Thus, pBFT is best suited for blockchains requiring authorization. In public blockchains, it is used in a hybrid implementation.

The process is used, for example, in Hyperledger Sawtooth. The participants of the blockchain network were initially divided into followers and candidates for the so-called leader. The network needs a leader to synchronize block creation and logging. Followers without a leader immediately offer themselves as candidates and hold a vote, as a result of which a leader appears (nodes vote for the corresponding state of the blockchain, and this creates a consensus). Then this node sends a control signal to other participants, and while it can perform its tasks of maintaining the block chain, they copy the current state of the blockchain among themselves.

A consensus procedure that follows a diametrically opposite approach is Proof of Elapsed Time (POET), used by, among others, Sawtooth. PoET is designed to maximize resource efficiency and minimize energy consumption (the opposite of PoW). For this purpose, PoET uses a lottery system. Each node selects a random waiting time and switches to an inactive state for this time. Whichever node finishes its waiting time, it becomes the leader of the pending validation of the next block of data.

Of course, this approach requires a blockchain network in which only honest, identifiable, non-manipulative nodes play a role. This process was developed at Intel and is based on a robust runtime environment based on Intel Software Guard Extensions (SGX), the CPU’s own instruction set. The advantage of this hardware-accelerated consensus procedure is its huge scalability.

Vectors of attacks against PoS

The upcoming transition of Ethereum from Proof of Wo, k to Proof of Stake has been going on for several months, and everyone is talking about it. But problems are not excluded here either. Typical attacks that need to be repelled with PoS range from “nothing is at stake” fraud, to long-range attacks and pooling. This remains an exciting topic!

Validator nodes in a naive PoS implementation can undermine the security of the blockchain by voting for several conflicting blocks at the same time in order to maximize their income without penalties. This so-called “nothing at stake” attack occurs when validators have no incentive to use a single chain. The problem does not arise with PoW because the available hashing power is the limiting factor.

Carrot and Stick: By offering consensus PoS, Casper follows a fundamentally new philosophy of consensus search. Successful validators are paid for their work. If you make a mistake, you pay extra.

As a countermeasure, Vitalik Buterin uses “Slasher”, the function of punishing unscrupulous validators. A long-range attack (patching attack) occurs when an attacker goes far into the block chain and starts generating fraudulent blocks.

The vulnerability of the blockchain to this attack arises due to the problem of weak subjectivity. The new node, which must first receive a copy of the blockchain from the network, does not have any objective criteria for the correct identification of the current main chain. With PoW, the length of the chain can provide information about the time spent on calculations, but with PoS, this criterion does not make sense.

In PoS, an attacker can easily deceive naive newcomers so that they conscientiously join the wrong chain and check new data blocks. However, many other methods are available to the fraudster to obtain the necessary validators for the robbery. Since computational effort is minimal in the case of PoS (so-called free simulation), and the fraudulent chain can handle fictitious smart contracts anyway, it quickly gains an advantage over the main chain.

With this method, an attacker can build an alternative chain, and eventually choose it in the main chain, even if he is not allowed to check each block on his own. Thus, the immutability of the blockchain becomes a pure illusion. Worse: no workaround has provided reliable protection against this type of attack when using PoS. Successful protection can be achieved only through the use of complex combination methods (including moving checkpoints, context-sensitive transactions, cryptography with a changing key and the so-called completeness rule).

Conclusion

In the blockchain ecosystem, everything “revolves” around the consensus mechanism: indicators such as transaction throughput and horizontal scalability, as well as the ability to implement authorized access, Byzantine fault tolerance and other functions are directly related to this process.

In the end, however, the crucial point is the defense mechanisms needed against Sybil attacks. The effectiveness of these procedures depends on the integrity of the block chain and, therefore, on trust.