Translator's Note: Explain the following information in advance, perhaps to help readers better understand the content of this article and our choice of translation terms: In Ethereum 2.0, one of the certifier's duties is to submit attestation, which can be understood as voting However, in an attestation, the certifier votes for three items instead of one: one is the vote for the beacon chain block, used for the LMD Ghost algorithm, selects the main chain; one is for the epoch (time slot) Vote for the Casper FFG algorithm, finalize the checkpoint; the previous block of the checkpoint will be irreversible, and the checkpoint will also be the starting point for a new round of LMD Ghost algorithm (conceivable as a constantly refreshing creation state); One is a vote on the fragment chain status that is used to determine the latest state of the slice chain. Although they all vote, the specific content of different types of voting points is different, and the attributes contributed to the entire system are different. 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 considered as separate but complementary.
In view of this, although some translators translate attestation into “proof”, we decided to adopt a translation that is more literal than the above, and not translate any concept into “proof” or “voting”. Cause more confusion.
- ICT Researcher: Five Suggestions on China's Blockchain Legislation Supervision
- What is bitcoin fork? Can you profit from the fork?
- The vision of Twitter CEO's social network: Decentralized network is the original intention, and the advent of blockchain rekindled the "hope" in my heart
- Jia Nan submits the prospectus to the SEC: from the mining giant to the leader of the AI chip
- SWIFT: Instant payment services face challenges from Ripple, Libra, etc.
- Detailed DCEP future use scenarios-highly concurrent retail payments
If you are confused about terms such as justification and finalization in Ethereum 2.0, you are definitely not the only one who can't figure it out; let us explain in a nutshell what these two words mean.
Let's talk first, what exactly is finality ? You must have noticed that whether you use a cryptographic currency platform or dApp, you have to wait until several blocks have been generated before they can be confirmed. 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 called certainty.
Ethereum 2.0 provides a deterministic guarantee – turning the winding transaction into an objective fact recorded on the blockchain, not just “the transaction may remain on the longest chain”. This is important, if the block can be confirmed in time, the interaction on the chain can be faster and more complete.
Let's figure it out a bit, starting with some definitions.
Note: The rest of the story covers more underlying technologies, but it will still be as easy to understand as other articles in the 2.0 series . If you find anything you need to add, please contact me .
Before we talk about the details, let's take a look at a few definitions:
- LMD GHOST : The latest message-driven GHOST algorithm (Last Message Driven Greediest Heaviest Observed SubTree), Ethereum 2.0's fork selection rules.
- Casper FFG : Casper, the Friendly Finality Gadget, an agreement used by Ethereum 2.0 to provide deterministic guarantees.
- Bifurcation selection rule : A mechanism that, given the entire blockchain, can output the blockchain path from the Genesis block to the block S, and let the chain where S is located can be considered an authoritative chain (also called "main" Chain", "root chain").
- Epoch : In Ethereum 2.0, it refers to a time unit of 6.4 minutes, and each epoch (time slot) contains 64 slots (time slots, each time slot is 6 seconds).
- It is not necessary for each time slot to generate a block, and the last slot in the epoch is called a boundary slot , or a checkpoint .
- The so-called committee is a randomly selected set of verifiers; each committee is assigned to a specific time slot, the first verifier in the committee is responsible for the propose block, and the other verifiers come. Witness (attest) the block.
With these concepts in place, let's start discussing justification and finalization.
Casper is a method for justifying and finalizing time periods (both for blocks in a general blockchain network and for epoch in Ethereum 2.0). It is a generic "gadget" that can be added to any blockchain; however, Casper's greatest use is only available on the PoS blockchain.
Finality is a concept that two conflicting checkpoints cannot be determined (irreversible); they can also be called economic certainty, because once two conflicting checkpoints are finalized, At least one-third of the certifiers in the system will be fined.
You may have questions, why do 1/3 of the verifiers get a penalty?
Once there are two conflicting checkpoints, it means that each of the two checkpoints receives more than 2/3 of the verifier votes; because only one checkpoint can be established, at least one third of the people will vote repeatedly. The 1/3 repeat voter will be considered a malicious participant and will be fined. In order to avoid such invalid operations, the best way for the verifier is to confirm the status of the beacon chain before each round of voting and then vote for the appropriate checkpoint.
So how do you understand the "OK" in "Checkpoints are established"? We have to talk about rationalization (justification, hereinafter referred to as "defense") .
Justification refers to the certifier's vote on the checkpoint and decide which checkpoint should be placed at the top of the current beacon chain. As long as more than 2/3 of the verifiers (ie, the absolute majority) agree on a pair of epochs (eg source epoch S -> Target epoch T, ie source time and target time period), we will say that the two epoch are rationalized (justified Regardless of whether or not the two epochs are skipped, as long as the two epochs in the same column are rationalized, we call the previous epoch 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.
Therefore, a "finalized" epoch must be justified; on the contrary, a "justified" epoch is not necessarily determined, and there is a possibility of reversal. Once the epoch reaches the "final" state, it is difficult to change.
As a reminder, when we say that the verifier is doing the proof/determination, it does not mean that the verifier voted for the epoch itself – it sounds like some people are using voting to decide what time is at the time (we all know which one is currently) Time, there is no need to vote at all). The verifier actually votes on the contents of these epochs, the root states of their respective last slots (boundary slots). Therefore, the verifier selects the latest valid state of the blockchain by proving/determining the epoch vote (translator's note: the original text. But this is also somewhat misleading).
In the final battle of Fulian 4, Dr. Singer saw 14 million possibilities in the parallel world. In these parallel worlds, time goes linearly, and every day and every hour occurs simultaneously in all the worlds; but in all these worlds, only one desirable result is produced—other results are bifurcations.
The way the forks are selected is here.
The GHOST algorithm was very popular early in PoW and other blockchains; the GHOST algorithm follows the "heaviest" subtree, the longest chain (Translator's Note: It's probably a big deal, but it's actually not rigorous.) ). In the case of Bitcoin, the heaviest branch refers to the chain that puts the most computational power into its block, which is the longest chain. Although the longest chain is easy to see, the longest chain is only determined by probability, and at any time it is possible to grow a longer chain on another fork (although this chance is minimal).
In the latest message-driven (LMD) GHOST method, the algorithm is run based on "message", which is attestation ("witness information"). In general, the forked chain with the most votes will be considered an “authoritative chain”.
The figure above shows the details of the latest message-driven GHOST method; the smiley symbol represents the witness information, and there is a number in each block, representing the sum of the number of witnesses, that is, the weight of the block. In the above picture, although the top chain is the longest chain, the green one is the “authoritative chain”.
In Ethereum 2.0, Casper and GHOST are collectively referred to as Gasper, the core consensus agreement of Ethereum 2.0.
Let's take a look at Justin Drake's briefing on Ethereum 2.0 at the EthCC conference.
In the two boxes above, there are two illegal conditions in the fork selection. The box on the left indicates that it is not allowed to vote for two different root states at the same time (ie, you cannot vote for two epochs containing different content at the same time). The box to the right indicates that if a time period comes directly from some of the time periods that have been finalized, it is not allowed to bypass these time periods to vote for the new time period. In other words, it is not allowed to skip the current candidate epoch and directly vote for the future epoch.
Two "determined" bifurcation chains are shown below the figure. The epochs represented by the first and second red circles have been identified because they are followed by the identified third epoch and fourth epoch. However, the third and fourth epoch exist in two parallel branches. Which one is the "authoritative chain"?
According to the first rule: repeated voting is not allowed. The above fork in the newsletter seems to be legal, because there is already a certain epoch on it, but there is also a confirmed epoch in the following forks, but it is determined to be a little late!
This concludes that the lower fork is invalid, because if a chain is formed according to the later determined epoch, it means that the epoch that was previously determined but skipped due to the fork is "surrounded". In other words, a newly cast epoch is connected to an epoch from another fork. This situation is not legal – because the checkpoints that are determined must be in chronological order. If this happens, many verifiers will be severely punished for voting for an epoch on an "illegal chain." According to the "double vote" and "surrounded vote" rules, it is possible to identify which verifiers are doing evil, and the cost of doing so will be very high.
The above is all the content! If you are a certifier, make sure you vote only once in a slot and make sure that your vote is consistent with the votes of others to avoid being penalized (don't worry, these features will be integrated into the Ethereum 2.0 client) ).
I hope this article will help you figure out the definition of justification and finalization. If you still don't understand, please let me know by Twitter . Finally, thanks to the help of Dustin , Mamy , Justin and Danny !
Original link: https://our.status.im/two-point-oh-justification-and-finalization/ Author: Bruno Škvorc translation & proofreading: IAN LIU & A sword
This article was authored by the original author to translate and republish EthFans.