Ethereum 2.0: Rationalization and Determinism
Editor's Note: This article comes fromEthereum enthusiasts (ID: Ethfans)Editor's Note: This article comes from
Ethereum enthusiasts (ID: Ethfans)
, Author: Bruno Škvorc, Translator & Proofreader: IAN LIU & A Jian, reproduced by Odaily with authorization.
Translator’s Note: Explaining the following information in advance may help readers better understand the content of this article and our choice of translation words: In Ethereum 2.0, one of the responsibilities of validators is to submit attestation, which can be understood as voting ; But in an attestation, the content of the verifier's vote has three items instead of one: one is a vote on the beacon chain block, which is used in the LMD Ghost algorithm to select the main chain; one is on the epoch (period) The vote of the Casper FFG algorithm is used to finalize the checkpoint; the block before the checkpoint will be irreversible, and the checkpoint will also become the starting point of a new round of LMD Ghost algorithm (can be imagined as a constantly refreshed genesis state); One is a vote on the state of the shard chain (crosslink), which is used to determine the latest state of the shard chain. Although they are all votes, different types of votes point to different specific content and contribute different attributes to the entire system. The content of this article is the voting related to Casper FFG. The key concepts are justification and finalization. Although LMD Ghost is also mentioned later in the article, LMD Ghost and Casper FFG should be regarded as two independent but complementary things.
In view of this, although some translators translated attestation as "proof", we decided to translate all the above-mentioned concepts closer to their literal meaning, and did not translate any concept into "proof" or "voting", so as not to cause more confusion.
If you’re confused about terms like justification and finalization in Ethereum 2.0, you’re definitely not the only one; let’s explain in layman’s terms what these terms actually mean.
Let's talk first, what exactly does finality mean? You must have noticed that whether you are using a cryptocurrency platform or a dApp, transactions cannot be confirmed until several blocks are generated. This is a relatively reliable method (but not a 100% guarantee), allowing you to determine the status of the transaction and the transaction will not be reversed, which is the so-called certainty.
Ethereum 2.0 provides a deterministic guarantee - turning the on-chain transaction into an objective fact recorded on the blockchain, not just "the transaction may remain on the longest chain". This is very important, if the block can be confirmed in time, then the interaction on the chain can be carried out faster and more complete.
Let's get a little clearer and start with some definitions.
Note: The following content involves more low-level technologies, but it will still be as simple and easy to understand as other articles in the 2.0 series. Please let me know if you find anything that needs to be added.
Before talking about the details, let's clear up a few definitions:
LMD GHOST: The latest message-driven GHOST algorithm (Last Message Driven Greediest Heaviest Observed SubTree), the fork selection rule of Ethereum 2.0.
Casper FFG: Casper FFG protocol (Casper, the Friendly Finality Gadget), a protocol used by Ethereum 2.0 to provide deterministic guarantees.
Fork selection rule: A mechanism that, given the entire blockchain, can output the blockchain path from the genesis block to block S, and make the chain where S is located can be considered as the authoritative chain (also called "master chain", "root chain").
Epoch: In Ethereum 2.0, it refers to a time unit that lasts 6.4 minutes, and each epoch (period) contains 64 slots (time slots, each time slot is 6 seconds).
Casper FFG
With these concepts in place, let's move on to justification and finalization.
secondary title
Casper is a method for justifying and finalizing time periods (both for blocks in general blockchain networks and for epochs in Ethereum 2.0). It is a general-purpose "gadget" that can be added to any blockchain; however, Casper is most useful on PoS blockchains.
Finality is a concept that two conflicting checkpoints cannot be determined (irreversible); it can also be called economic certainty, because once two conflicting checkpoints are finalized, Then at least 1/3 of the verifiers in the system will be fined forfeiting their deposits.
You may wonder why 1/3 of the verifiers are fined forfeiting their deposits?
Once there are two conflicting checkpoints, it means that the two checkpoints each receive more than 2/3 of the validator votes; because only one checkpoint can be established in the end, at least 1/3 of the people will vote repeatedly. The 1/3 of validators who voted repeatedly will be considered as malicious participants and their deposit will be fined. In order to avoid such invalid operations, the best way for validators is to confirm the state of the beacon chain before each round of voting, and then vote for the appropriate checkpoint.
So how to understand the "determined" in "the checkpoint is determined to be established"? We need to talk about justification (called “justification” above) first.
Justification refers to the operation in which validators vote on checkpoints and decide which checkpoint should be placed at the forefront of the current beacon chain. As long as more than 2/3 of the validators (that is, the absolute majority) reach a consensus on a pair of epochs (such as source epoch S -> Target epoch T, that is, the source period and the target period), we will say that the two epochs are rationalized (justified ); Regardless of whether there are skipped epochs in the two epochs, as long as the two epochs in the same column are rationalized, we call the previous epoch finalized (finalized).
Note: For ease of understanding, the above is a greatly simplified definition; there are other influencing factors, but they are beyond the scope of this article.
As a reminder, when we say validators are attesting/finalizing, we don't mean validators voting on the epoch itself - it sounds like someone is using voting to determine what time it is (we all know which time it is currently) time, there is no need to vote at all). Validators are actually voting on the contents of these epochs - the root state of their respective final slots (boundary slots). So validators choose the latest valid state of the blockchain by attesting/confirming epoch votes.
LMD GHOST
In the final battle of Avengers 4, Doctor Strange saw 14 million possibilities in the parallel world. In these parallel worlds, time progresses linearly, with each day, each hour happening simultaneously in all worlds; but in all of these worlds, there is only one desirable outcome—other outcomes are forks.
secondary title
Then we have to talk about fork selection rules.
In the latest message-driven (LMD) GHOST method, the algorithm runs based on "messages", that is, attestation ("witness information"). In general, the forked chain with the most votes is considered the "authoritative chain".Gasper
The figure above shows the details of the latest news-driven GHOST method; the smiley face symbol represents the witness information, and there is a number in each block, which represents the sum of the number of witnesses, which is the weight of the block. In the picture above, although the top chain is the longest chain, the green one is the "authoritative chain".
secondary title
In Ethereum 2.0, Casper and GHOST are collectively called Gasper, which is the core consensus protocol of Ethereum 2.0.


