一文详解ETH 2.0

资讯 2024-07-10 阅读:63 评论:0
文章来源:The Beacon Chain Ethereum 2.0Source: The Beacon Chain Etheeum 2.0 翻译:swifterThis post...
美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

文章来源:The Beacon Chain Ethereum 2.0

Source: The Beacon Chain Etheeum 2.0

翻译:swifter

This post is part of our special coverage Egypt Protests 2011.

想弄明白以太坊2.0,就要弄明白信标链;想弄明白信标链,对分片、时隙、纪元、验证器、认证和信标链的充分理解就非常重要。

To understand Ether 2.0, it is necessary to understand the beacon chain; to understand the beacon chain, it is important to fully understand the fragments, the gaps, the period, the period, the authentication, the authentication and the beacon chain.

分片 Sharding

Shaping

包括以太坊在内的区块链项目,目前都普遍面临“可扩展性”的问题:每个节点都必须验证并执行网络中的每笔交易(这种执行的消耗是非常昂贵的)。

The issue of “extensibleness” is now common in block chain projects, including Etheria: each node of

目前有两种主要的扩容方法:

There are currently two main modes of expansion:

  • 垂直扩容,增强节点性能
  • 水平扩容,增加节点数量

而对于去中心化系统,区块链需要横向扩展。以太坊2.0的目标是让节点能在消费级硬件(指的是容易买到,并且性能较高的硬件产品)上运行,因此就诞生了对数据库水平拆分的技术,也就是分片。

For decentralised systems, the block chain needs to be extended horizontally. The goal of Ether 2.0 is to allow nodes to run on consumer hardware (which is easy to buy, and which has a high performance), hence the technology to split the database horizontally, i.e., fragments.

通常来说,分片链都有各自仅处理它的任务的节点子集——虚拟矿工、验证器被分配到分片,并且只处理和验证该分片(链)中的交易。

Typically, the Fragmentation Chain has nodes that deal only with its tasks — virtual miners, certifiers are assigned to fragments, and only deals in the fragment (chain) are processed and validated.

以太坊的分片链有很多动态节点合集(静态:手动添加创建,动态:后台代码帮你实现数据绑定),并且在不同的区块高度分片上的节点集不同。因此,分片的主要挑战就是安全性——由于验证器是被随机组合分布于多个分片中的,那就有一定的概率会出现,许多恶意验证器被同时分配到单个分片。

There are many dynamic nodes (static: creation by manual addition, dynamics: back-office code to help you bind data) in the cell, and there are different nodes on the high partitions. Thus, the main challenge for the section is security — since the authenticator is randomly grouped in multiple pieces, there is a certain probability that many malicious authenticators will be assigned to individual pieces at the same time.

对此,项目方想了个法子:

每个分片区块都被安插了一个(伪)随机的验证者委员会,以此确保所有验证器中只有少于 1/3 的攻击者。

Each sub-block was placed in a random (false) Commission of Certifiers to ensure that there were fewer than one third of the attackers in all the certifiers.

在以太坊2.0中,最初会有64个分片,每一个分片都可以看作是一条独立的“新链”。而信标链作为枢纽链,将会成为分片与其他64个分片进行双向沟通、信息传递,从而使跨分片交易顺利进行。

In Ether 2.0, there would initially be 64 pieces, each of which could be seen as a separate “new chain.” As a hub chain, the beacon chain would be a two-way communication and information transfer between the pieces and the other 64 pieces, thereby enabling the cross-section trade to proceed smoothly.

Slots and Epochs(时隙和纪元)

Slots and Epochs (time gap and era)

信标链被誉为以太坊 2.0的心跳,它为系统的和谐与共识提供了节拍、节奏,每个时隙为 12 秒,一个纪元为 32 个时隙,即 6.4 分钟。

The beacon chain is known as Ether's 2.0 heart beat, which provides the beat and rhythm of the system's harmony and consensus, with 12 seconds per time gap, and 32 minutes per period, with 6.4 minutes.

slot是将区块添加到信标链和分片的时间间隔。你可以想象信标链和分片链是同步编排的,当系统处于最佳运行状态时,每12 秒添加 1 个信标(链)块和 64 个分片块。

Slot is the time interval during which a block is added to the beacon chain and the segment. You can imagine that the beacon chain and the segment chain are synchronized, adding 1 beacon (chain) block and 64 fragments every 12 seconds when the system is optimally active.

一个slot就是一个区块时间(slot可以是空的)。信标链和分片的创世块位于 Slot 0。分片将在比信标链的 Epoch 0 更远的 Epoch 开始,但同时也会有自己的 Epoch 0,其中也包括创世块。

A slot is a block of time (slot can be empty). The beacon chain and the fragments of the creation block are located in Slot 0. The fractions will begin at Epoch 0, which is further away from the beacon chain, but they will also have their own Epoch 0, which also includes the creation block.

Validators, Attestations, and the Beacon Chain(验证器、认证和信标链)

Validadors, Attestations, and the Beacon Chain (certifier, authentication and beacon chain)

原理上,工作量证明 (PoW) 和矿工有关。但在以太坊2.0 中,验证器就是权益证明的"虚拟矿工"。他们的激励措施稍后将在 Staking Rewards and Penalties 中讨论。

