模块化执行的案例(第二部分) The Case for Modular Execution (Part 2)

The Case for Modular Execution (Part 2)

How modular execution layers can achieve scalability by optimizing for efficient computation.
模块化执行层如何通过优化高效计算,来实现可扩展性。


模块化执行的案例 (The Case for Modular Execution)

Modular architecture will enable blockchains to scale by orders of magnitude. As a core part of the modular stack, execution layers are in a stage of rapid innovation.

模块化架构将使区块链能够按数量级扩展。作为模块化技术栈的核心部分,执行层正处于快速创新的阶段。

Fuel is building the fastest execution layer for the modular blockchain stack. In Part 1 we explored how modular execution layers enable scalability by decoupling computation from verification.

Fuel 正在为模块化区块链技术栈构建最快的执行层。第一部分我们探索了模块化执行层如何通过将计算与验证解耦来实现可扩展性。

模块化执行的案例(第一部分) The Case for Modular Execution (Part 1)

We also touched on a second core benefit which enables modular execution layers to scale by orders of magnitude more than their monolithic counterparts:

我们还谈到了第二个核心优势,它使模块化执行层能够比其单片执行层扩展几个数量级:

Monolithic chains are locked into inefficient technologies when it comes to the speed and variety of computation they can support. On the other hand, modular execution layers can be specifically designed to optimize for efficient computation.

单片链在它们可以支持的计算速度和多样性方面被锁定在低效的技术中。另一方面,模块化执行层可以专门设计用于优化高效计算。

This post explores this second core benefit, with a specific focus on how Fuel is revolutionizing the way blockchains handle computation.

这篇文章探讨了第二个核心优势,特别关注 Fuel 如何彻底改变区块链处理计算的方式。


单片链:Layer1迭代的挑战 (Monolithic Chains: The Challenge of Iterating on Layer-1s)

Monolithic chains are locked into inefficient technologies when it comes to the speed and variety of computation they can support.

单片链在其可以支持的计算速度和多样性方面,被锁定在低效的技术中。

When blockchains were first conceived of, there was a single use case in mind: digital cash. The Bitcoin blockchain was designed to optimize for this one narrow use case.

首次构想区块链时,脑海中只有一个用例:数字现金。比特币区块链旨在优化这一狭窄用例。

Soon after the launch of Bitcoin, people started to realize the potential of blockchains for use cases far beyond money. The narrative quickly shifted from “distributed ledger” to “distributed computer”. The Bitcoin community attempted to support this use case through colored coins, but it was clear that it was not versatile enough to truly support trustless distributed computing; it was locked into its original use case. A new architecture was required.

比特币推出后不久,人们开始意识到区块链远超金钱用例的潜力。叙事迅速从“分布式账本”转变为“分布式计算机”。比特币社区试图通过 色彩币 来支持这个用例,但很明显它的通用性不足以真正支持去信任分布式计算;它被锁定在其原始用例中。(我们)需要一种新的架构。

Recognizing this problem, the creators of Ethereum set out to build a blockchain which could support a distributed Turing-complete virtual machine: the Ethereum Virtual Machine (EVM). With the launch of Ethereum in 2015, blockchains had evolved to support arbitrary computation in a trustless environment. Now, anyone could build and launch a computer program (smart contract) and have it run on a distributed computer.

认识到这个问题,以太坊的创建者着手构建一个可以支持分布式图灵完备虚拟机的区块链:以太坊虚拟机(EVM)。随着 2015 年以太坊的推出,区块链已经发展到支持去信任环境中的任意计算。现在,任何人都可以构建和启动一个计算机程序(智能合约)并让它在分布式计算机上运行。

Ethereum was conceived of less than half a decade after the concept of blockchains came into existence. In the 7 years since Ethereum launched, new concepts have been invented which represent an even greater leap forward than the progress Ethereum made over Bitcoin. But like Bitcoin, the Ethereum blockchain is mostly locked into the core architecture it launched with.

以太坊是在区块链概念出现后不到五年的时间构思出来的。自以太坊推出以来的 7 年里,人们发明了新概念,这代表了以太坊相对比特币所取得进步的更大飞跃。但就像比特币一样,以太坊区块链大多被锁定在它推出的核心架构中。

