技术解析Artela:为什么“并行EVM”关乎以太坊EVM生态的存续之战?

币圈资讯 阅读:29 2024-04-22 03:05:00 评论:0
美化布局示例

欧易(OKX)最新版本

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

APP下载   全球官网 大陆官网

币安(Binance)最新版本

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

APP下载   官网地址

火币HTX最新版本

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

APP下载   官网地址

作者:Haotian,独立研究员 来源:X,@tmel0211

最近,Paradigm下重注领投了Monad一轮2.25亿美元的巨额融资,引发市场对“并行EVM”的强烈关注。那么,“并行EVM”到底解决了什么问题?发展并行EVM的瓶颈和关键是什么? 在我看来,“并行EVM”是EVM链迎击高性能layer1链的最后一博,事关以太坊EVM生态的存续之战。Why?接下来,来谈谈我的理解:

由于以太坊EVM虚拟机只能“串行”交易,这使得EVM- Compatible layer1链以及EVM兼容的layer2链,也都受到了相应的性能制约,因为大家本质上都基于同一套框架处理状态和交易Finality。

然而,像Solana、Sui、Aptos等主打高性能的layer1先天就具有可并行的优势。在此背景下,EVM基因的链要想正面Battle高性能layer1公链的冲击,就势必得补足“并行”能力先天不足的问题。如何做呢?涉及技术原理和细节,我将以并行EVM新锐链 @Artela_Network 为例展开说明:

1)以Monad、Artela、SEI等为代表的强化型EVM layer1链,它们会在高度兼容EVM的基础上大幅提升TPS并能赋予交易在拟EVM环境下的并行能力,这类独立并行EVM layer1链,有独立的共识机制和技术特性,但依然会以兼容并拓展EVM生态为目标,相当于,以“换血统”的方式重构EVM链,又服务于EVM生态;

2) 以Eclipse、MegaETH等为代表的扩容型layer2 EVM兼容链,它们利用layer2链独立的共识和交易“预处理”能力,可以在大批量交易被Batch到主网前,对交易状态进行筛选和处理,并可同时选择其他任意链的执行层来最终确定交易状态。等同于把EVM抽象成一个可插拔的执行模块,可根据需要选择最佳“执行层”,进而实现了并行能力;但,这类方案可服务于EVM,但又超出EVM框架范畴;

3)以Polygon、BSC等为代表的等效型 Alt-layer1链,它们一定程度上实现了EVM的并行处理能力,但只是进行了算法层的优化,并没有进行深层次的共识层和存储层的优化,因此这类并行能力更多可视为一个特定的Feature,而并没有彻底解决EVM的并行问题。

4)以Aptos、Sui、Fuel等为代表的差异型Non-EVM并行链,它们某种程度上并非实现的并非EVM链,而是在其先天具有高并发执行能力接触上,然后通过某种中间件或编码解析方式,实现了和EVM环境的兼容。我们看身为以太坊layer2的Starknet就是如此,由于Starknet具备Cario语言和账户抽象使其也具备并行能力,但其兼容EVM却需要一个特殊的管道。这些Non-EVM链的并行能力接轨EVM链基本都存在这个问题。

以上四个方案,各有侧重点,比如:有并行能力的layer2侧重模块化组合“执行层”链的灵活性;而EVM- Compatible链则突出了特定功能的定制特性;至于其他非EVM链的EVM兼容特性更多所图抽以太坊的流动性;真正目标彻底巩固EVM生态,并从底层改变并行能力的只剩一个强化型EVM layer1赛道了。

那么,做强化型并行EVM layer1公链的关键是什么?如何才能重构EVM链,又能服务于EVM生态?有两个关键点:

1、访问state I/O磁盘读取和输出信息的能力,由于数据的读取和写入要消耗时间,只是简单进行交易排序和调度,并不能根本上提高并行处理能力,还需要引入缓存、数据切片甚至分布式存储技术等等,从根本状态存储和读取流程上平衡读取速度和状态冲突的可能性;

2)拥有高效的网络通信,数据同步,算法优化、虚拟机强化、以及将计算和IO任务分离等共识机制层的各类组件优化等等,需要牵一发而动全身从底层组件架构、协作流程等方方面面综合优化和提升,最终促成响应速度快、计算消耗可控、准确率高的并行交易的能力;

具体到并行EVM layer1链项目本身,要做哪些技术创新和框架优化来实现“并行EVM”呢?

