Parallelization plays a crucial role in optimizing the performance of blockchain systems, enabling faster transaction processing and improved scalability. This article provides a comparative analysis of three blockchain platforms — Vara, SUI, and Aptos — with respect to their parallelization techniques. Furthermore, the article delves into Gear Protocol’s distinctive approach to parallelization, emphasizing its benefits and potential impact on the future of distributed computing.

并行化在优化区块链系统的性能方面起着至关重要的作用,可实现更快的交易处理和更高的可扩展性。本文对三个区块链平台(Vara、SUI 和 Aptos)的并行化技术进行了比较分析。此外,本文还深入探讨了 Gear Protocol 独特的并行化方法,强调了其优势和对分布式计算未来的潜在影响。
Parallelization Techniques in Blockchain Systems
区块链系统中的并行化技术
Two primary approaches to achieving parallelization in blockchain systems are sharding and parallel execution:
在区块链系统中实现并行化的两种主要方法是分片和并行执行:

  1. Sharding: Sharding involves dividing the state space of a blockchain into multiple segments, known as shards. Each shard operates independently but enables cross-shard communication, thereby allowing for the parallel execution of transactions. This technique significantly enhances overall system efficiency.
    分片:分片涉及将区块链的状态空间划分为多个段,称为分片。每个分片独立运行,但支持跨分片通信,从而允许并行执行事务。这种技术显著提高了整体系统效率。
  2. Parallel Execution: Parallel execution is achieved by identifying and concurrently processing independent transactions. Transactions are considered independent if they do not read from or write to the same data. This approach leverages multiple CPU cores or GPUs for parallel processing, thereby accelerating transaction throughput.
    并行执行:并行执行是通过识别并发处理独立事务来实现的。如果事务不读取或写入相同的数据,则它们被视为独立事务。这种方法利用多个 CPU 内核或 GPU 进行并行处理,从而加快事务吞吐量。

