What is Distributed Consensus

What is Distributed Consensus? Distributed Consensus in Distributed Systems. How to Reach Widespread/Distributed Consensus. Characteristics of Distributed Consensus in Distributed Systems. All of the above will be explored in this post.

What is Distributed Consensus?. Distributed Consensus in Distributed Systems. How to Reach Widespread/Distributed Consensus.

The Meaning of Distributed Consensus

Distributed consensus is required for the decentralized operation of a network or device.

It’s simple to get a consensus involving parties  (Betty invites David to her place; David accepts.) Agreement gets more challenging to achieve as the number of groups (or nodes on a network) grows.

The nodes on a network must concur on a “source of truth” in order to cooperate in their common purpose – that is, they must be damn sure that they are receiving valid facts even if several other nodes on the network falter.

Each node in the network or member, say, the Bitcoin blockchain must have an exact copy, and everyone must accept that the edition of the ledger stored by each node is correct. Blockchain projects employ distributed consensus techniques to do this.

Meaning of Distributed Consensus: In-depth

Proof-of-Work, as envisioned and created by Satoshi Nakamoto, is used to find agreement and organization on the Bitcoin blockchain. Proof-of-Stake and Assigned Proof-of-Stake are two other consensus procedures.

Most distributed consensus techniques, on the other hand, have the same essential qualities. To begin with, they are built on a stake, which is a store of value that a proposer is willing to put up, such as dollars or computational capabilities. They also include compensation for validation (mining a new block), which is typically in the shape of a coin specific to the blockchain in particular. They also operate on the principle of transparency, which means that other users must be able to see whether a verifier or offeror is aiming to deceive the system.

Proof-of-Work is the cornerstone for blockchain-based consensus, and it is still used to mine new blocks on the Bitcoin blockchain. Other blockchain initiatives, on the other hand, are employing new consensus processes. Some of them, such as Proof-of-Stake, are becoming more popular.

Distributed Consensus

A distributed consensus achieves consent on a plan or assures data consistency among nodes in a distributed system.

The technique by which a blockchain network reaches consensus is known as a consensus algorithm. Because there is no central authority, public (decentralized) blockchains are created as distributed systems, and the dispersed nodes must consent to the authenticity of events. Consensus algorithms are used in this situation. They ensure that the procedural rules are obeyed and that all transactions are conducted in an untrustworthy manner, ensuring that the coins can only be expended once.

Distributed Consensus in Distributed Systems

In a distributed or decentralized multi-agent platform, a mechanism for reaching a common accord. It is crucial for the message transmission system. As an example,

A leader is chosen by a group of processes in a network. Each procedure starts with a leadership proposal. Consensus is used in classic or traditional distributed systems to enhance reliability and fault tolerance. It indicates that in a decentralized setting with various individual parties that may make their own decisions, it is possible for certain nodes or parties to act maliciously or as flawed individuals. In those situations, it’s critical to reach a consensus or a common point of view. The key challenge is having a common point of view in an environment where people can act maliciously or crash the work in a defective manner. So, in this type of distributed system, our goal is to provide dependability, which entails ensuring proper operation even when one or more persons are problematic.

Characteristics:

  1. It ensures incident adaptability and dependability in distributed systems.
  2. It is Ensure accurate activities in the presence of flawed persons.

For example:

Perform a transaction in a database, Cloning of state machines, Synchronization of clocks

How to Reach Widespread/Distributed Consensus:

To obtain distributed consensus, there are a few requirements that must be met.

Closure

Every non-faulty process must make a decision at some point.

Consensus

Every non-faulty process’s ultimate judgment must be the same.

Authenticity

Every non-defective procedure must start with the same output and conclude with the same output.

Honesty

Each right person chooses only one value, and the chosen value must be offered by someone.

So here is an example of a validation criterion: We should make a decision based on a value that must be the initial value of some procedure since it is pointless to strike a deal if the accepted value does not match anyone’s first choice.

The Distributed Consensus Protocol’s accuracy:

The following two properties can be used to characterize it.

Security Possessions

