本文讲的是通往以太坊的未来之路。Eth2 开发者团队将当前的以太坊称为 “eth1”,也就是现在我们所熟知的 PoW 链。而未来的以太坊既不是 eth1,也不是 eth2,而是...以太坊:
This is the way to the future of Ethay. The Eth2 team of developers calls the current Etherms & & & & eth1 & rdquo; which is now the PoW chain that we know well. The future Ethal is neither Eth1 nor Eth2, but... Ethym:
让我们来梳理一下现在的以太坊:
Let's take a look at what's going on in Ether:
用户想要做一些事情 (“进行交易”),因此将其交易发送给矿工,矿工把它们打包成块并添加至一条不断增长的链中。矿工运行 PoW 共识机制 [1],以决定谁来添加下一个区块, 并执行区块中的交易,以确保交易是有效的。
Users want to do something (“ trading & rdquo;) and send their transactions to miners, who wrap them up into blocks and add them to a growing chain. Miners run the PoW Consensus Mechanism [1] to decide who adds the next block and executes the transactions in the blocks to ensure that the transactions are valid.
PoW 也不全是糟糕的,但我需要一个吸引人的题目
Pow's not all bad, but I need an attractive subject.
PoW 需要大量硬件运行密集的计算,造成了过高的能量消耗。我们并不会像大多数加密货币批评者那样谈论资源浪费 (他们通常的说辞是“为什么我们要用一种消耗国家资源的支付系统”?),我们所倡导的是,既然我们能够以相对较小的消耗去做同样的事情,那我们就应该这样做。
PoW needs a lot of hardware to run in intensive calculations, causing excessive energy consumption. We do not talk about waste of resources like most cryptic money critics (they usually say & & ldquo; why do we use a payment system that consumes national resources & & rdquo?) We advocate that, since we can do the same with relatively small consumption, we should do the same.
所以我们选择向 PoS 过渡,仅用一个小型服务器代替大量的挖矿设备,用验证者代替矿工。
So we chose to transition to Pos, replacing large quantities of mining equipment with only one small server, and miners with a certifier.
那第二步是怎样运作的?验证者到底在验证什么?
So how does the second step work? What is the certificationer verifying?
图:将以太坊的活动分为两部分 (共识层和执行层)
共识层确保每个人就某个正确的数据达成一致。而执行层实际上会解释这些数据,使其有意义。“数据”即与区块链任何形式的交互,如,部署一个合约、在交易所进行交易、发送支付交易等等...
The consensus level ensures that everyone agrees on a correct data. The enforcement level actually explains the data to make it meaningful. & ldquao; data & rdquao; i.e., any interaction with a block chain, e.g., deployment of a contract, dealing in an exchange, sending payment transactions, etc.
区块链的核心是在链中添加新的区块。当有新的区块添加时,该区块之前的状态会向区块后的状态迁移。这个状态汇总了从区块 0 到 N 的所有数据。
The core of the block chain is to add a new block to the chain. When a new block is added, the state before the block moves to the position after the block. This state aggregates all data from block 0 to N.
例如,如果该状态保存着记录 Alice 和 Bob 余额的账本,而新区块包含了 Bob 向 Alice 支付 10 代币的记录,那么这个新区块被添加至区块链之后,状态将会记录新的余额信息。“State after block N+1” (区块 N+1 之后的状态) 那个图中右边的虚线斑点就代表着添加了新区块之后的变化,这时可能会修改现有状态 (例如,Alice 和 Bob 的余额),或创建新的状态 (部署一个新的合约,或将 Carol 添加到账本...)
For example, if this state keeps the books of the recorded Alice and Bob balances, and the new block contains Bob's record of paying Alice for 10 tokens, the new block will record the new balance information when added to the block chain. “ State after Block N+1” (State after block N+1) The dotted spot on the right side of the map represents a change after the new block has been added, which may modify the current state (e.g., Alice and Bob's balance) or create a new state (place a new contract, or add Carol to the account book...)
第一步将共识层与执行层解耦;第二步从 PoW 向 PoS 转移
First step decoupling the consensus layer with the implementation layer; second step shifting from Pow to PS
Rollups 和 eth2 主要为了解决上图计划中的第一点:去除共识层与执行层的相关性。那么这项工作的进展如何?
Rollups and Eth2 are mainly designed to address the first point of the plan in the chart above: to remove the relevance of the consensus layer to the implementation level. So how is this work going?
自 2020 年 12 月以来,我们同时拥有着两条链在进行:
Since December 2020, we have had two chains at the same time:
- 第一条,是 PoS-共识链 (又名,信标链)
- 第二条,是我们可靠的 PoW-共识+执行链 (又名,eth1)
他们同时运行,但他们也可以相互通讯。但是,目前还没有实现这种功能...
They run at the same time, but they can also communicate with each other. However, this function has not yet been realized...
想要成为 PoS-共识的验证者,PoW-共识+执行链上的用户需要在存款合约中锁定 32 ETH,这会自动转移到 PoS-共识链中。一旦验证者被激活,他们就可以开始验证工作和获取奖励了。
To be a PoS-consensus certifier, users on the PoW-consensus+ implementation chain need to lock 32 ETHs in deposit contracts, which automatically moves to the Pos-consensus chain. Once the certifiers are activated, they can start the validation process and get the reward.
这种无法通讯的情况希望不会持续太久。“合并”将 PoS-共识链和 PoW-共识+执行链永久地桥接起来,也就是说验证者可以为执行层生产区块。合并后,我们拥有两种链:
This inability to communicate is not expected to last much longer. & ldquo; merge & rdquo; link the PoS-consensus chain with the PoW-consensus+ implementation chain permanently, which means that the certifier can produce blocks at the enforcement level. After the merger, we have two chains:
- PoS-共识链
- 一条基于 PoS 的执行链 (即 “eth1” 链)
合并之后,PoS-共识链的验证者将能够赎回以及提现他们的质押存款和奖励,并将其发送回到基于 PoS 的执行链中。[2]
After consolidation, the PoS-consensus chain certifiers will be able to redeem and withdraw their pledged deposits and rewards and send them back to the PoS-based enforcement chain.[2]
因此我们需要从 PoW 环境中转向完全成熟的 PoS 环境。但是请注意,这一转变并没有怎么提高区块链的带宽 (一个区块打包多少执行交易),这是分片要解决的问题。在此之前,让我们来讨论一下,当我们只有一条执行链时,有哪些方法可以提高执行的可扩展性。
So we need to move from the Pow environment to a fully-fledged PS environment. But note that this shift has not been able to increase the bandwidth of the block chain (the number of transactions that a block packs up), which is the problem to be solved in a segment. Before we do, let's talk about ways to increase the expansionability of implementation when we have only one enforcement chain.
(颜色总结:共识=紫色,执行=绿色,数据=黄色)
说到 rollups,这是众多可用的扩容解决方案之一,但从协议设计的角度来看,这种解决方案可能提供了最优的折衷方案。这种方案的想法很简单:通过将数据存储在链上 (这些数据用于重建状态转移的执行) 来综合地处理状态转换,并且将状态的执行放到链下。如果有人不同意执行的结果,或者有人一开始就忘记执行,数据就在链上供所有人使用 (可以重新计算),这是完全无需许可的!
Speaking of rollups, this is one of the many available maturities solutions, but from the point of view of the protocol design, such a solution may offer the best compromise solution. The idea of such a solution is simple: to deal with state conversions in an integrated manner by storing data on the chain (the data are used to re-establish state transfer implementation) and to put state execution under the chain. If someone disagrees with the results of implementation or forgets implementation at the outset, the data is available to all (recalculating) on the chain, which is completely unlicensed.
更准确地说,执行所需的数据 (交易输入) 与其载体 (交易) 分离,并以节省空间的方式 “捆绑”起来。同时,rollups 在执行链 (eth1) 之外运行,提交并执行数据。
More precisely, the data required for implementation (trading entry) is separated from its vehicle (trading) and & ldquo; tied & rdquo; up in a way that saves space. At the same time, rollups run outside the implementation chain (eth1) and submit and execute data.
用户需要往执行链 ("eth1") 上的 rollup 合约质押一笔资产,才能够进入到 rollup 里,用户可以在里面进行交易。完成之后,用户可以将资产从 rollup 中转回到执行链中。
The user needs to pledge an asset to the execution chain (&quat; eth1&quat;) the roll group contract to enter the roll group, where the user can trade. After completion, the user can transfer the asset back from the roll group to the execution chain.
Rollups 的替代方案是什么?大家看一下上图,让我们来假设一下,如果我们用一串串平行的红色来代替那些垂直的黄色链会怎样?比如说,如果我们复制了几条 eth1 链,然后它们之间并排运行会怎么样?
What's the alternative for Rollups? Let's look at the chart. Let's assume, what happens if we replace those vertical yellow chains with a string of parallel reds? For example, what happens if we copy several Eth1 chains, and then they run side by side?
这里的问题是如何处理并行运行的多个执行链。如果某条链上发生了什么事情,而其他人需要知道怎么办呢?这是分片面临的一个非常棘手的问题,或者说对于在多个链中执行的方案来说都需要克服的问题。
The question here is how to deal with multiple enforcement chains running in parallel. What if something happens in a chain, and others need to know what to do? This is a very difficult question for a segment, or one that needs to be overcome for a programme to be implemented in multiple chains.
"Rollups 之间并没什么不同",读者可能这么认为,本质上来说这没什么错。但是当你想要从一个 rollup 转到另一个 rollup 上进行交易时,同样棘手的问题又出现了。然而,关键在于,现在已经存在几种 rollup 设计了,并且这些解决方案的可探索空间仍非常广泛。既然如此,为什么不让 rollups 先进行试验,然后再引入一种协议级别的方法呢?
There is no difference between & & Quot; Rollups & & Quot; the reader may think it's not inherently wrong. But when you want to trade from one group to another, the same thorny problem arises again. The point is, however, that there are now several types of group designs, and the searchable space for these solutions is still very wide. So why not let the group test first and then introduce a protocol-level approach?
这让我们来到了...
This brings us to...
读者应该听说过区块空间不足的事吧?Rollups 确实需要发布它们的数据,但是 eth1 区块空间十分稀缺!而且,就像我们所讨论过的,跨分片是非常难的。那为了解决这个问题,我们可以用分片来保存 rollup 需要发布的数据。届时很可能会有 64 个分片,即现在可用带宽的 64 倍。而且一个分片区块可能会比 eth1 链区块当前能够容纳更多的数据量。
Readers should have heard of the lack of space in blocks? Rollups does need to publish their data, but Eth1 space is scarce! And, as we discussed, it is very difficult to get through the fragments. So, to solve this problem, we can save the data that the group needs to publish.
我需要强调一下,这并不意味着我们将永远排除执行分片这个方案。以 rollup 为中心的以太坊路线图是我们中短期的发展目标,直到我们找到更好的加密基元,以保证能够实现跨多条链的执行分片。这个方案很吸引人,需要团队很多人花费很长的时间去研究。与此同时,我们可以使用 rollups。
I need to stress that this does not mean that we will always rule out the implementation of the sub-programme. The tele-road map, centred on the roll group, is our short- and medium-term development goal, until we find a better encryption base to ensure that we can achieve the implementation segment across multiple chains.
这方面还有很多工作要做!首先我们不要忘记,“合并”和“数据分片”都是非常复杂的工作,需要多个团队同时从事其中一项或两项工作。但在 rollup 方面,也仍有一些有趣的问题有待探索,我仅列出了一部分:
First, let us not forget that & & & & & & & & & & & & & & ; & & & & & & & & ; & & & & & & & & & & & & & & & & & & & & & & & & ; are very complex tasks that require multiple teams to do one or two of them at the same time.
- 实现用户和 rollups 之间的大规模迁移是一个很酷的概念。如果用户有足够多的公共交通工具令其往返 Layer1 (eth1) 和 Layer2 (rollups),那么为什么还要自己开车往返呢?这非常不经济。
- 如果用户觉得可以在另外一个 rollup 上做一些更酷的东西 (ta 所在的 rollup 是没有的),难道 ta 一定得先提现至 L1,然后再从 L1 中存款进这个 rollup 中吗?这未免太浪费了。
- 对于当前的链上操作来说,rollups 极大地提高了网络带宽,这是毫无疑问的。但是 rollups 仍不是用户所期望的无限高速公路那样。仍有很多人想要在 rollups 上做很多事情,有时甚至是同时做的!因此 rollups 将不可避免地面临拥堵问题,但与 L1 这个尤其拥堵的市场不同 (很快就会上线 1559 了),rollups 的可探索空间更加广泛。
- 说到拥堵问题,虽然这更特定于协议层面,但是我们还将看到 EIP-1559 扮演交通警察的角色,来规定每个数据分片上发布多少数据,确保验证者可以处理这个数据量。如果读者觉得 eth1 上运行 EIP-1559 很酷,那么请期待届时会在 64 条分片链上同时运行 1559。那么,rollups 应该在哪里发布它们的数据呢?是仅发布在单个分片上,使数据仅在该分片上可获取?还是说发布在多个分片上,这样就可以受益于计划推出的“错开分片区块生产” (shard staggering) 方案?这个方案由 Vitalik 提出,即分片轮流出块,这样发布数据时,距离新区块的生成时间为几百毫秒以内,这对于需要“快速敲定”的应用来说是理想选择。
特此感谢 Danny Ryan 和 Sacha Saint-Leger 的建议。
I would like to thank Danny Ryan and Sacha Saint-Leger for their advice.
[1] 我听说 PoW 不是一种共识算法,但我认为如果使其定义超载了,将其描述为共识机制是没有问题的。
[1] I hear PoW is not a consensus algorithm, but I think it's okay to describe it as a consensus mechanism if its definition is overloaded.
[2] PhiGo 在推特写道,合并后 (PoW 退出以太坊) 不一定就可以提取质押存款。的确,目前合并计划更专注于合并部分,而“提款”问题是一项独立但相关的研究工作。
[2] Phigo wrote on Twitter that the merger (PoW exits Ether) does not necessarily lead to the withdrawal of pledged deposits. Indeed, the current merger plan is more focused on the merger than on “ withdrawals & & rdquo; the problem is an independent but related study.
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论