Sun. Mar 7th, 2021
BFT, Free TON, Validators

The Free TON blockchain block generation procedure is based on the consensus of the Byzantine Fault Tolerant (BFT) family of the Proof-of-Stake (PoS) algorithm.

For any blockchain, the implemented principle of reaching consensus is important. First, the algorithm must provide high transaction speed. Second, consensus must be reached even when non-working processes occur. Third, erroneous transactions should not be made.

Byzantine Fault Tolerance: Remote Consensus

In 1982, the Byzantine Fault Tolerance was described. Its essence is that the general and his lieutenants, the commanders of the armies, must agree on an attack on the enemy or retreat, that is, come to a consensus. 

The general gives the order to each lieutenant separately through messengers. And the lieutenants exchange information about the order in the same way. Then each lieutenant, based on the information received from all the other lieutenants and the general, decides to attack or retreat. The nuance of the task lies in the fact that the general himself or any lieutenant (or several) may turn out to be traitors. 

The adoption of a single decision by a majority of the lieutenants is the achievement of consensus. It is possible if honest participants make up more than ⅔ of their total number.

Byzantine Fault Tolerance For Four Participants

Consider a special case: there is a general and three lieutenants. General, Lieutenant 1, and Lieutenant 2 are loyal. Lieutenant 3 is a traitor. Thus, there are only four participants, the condition 3/4 > 2/3 is met.

How is consensus achieved in this case:

Step 1

The general sends an order to attack (Y value) with the time indication to all three lieutenants.

Step 2

The lieutenants exchange orders among themselves. 

The loyal lieutenants (Lieutenant 1 and Lieutenant 2) exchange the general’s order with the other two — relatively speaking, Y.

The traitor, that is, Lieutenant 3 sends a different value (some X) to Lieutenant 1 and Lieutenant 2.

Step 3

Each Lieutenant makes a decision like the majority from the information received.

Lieutenant 1 chooses from Y from General, Y from Lieutenant 2, and X from Lieutenant 3. 

His decision is Y.

Lieutenant 2 chooses from Y from General, Y from Lieutenant 1, and X from Lieutenant 3. 

His decision is Y.

Lieutenant 3 chooses from Y from General, Y from Lieutenant 2, and Y from Lieutenant 3. 

Since he is a traitor, his decision can be anything.

Conclusion

Two out of three lieutenants make the same decision — Y — it is also the order of the general. Consensus has been reached.

The above method of making decisions based on the overwhelming majority (more than 2/3) in the received information is called Byzantine Fault Tolerance.

Byzantine Fault Tolerance in the Free TON consensus algorithm

The Free TON blockchain uses the Byzantine Fault Tolerant (BFT) to reach consensus on accepting or rejecting transactions.

How does it work in Free TON, what are the stages to reach consensus?

  1. Selection of validators based on the stake.
  2. Start of verification session.
  3. Several rounds of block generation.

Validators are selected based on the size of the deposited stakes. 

In each round, several validators are selected to generate blocks, and one validator submits a proposal to vote for the block. The weight of the votes is proportional to the weight of the entered validator stakes. The bigger the validator’s stake, the bigger its vote. The time of each round is limited and in each next round the validators change their roles.

During the round, validators:

  • exchange messages about candidates for blocks;
  • checking candidates; 
  • select candidates for voting;
  • vote for them by signing the candidate for the block with their private keys.

To improve overall performance, the validator interacts only with a randomly selected group of validators and uses the data received from them to make decisions during the validation round.

If a block receives at least 2/3 of all weights (cut off weight), it automatically wins a particular round of voting and is accepted. If 2/3 of votes are not received within the agreed time — the round is skipped and the block is not formed. If no agreement is reached after several rounds, a new election of validators will solve the problem and a consensus will be reached. Malicious influence of unscrupulous validators is not possible if there are less than 1/3 of them.

The result of reaching a consensus is the appearance of the next block in the blockchain. And the whole described process of reaching consensus for Free TON is called the Catchain algorithm.

Byzantine Fault Tolerance: Use In Other Blockchains

The advantage of this consensus algorithm is the speed of block formation and the almost complete elimination of forks. Along with Free TON, similar consensus mechanisms are implemented in some other blockchains, but they differ:

  • In the PBFT (Practical Byzantine Fault Tolerance) protocol, the slot leader changes in case of unsatisfactory performance, and in Catchain, every round.
  • Tendermint protocol is the closest to Catchain, but differs in that the time for each round is recorded in it on the local clock. Catchain has a globally synchronized clock.
  • The Algorand protocol is similar to Free TON, and its difference is expressed in the secret principle by which the election of validators for voting is implemented.

____________________

The use of the Proof-of-stake BFT consensus method in Free TON, along with the distributed blockchain architecture, makes it the fastest and one of the most reliable among all analogues.

14
0