为了从底层架构层彻底实现资源协调和优化的“并行EVM”能力,Artela引入了弹性计算(Elastic Computing)和弹性区块空间(Elastic Block Space),如何理解呢?弹性计算,网络可根据需求和负载动态地分配和调整计算资源;弹性区块空间,可根据网络中交易数量和数据大小进行动态调整区块大小;整个弹性设计工作原理,恰如商场自动感应人流量进行工作的扶梯一样,很Make Sense;

前文说了,State I/O磁盘读取性能对并行EVM很关键,Polygon、BSC等EVM-Compatible链通过算法实现的“并行”能力,也能实现2-4倍的效率提升,但其只是算法层的优化,其共识层、存储层并没有进行深层优化,真正的深层优化会是怎样呢?

针对此,Artela借鉴了数据库技术方案,在状态读取和写入方面都做了提升,其中写入状态方面才去了写入前日志(WAL)技术,当状态改变要写入时先把改变记录写入日志并提交到内存,就可以认为完成了“写入”操作,这样做其实实现了操作异步化,避免了在状态改变时写入时立即进行磁盘写入操作,故而降低了对磁盘的I/O操作。状态读取方面,本质上也是异步化操作,通过预加载策略来提升读取效率,根据合约历史执行记录来预测下一次特定的合约调用会用到哪些状态,并预先加载到内存中,进而提升了磁盘I/O请求效率。

总之,这是一种通过内存空间换执行时间的一种算法,以此从根本上提升EVM虚拟机的并行处理能力,算是从根本上优化了状态冲突问题。

除此之外,Artela通过引入Aspect模块化编程能力,以更好管理复杂性并提高开发效率:通过引入WASM编码解析以增强编程的灵活性;同时,它还具有底层API访问权限,实现了执行层的安全隔离。这使得开发者可以在Artela的环境下高效地开发,调试和部署智能合约,以此激活开发者群体的定制扩展能力。特别是,开发者也会被激励在智能合约代码层就往可并行的方向进行代码优化,毕竟要减少状态冲突概率,每一个智能合约的调用逻辑和算法都尤为关键。

大家不难看出,“并行EVM”这一概念本质上就是在优化交易状态的执行过程, @monad_xyz 号称可达到每秒10,000笔交易,其技术内核也无非在专用数据库、开发者友好度、延迟执行共识、超标量流水线技术等等方面来达成大规模交易的并行处理,这和Artela的弹性计算和I/O异步性操作本质逻辑并无太大差异。

但我其实更想表达的是,这类高性能并行EVM链其实是融入web2产品和技术力之后的结果,确实采用了web2成熟应用市场上,时不时流量高负载下的“技术处理”精髓。

如果放眼一个Mass Adoption的遥远未来,“并行EVM”的确是EVM生态下一步面向web2更广泛市场的基础infra,能受资本市场如此Bullish也在情理之中。