It assures that you never settle to an incorrect value, or that correct persons in a network never settle to an incorrect value.

Vibrancy Possessions

It implies that every accurate value must be recognized at some point, implying that something positive will occur.

The Use of Distributed Consensus:

In a fault-tolerant setting, a leader is chosen to initiate a global action without introducing a performance degradation.

In a distributed network, maintaining a balance is a challenge. Assume that multiple nodes are observing the same region. A consensus method will ensure robustness against such problems if one of the nodes fails.

Distributed Consensus Algorithms(DCA) to the Blockchain Consensus Mechanism(BCM)

A distributed consensus achieves consensus on a request or assures data consistency among nodes in a distributed system. Any engineers that work with distributed systems like HDFS, MQ, ZooKeeper, Kafka, Redis, and Elasticsearch will be acquainted with this issue. Designers have constantly been testing different ways to fix this continuing challenge in both theory and practice, despite the fast growth and rising intricacy of dispersed networks.

Following that, with the emergence of blockchain technology, particularly public blockchains in open networks and private blockchains in permissioned networks, the agreement problem has resurfaced and requires a new look.

The concerns and difficulties of distributed consensus, as well as the accompanying consensus algorithms, will be described in detail. We’ll also look at the usefulness and limitations of various consensus algorithms, as well as how these traditional consensus algorithms might be combined with new blockchain technology. Later in this essay, we’ll look at the consensus method and mechanism in the public blockchain industry from the standpoint of human dependability. This post also looks at the connection between distributed consensus algorithms in classical computer science and the consensus process in blockchain, as well as how new consensus concepts are emerging in the public blockchain space.

Distributed Consensus Issues and Difficulties

To completely comprehend distributed consensus, we must first comprehend the characteristics of a distributed network. What are the primary attributes of a distributed network? What are some of the potential issues with a distributed network? In this part of the study, we’ll look into some of these issues.

Fault of Incident

Let’s start with financial faults. In a distributed network, a crash fault is frequently caused by one of the following problems:

  1. Nodes or copies may undergo breakdowns at any time, causing them to stop running for a short period of time before restarting.
  2. At any point, the network may be disrupted.
  3. It is possible that a message transmitted will be lost in transit and will not be delivered.
  4. A message that has been transmitted may be deferred and delivered after a long period of time.
  5. During the delivery process, messages may face an out-of-order error.
  6. It’s possible that the network will be fragmented. Due to inadequate connection between clusters in China and the United States, for instance, the entire system may be split into two sub-networks for China clusters and US clusters.

In distributed systems, the issues listed above are prevalent. In distributed systems, they are basically the unavoidable hazards posed by faulty and unpredictable physical hardware. Networks, or communication channels, for example, are not always steady and trustworthy. Disks on physical computers and CPUs aren’t always in good shape. As a result, it’s safe to state that crash errors are the most basic and prevalent sort of distributed system issue to resolve.

The Byzantine Fracture 

The crash errors are based on a simple premise: whether nodes do not work or reply properly, or they function and react generally but are unable to execute irregularly, that is, they can be inactive but not make mistakes. Attacker nodes in networks can alter and fake data at any time, making the consensus problem more difficult to address. Byzantine faults are a type of troublesome condition that can modify and counterfeit data or response information. A non-Byzantine fault is a type of crash fault.

Lamport’s paper gave birth to Byzantine. To suggest that Byzantine fault tolerance (BFT) is the most complex and rigorous tolerance model is an understatement. By analogy, a group of generals plans an attack on a castle, and each general has the option of leading the attack or retreating. To successfully conquer the castle, however, all of the generals must act in lockstep. Following that, because the generals are too far apart to communicate directly, messengers are used to delivering messages. Messages, on the other hand, are unreliable. They may convey communications effectively after a long period of time, fail to deliver messages, or even modify messages. The generals may not be trustworthy as well; for instance, one of them could be a renegade who acts against the strategy. The generals in this tale symbolize nodes, while the couriers represent communication channels in distributed networks.

Fault Patience

