# 每个周期（每 6.4 分钟）可以退

By [间人的](https://paragraph.com/@0xaf26d0d49f1f3ee95c1dc85cbc3b2b1426281e91) · 2023-04-10

---

图 3 描述了退出一个活动验证器所需的高级步骤。让我们简单地来谈谈每一个步骤。

一个[活跃的](https://www.attestant.io/posts/understanding-the-validator-lifecycle/#:~:text=Active%20%2D%20the%20validator%20is%20attesting,validator%20is%20no%20longer%20attesting)验证器，具有 0x01-类型提款凭证，按照预期提出并验证块。验证者的[私钥](https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/keys/#validator-key)被用来签署[自愿退出](https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#voluntaryexit)（VE）操作，而[已签署的 VE](https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#signedvoluntaryexit)（通过 CL 客户端）提交给以太坊的 CL. 每个时段最多处理 [16](https://github.com/ethereum/consensus-specs/blob/e59c0afe79c5d5eef73ddd31991e22beef27e366/configs/mainnet/phase0.yaml#L142) 个 VE（每 12 秒）。一旦 VE 操作被处理，并且经过至少 [5 个历时](https://eth2book.info/bellatrix/part3/helper/misc/#compute_activation_exit_epoch)（32 分钟）的延迟，验证器的状态就会从激活状态更新为[退出](https://www.attestant.io/posts/understanding-the-validator-lifecycle/#:~:text=Active%20%2D%20the%20validator%20is%20attesting,validator%20is%20no%20longer%20attesting)状态。在这一点上，退出的验证器被分配了一个退出历时（即验证器将被退出的历时），并正式进入退出队列。虽然验证器现在已经发出了退出的信号，但它仍然必须执行所有验证器的职责（即区块提案和证明），直到它通过退出队列被处理。退出队列的长度取决于活跃的以太坊验证器的总数和已经在队列中的验证器的数量。在验证器通过退出队列处理后，其状态从正在退出更新为[已退出](https://www.attestant.io/posts/understanding-the-validator-lifecycle/#:~:text=Active%20%2D%20the%20validator%20is%20attesting,validator%20is%20no%20longer%20attesting)，并停止验证区块。

验证器退出率的限制

由于[一些原因](https://notes.ethereum.org/@vbuterin/serenity_design_rationale#Exiting)，重要的是 PoS 协议的验证器集别变化得太快。因此，验证器的退出受到退出队列的速率限制。退出队列的持续时间是协议的[流失限制](https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#get_validator_churn_limit)的函数，以及在感兴趣的验证器之前要退出的验证器数量。

Churn limit 是一个变量，它定义了每个周期（每 6.4 分钟）可以退出的最大验证器数量，并由以下的表达式给出：

Churn Limit =max(4, active\_validators/65536)

根据上面的表达式，流失限制将是 4，直到有 327680 个活跃的以太坊验证器，在这一点上它就会变成 5. 在这之后，每有 65536 个新激活的验证器（[流失限制商数](https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#validator-cycle)），流失限制就会增加一个。

截至 2023 年 2 月 23 日，大约有 [525000](https://beaconcha.in/) 个活跃的以太坊验证器。从图 4 和图 5 中，我们可以看到，目前的流失限制是 8 个，这意味着每天可以退出 1800 个验证器（见图 4）。

---

*Originally published on [间人的](https://paragraph.com/@0xaf26d0d49f1f3ee95c1dc85cbc3b2b1426281e91/6-4)*