For every improvement that has been made to the Ethereum blockchain and the EVM over the years, there are many more potential innovations that cannot be implemented due to the need to maintain backward compatibility.

对于多年来对以太坊区块链和 EVM 所做的每一项改进,由于需要保持向后兼容性,还有许多潜在的创新无法实施。

As a result, the blockchain community has continued funding, building, and launching new blockchains every time a new innovation is hatched. Countless new layer-1 blockchains have launched on the promise of iterating on the concept of trustless distributed computing, but they all run into the same challenge: it’s hard (and often impossible) to upgrade blockchains to support new functionalities and improvements.

因此,每次孵化出新创新时,区块链社区都会继续资助、构建和推出新的区块链。无数新的Layer1区块链已经推出,承诺迭代去信任分布式计算的概念,但它们都遇到了同样的挑战:升级区块链来支持新功能和改进是困难的(而且通常是不可能的)。

And so the cycle continues, where we continue to see new blockchains launching with piecemeal improvements over their predecessors. In the process, we are left with an ecosystem of mostly incompatible blockchains, with ever-increasing fragmentation of liquidity, funding, user experience, and developer-mindshare. Meanwhile, the energy that could be spent on true innovation is instead directed toward getting attention from investors, developers, and end-users.

所以这个循环还在继续,我们也继续看到新区块链推出,对它们的前辈进行零碎的改进。在这个过程中,我们留下了一个由大部分不兼容的区块链组成的生态系统,流动性、资金、用户体验和开发者的思想份额越来越分散。与此同时,可以花在真正创新上的精力反而被用于吸引投资者、开发商和最终用户的关注。

Competition is healthy and necessary for a thriving ecosystem. But this competition is happening at the wrong level.

竞争对于繁荣的生态系统是健康的和必要的。但这场竞争发生在错误的层面。

The modular blockchain paradigm promises to solve this problem. Because each layer in the modular stack is independent of the others, innovation can happen on one layer without a complete overhaul of the entire stack. Execution layers can compete on execution. Data availability layers can compete on data availability. Every layer can optimize for its intended purpose without breaking backward compatibility.

模块化区块链范式有望解决这个问题。 由于模块化技术栈中的每一层都独立于其他层,因此创新可以发生在一个单独层上,而无需对整个技术栈进行彻底检修。执行层可以竞争执行。数据可用性层可以在数据可用性上竞争。每一层都可以针对其预期目的进行优化,而不会破坏向后兼容性。

Shared settlement layers enable liquidity to be pooled in one place, so new execution layers can be built without fragmenting liquidity or adding friction to the end-user experience. Natively enabled trust-minimized bridging means the community can reduce the resources spent on interoperability efforts and instead focus them on exploring meaningful innovations.

共享结算层可以将流动性集中在一个地方,因此可以构建新的执行层,而不会分散流动性或增加最终用户体验的摩擦。原生支持的信任最小化桥接意味着社区可以减少在交互性工作上花费的资源,而是将它们集中在探索有意义的创新上。

With the advent of the modular stack, we can move away from a disparate ecosystem of L1s competing on vanity metrics, and toward a more cohesive, interoperable, upgradeable stack.

随着模块化技术栈的出现,我们可以摆脱在虚荣指标上竞争的不同的 L1 生态系统,而转向更具凝聚力、可交互、可升级的技术栈。


模块化执行:超越 EVM (Modular Execution: Moving Beyond the EVM)

Despite the plethora of layer-1 blockchains promising improvements over the EVM's original design, its first-mover advantage enabled the EVM to gain a foothold as the "default" runtime environment in the blockchain ecosystem. Smart contract development became synonymous with Solidity (the EVM's programming language), which has captured the majority of would-be blockchain developers. Because of this, most execution layers currently under development are EVM-based rollups.

尽管有过多的Layer1区块链有望对 EVM 的原始设计进行改进,但其先发优势使 EVM 作为区块链生态系统中的“默认”运行时环境获得了立足点。智能合约开发成为 Solidity(EVM 的编程语言)的代名词,它吸引了大多数潜在的区块链开发人员。因此,目前正在开发的大多数执行层都是基于 EVM 的汇总。