The challenge of how to implement assurance and agreement so that accurate consensus outcome are returned throughout the whole distributed network, which can be full of danger and doubts, is the most critical difficulty that distributed consensus algorithms must answer. Crash defects are, of course, relatively simple to fix. Crash fault tolerance (CFT) algorithms or non-Byzantine fault tolerance algorithms are methods that are used to solve this type of issue. Byzantine errors can result in unapproved changes, are more complex, and are more difficult to diagnose. Byzantine fault tolerance algorithms are methods that solve these difficulties.

Where does the line between the two kinds of fault tolerance algorithms get drawn? What situations do you find yourself in?  When do these two types of flaws occur? Is it truly necessary to incorporate unapproved changes? consideration? The solutions to these problems may vary depending on the network environments in question  as well as business scenarios

Crash Fault Tolerance

In general, if a system is connected to a secure internal network, we just need to think about crash fault tolerance (CFT). For instance, we just need to examine CFT for network elements in many enterprises, such as distributed storage, message queues, and distributed services. The following are the reasons for this: External access and attacks are improbable because the entire company network is isolated and protected by various firewalls. Individual nodes are deployed in a uniform fashion, and it’s extremely unlikely that the machines or running software will be modified without the necessary authorization. At this stage, the distributed network is rather “clean,” and we only need to focus on the communication network and machine hardware. We must include network slowness and inconsistency, as well as machine downtime and defects, which might occur at any time.

Byzantine Fault Tolerance

Then there’s Byzantine fault tolerance (BFT), which is concerned with the evaluation of the entire distributed network in a broader environment. In addition to actual hardware, various “man-made” variables must be considered. After all, it is specific people, not machines, that commit wrongdoing. Assume that a distributed network, such as a private network of tens of enterprises in a certain industry, is reasonably open. Consider a completely open network, such as one to which anybody has access. Individual corporations or individuals deploy node computers and the software that runs on them.

If the reward is appealing enough, an individual may initiate DDoS attacks on one of these nodes, modifying software code and executable logic, as well as data stored on network drives, in an, allowed, frequently harmful manner. In this instance, we will confront greater challenges. We must also evaluate and address the “troublemakers” in the system, in addition to the faulty communication networks and machine hardware.

Triangle of Unlikelihood

Many computer scientists have undertaken numerous theoretical research in order to overcome the challenges that arise in real-world circumstances. For engineering technicians. These theoretical studies may appear overly abstract and laborious, and some of these research are concerning tedious mathematical concerns. These theories, on the other hand, can provide valuable insight into how to address these issues. These theories also demonstrate what the theoretical limitations of feasible solutions are, as well as which directions can be investigated and which cannot. We don’t have to spend all of our energy building a “perpetual motion machine” because we’re standing on the shoulders of giants. Let’s take a quick review of these theories because most of you are familiar with them.

Fisher, Lynch, and Paterson (FLP) Unlikelihood

Fisher, Lynch, and Paterson published the distributed consensus impossibility theory in 1985. We previously demonstrated that a natural and fundamental issue of fault-tolerant cooperative computing cannot be handled in a completely asynchronous computation architecture. That is to say, in asynchronous networks, consensus techniques that tolerate even a single node fault are hard to construct. Let’s take a quick review of these theories because most of you are familiar with them.

Byzantine failures, on the other hand, are not taken into account in this theorem. It is also expected that the network is extremely stable and that all messages are delivered appropriately and at the same time. We show in this study that no entirely asynchronous consensus mechanism can withstand even a single undisclosed process demise, which is a surprise outcome. We ignore Byzantine errors and assume that the message system is trustworthy, delivering all messages correctly and precisely once.

Of all, this is merely a hypothetical situation. It demonstrates the theoretical constraints of tackling certain problems, but it does not exclude their solution in practice. We can find practical and feasible engineering solutions if we are willing to reduce limits and make certain sacrifices.
The asynchronous network model is the most basic need of the FLP impossibility theorem.
What are the differences between an asynchronous model and a synchronous model?