The author, an independent researcher, recently invested a huge round of financing of billions of dollars, which aroused strong concern in the market for parallelism. So what problems did parallelism solve? What is the bottleneck and key to the development of parallelism? In my opinion, parallelism is the last battle for the chain to meet the high-performance chain, which is related to the survival of the Ethereum ecology. Next, let's talk about my understanding. Because Ethereum virtual machines can only trade in series, the chain and compatible chains are also subject to corresponding performance constraints, because everyone is essentially basic. Dealing with states and transactions in the same framework, however, the high-performance nature of equality has the advantage of parallelism. Under this background, if the gene chain wants to face the impact of high-performance public chain, it is necessary to make up for the inherent deficiency of parallelism. How to do it? I will take the new parallel chain as an example to explain the enhanced chain represented by equality, which will be greatly improved on the basis of high compatibility and can give the parallel ability of transactions in a quasi-environment. Such independent parallel chains are independent. However, they will still aim at compatibility and expanding ecology, which is equivalent to reconstructing the chain by changing lineages and serving the expansion compatible chain represented by ecological equivalence. They can use the independent consensus and transaction preprocessing ability of the chain to screen and process the transaction status before large-scale transactions are sent to the main network, and at the same time, they can choose the execution layer of any other chain to finally determine the transaction status, which is equivalent to abstracting it into a pluggable execution module, and can choose the best execution as needed. The layer further realizes the parallel ability, but this kind of scheme can serve the equivalent chain represented by equality in the framework category. They realize the parallel processing ability to a certain extent, but only optimize the algorithm layer, but not the deep consensus layer and storage layer. Therefore, this kind of parallel ability can be regarded as a specific and not completely solved parallel problem, and the differential parallel chain represented by equality is not realized to some extent, but is inherently possessed. The high concurrent execution ability comes into contact with it, and then it is compatible with the environment through some middleware or code analysis. We think that's the case with Ethereum. Because of its language and account abstraction, it also has parallel ability, but its compatibility needs a special pipeline. The parallel ability of these chains basically has this problem. Each of the above four schemes has its own emphasis, such as the flexibility of modular combination execution layer chain with parallel ability, while the chain highlights the customization characteristics of specific functions. As for the compatibility characteristics of other non-chains, there is only one enhanced track to completely consolidate the ecology and change the parallel ability from the bottom. What is the key to making an enhanced parallel public chain? How can we rebuild the chain and serve the ecology? There are two key points to access the disk to read and output information. Because reading and writing data takes time, it is only simple to sort and schedule transactions, but it cannot fundamentally improve the parallel processing ability. It needs to be introduced. Caching data slicing and even distributed storage technology, etc. balance the reading speed and the possibility of state conflict from the basic state storage and reading process, have efficient network communication data synchronization algorithms, optimize virtual machines, and optimize various components in the consensus mechanism layer such as separation of computing and tasks, etc., and need to take the lead and comprehensively optimize and improve the whole body from all aspects such as the underlying component architecture and cooperation process, and finally promote the ability of parallel transactions with fast response, controllable calculation consumption and high accuracy. Specific to the parallel chain project itself, what technical innovation and framework optimization should be done to achieve parallelism? In order to completely realize the parallel ability of resource coordination and optimization from the bottom architecture layer, elastic computing and elastic block space are introduced. How to understand it? The elastic computing network can dynamically allocate and adjust computing resources according to demand and load, and the elastic block space can dynamically adjust the block size according to the number of transactions and data size in the network. The working principle of the whole elastic design is just like the shopping mall automatically sensing the flow of people. As mentioned earlier, the performance of disk reading is very important for parallelism, and the parallel ability of equal chain through algorithm can also improve the efficiency by times, but it is only the optimization of algorithm layer, and its consensus layer and storage layer have not been deeply optimized. What will the real deep optimization be like? For this reason, it draws lessons from the database technology scheme and improves both state reading and writing, in which the log technology before writing is gone in the state of writing, and when the state changes to be written, the change is recorded in the log first. And submit it to the memory, it can be considered that the writing operation is completed. In fact, it realizes the asynchronization of the operation, avoids the immediate writing operation on the disk when the state changes, and thus reduces the operation on the disk. The reading of the state is essentially asynchronous, which improves the reading efficiency through the preloading strategy. According to the contract history execution record, it predicts which states will be used for the next specific contract call and loads them into the memory in advance, thus improving the efficiency of the disk request. In short, this is a general method. An algorithm of exchanging memory space for execution time can fundamentally improve the parallel processing ability of virtual machines, which can be regarded as fundamentally optimizing the state conflict problem. In addition, it can better manage complexity and improve development efficiency by introducing modular programming ability, and enhance programming flexibility by introducing code analysis. At the same time, it also has the bottom access rights to realize the security isolation of the execution layer, which enables developers to efficiently develop, debug and deploy smart contracts in a new environment to activate development. The customization and expansion ability of users, especially developers, will also be encouraged to optimize the code in the direction of parallelism in the code layer of smart contracts. After all, to reduce the probability of state conflict, the calling logic and algorithm of every smart contract are particularly critical. It is not difficult to see that the concept of parallelism is essentially to optimize the execution process of transaction state, claiming that it can achieve transactions per second, and its technical core is nothing more than the developer friendliness of special databases, delaying the implementation of consensus superscalar pipeline technology and so on. To achieve the parallel processing of large-scale transactions, which is not much different from the essential logic of elastic computing and asynchronous operation, but what I actually want to express is that this kind of high-performance parallel chain is actually the result of integrating products and technical forces, and it does adopt the essence of technical processing under high traffic and load from time to time in mature application markets. If we look at a distant future, parallelism is indeed the foundation of ecology, and it is reasonable that it can be affected by the capital market. 比特币今日价格行情网_okx交易所app_永续合约_比特币怎么买卖交易_虚拟币交易所平台

文字格式和图片示例

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

弹窗与图片大小一致 文章转载注明 网址:https://netpsp.com/?id=54388

美化布局示例

欧易(OKX)最新版本

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

APP下载   全球官网 大陆官网

币安(Binance)最新版本

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

APP下载   官网地址

火币HTX最新版本

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

APP下载   官网地址
可以去百度分享获取分享代码输入这里。
声明

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

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

欧易(OKX)

  全球官网 大陆官网

币安(Binance)

  官网

火币(HTX)

  官网

Gate.io

  官网

Bitget

  官网

deepcoin

  官网
关注我们

若遇到问题,加微信客服---清歌

搜索
排行榜
扫一扫,加我为微信好友加我为微信好友