Technically, the workload proof is related to the miners. But in Ether 2.0, the authenticator is the "virtual miners." Their incentives will be discussed later in Staking Rewards and Penalties.

区块提议者是被伪随机选择来构建区块的验证者,有时候,他们也是对信标块和分片块进行投票的证明者。这些投票会被记录在信标链中(投票决定了信标链的头部和分片的头部)。

Block proponents are the certifiers who are chosen by false random choice to build blocks, and sometimes they are also the ones who vote on beacon blocks and fragments. These votes are recorded in the beacon chain (the vote determines the head of the beacon chain and the head of the segment).

在每个纪元,一个验证器被伪随机分配到一个slot和分片。验证者需要参与该分片链的共识并投票给该分片的头部,然后,验证器会将分片头链接到一个slot的信标块。

In each era, a authenticator is assigned to a slot and a snippet in a pseudo-random. The certifier needs to participate in the consensus of the snippet chain and vote for the head of the snippet, and then the certifier will link the slot to a slot's beacon.

验证者通过余额加权投票来证明,然后再通过广播证明。

The certifying officer is certified by a weighted balance vote and then by broadcast.

验证者之间可以相互监督,并通过报告其他投票冲突或提出多个区块的验证者而获得奖励。

Certifying officers can monitor each other and are rewarded by reporting other voting conflicts or proposing multiple blocks of certification.

信标链主要分为:验证者地址、每个验证者的状态、验证者提交的证明和与分片建立的链接。

The beacon chain is divided into, inter alia, the address of the certifying authority, the status of each certifying authority, the certificates submitted by the certifying authority and the links established with the fragments.

验证器作为ETH2.0上的虚拟矿工,由ETH的质押者在2.0的网络上激活。好比在 PoW 中,用户通过购买硬件成为矿工;而在以太坊 2.0 中,用户通过质押 ETH 以激活和控制验证器。

The authenticator is a virtual miner on ETH 2.0, activated by an ETH pledgeer on a 2.0 network. As in Pow, the user becomes a miner by buying hardware; in Ether 2.0, the user activates and controls the authenticator through a pledge of ETH.

将质押者与权益相关联,将验证器与账户余额相关联会更清晰。每个验证器的最大余额为 32 ETH,但质押者可以质押他们所有的 ETH。每抵押 32 个 ETH,就会激活一个验证器。

Links the pledgeer to the interest, and the checker to the account balance will be clearer. The maximum balance of each identifier is 32 ETH, but the pledgeer can pledge all of their ETHs. For every 32 ETH mortgages, a validator is activated.

  • 验证由使用信标(链)节点的验证器客户端执行。
  • 信标节点具有跟踪和读取信标链的功能。
  • 验证器客户端可以实现信标节点功能或调用信标节点。
  • 一个验证器客户端可以执行一个或多个验证器。

Crosslinks: Rooting Shards to

the Beacon Chain(交叉连接:将分片扎根到信标链)

the Beacon Chain (cross-link: to root the pieces into the beacon chain)

所有分片链始终遵循信标链的共识。交叉连接是信标块中对分片块的引用,是信标链保持跟随分片链头部的方式。由于有 64 个分片,每个信标块最多可以包含 64 个交联。一个信标块可能只有一个交叉连接,如果在那个slot,没有其他 63 个分片链的块。Eth2 Phase 1 计划进行交联,将分片链嫁接到到信标链中,作为分叉连接、分片链确定性和跨分片通信的基础。

Cross-linking is the reference in the beacon block to the segment and the way the beacon chain keeps following its head. With 64 pieces, each beacon block can contain up to 64 links. A beacon block may have only one cross-link, and if there is no other 63 segments in the slot, there is no other segment chain. Eth2 Phase 1 plans to connect the segment chain to the beacon chain as a basis for cross-linking, segment determination and cross-section communication.

Committees(委员会)

Committees (Committee)

委员会是验证者的集合。为了安全起见,每个slot(在信标链和每个分片中)都有至少 128 个验证者的委员会。信标链在称为 RANDAO 的伪随机过程上强制达成共识,并以以太坊信标链的名字命名向公众发出随机数的随机信标的概念。

The committee is the assembly of certifiers. For security reasons, each slot has a committee of at least 128 certifiers (in the beacon chain and in each piece). The beacon chain enforces consensus on the pseudo-random process known as RANDAO, and sends random random beacons to the public after the name of the tayapan beacon chain.

总的来说,攻击者获得委员会 ? 控制权的可能性不到万亿分之一。

In general, the attackers have access to the Commission, and the possibility of control is less than one in a trillion.

在每个slot,一个伪随机过程 RANDAO 为每个时隙选择提议者,并将验证者随机分配给委员会。提议者由 RANDAO 选择,并在验证器账户的余额上加权。验证者可能是同一 slot 的提议者和委员会成员,但这不是常态。这种情况发生的概率是 1/32,所以我们每个 epoch 都会看到它一次。上图描绘了一个验证者少于 8,192 人的场景,否则每个slot将至少有两个委员会。

In each slot, a pseudo-random process RANDAO selects the proposer for each gap and assigns the verifyer randomly to the committee. The proposer is chosen by RANDAO and weighs on the balance of the verifyor account. The verifier may be the proposer and member of the same slot account, but this is not the norm. The probability is 1/32, so each epoch will see it once. The graph shows a scene of less than 8,192 people, otherwise each slot will have at least two committees.