SUI’s Account-based vs. Aptos’ Object-based Approach
SUI 的基于帐户的方法与 Aptos 的基于对象的方法
Both SUI and Aptos strive for parallel execution but employ distinct strategies. SUI necessitates explicit specificity in code, while Aptos introduces a developer-friendly Block-STM. Aptos' approach, however, may face challenges as concurrent transactions with the same memory read-write can invalidate transactions, raising concerns about network robustness and efficiency. These differences complicate contract development and necessitate increased effort to optimize transaction parallelization.
SUI 和 Aptos 都努力并行执行,但采用不同的策略。SUI 需要在代码中明确特定性,而 Aptos 引入了对开发人员友好的 Block-STM。然而,Aptos 的方法可能会面临挑战,因为具有相同内存读写的并发事务可能会使事务无效,从而引发对网络健壮性和效率的担忧。这些差异使合同开发复杂化,并且需要更加努力地优化交易并行化。
Aptos distinguishes itself by utilizing Block-STM (Software Transactional Memory), which provides a better developer experience. In this approach, the system distributes transactions in each block across processor threads during execution according to a pre-set order. It assumes no dependencies between nodes and validates all transactions. If a transaction invalidates memory locations modified by preceding transactions, it is invalidated. While this enhances parallel execution, Block-STM introduces potential limitations and necessitates additional error-handling measures.
Aptos 通过利用 Block-STM(软件事务内存)来区分自己,它提供了更好的开发人员体验。在这种方法中,系统在执行过程中根据预设的顺序在处理器线程之间分配每个块中的事务。它假设节点之间没有依赖关系,并验证所有事务。如果事务使先前事务修改的内存位置无效,则该事务将失效。虽然这增强了并行执行,但 Block-STM 引入了潜在的限制,并需要额外的错误处理措施。
How Vara Network’s Parallelization Approach Enhances Developer Experience
Vara Network 的并行化方法如何增强开发人员体验
Vara, built on the Gear Protocol, offers a unique parallelization approach that significantly enhances the developer experience. The Gear Protocol’s architecture relies on the Actor model, which is one of its flagship features. In this model, users, programs, and network entities act as actors that engage in message exchanges. Each program has a dedicated, isolated memory and maintains its own state without sharing it.
Vara 基于 Gear 协议构建,提供了一种独特的并行化方法,可显著增强开发人员的体验。Gear Protocol 的架构依赖于 Actor 模型,这是其旗舰功能之一。在此模型中,用户、程序和网络实体充当参与消息交换的参与者。每个程序都有一个专用的隔离内存,并在不共享的情况下保持自己的状态。
When a program receives a message, it can modify its private state, generate a reply (another message) to another program or user, or create a new actor altogether. This design facilitates sharding within the Gear networks. The Actor model provides a cohesive framework for parallel and distributed computing, ensuring a unified approach. Due to actors having private states, the system achieves infinite sharding with the introduction of new programs.
当一个程序收到一条消息时,它可以修改其私有状态,生成对另一个程序或用户的回复(另一条消息),或者完全创建一个新的参与者。这种设计有助于在 Gear 网络内进行分片。Actor 模型为并行和分布式计算提供了一个内聚框架,确保了统一的方法。由于参与者具有私有状态,因此系统通过引入新程序实现了无限分片。
The Parallelization Summary: Actor Model Advantages
并行化摘要:Actor 模型的优点
Comparing the parallelization approaches in blockchain networks reveals distinct characteristics in Vara, SUI, and Aptos. In the Actor model, message communications occur asynchronously. However, in synchronous programming languages like Solana, SUI, and Aptos, dApp developers must design their business logic sequentially, waiting for each preceding step to complete. Each distinct business logic section must be completed within a single block.
比较区块链网络中的并行化方法可以揭示 Vara、SUI 和 Aptos 的不同特征。在 Actor 模型中,消息通信是异步发生的。但是,在 Solana、SUI 和 Aptos 等同步编程语言中,dApp 开发人员必须按顺序设计他们的业务逻辑,等待前面的每个步骤完成。每个不同的业务逻辑部分都必须在单个块中完成。
Asynchronous programming eliminates these limitations, allowing developers to address different system components (actors) in parallel without waiting for responses from previous messages. Messages related to a single workflow or business logic can be processed and completed in different blocks, even if they are temporally distant.
异步编程消除了这些限制,使开发人员能够并行处理不同的系统组件(参与者),而无需等待先前消息的响应。与单个工作流或业务逻辑相关的消息可以在不同的块中处理和完成,即使它们在时间上相距遥远。
Vara, leveraging the Gear Protocol, presents an inherently sharded system with asynchronous messaging capabilities, thanks to the Actor model. While per-CPU parallelization implementation is forthcoming, Vara’s design ensures isolated program execution, minimizing conflicts and allowing for future error-handling enhancements. For more details, one can refer to Gear Protocol’s documentation.
Vara 利用 Gear 协议,借助 Actor 模型,提出了一个具有异步消息传递功能的固有分片系统。虽然每个 CPU 并行化实现即将到来,但 Vara 的设计确保了隔离的程序执行,最大限度地减少了冲突,并允许未来的错误处理增强功能。有关更多详细信息,可以参考 Gear Protocol 的文档。
Vara Network’s Benefits on Scalability, Efficiency, and Flexibility
Vara Network 在可扩展性、效率和灵活性方面的优势
As the first Layer-1 standalone network built on the Gear Protocol, Vara Network harnesses the inherent power of parallelization and the Actor model to achieve remarkable scalability and efficiency. With Vara Network, developers benefit from integrating the Actor model, enabling asynchronous messaging and unlocking new possibilities for dApps. By employing individual isolated memory spaces per program, Vara Network eliminates the complexities associated with specifying data access, allowing developers to focus on building robust applications without the burden of manual optimization.
作为第一个基于 Gear 协议构建的 Layer-1 独立网络,Vara Network 利用并行化的固有能力和 Actor 模型实现了卓越的可扩展性和效率。借助 Vara Network,开发人员可以从集成 Actor 模型中受益,从而实现异步消息传递并为 dApp 解锁新的可能性。通过为每个程序采用单独的隔离内存空间,Vara Network 消除了与指定数据访问相关的复杂性,使开发人员能够专注于构建强大的应用程序,而无需手动优化。
The upcoming implementation of per-CPU parallelization exemplifies Vara Network’s commitment to ongoing development. This enhancement further optimizes message processing on Gear nodes, maximizing the potential for parallel execution and bolstering the network’s overall performance.
即将实现的每 CPU 并行化体现了 Vara Network 对持续开发的承诺。此增强功能进一步优化了 Gear 节点上的消息处理,最大限度地提高了并行执行的潜力,并增强了网络的整体性能。
By pushing the boundaries of what is possible in blockchain networks, Vara Network opens new horizons for dApps, enabling them to achieve unparalleled scalability, efficiency, and flexibility. To explore Vara Network and its capabilities, visit vara-network.io and discover how the layer-1 network is transforming the blockchain landscape.
通过突破区块链网络的可能性界限,Vara Network 为 dApp 开辟了新的视野,使他们能够实现无与伦比的可扩展性、效率和灵活性。要探索 Vara Network 及其功能,请访问 vara-network.io 并了解第 1 层网络如何改变区块链格局。
Parallel Computations Techniques
并行计算技术
Parallel computations in blockchain can be achieved via:
区块链中的并行计算可以通过以下方式实现:

  1. Sharding: Sharding breaks the state space into N parts, each operating independently while remaining open to cross-shard communications.
    分片:分片将状态空间分解为N个部分,每个部分独立运行,同时保持对跨分片通信的开放性。
  2. Parallel Execution: This is achieved by identifying independent transactions and executing them simultaneously. Two transactions are separate if they don’t read from or write to the same data. Regardless of the order of execution, the result will be the same. This method can be parallelized using different CPU cores or GPUs.
    并行执行:这是通过识别独立事务并同时执行它们来实现的。如果两个事务不读取或写入相同的数据,则它们是独立的。无论执行顺序如何,结果都是相同的。可以使用不同的 CPU 内核或 GPU 并行化此方法。

