Casper CBC roughly works as follows:
- Validators make messages.
- Each message specifies a block that the validator is voting on, and also specifies the most recent message that the validator received from each other validator.
- The block that the validator is voting on must be equal to or descended from the block that is the head under the GHOST fork choice rule using as inputs the other validators’ latest messages.
- The only slashing conditions are (i) the above rule, (ii) a validator cannot make two messages with the same sequence number, (iii) a validator cannot in a later message refer to messages with an earlier sequence number than the messages that the validator referred to in an earlier message.
- Finality is endogenous: at some point, when there are multiple rounds of validators voting on descendants of X, it’s mathematically impossible for the head to switch to being not-X without a large portion of validators making invalid messages. A lower bound on this amount can be detected and measured using various heuristics.
Here’s an example of the GHOST fork choice rule in action. The letters A,B,C,D,E represent the five most recent votes.
币安是全球领先的数字货币交易平台，提供比特币、以太坊、BNB 以及 USDT 交易。