这份对于信标链的解释侧重于信标委员会:为信标链服务的验证者。委员会被伪随机分配了一个分片以交叉链接到信标块(没有固定成员的委员会),负责交联分片块的委员会会随区块高度变更。

This explanation of the beacon chain focuses on the Beacon Board: the Certifier who serves the beacon chain. The Committee was pseudo-randomly assigned a segment to cross-link the beacon block (a committee without a fixed member), and the committee responsible for handing over the links would vary at the height of the block.

单独构建分片链块的分片委员会是一个未来的话题。许多分片区块可能由不与信标链交互的分片链验证者构建。但是如果需要一个分片与其他分片进行通信,它就需要一个信标委员会将其与信标块进行交叉链接。

A segment committee that builds the fragments separately is a topic for the future. Many of the fragments may be constructed by a branch chainer that does not interact with the beacon chain. But if a segment is needed to communicate with other sub-sections, it requires a beacon committee to cross-link them with the beacon block.

该图是对三个 slot 中发生的事情的综合描述。在 Slot 1 中,提出一个区块,然后由两个验证者证明;A 委员会的一名验证者离线。Slot 1 处的证明和块传播网络并到达许多验证者。在 Slot 2 中,提出了一个区块,B 委员会的验证器没有看到它,因此它证明信标链头是 Slot 1 的块。 注意这个验证器不同于 Slot 1 的离线验证器。信标链头被称为 LMD GHOST 投票。在 Slot 3 中,C 委员会中的所有验证者都运行 LMD GHOST 分叉选择规则,并独立证明同一个头部。

This map is a comprehensive description of what happened in three slots. In Slot 1, a block is proposed, then certified by two certifying officers; one of the certifiers in Committee A is offline. The certificate and block distribution network at Slot 1 reached many certifiers. In Slot 2, a block was proposed, and the B Commission's certifier did not see it, so it proved that the beacon chain head was a slot 1. Note that this certifier is different from the Slot 1 offline certifier. The beacon chain head is known as the LMD GOST vote. In Slot 3, all certifiers in Committee C run the LMD GHOST cross selection rule and independently prove the same head.

一个验证者每个 epoch 只能在一个委员会中。通常,有超过 8,192 个验证者:这意味着每个 slot 有多个委员会。所有委员会的规模相同,并且至少有 128 名验证者。当验证者个数少于 4,096 时,安全性会降低,因为单个委员会的验证者少于 128 个。

In general, there are more than 8,192 certifiers: this means that there are multiple certifiers per slot. All committees are of the same size and have at least 128 certifiers. When the number of certifiers is less than 4,096, security is reduced because there are fewer certifiers in individual committees than 128.

在每个epoch,验证者都被均匀地分配到 slot 中,然后再细分为适当大小的委员会。该 slot 中的所有验证器都需要证明信标链头。该 slot 中的每个委员会都试图交叉链接一个特定的分片。重组算法会增加或减少每个插槽的委员会数量,以获得每个委员会至少 128 个验证者。

In each epoch, the certifying officer is evenly distributed to the slot, which is then broken down into the appropriate size committee. All the authenticators in the slot are required to prove the beacon chain. Each committee in the slot tries to cross-link a particular segment. The reorganization algorithm increases or reduces the number of committees per chute to obtain at least 128 certifiers per committee.

例如,假设有 16,384 个验证器。512 个验证者被伪随机分配到slot 1,另外 512 个验证者被分配到slot 2,依此类推。然后,Slot 1 的 512 个验证者被细分为四个委员会,并伪随机地分配给分片。假设分片 33、55、22、11 是分片分配。所有 512 个验证者都投了 Slot 1 LMD GHOST 投票。四个委员会之一的 128 名验证者试图交叉链接分片 33。在另一个委员会中,128 名验证者试图交叉链接分片 55。另一个委员会中的 128 名验证者试图交叉链接分片 22。另外 128 名验证者试图交叉链接分片 11。

For example, it is assumed that there are 16,384 certifiers. 512 certifiers were assigned to slot 1, and 512 certifiers were assigned to slot 2, and so on. Then, 512 certifiers from Slot 1 were divided into four committees, and pseudo-randomized subsects. Assuming subsects 33, 55, 22, 11 are partitions. All 512 certifiers voted. 128 certifiers from one of the four committees tried to cross-link sub-filtration 33. In another committee, 128 certifiers tried to cross-link sub-s. 128 certifiers from another committee tried to cross-link sub-filt 22. Another 128 certifiers tried to cross-link.

对于Slot 2,重复该过程。Slot 2 的 512 个验证者被细分为四个委员会,并伪随机分配给分片。假设分片 41、20、17、15 是分片分配。Slot 2 的所有 512 个验证者都证明了他们对 Slot 2 信标链头的看法。委员会试图交叉链接分片 41、20、17、15。

For Slot 2, repeat the process. The 512 certifying officers of Slot 2 were broken down into four committees and allocated to the fragments in a pseudo-random. Assumptions 41, 20, 17, 15 are partitions. All 512 authenticators of Slot 2 have confirmed their views on the Slot 2 beacon chain. The committee tried to cross-link the pieces 41, 20, 17, 15.

