Original author: @LuozhuZhang
Original compilation: 0x711, BlockBeats
As you all know, PoS Ethereum's consensus protocol is "Gasper", which is built using Casper FFG (finality tool) on top of LMD-GHOST (fork selection rule). So if you want to understand the complete Ethereum consensus protocol, you must understand these two parts (Casper + Ghost). Plus, the designs are really fun. I intend to sort out the background and evolution of these two protocols, as well as their simple workflow.

The three schools of PoS consensus algorithm are as follows:
1. Nakamoto-inspired (Peercoin)
2. PBFT-inspired (Tendermint, Casper FFG)
3.CBC Casper
Nakamoto-inspired PoS is a chain-based algorithm, Simulate mining in PoW. It creates new blocks by pseudo-randomly selecting validators. First proposed in the "Peercoin" paper in 2012, peercoin is the first cryptocurrency based on a proof-of-stake consensus.
PBFT-inspired (ie BFT-style) PoS is based on years of research into Byzantine Fault Tolerance (especially pBFT). First proposed in the "Tendermint" paper in 2014. Generally, these algorithms select a unique chain that represents canonical transactions on the ledger.
Casper directly inherits the BFT algorithm (more precisely pBFT), with some modifications. CBC Casper was proposed by @VladZamfir and there are some good sources that explain it more fully.
CBC Casper History by VladZamfir
Although Ethereum finally chose Casper FFG is not CBC Casper, but the research on CBC Casper is also very valuable, such as the fork selection rule "LMD-GHOST" that meets the needs of Ethereum. Casper FFG was proposed by V God and Virgil Griffithin 2017, which introduced the concepts of justification and finalization, and introduced slashing conditions and dynamic validators Mechanisms, these are very important features.
Casper FFG is used to guarantee "finality" (aka security), which does not exist in PoW. In simple terms, each validator votes on the checkpoint, and after two rounds of voting, the checkpoint is "finalized" (the first round is validating, the second round is finalizing).

All finalized checkpoints become canonical chains (area part of the blockchain history), all loyal nodes agree that they will never reverse the chain. Blocks after the "final checkpoint" can be forked at will, but previous blocks are not allowed to fork.

Casper FFG uses "finality" to ensure blocks In addition to chain security, slashing conditions are also introduced to punish all verifiers who violate the rules (this cannot be done in traditional BFT algorithms), and all verifiers who violate the rules will be tracked and punished.
Besides, Casper FFG is permissionless (traditional BFT algorithms require permission certified), pBFT maintains consensus through a list, and only those in the list can become participants. Casper FFG has built a dynamic validator mechanism, and all validators can enter and exit freely. Casper FFG is used to ensure "finality" and "safety". It is responsible for confirming the final state of blocks, but not responsible for creating new blocks, so it requires the underlying blockchain and fork selection rules.
The fork selection rule used by Ethereum is based on GHOST, which was first published in in a 2013 paper. In 2017, when @VladZamfir was working on CBC Casper, he tried to combine GHOST with Casper, resulting in a variant "LMD-GHOST".
The blockchain allows forks, when there are different branches, which chain should be chosen To continue adding subsequent new blocks, fork selection rules are required. PoW uses the longest chain rule. The idea is that forging the longest chain requires the most computing power, so this chain is the most reliable. So when all miners add a new block, they will add it on the longest chain by default.

The idea of GHOST is similar to this, it chooses the chain with the most votes instead of the chain with the longest height, LMD-GHOST has made some modifications, only considering the most recent vote (the so-called "Least Message Driven", LMD) .

The rules of LMD-GHOST are simple:
p>
- Start from the genesis block;
- Every time there is a fork, choose the branch with the most votes;
- Repeat until a block leaf is found;
- Return to the head of the chain;
< br>

This is the evolution of Casper FFG and LMD-GHOST and how they work together to ensure "secure "+" active ". LMD-GHOST allows the proposer to create a new block at any time, and the new block will be added to the chain with the largest weight according to the fork selection rule (ie, activity). While Casper FFG will finalize a canonical chain based on the votes of all validators (two rounds, more than 2/3, by deposit). All loyal nodes accept the canonical chain by default, thus gaining security.

Consensus is really interesting, Ethereum's research on PoS began in 2014, and the merger was completed in 2022 . It's been a long and winding road, with many fantastic ideas, designs and projects born along the way.
Welcome to join the official BlockBeats community:
Telegram Subscription Group: https://t.me/theblockbeats
Telegram Discussion Group: https://t.me/BlockBeats_App
Official Twitter Account: https://twitter.com/BlockBeatsAsia