NEO dBFT (Delegated Byzantine Fault Tolerance)

in cryptocurrency •  7 years ago 

NEO makes use of a consensus algorithm called dBFT or Delegated Byzantine Fault Tolerance. A fundamental problem in distributed computing and multi-agent systems is to achieve overall system reliability in the presence of a number of faulty processes. This often requires processes to agree on some data value that is needed during computation. This is where BFT is used, most often in critical systems that have sensors like commercial aircraft engines, nuclear power plant operation, rocket launch systems and edge devices that detect events and monitor conditions. NEO has applied this concept to their own cryptocurrency project in which they use a delegated consensus protocol. In NEO there are 2 types of tokens, a NEO token which is the store of value of the coin and GAS token which is used to process transactions. Ordinary NEO token holders are called Ordinary Nodes. A specific group that performs the validation of blocks and processing of transactions are called Professional Nodes.

A correctly implemented Byzantine Fault Tolerant system should be able to still provide service in the event of uncertainty, assuming that the majority of the components are still healthy. The important thing here is to know which version of truth is the most credible. This is how blocks are validated for the NEO blockchain by Professional Nodes. A randomly selected node or computer in the network, called the Speaker takes over the role of block validator. The Speaker is selected from professional nodes called delegates. Only delegate nodes can take part in this process and there can be n number of them, but only 1 Speaker is chosen at a time. So for (n -1) nodes there is always a Speaker. It is randomly done to prevent a bad actor from taking control and also to prevent collusion among delegates (favoritism not allowed).

When it comes time to validate a block, the Speaker sends a message x to all delegates. The delegates are also called Bookkeeping Nodes. They verify each block written on the NEO blockchain. To become a Bokkeeping Node one must have 1,000 GAS as their commitment to serve the network. So this is like in PoS, where you are staking funds, in this case 1,000 GAS to help process transactions. Bad nodes will get punished and aim to lose 1,000 GAS if they become “traitorous”. If they cooperate they will receive a reward in the form of transaction fees. The process must be that the data about the transaction must be agreed upon by all delegates. If the consensus is 100% or 66% of all delegates that the Speaker has truthfully validated the block, then it is added to the blockchain. However, if only 1/3 or 33% of the delegates agree with the Speaker, the block is not validated because it requires at least 2/3 of the network. A Speaker can then be replaced, so a Speaker who is a bad actor will not be able to manipulate validating blocks for personal gain because there will be delegates who can verify if their data is truthful. At times a bad actor can also arise among the delegates. If this is the case, the delegate can be removed from the network (that is for another story).

In a truthful network the relationships are as follows:

  1. Speaker A sends x to all delegates B:
  2. B1 sends x to B2,B3 | B2 sends x to B1,B3 | B3 sends x to B1,B2
  3. B1,B2,B3 all agree on the truthfulness of x from Speaker A

If one of the delegates is not truthful:

  1. Speaker A sends x to all delegates B
  2. B1 sends x to B2 | B3 sends v to B2, v is NOT x
  3. B2 ← majority(x,x,v) == x
  4. Majority is 2/3 or 66% so block is still validated

If the Speaker is not truthful no validation will take place:

  1. The Speaker sends x, y, z to B1, B2, B3
  2. B1 sends x to B2, B3 | B2 sends y to B1, B3 | B3 sends z to B1, B2
  3. B1 ← majority(x,y,z) | B2 ← majority(x,y,z) | B3 ← majority(x,y,z)
  4. No consensus is reached, block is not validated

Screen Shot 2018-05-26 at 4.52.13 PM.png

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!