该过程对 epoch 中的剩余 Slot 重复。每个验证者都有一个可以发言、证明和交联的 Slot。在 epoch 结束时,所有 16,384 名验证者都有机会进行证明和交联。但到目前为止,验证者投票是针对特定 Slot 的,而不是针对特定Epoch的。这就像为当地政府投票,而不是在更广泛的全国选举中投票。所有 16,384 名验证者都没有对同一件事进行投票。即将到来的关于检查点和终结性的部分描述了验证者在他们发言时所投的特定 Slot 的投票。在他们分配的Slot,所有 16,384 名验证者也投票支持 epoch 的检查点。

The process repeats the rest of Slot in the epoch. Each certifying officer has a Slot that can speak, prove and connect. At the end of the epoch, all 16,384 certifying officers have had the opportunity to prove and connect. So far, however, the certifying officers voted for a particular Slot, not for a particular Epoch. This is like voting for the local government, not for a broader national election. All 16,384 certifying officers did not vote on the same matter. The forthcoming section on inspection points and finality describes the particular Slot vote that the certifying officers cast in their statements. In their assigned Slot, all 16,384 certifying officers also voted in favour of the epoch site.

Beacon Chain Checkpoints

检查点是一个 epoch 第一个 slot 中的一个块。如果没有这样的块,则检查点是前一个最近的块。每个 epoch 总是有一个检查点块。一个区块可以是多个 epoch 的检查点。

Checkpoint is a block in the first slot of an epoch. If there is no such block, the checkpoint is the last one. Each epoch always has a checkpoint. One block can be a checkpoint for multiple epochs.

注意Slot 65 到Slot 128 是空的。Epoch 2 检查点应该是 Slot 128 的块。由于 Slot 丢失,Epoch 2 检查点是 Slot 64 的前一个块。Epoch 3 类似:Slot 192 是空的,因此 Slot 180 的前一个块是Epoch 3 检查点。

Note that Slot 65 to Slot 128 is empty. The Epoch 2 checkpoint should be a block of Slot 128. The Epoch 2 checkpoint is the first block of Slot 64 as a result of Slot's loss. Epoch 3 is similar: Slot 192 is empty, so the first block of Slot 180 is the Epoch 3 checkpoint.

Epoch 边界块 (EBB) 是一些文献中的一个术语(例如 Gasper 论文,上图的来源和后来的一个),它们可以被认为是检查点的同义词。

The Epoch Boundaries (EBB) are a term in some literature (e.g. the Gasper paper, the source of the above figure and a later one), which can be considered synonymous with the inspection point.

在进行 LMD GHOST 投票时,验证者还会为其当前时期的检查点投票,称为目标。此投票称为 Casper FFG 投票,还包括一个先前的检查点,称为源。在图中,Epoch 1 中的验证者投票支持了创世区块的源检查点,以及 Slot 64 中块的目标检查点。在 Epoch 2 中,同一验证者投票支持相同的检查点。只有分配到某个插槽的验证者才会对该插槽投下 LMD GHOST 投票。但是,所有验证者都为每个 epoch 检查点投了 FFG 投票。

In the LMD GHOST ballot, the certifying officer also casts a vote for its current check point, known as the target. The vote is called Casper FFG, and includes a previous check point, called source. In the graph, the certifying officer in Epoch 1 voted for the source check point for the creation block and the target check point for Slot 64. In Epoch 2, the same certifying officer voted for the same check point. LMD GHOST was voted on the slot only by the certifying officer assigned to a slot. However, all certifying officers voted for each FFG checkpoint.

Supermajority

由所有活跃验证者总余额的 ? 进行的投票被视为绝对多数。在教学上,假设有三个活跃的验证者:两个有 8 个 ETH 的余额,一个唯一的验证者有 32 个 ETH 的余额。绝对多数票必须包含唯一验证者的投票:尽管其他两个验证者可能会投票给唯一验证者,但他们没有足够的余额来组成绝对多数。

Voting by the total balance of all active certifying agents? The voting is considered an absolute majority. In teaching, there are three active certifying officers: two with 8 ETHs and one with 32 ETHs. The absolute majority must include the vote of the sole certifying authority: although the other two certifications may vote for the sole certificationer, they do not have enough balance to form an absolute majority.

Finality

当一个 Epoch 结束时,如果它的检查点获得了 ? 绝对多数,则该检查点是合理的。

When an Epoch ends, the checkpoint is reasonable if it gets an absolute majority.

如果检查点 B 是合理的,并且紧接下一个 epoch 中的检查点变得合理,则 B 成为最终确定的。通常,一个检查点在两个 epoch 内完成,即 12.8 分钟。

Checkpoint B becomes final if the check point in the next epoch becomes reasonable. Normally, a check point is completed in two epochs, i.e. 12.8 minutes.

平均而言,用户交易将在一个时期的中间发生在一个区块中。距离下一个检查点还有半个 epoch,这表明交易终结时间为 2.5 个 epoch:16 分钟。最理想的情况是,一个 Epoch 的第 22 个 Slot 将包含超过 ? 的证明。因此,交易终结平均为 14 分钟(16+32+22 个slot)。区块确认来自区块的证明提交、证明验证、最终确定。用例可以决定它们是否需要终结性或较早的安全阈值就足够了。