(FLP) Unlikelihood

  1. The message delay from one node to the other in an asynchronous paradigm is limited but can be unlimited. This implies that if a node does not receive a message, it is unable to determine whether the message was lost or just delayed. In other words, timeouts cannot be used to identify whether or not a node has suffered faults.
  2. Message delivery delay is finite and bounded in a synchronous architecture. This means that, based on our experience or sampling, we can precisely predict the maximum message latency and decide if messages are lost or nodes fail due to queuing delay.

Luckily, our real-world network environment resembles a synchronous model more closely. As a result, based on experience or sample, we may establish the maximum timeout. You shipped a book to one of your pals, for example. However, the book is yet to be delivered to your pal after three days. Your acquaintance may be unsure whether the delivery has been delayed or whether the book has gone missing throughout the delivery procedure at this time. But, if the book has not been delivered to your buddy after one month, you and your friend can reasonably conclude that the book was lost in transit.

Based on our expertise and facts. We’ve come to the following conclusion: Within one to two weeks, an item can typically be delivered successfully.
The worst-case scenarios and extreme instances of inter-code communication are reflected in an asynchronous model. An asynchronous model and a synchronous node have something in common: an asynchronous consensus protocol also works in a synchronous model. An asynchronous model is modified and restricted in a synchronous model so that the synchronous model is closer to real-world situations and the agreement issue may be solved in reality.

More (FLP) Unlikelihood

Furthermore, in an asynchronous network model. FLP does not imply that agreement is impossible to achieve, only that it is not necessarily possible in a limited time frame. In fact, if the constraints on the bounded time are eased, it is still possible to develop solutions.
Thus according to DLS research, there are three main types of consensus algorithms based on the network model.

  1. In partly synchronous models, consensus procedures can accept up to 1/3 of all errors. The network delay in a partly synchronous model is limited, but we can’t know where that border is in beforehand. Byzantine faults are also included in this sort of fault tolerance.
  2. In an asynchronous architecture, deterministic protocols cannot tolerate failures. As previously stated, network latency in an asynchronous paradigm is limitless. This is exactly what the FLP impossibility theorem says: Deterministic protocols on a completely asynchronous network can’t tolerate even a single node fault.
  3. When the amount of faulty nodes exceeds 1/2 of the total nodes, protocols in a synchronous architecture can unexpectedly achieve 100% fault tolerance, but they will limit node actions. The network latency in a synchronous architecture is bounded (less than a specified constant).

The three components of a distributed system FLP covers

FLP covers three components of a distributed system: safety, liveness, and fault tolerance, from a distinct perspective.

  1. The term “safety” refers to the consistency and validity of the values obtained across nodes in a system
    The most basic criterion for system consistency is safety. The most important aspect of safety is ensuring that it cannot do anything harmful.
  2. Individual nodes in a system must come to an agreement (in a finite amount of time). This implies that the system must move forward and cannot constantly be in an inconsistent state. In fact, liveliness is a more important criterion. It means you can’t always do something awful, but you can’t always do nothing either. You must do something positive to ensure that the entire system functions properly and efficiently.
  3. Fault tolerance necessitates that a protocol is effective even if a node fails.

In an asynchronous network, FLP impossibility means that no distributed consensus mechanism can meet all three properties at the same time. Node failures are almost unavoidable in a distributed system. As a result, fault tolerance must be taken into account. Because the FLP is impossible, every consensus protocol can only have liveness or safety as well as fault tolerance.

In practice, we must frequently make concessions. For instance, we can give up a certain level of safety, which implies that the system can always achieve a speedy agreement. But the agreement isn’t very trustworthy. We can indeed give up a certain amount of liveness. This indicates that the model can reach a very trustworthy agreement but it will take too long or will never be reached owing to endless arguments. Fortunately, many real-world cases have high robustness, making it extremely rare that an event will invalidate a consensus procedure.

What is Distributed Consensus?

Below is a list of topics that might be of value to you:

  1. Blockchain Technology
  2. Defi
  3. NFTs
  4. DAOs
  5. Crypto
  6. Web 3.0
  7. Altcoin Tokenomics
  8. Metaverse
  9. Smart Contracts

Leave a Comment