There is a good reason for this: using the EVM enables rollups to tap into a market of existing applications written in Solidity, as well as a large cohort of end-users who are already familiar with those applications. The EVM is a great tool for seeding a new ecosystem, as it already has such a large share of the developer market.

这有一个很好的理由:使用 EVM 使汇总能够进入使用 Solidity 编写的现有应用程序的市场,以及已经熟悉这些应用程序的大量最终用户。 EVM 是播种新生态系统的绝佳工具,因为它已经在开发者市场占有如此大的份额。

However, as we already explored, the need to maintain backward compatibility means that the EVM has been unable to adopt many innovations. In addition, the core design of the EVM is optimized for a monolithic chain, not a modular stack.

然而,正如我们已经探讨过的,保持向后兼容性的需要意味着 EVM 无法采用许多创新。此外,EVM 的核心设计针对单片链而非模块化技术栈进行了优化。

Just some limitations of the EVM include:
EVM 的一些限制包括:

  • Sequential Execution - The EVM does not support parallel transaction execution, making it much less computationally efficient than other VM designs.
    顺序执行 - EVM 不支持并行交易执行,使其计算效率低于其他 VM 设计。

  • Fraud Proofs - Ethereum’s account-based model means generating and executing fraud proofs on EVM chains is extremely costly and inefficient, making it sub-optimal for modular execution layers.
    欺诈证明 - 以太坊基于账户的模型意味着在 EVM 链上生成和执行欺诈证明的成本极高且效率低下,因此对于模块化执行层来说并非最优。

  • Solidity - The most popular programming language for the EVM, Solidity, is notorious for providing a poor developer experience, and is designed in a way that makes it difficult to write secure smart contracts.
    Solidity - EVM 最流行的编程语言 Solidity 因提供糟糕的开发者体验而声名狼藉,并且其设计方式使得编写安全的智能合约变得困难.


Fuel:优化的模块化执行 (Fuel: Optimized for Modular Execution)

The advent of modularism means that execution layers can leverage Ethereum’s liquidity and security without being restricted by the limitations of the EVM.

模块化的出现意味着执行层可以利用以太坊的流动性和安全性,而不受 EVM 的限制。

By adopting new and improved VM design principles, modular execution layers can specifically optimize for efficient & scalable computation, superior developer experience, and maximum security.

通过采用全新和改进的 VM 设计原则,模块化执行层可以专门针对高效和可扩展计算、卓越的开发者体验和最大的安全性进行优化。

Fuel is taking advantage of this new design space to build the fastest modular execution layer.

Fuel 正在利用这个新的设计空间来构建 最快的模块化执行层

Fuel虚拟机 (FuelVM)

One of the core innovations of Fuel is a completely new virtual machine, the FuelVM. The advent of execution layers built on Ethereum presents a new opportunity to improve on past VM designs, unconstrained by the need to be backward compatible.

Fuel 的核心创新之一是全新的虚拟机,FuelVM。基于以太坊构建的执行层的出现,为改进过去的 VM 设计提供了新的机会,不受向后兼容需求的限制。

While the EVM’s slow transaction execution may have been sufficient in a pre-modular world where bandwidth was the core bottleneck, improvements made within the new modular stack (including on L1 Ethereum) mean that computational throughput is becoming the primary constraint when it comes to scaling.

虽然在带宽是核心瓶颈的前模块化世界中,EVM 的缓慢交易执行可能已经足够,但在新的模块化技术栈(包括 L1 以太坊)中所做的改进意味着计算吞吐量正在成为扩展时的主要限制.

In anticipation of this new paradigm, the FuelVM is designed to optimize for fast transaction execution. Taking learnings from the EVM, Solana, WASM, Bitcoin, and Cosmos, the FuelVM is designed to reduce wasteful processing of traditional blockchain virtual machine architectures, while vastly increasing the potential design space for developers.

