ton-blockchain / TIPs

Improvement Proposal repository
78 stars 16 forks source link

Slashing cheating validators #14

Open tolya-yanot opened 3 years ago

tolya-yanot commented 3 years ago

Complete slashing of cheating validators.

Initially mytonctrl will act as a panisher.

tolya-yanot commented 3 years ago

In TON the Block Consensus Protocol runs on top of the Catchain protocol.

Both protocols are well described in the catchcain.pdf whitepaper.

Implementation: https://github.com/newton-blockchain/ton/tree/master/catchain

Section 2.7 describes that any cheating in the catchain will be represented by the creation of two (or more) different versions of the same message Mi,s or, in other words, a fork.

Since every message in a catchain is signed by its creator (2.5.4), then the presence of two signed different versions of the same message is a proof of cheating (2.7.2).

Catchain is able to detect forks and process them (2.7.4):

Once a fork (created by i) is detected (by another process j), i.e. j learns about two different messages Mi,s and M'i,s created by i and having same height s (usually this happens while recursively downloading dependencies of some other messages), j starts ignoring i and all of its subsequent messages. They are not accepted and not broadcast further.

Thus, the catchain is able to detect forks (cheating) and starts to ignore the cheater (he is no longer involved in the creation of blocks).

As we described, slashing of idle validators (validators processing too few blocks) is already functioning on the network. Thus, cheaters will also be fined as idle validators.

Perhaps in the future it makes sense to make a larger penalty for cheaters than for those who simply stand idle. In this case, we will need to provide a fork proof to smart-contract. This does not seem necessary at the moment.