On average, a user transaction will occur in a block in the middle of a period. Half an epoch is left to the next check point, indicating that the transaction ends at 2.5 epoch:16 minutes. Ideally, the 22nd Slot of an Epoch will contain more than?

这是一个 Slot64 作为一个检查点获得 2/3 的大多数验证者同意,然后前一个检查点达到最终状态的例子。

This is an example where Slot64 obtained the consent of a majority of two thirds as a check point, and then the previous check point reached its final state.

信标链头发生了什么?

What happened to the beacon chain?

Epoch 边界块在 Slot 96 处被提出的,其中包含epoch 2 检查点的证明。Epoch 2 检查点的证明数量现在达到了 ? 的绝对多数。这会导致 Epoch 2 检查点的对齐,从而导致先前已对齐的 Epoch 1 检查点的终结。Slot 32 的终结立即导致它之前的所有块的终结。在完成检查点时,可以完成的块数量没有限制。尽管最终性仅在 epoch 边界处计算,但证明会在每个区块中累积,如下面的替代叙述“从起源到头部可能发生的事情”中所述。

The Epoch boundary block was proposed at Slot 96, containing proof of the epoch 2 checkpoint. The number of certificates at the Epoch 2 checkpoint has now reached an absolute majority. This will lead to the alignment of the Epoch 2 checkpoint, leading to the end of the previously aligned Epoch 1 checkpoint. The end of Slot 32 immediately leads to the end of all the blocks before it. At the completion of the checkpoint, there is no limit on the number of blocks that can be completed. Although the finality is calculated only at the epoch boundary, it is proved to accumulate in each block, as described in the alternative description “what can happen from origin to head”.

从 Slot 1 到 Slot 32 的信标块中包含的所有交联将导致分片链的终结。换句话说,当一个分片块被交联成一个最终确定的信标块时,它才被最终确定。交联本身不足以确定分片区块,但有助于分片链的分叉选择。

All the links contained in the beacons from Slot 1 to Slot 32 will lead to the end of the fragment chain. In other words, a fragment is only finalized when it is turned into a finally identified beacon. The connection itself is not sufficient to identify the segment blocks, but it helps the segmental fork selection.

从创世块到头部块会发生什么?

What's going to happen from Genesis to Head?

参照上面的最后一幅插图,这是一个可以从创世块到当前块的中故事情节。从 Slot 1 到 Slot 63 的所有提议者都提出了一个区块,并且这些都出现在链上。对于 Epoch 1 中的每个区块,其检查点(位于 Slot 32 的区块)累积了 55% 验证者的证明。Slot 64 的块包括对 Epoch 1 检查点的证明。现在,70% 的验证者已经证明了 Epoch 1 检查点:这证实了它的合理性。Epoch 2 检查点(Slot 64)在整个 Epoch 2 中积累证明,但没有达到 ? 绝对多数。Slot 96 的块包括了对 Epoch 2 检查点的证明。这证实了达到 ? 绝对多数和 Epoch 2 检查点的合理性。证明 Epoch 2 检查点最终确定了 Epoch 1 检查点和所有先前的块。

With reference to the last illustration above, this is a story from the creation block to the current block. All the proponents from Slot 1 to Slot 63 have proposed a block, and all of these are on the chain. For each block in Epoch 1, the checkpoint (in Slot 32) has accumulated 55% of the certification of the authenticator. Slot 64 contains proof of the Epoch 1 checkpoint. Now, 70% of the verifiers have proved the Epoch 1 checkpoint: this confirms its reasonableness. The Epoch 2 checkpoint has accumulated evidence of the Epoch 2 as a whole, but it has not reached an absolute majority. The Slot 96 section includes proof of the Epoch 2 checkpoint. This confirms the validity of the absolute majority and the Epoch 2 checkpoint.

这是另一种可能的情况。仅考虑到 Epoch 1。在提出 Epoch 2 的检查点之前,Epoch 1 的检查点可能已经获得 ? 绝对多数。例如,当 Slot 32 到 Slot 54 中的块被提出时,证明检查点(Slot 32)合理的证明可能已经达到了 ? 绝对多数。在这种情况下,检查点将在 Epoch 2 之前被证明。检查点可以在其当前 epoch 被证明,但它的最终确定至少需要它之后的 epoch。

This is another possibility. Consider only Epoch 1. The Epoch 1 checkpoint may have been obtained before the Epoch 2 checkpoint was presented. An absolute majority is obtained. For example, when a block from Slot 32 to Slot 54 is presented, the proof that the check point (Slot 32) is reasonable may have reached an absolute majority. In this case, the checkpoint will be proven before Epoch 2. The checkpoint can be proved by its current epoch, but it is ultimately determined that it is needed at least after the epoch.

最终确定对于分片和以太坊区块链各方对交易进行保证至关重要。最终性降低了跨分片通信的复杂性。如果没有最终确定性,分片内和分片之间的事务级联回滚将是破坏性的,并且可能会抵消分片的好处。

Finalization is essential to guarantee transactions between the parties in the fragments and the Ether section chain. Finality reduces the complexity of cross-discrete communications.

Attestations: a closer look