Solana and SUI are similar in transaction execution, although data is stored as accounts on Solana and as objects on SUI. dApps need to specify which accounts or objects they wish to interact with in their function calls so that the VM can run an analysis to determine independent transactions, adding complexity to contract development.
Solana 和 SUI 在事务执行上相似,尽管数据在 Solana 上存储为账户,在 SUI 上存储为对象。dApp 需要指定他们希望在函数调用中与哪些账户或对象进行交互,以便 VM 可以运行分析以确定独立的交易,这增加了合约开发的复杂性。
Aptos adopts a different approach that provides a better developer experience by eliminating the need to specify which data to access in a transaction. Aptos employs Block-STM (Software Transactional Memory), where transactions in every block follow a preset order and are distributed across processor threads during execution. The blockchain assumes no dependencies between nodes, executing all transactions while recording memory locations modified by each transaction. If a transaction accesses memory locations altered by preceding transactions, it will be invalidated.
Aptos 采用了一种不同的方法,通过消除指定在事务中访问哪些数据的需要,提供了更好的开发人员体验。Aptos 采用 Block-STM(软件事务内存),其中每个块中的事务都遵循预设顺序,并在执行过程中分布在处理器线程之间。区块链假设节点之间没有依赖关系,执行所有交易,同时记录每笔交易修改的内存位置。如果事务访问了被先前事务更改的内存位置,则该事务将失效。
One of Gear Protocol’s key features is the Actor model for communications. Users, programs, and other network entities act as actors that exchange messages. Programs have isolated memory and do not share their state. The result of a message received by a program can lead to a change in the program’s private state, a reply to another program or user, or the creation of another actor.
Gear Protocol 的主要特性之一是用于通信的 Actor 模型。用户、程序和其他网络实体充当交换消息的参与者。程序具有隔离的内存,并且不共享其状态。程序接收到的消息的结果可能会导致程序的私有状态发生变化、对另一个程序或用户的回复,或者创建另一个参与者。
This inherently enables sharding within Gear networks. The Actor model provides a unified design for parallel and distributed computing. Due to actors having private states, the system is infinitely sharded with new programs.
这本质上可以在 Gear 网络内实现分片。Actor 模型为并行计算和分布式计算提供了统一的设计。由于参与者具有私有状态,因此系统被新程序无限分片。
Message communications in the Actor model are asynchronous. In synchronous programming (Solana, SUI, Aptos), a dApp developer must design business logic sequentially, waiting for the completion of the previous step. The distinct business logic part must be completed within a single block. Asynchronous programming removes this limitation, allowing developers to address different system components (actors) in parallel, not waiting for a response from the previous message. Messages related to a single workflow can be finalized in different blocks, even if they are temporally distant.
Actor 模型中的消息通信是异步的。在同步编程(Solana、SUI、Aptos)中,dApp开发人员必须按顺序设计业务逻辑,等待上一步的完成。不同的业务逻辑部分必须在单个块中完成。异步编程消除了这一限制,允许开发人员并行处理不同的系统组件(参与者),而无需等待前一条消息的响应。与单个工作流相关的消息可以在不同的块中完成,即使它们在时间上相距遥远。
Unlike SUI, Gear dApp developers do not need to specify which objects to address for optimal transaction parallelization, as this is managed by the protocol thanks to individual isolated memory spaces per program.
与 SUI 不同,Gear dApp 开发人员不需要指定要寻址哪些对象以实现最佳事务并行化,因为这是由协议管理的,这要归功于每个程序的独立隔离内存空间。
Conclusion 结论
SUI’s system sharding can be achieved if dApp developers manage it effectively. Aptos ensures parallel per-CPU execution with subsequent error handling due to the shared state, which can potentially reduce the effectiveness of parallel computations. Gear, with its infinitely sharded system by design and asynchronous messages enabled by the Actor model, offers per-CPU parallelization for isolated programs without conflicts and with future error handling enhancements.
如果 dApp 开发人员有效地管理它,SUI 的系统分片是可以实现的。Aptos 确保每个 CPU 并行执行,并由于共享状态而进行后续错误处理,这可能会降低并行计算的效率。Gear 凭借其无限分片系统的设计和 Actor 模型支持的异步消息,为无冲突的隔离程序提供每 CPU 并行化,并具有未来的错误处理增强功能。