出于对这种新范式的预期,FuelVM 旨在优化快速交易执行。 FuelVM 借鉴了 EVM、Solana、WASM、比特币和 Cosmos,旨在减少传统区块链虚拟机架构的浪费处理,同时极大地增加开发人员的潜在设计空间。

The FuelVM adopts many innovations that have been suggested and supported by the EVM community, but couldn't be implemented due to the need to maintain backward compatibility. Just a few examples are highlighted below (see here for the full list).

FuelVM 采用了许多 EVM 社区已经建议和支持的创新,但由于需要保持向后兼容性而无法实施。下面仅突出显示了几个示例(完整列表请参见此处)。

These are just a few examples of EIPs which were ultimately rejected for the EVM due to backward compatibility issues, but have been implemented in Fuel (source: Fuel)
这些只是 EIP 的几个示例,由于向后兼容性问题最终被 EVM 拒绝,但已在 Fuel 中实现(来源: [Fuel](https://fuellabs.github.io/fuel-docs/master /vs-evm.html#eips-implemented-in-fuel))

用Sway和Force实现的高级DevEx (Superior DevEx with Sway and Forc)

The Fuel protocol was designed with developer experience at the forefront. The FuelVM has been built alongside its companion language, Sway: a Rust-based domain-specific language designed specifically to leverage a blockchain VM. Unlike Solidity, which was developed after the creation of the EVM, Sway has been created from the ground up to have convenient and efficient ops built-in. By basing Sway on Rust, Fuel makes smart contract development safer and more performant through the use of strong static analysis and compiler feedback.

Fuel 协议的设计凝结最前沿的开发人员经验。 FuelVM 是与它的配套语言 Sway 一起构建的:一种基于 Rust 设计的特定领域语言,专门来使用区块链虚拟机。与在创建 EVM 之后开发的 Solidity 不同,Sway 是从头开始创建的,内置了方便高效的操作。通过基于 Rust 的 Sway,Fuel 通过使用强大的静态分析和编译器反馈使智能合约开发更安全、更高效。

From a tooling perspective, Fuel improves on the EVM ecosystem with the Forc toolchain. With Forc, developers can get everything they need to start creating Sway applications for the Fuel VM with a single toolchain. Fuel takes a curated, "batteries-included"-yet-modular approach to providing tooling, with a comprehensive, standardized, canonical set of tools that covers not only the lower levels of the stack (like protocol and VM implementations), but also the higher levels (such as package management, editor support, common-use plugins, and much more).

从工具的角度来看,Fuel 通过 Forc 工具链 改进了 EVM 生态系统。借助 Forc,开发人员可以使用单个工具链获得开始为 Fuel VM 创建 Sway 应用所需的一切。 Fuel 采用精心策划的“包含电池”但模块化的方法来提供工具,具有全面、标准化、规范的工具集,不仅涵盖技术栈的较低级别(如协议和 VM 实现),也包括更高级别(例如包管理、编辑器支持、常用插件等等)。

Fuel’s developer environment retains the benefits of smart contract languages like Solidity while adopting the paradigms introduced in the Rust tooling ecosystem, making the learning curve for Sway easily manageable for all levels of developer experience.

Fuel 的开发人员环境保留了 Solidity 等智能合约语言的优势,同时采用了 Rust 工具生态系统中引入的范式,使 Sway 的学习曲线易于管理,适合所有级别的开发人员体验。

并行交易执行 (Parallel Transaction Execution)

The ability to execute transactions in parallel is a highly desirable property, especially as modern processors become increasingly multi-threaded. As such, it was a core consideration when designing the Fuel protocol.

并行执行交易的能力是一个非常理想的属性,尤其是在现代处理器变得越来越多线程的情况下。因此,这是设计 Fuel 协议时的核心考虑因素。

Parallel transaction execution requires the ability to determine and handle dependencies between transactions. In order to avoid overlap when processing the transactions on separate cores, the shared state that may be touched by each transaction needs to be identified upfront (via “access lists”), so transactions can be partitioned into sets which don’t have any possible interactions with one another.

并行交易执行需要能够确定和处理交易之间的依赖项。为了避免在不同核上处理交易时发生重叠,需要预先识别每个交易可能涉及的共享状态(通过“访问列表”),因此可以将交易划分为没有任何可能彼此互动的集合。

Because of the constraints of its account-based design, Ethereum is not able to support these access lists, so is forced to process transactions sequentially (i.e. one after the other). EIP-648 proposed the addition of access lists to Ethereum, but this has never been implemented due to other inefficiencies it would introduce.

因为其基于帐户的设计的限制,以太坊无法支持这些访问列表,因此被迫按顺序处理交易(即一个接一个)。 EIP-648 提议向以太坊添加访问列表,但由于它会引入其他类型的低效率,所以这从未实施过。

Learning from this limitation, Fuel has implemented strict state access lists in the form of a UTXO model, giving it the ability to use multiple CPU threads and cores that are typically idle in single-threaded blockchains. As a result, Fuel can execute transactions in parallel, delivering far more compute, state accesses, and transactional throughput than its single-threaded counterparts.

从这个限制中吸取教训,Fuel 实施了形同UTXO 模型的 严格的状态访问列表 ,使其能够使用通常在单线程区块链中空闲的多个 CPU 线程和内核。因此,**Fuel 可以并行执行交易,提供比单线程更多的计算、状态访问和交易吞吐量。

Fuel’s support for parallel transaction execution means validators can maximize efficiency by using all of their hardware (source: Fuel)
Fuel 对并行交易执行的支持意味着验证者可以通过使用其所有的硬件来最大化效率(来源: Fuel)

As well as providing efficiency optimizations, the ability to process multiple transactions in parallel allows for security improvements, as it enables transaction throughput to scale without a comparable increase in the resource requirements to verify those transactions. This reduces the barrier for running a full node, leading to a more decentralized network of verifiers.

除了提供效率优化外,并行处理多个交易的能力还可以提高安全性,因为它可以扩展交易吞吐量,而不会增加用于验证这些交易的资源需求。这降低了运行完整节点的障碍,从而导致验证者网络更加分散。

为欺诈证明而优化 (Optimized for Fraud Proofs)

Fraud proofs are a core technology in the modular blockchain stack. In Part 1, we explored how modular execution layers can leverage fraud proofs to enable trust-minimized light clients, allowing for security under the assumption that only a single honest full node is available.

欺诈证明是模块化区块链技术栈中的核心技术。在 第一部分 中,我们探讨了模块化执行层如何利用欺诈证明来启用信任最小化的轻客户端,在只有一个诚实的全节点可用的假设下确保安全性。

Fraud proofs enable trust-minimized light clients which rely on a single honest minority, giving them much greater security guarantees than monolithic light clients (source: Fuel)
欺诈证明使信任最小化的轻客户端依赖于一个诚实的少数,为他们提供比单体轻客户端更大的安全保证(来源: [Fuel](https://fuel-labs.ghost.io/the-case- for-modular-execution-part-1/))

With trust-minimized light clients and shared settlement & data availability layers, it is possible to build trust-minimized bridges between modular execution layers, something which is impossible to achieve between L1s. This allows for the experimentation with and deployment of new blockchain designs without fragmenting security or liquidity.

通过信任最小化的轻客户端和共享结算和数据可用性层,可以在模块化执行层之间建立信任最小化的桥接,这是 L1 之间无法实现的。这允许在不破坏安全性或流动性的情况下试验和部署新的区块链设计。

Because of the benefits fraud proofs provide, Fuel was designed and built specifically to be fraud-provable in a low-cost, efficient manner.

由于欺诈证明提供的好处,Fuel 被设计和产出专门的低成本和高效的方式证明欺诈

Whereas Ethereum’s account-based model means that the cost of constructing fraud proofs for it is unbound, Fuel optimizes for fraud proofs by using the UTXO model. UTXO fraud proofs achieve efficiency by simply requiring each spend of a UTXO to "point" to the creation of the UTXO, without having to refer to a global state tree. Proving that either a) the pointer is invalid, or b) whatever is being pointed to doesn't match whatever is being spent, is sufficient for exhaustively proving fraud.

以太坊基于账户的模型意味着为其构建欺诈证明的成本是无限的,而 Fuel 通过使用 UTXO 模型来优化欺诈证明。 UTXO 欺诈证明 通过简单地要求 UTXO 的每笔支出“指向”UTXO 的创建来实现效率,无需强制参考全局状态树。证明 a) 指针无效,或 b) 所指向的内容与所花费的内容不匹配,足以彻底证明欺诈。

