
Original title: "Understanding The Validator Lifecycle》
Original title: "
Author: Jim McDonald
Compilation of the original text: John
Understand the validator (Validator) life cycle
Ethereum 2.0 uses proof of stake to ensure its network security. Computer processes called "verifiers" will vote on the next block to be packaged (hereinafter referred to as "witness"), and they will also propose to let themselves blocks are packed into it. However, validators are not just "on" and "off": they go through a series of transactions during their lifetime. This article will deeply dissect the validator life cycle, showing what happens at each state and state transition, what triggers the state transition, and the time required for each state transition (Note 1).
a symbol of time
In Ethereum 2.0, the time is usually in units of epoch, and an epoch includes 384 seconds, which is about 6 and a half minutes. For ease of understanding, times measured in this manner are roughly translated into minutes, hours and days, with the exact information available in the corresponding footnotes.
Lifecycle overview
Explain the life cycle of Ethereum validators in detail: how to ensure the normal operation of the Ethereum network?
Figure 1: Overview of validator lifecycle
Here are the status labels:
Deposited - The deposit protocol has been accepted by the Ethereum 1.0 network
Pending - The deposit protocol has been accepted by the Ethereum 2.0 network
Active - validators are witnessing and proposing blocks
Exiting - the validator is in the process of aborting witnessing and proposing blocks
Slashing - The validator was found to be cheating and is in the process of aborting witnesses and proposing blocks
Exited - the validator is no longer participating in witnessing
Explain the life cycle of Ethereum validators in detail: how to ensure the normal operation of the Ethereum network?
Diagram 2: Meta state of witness
After these states are defined it is time to analyze each state and the transactions between them in detail.
Deposited status
The accepting deposit agreement is the beginning of the life cycle of the validator. Acceptance happens on the Ethereum 1.0 chain, because that's where the validator funds come from. At this point the Ethereum 2.0 chain is not aware of this deposit.
Explain the life cycle of Ethereum validators in detail: how to ensure the normal operation of the Ethereum network?
Diagram 3: Transition from deposited state to ready state
pending status
Once the deposit has been on the Ethereum 1.0 chain long enough, it will be added to the Ethereum 2.0 chain. This marks that this validator has been officially recognized by Ethereum 2.0. Provided at least 32 ETH have been deposited (Note 4), the validator will now be ready to start witnessing.
Explain the life cycle of Ethereum validators in detail: how to ensure the normal operation of the Ethereum network?
Diagram 4: Transition from ready state to active state
active state
Validators are supposed to spend their primary lifecycle in the active state. Active validators will participate in the current witness at a frequency of 6 minutes, and occasionally propose blockchain work (Note 7). Validators remain active until one of the following happens:
Validators were penalized for failing to perform their duties when they were required to participate in witnessing, causing funds to drop below 16 ETH.
The user requests to stop validating by sending an appropriate transaction (this transaction cannot be initiated during the first 9 days that the validator becomes active).
The verifier is proven to be cheating.
Explain the life cycle of Ethereum validators in detail: how to ensure the normal operation of the Ethereum network?
Figure 5: Transition from active state to exiting state
Explain the life cycle of Ethereum validators in detail: how to ensure the normal operation of the Ethereum network?
Diagram 6: Transition from active state to slashed state
Note that it is possible to deposit additional ETH to an active validator by sending an additional deposit agreement including the same validator information (always remember that the effective balance cannot exceed 32 ETH). This helps avoid situations where a validator's funds drop below 16 ETH and are added to the exit queue.
exiting status
When an existing verifier of the network expresses his intention to stop verification, no matter whether he is voluntary or involuntary, he will not do so immediately but will enter the state of exiting, which is the same as the previous active state Continue to participate in witnessing and proposing as much. This ensures the stability of the network and avoids the situation where a validator decides to leave and immediately stops performing its duties.
Explain the life cycle of Ethereum validators in detail: how to ensure the normal operation of the Ethereum network?
Figure 7: Transition from exiting to exited state
Slashing status
Explain the life cycle of Ethereum validators in detail: how to ensure the normal operation of the Ethereum network?
Diagram 8: Transition from Slashed to Exited
Explain the life cycle of Ethereum validators in detail: how to ensure the normal operation of the Ethereum network?
Figure 9: Extended slashing conditions
exited status
When a validator reaches the exited state, he has officially completed his mission. He no longer needs to participate in witnessing or proposing blocks, and no longer needs to have state information about the Ethereum 2.0 chain.
After exiting, there is a final delay of about 1 day (Note 8) before funds can be transferred away from validators. However, if the validator is marked as slashed, then he incurs two additional penalties.
Explain the life cycle of Ethereum validators in detail: how to ensure the normal operation of the Ethereum network?
Chart 10: Effective balance slashed as a percentage of validators slashed by the network over roughly the same time period
Once the 36 days have expired, the remaining funds of the slashed validators can be transferred.
As can be seen in the lifecycle diagram, an exited validator cannot re-enter active state through any mechanism. That is, once a validator exits, his funds remain dormant until transferred. Note that you cannot transfer funds during phase 0 of Ethereum 2.0 - all exited validator funds will remain with the validator until funds transfer operations are introduced. The reason for the lack of transfer operations is the lack of user accounts that can transfer ETH.
Extended Validator Lifecycle
Explain the life cycle of Ethereum validators in detail: how to ensure the normal operation of the Ethereum network?
Understanding what transitions between states require and how long they take is critical to ensuring the successful operation of Ethereum 2.0 staking infrastructure. From the initial deposit to the withdrawal of funds, the life cycle shows what can happen in each state and provides an explicit explanation of the validator's behavior at any time.
footnote
footnote
Footnote 1: It is worth noting that Ethereum 2.0 does not set a clear state mechanism; that is to say, the name of the state is proposed by the author for easy understanding.
Footnote 2: 1,024 Ethereum 1.0 blocks plus 32 Ethereum 2.0 epochs.
Footnote 3: This assumes the deposit protocol requires the full 32 ETH. If the deposit agreement is less than this threshold, the validator will stay in the deposited state until more deposit agreements increase the validator's balance to at least 32 ETH.
Footnote 4: If not, another deposit can be added to increase the validator's balance to this amount.
Footnote 5: Each epoch is (active + withdrawn + slashed validators)/65536, and the minimum value is 4.
Footnote 6: 4 epochs.
Footnote 7: A verifier in each epoch can only witness once, and only one designated verifier in each slot performs the duties of the proposer.
Footnote 8: 256 epochs
Footnote 9: 8192 epochs