证明包含 LMD GHOST 投票和 FFG 投票。最理想的是,所有验证者在每个 epoch 提交一个证明。一个证明有 32 次机会被包含在链上。这意味着一个验证者可能在一个 epoch 中包含两个链上证明。当验证者的证明被包含在其指定位置的链上时,他们将获得最多的奖励;后来加入是一种衰减的奖励。为了给验证者时间做准备,他们提前一个 epoch 分配给委员会。提议者仅在 epoch 开始后才被分配到 Slot。尽管如此,秘密领导人选举研究旨在减轻对提议者的攻击或贿赂。

The certificate contains the LMD GHOST vote and the FFG vote. Ideally, all certifying officers submit a certificate in each epoch. A certificate has 32 opportunities that are included in the chain. This means that a certificationer may contain two chains in an epoch. When the certification of the certifying officer is included in the chain of his designated position, they will receive the greatest reward; later on, it is a decaying reward. To prepare the time for the certificationer, they assign an epoch to the committee. The proposer will be assigned to Slot only after the epoch begins.

委员会允许将来自每个证明者的签名组合成单个聚合签名的技术优化。当同一委员会中的验证者进行相同的 LMD GHOST 和 FFG 投票时,他们的签名可以聚合。

The Commission allows technical optimization of the combination of signatures from each certifying person into individual polymer signatures. Their signatures can be aggregated when the same LMD GHOST and FFG certifying officers in the same committee vote.

Staking Rewards and Penalties

  • 证明奖励attester rewards
  • 证明惩罚attester penalties
  • 质押奖励的下行风险
  • 作弊惩罚和举报奖励
  • 提议者奖励
  • 不活跃验证者惩罚

详述如下:

details as follows:

  1. 验证者通过做出大多数其他验证者同意的证明(LMD GHOST 和 FFG 投票)而获得奖励。在 eth2 第一阶段,验证者也将获得交联奖励。最终区块中的证明更有价值。
  2. 另一方面,验证者会因未证明或证明未最终确定的区块而受到处罚。
  3. 在概述不太常见的惩罚和奖励之前,您可能想了解成为抵押者的不利风险。作为关注您可能会损失多少 ETH 的质押者,这几乎是您可以赚取多少的一面镜子。例如,如果验证者在一年内从证明者奖励中赚取 10%,那么(诚实的)验证者如果做得最糟糕,他们将损失 7.5%。始终离线或始终对未最终确定的区块进行投票的验证者将受到 3/4 的处罚,该金额是验证者因准时完成最终证明而获得的奖励金额的 3/4。365 天的示例意味着离线几天或几周的惩罚要小得多:离线 36 天将损失约 0.75%(除非存在下面 #6 中描述的不活动泄漏)。
  4. Slashings 是惩罚,范围从超过 0.5 ETH 到验证者的全部质押。一个诚实、安全的验证者的奖励不会被其他验证者的行为所削减。对于符合惩罚要求的行为,验证者会失去至少 1/32 的余额并被停用(“强制退出”)。验证器将受到惩罚,就好像它在 8,192 个 epoch 中处于离线状态一样。该协议还根据几乎同时被削减的其他人的数量施加了额外的惩罚.额外惩罚的基本公式是:validator_balance * 3 * fraction_of_validators_slashed。一个影响是,如果所有验证者中有 1/3 在相似的时间内犯下可削减的罪行,他们将失去全部余额。报告攻击的验证者将获得举报人的奖励。
  5. 最终确定的区块的提议者获得可观的奖励。始终在线做得很好的验证者因提出具有新证明的区块而获得的总奖励增加了约 1/8。当发生惩罚时,提议者也会因在区块中包含惩罚证据而获得小额奖励。在 eth2 阶段 0 中,所有举报人的奖励实际上都流向了提议者。
  6. 以太坊 2.0 是一个具有许多机制的系统,其中一些机制可以通过它们的整体效果得到更多的理解。设计的奖励和惩罚最终导致不活动泄漏惩罚。与#3 中的典型风险不同,这是严重且罕见的。基本上,如果自最终确定以来已经超过四个 epoch,验证者将遭受不活动惩罚,该惩罚以二次方增加,直到检查点最终确定。不活动惩罚(或“二次泄漏”)保证了这种类型的结果:如果 50% 的验证者掉线,则区块将在 18 天后再次开始最终确定。二次泄漏将有问题的验证者排到强制退出,这样其他验证者将成为可以恢复最终确定性的 ? 多数。不活动泄漏不会耗尽运行最佳的验证器。在不活动泄漏期间,证明者奖励为零;验证者像往常一样获得提议者和举报人的奖励。

Slashable Offences

验证者有三个削减条件。它们可以被描述为双重提案、FFG 环绕投票和 FFG 双重投票:

The certifier has three reduction conditions. They can be described as a double proposal, a FFG round vote and a FFG double vote:

  1. 双重提议是提议者为其分配的 Slot 提议多个区块。
  2. 环绕投票是验证者投出的 FFG 投票围绕或被他们之前所做的 FFG 投票包围。以下是基于验证者在 Epoch 5 中使用 Slot 32 的源和 Slot 128 的目标进行 FFG 投票的场景的两个示例: --在 Epoch 6 中以 Slot 64 为源和 Slot 96 为目标的 FFG 投票将是被其 Epoch 5 投票包围的 FFG 投票。 --在 Epoch 6 中以 Slot 0 为源和 Slot 160 为目标的 FFG 投票将围绕他们在 Epoch 5 中的 FFG 投票。
  3. 双重投票是验证者在同一时期为任意两个目标投 2 次 FFG 投票。这可能发生在分叉期间。

蓝色箭头是两个 FFG 投票,一个投票给左分叉上 Slot 128 上的目标块,另一个投票给右分叉上 Slot 128 上的目标块。一个同时投两票的验证者犯了一种称为双重投票的可惩罚行为。上面是一个双重投票的例子,其中源检查点不同。

Blue arrows are two FFG votes, one for the target block on Slot 128 on the left fork, and the other for the target block on the right fork on Slot 128. A certifier who casts two votes at the same time commits a punishable act called double voting. This is an example of a double vote, with different source points.

接下来是一个双重投票源相同(Epoch 0 checkpoint),目标不同的场景。

This is followed by a double vote (Epoch 0 checkpoint) with different targets.

上分叉有一个 Epoch 1 检查点“block 64”。下分叉有一个 Epoch 1 检查点“block 63”。(因为在下分叉的 Slot 64 没有提议区块;回顾一下信标链检查点部分的内容。)投票给“block 64”的 Epoch 1 目标和“block 63”的 Epoch 1 目标是双重的 投票。双重投票是指验证者在同一 epoch 为两个目标投出 FFG 投票。

The upper fork has an Epoch 1 checkpoint “block 64”. The lower fork has an Epoch 1 check point “block 63”. (Because there is no block proposed in Slot 64 at the lower fork 64; review the contents of the beacon chain check point.) The vote for the Epoch 1 goal of “block 64” and the Epoch 1 objective of “block 63” is a double vote. Double vote means that the certifying officer casts a FFG vote for both objectives in the same epoch.

一个举报验证者需要包括相互冲突的投票来证明另一个验证者应该被惩罚。在大量历史数据中有效地找到相互冲突的投票是算法和数据结构的挑战。

A whistle-blower needs to include conflicting votes to prove that another certifier should be punished. Effectively finding conflicting votes in large amounts of historical data is a challenge for algorithms and data structures.

验证器可以完全控制以避免被惩罚:它只需要记住它签署的内容。诚实的验证者不能被其他验证者的行为惩罚。只要验证者没有签署冲突的证明或提案,验证者就不会被惩罚。

The authenticator can be fully controlled to avoid punishment: it only needs to remember what it has signed. An honest certifier cannot be punished for the conduct of other certifiers. A certifier will not be punished as long as the certifier does not sign a certificate or proposal of conflict.

验证器客户端可以使用多个信标节点来实现更好的正常运行时间、信任和离线保护等因素。在这些设置中,或者在使用备份验证器客户端的情况下,用户需要注意验证器不会签署冲突消息。

The authentication client can use multiple beacon nodes to achieve better normal operating times, trust, and offline protection. In these settings, or in the case of a back-up authentication client, the user needs to be aware that the authenticator will not sign conflicting messages.

Beacon Chain Validator Activation and Lifecycle

每个验证器需要 32 ETH 的余额才能激活。用户将 32 ETH 质押到以太坊主网上的存款合约中,将激活一个验证器。

Each authenticator needs 32 ETH balances to activate. The user pledges 32 ETH to a deposit contract on Ether's web site, and a validator is activated.

信标链停用(“强制退出”)所有余额达到 16 ETH 的验证器;质押者将能够提取任何剩余的验证器余额,但不能在 eth2 阶段 0 中提取。

The beacon chain is deactivated (“compulsory exit”) with all balances reaching 16 ETH; the pledgeer will be able to extract any remaining balance of the authenticator, but not in phase eth2.

验证者也可以在服务 2,048 个 epoch,大约 9 天后“自愿退出”。

Certifiers may also “voluntarily withdraw” after approximately nine days at 2,048 epoch.

在任何自愿或强制退出的情况下,质押者在撤回其股权之前都有四个时期的延迟。在这四个 epoch 内,验证者仍然可以被捕获和削减。诚实验证者的余额可在大约 27 小时内提取。但是被削减的验证器会导致 8,192 个 epoch(大约 36 天)的延迟。

In any case of voluntary or compulsory withdrawal, the pledgeer has four periods of delay before withdrawing his or her shareholdings. In these four epochs, the certificationer can still be captured and reduced. The balance of the honest certificationer can be extracted within about 27 hours. But the reduced certification device will result in a delay of 8,192 epochs (approximately 36 days).

为了避免在短时间内对验证器集进行大的更改,有一些机制限制了在一个 epoch 内可以激活或退出的验证器数量。例如,这些使得快速激活许多验证器来攻击系统变得更加困难。

In order to avoid major changes to the certifier collection in a short time, there are mechanisms that limit the number of certifiers that can be activated or withdrawn in an epoch. For example, these make it more difficult to quickly activate many certifiers to attack the system.

信标链使用更深层次的有效余额概念,与验证者余额相比,它的变化频率更低,并支持技术优化。

The beacon chain uses a deeper concept of effective balances, which changes less frequently than the balance of the certifying authority and supports technological optimization.

Wrapping Up

在每个 epoch,验证者被均匀地分配到槽中,然后再细分为适当大小的委员会。验证者只能在一个插槽和一个委员会中。

In each epoch, the certifier is evenly assigned to the chute, which is then broken down into appropriate size committees. The certifier can only be in one chute and one committee.

  • 一个 epoch 中的所有验证者都试图完成同一个检查点:FFG 投票
  • 分配给一个 slot 的所有验证者都尝试对同一个信标链头进行投票:LMD GHOST 投票
  • 分配给同一个委员会的所有验证器都试图交叉链接特定的分片

最优行为对验证者的奖励最多

信标链的激活在创世时至少需要 16,384 个验证者。验证者的数量可以通过削减或自愿退出来减少,或者可以激活更多质押者。随着系统升级到 eth2 阶段 1 及以后,预计会有更多的验证器。信标链至少需要 262,144 个验证者(超过 800 万个 ETH 质押)才能拥有包含 64 个交联的区块。

At least 16,384 certifiers are required to activate the beacon chain at the time of its creation. The number of certifiers can be reduced by reduction or voluntary withdrawal, or more pledgeers can be activated. As the system is upgraded to the eth2 phase 1 and later, more certifiers are expected. The beacon chain requires at least 262,144 certifiers (more than 8 million ETH pledges) to own blocks containing 64 links.

世界上从未有过可扩展的去中心化系统。

There has never been an expansionable decentralised system in the world.

作者:探索实验室;来自链得得内容开放平台“得得号”,本文仅代表作者观点,不代表链得得官方立场凡“得得号”文章,原创性和内容的真实性由投稿人保证,如果稿件因抄袭、作假等行为导致的法律后果,由投稿人本人负责得得号平台发布文章,如有侵权、违规及其他不当言论内容,请广大读者监督,一经证实,平台会立即下线。如遇文章内容问题,请联系微信:chaindd123。返回搜狐,查看更多

Author: Explore the Laboratories; From the Open-Text-of-Continution Platform, “Better Deal”, this paper only represents the author's view and does not represent the official position of the chain, that the originality and the authenticity of the content are assured by the contributor, that if the text is the legal consequences of the copying, forgery, etc., it is the author himself who is responsible for the publication of the article on the Platform, that if the content of the article is violated, irregular or otherwise inappropriate, it will be monitored by a wide audience and, if confirmed, the platform will immediately drop off. If you have a problem with the content of the article, please contact Twitter:chaind123. , see more

责任编辑:

美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址
文字格式和图片示例

注册有任何问题请添加 微信:MVIP619 拉你进入群

弹窗与图片大小一致 文章转载注明

分享:

扫一扫在手机阅读、分享本文

发表评论
平台列表
美化布局示例

欧易(OKX)

  全球官网 大陆官网

币安(Binance)

  官网

火币(HTX)

  官网

Gate.io

  官网

Bitget

  官网

deepcoin

  官网
热门文章
  • 区块链社区有哪些?区块链社区是什么?

    区块链社区有哪些?区块链社区是什么?
    展开全文...
  • 0.00006694个比特币等于多少人民币/美金

    0.00006694个比特币等于多少人民币/美金
    0.00006694比特币等于多少人民币?根据比特币对人民币的最新汇率,0.00006694比特币等于4.53424784美元/32.5436 16人民币。比特币(BTC)美元(USDT)人民币(CNY)0.000066944.53424784【比特币密码】32.82795436 16比特币对人民币的最新汇率为:490408.64 CNY(1比特币=490408.64人民币)(1美元=7.24人民币)(0.00006694USDT=0.0004846456 CNY)汇率更新时...
  • 0.00015693个比特币等于多少人民币/美金

    0.00015693个比特币等于多少人民币/美金
    0.000 15693比特币等于多少人民币?根据比特币对人民币的最新汇率,0.000 15693比特币等于10.6 1678529美元/76.86554996人民币。比特币(BTC)【比特币价格翻倍】美元(USDT)人民币(CNY)0.000/克洛克-0/5693【数字货币矿机】10.6 167852976.8655254996比特币对人民币的最新汇率为:489,807.72 CNY(1比特币= 489,807.72人民币)(1美元=7.24人民币)(0.00015693 U...
  • 0.00003374个比特币等于多少人民币/美金

    0.00003374个比特币等于多少人民币/美金
    0.00003374比特币等于多少人民币?根据比特币对人民币的最新汇率,0.00003374比特币等于2.2826 1222美元/16.5261124728人民币。比特币(BTC)美元(USDT)人民币(CNY)0.00003374克洛克-0/22216.5261124728比特币对人民币的最新汇率为:489807.72 CNY(1比特币=489807.72人民币)(1美元=7.24人民币)(0.00003374USDT=0.0002442776 CNY)。汇率更新于2024...
  • 2018-5-31币圈简报

    2018-5-31币圈简报
    一、要闻资讯类I. KEY INFORMATION CATEGORY1、央视:数字货币在京揭牌成立!中国或为此突变!1. View: Digital currency is established in Kyoto! China or mutated for it!中国数字货币来了˂a href="https://mp.weixin.qq.com/s/69fxKCf8GKSCscS4lT8WCA" Target="_blank"rel="noformlow"" Chinese...
标签列表