As an added benefit, the FuelVM instruction set is designed to be fraud-provable within the EVM. This means Fuel can use Ethereum as a settlement layer, leveraging its deep liquidity and large user base while remaining unconstrained by the limitations of the EVM.

还有一个额外的好处,FuelVM 指令集 被设计在 EVM 中进行欺诈证明。这意味着 Fuel 可以使用以太坊作为结算层,利用其深厚的流动性和庞大的用户群,同时不受 EVM 的限制。

其他益处 (Other Benefits)

On top of the above points, Fuel has implemented a number of other improvements, including:
除了上述几点之外,Fuel 还实施了许多其他改进,包括:

  • Support for multiple native assets 支持多种原生资产
  • Native account abstraction & predicates 原生支持帐户抽象和谓词
  • Multi-dimensional resource pricing 本机帐户抽象和谓词
  • Sequencer decentralization 序列器去中心化

An explanation of these improvements is out of scope for this article, but Blockchain Capital provides an excellent deep dive into these additional benefits.

对这些改进的解释超出了本文的范围,但 Blockchain Capital 提供了出色报告,告诉大家 深入了解这些额外好处 .


结论 (Summary)

  • The monolithic paradigm leads to an ecosystem of incompatible L1s competing on vanity metrics, fragmenting liquidity, funding, and developer-mindshare. Fuel adopts the premise that innovation does not require launching a new L1, but can happen at the execution layer.
    单片范式导致不兼容的 L1 生态系统在虚荣的指标上竞争、分散流动性、资金和开发者的思想份额。 Fuel 采用的前提是创新不需要启动新的 L1,但可以发生在执行层

  • Modular architecture enables MELs such as Fuel to focus on efficient computation without worrying about backward compatibility. Faster computation not only leads to higher throughput, but also makes running validators more efficient, improving decentralization. This enables Fuel to contribute to Ethereum’s scalability without being held back by the inefficiencies of the EVM.
    模块化架构使诸如 Fuel 之类的 MEL 能够专注于高效计算,而无需担心向后兼容性。更快的计算不仅可以带来更高的吞吐量,还可以让运行验证器的效率更高,从而增强去中心化。这使 Fuel 能够为以太坊的扩容做出贡献,而不会因 EVM 的低效而受阻。

  • Execution layers that use the EVM can capitalize on the existing ecosystem of Solidity applications and developers, but fail to make the most of the design space offered by the modular stack. Fuel is leveraging this new design space with the FuelVM, designed from the ground up to be fraud-provable and to provide the best developer experience.
    使用 EVM 的执行层可以利用现有的 Solidity 应用和开发人员生态系统,但无法充分利用模块化技术栈提供的设计空间。 Fuel 正在通过 FuelVM 充分利用这一新的设计空间,该设计从一开始就设计为可防欺诈并提供最佳的开发者体验。

  • Fuel introduces innovations that optimize for the rapidly approaching modular future, enabling a new generation of blockchains that go #BeyondMonolithic..
    Fuel 引入了针对快速接近的模块化未来进行优化的创新,使新一代区块链成为可能 #超越单片链..


敬请关注 (Follow Us)

关于我们 (About Us)

Fuel is the fastest execution layer for the modular blockchain stack. Powerful and sleek, the technology enables parallel transaction execution, empowering developers with the highest flexible throughput and maximum security required to scale. Developers choose the FuelVM for its superior developer experience and the ability to go beyond the limitations of the EVM.

Fuel 是模块化区块链技术栈的最快执行层。该技术功能强大且时尚,支持并行交易执行,为开发人员提供了扩展所需的最高灵活吞吐量最大安全性。开发人员选择 FuelVM 是因为它卓越的开发人员体验和运行能力 ,突破了 EVM 的限制**。

成为贡献者 (Become a Contributor)

赞赏