Presenting Artela Scalability Whitepaper - Parallel Execution Stack and Elastic Block Space

Jun 20, 2024

Featured

Do you know what a fully parallelized blockchain looks like? Artela scalability whitepaper introduces a brand new parallelized blockchain architecture: not only achieving parallel execution but also supporting parallel storage! On top of all this parallelization, we will further realize nodes that support elastic computing, achieving elastic node block space and bringing predictable performance to dApps!

Today, Artela published Artela Whitepaper: Full Stack Parallelization. We aim to fully unleash the blockchain scalability and enable dApps with predictable performance.

In this post, we introduce the core idea behind the upgrade towards a full-stack parallel blockchain.

Nontechnical overview

Understanding "full-stack parallelization" and what Artela has accomplished.

Software programs usually consist of two important parts: computation and storage. After completing the computations, the results need to be written into the storage layer.

High-performance optimization starts with making computations parallel so that the more CPU cores you have, the faster the program can run.

However, it soon becomes apparent that storage becomes a bottleneck: its write speed cannot keep up with the speed of parallel computations. Therefore, further improvements are needed: the storage layer also needs to be modified to be concurrent.

But soon you will find that the number of CPU cores in a computer is limited, so the degree of concurrency still has a limit. To overcome this, multiple computers need to work together in parallel, enabling elastic computing.

The same applies to blockchain! However, most current parallel execution solutions only solve computational parallelization. To enable full parallelization, this is what Artela aims to achieve: Not only achieving parallel execution but also supporting parallel storage! On top of all this, we will further realize elastic computing nodes, achieving elastic block space and enabling dApps with predictable performance!

Let's see how all of this will be implemented.

Technical overview

Artela blockchain enhances performance through its full parallel stack, providing applications with predictable performance. This stack consists of a suite of optimization strategies aimed at enabling efficient parallel transaction execution.

Initially, it employs a transaction dependency prediction algorithm to group transactions, facilitating their parallel execution across multiple CPU cores. Additionally, it implements a precise preloading mechanism to ensure that transactions perform all I/O operations in-memory cache rather than on the hard drive during execution, while state persistence is carried out asynchronously, thereby contributing to highly efficient read and write operations. Moreover, it optimizes the state storage layer extensively, effectively mitigating performance degradation resulting from data write amplification. Ultimately, the parallel execution and storage characteristics support elastic computing, enabling elastic block space that ensures predictable application performance.

These solutions will be integrated into the Artela blockchain, together with Aspect programming, forming a new generation modular execution layer that supports interoperable multi-virtual machines and scaling in both computation and storage.

How it works

Summary

Artela full-stack parallelization delves into the implementation of 4 modules:

  • Predictive optimistic execution: enhances optimistic parallel execution by accurately predicting transaction dependencies to reduce conflicts. It uses a hint table that logs state access information from historical transactions to form optimized execution groups without user input.

  • Async preloading: an async I/O solution. It leverages a predictive algorithm to preload transaction states into memory before execution, and streamlines data access to eliminate I/O bottlenecks during execution.

  • Parallel storage: a solution that enabling parallelizable storage and enhancing the efficiency of persisting Merkelized world states into a database.

  • Elastic block space: the design refers to a dynamically scalable block space that provides independent and protocol-guaranteed block space for dApps with high transaction throughput needs, ensuring predictable performance. When a new EBS is created, dedicated resources are elastically allocated to dApps, ensuring efficient resource utilization and accommodating varying transaction volumes.

Predictive optimistic execution

We propose Predictive Optimistic Execution, an approach designed to enhance optimistic execution algorithms by predicting transaction dependencies with high accuracy. This method reduces conflict rates and boosts the efficiency of parallel executions.

Traditional optimistic execution algorithms face difficulties with high-conflict blocks, which will lead to a large amount of redundant execution of related transactions and a significant decline in the efficiency of parallel EVMs.

Artela introduce an optimistic execution method complemented by a prediction module. This module proactively analyzes transaction dependencies based on hints associated with transactions and contracts, thereby forming execution groups for transactions to reduce the possible re-execution. A hint table is incorporated, which logs the state access information of transactions and contracts. The hint table serves as the input for the prediction algorithm; these hints are dynamically accumulated through analysis of historical transaction execution processes and do not require user input.

Async preloading

To maximize the use of the CPU's concurrent computational capabilities and prevent I/O from becoming the execution bottleneck, we propose "Async Preloading", which is based on a predictive algorithm. This approach proactively preloads the states required for transaction execution into memory beforehand, thereby eliminating the need for I/O access during transaction execution.

With the transition to parallel transaction execution, the potential bottleneck during execution shifts to states’ I/O. The performance of a block is contingent on its slowest batch, which may suffer from higher computational demands or extended "waiting" times, primarily from disk reads for accounts and storage slots. In Artela, advanced predictive algorithms is designed to address computational bottlenecks by offering predictive algorithms address computational bottlenecks by offering relatively optimal solutions, while I/O delays are mitigated through Async Preloading combined with the hint table, enhancing overall system performance.

The working process of async preloading is illustrated in the diagram below:

  1. Before executing every transaction, Optimistic Preloading is initiated, loading only the specified storage into memory according to static hints.

  2. Following Optimistic Preloading, Pessimistic Preloading commences, loading all potential storage into memory in accordance with dynamic hints.

After completing the async preloading, all the necessary state storage is loaded into memory. Subsequent execution will be entirely based on memory, which is expected to enhance I/O performance by a factor of 10 to 1,000 times.

Parallel storage

The parallel storage addresses two critical performance challenges in blockchain execution: parallelizable storage and Merkelization performance.

When transactions are executed in parallel, multi-core processing is utilized effectively. However, if data persistence lags behind transaction execution, storage becomes a bottleneck, hindering blockchain performance. Parallelizable storage is essential for maximizing transaction parallel execution efficiency.

Merkelization performance pertains to the throughput and latency of writing Merkle tree-based world states into the database. The primary issues are write amplification and database performance. Each state modification requires the Merkle tree to re-encode and rewrite from leaf nodes to the root in the KV database. The KV database itself also experiences write amplification, leading to significant overhead. As data accumulates, the Merkle tree depth increases, resulting in more key-value pairs being written. This intensifies database background activities such as compaction, which consume substantial disk and CPU resources. Consequently, the throughput and performance of writing world states degrade significantly.

In Artela blockchain, the parallel storage serves as an optimized storage solution specifically engineered to augment the efficiency of state storage within the Cosmos SDK. This layer is crafted to ensure seamless compatibility with established Cosmos storage frameworks, such as LevelDB or RocksDB, as well as the IAVL trie, while introducing a substantially enhanced storage strategy. Notably, the existing implementation of Cosmos IAVL storage suffers from performance degradation as the blockchain state expands.

The parallel storage addresses these challenges by optimizing I/O performance for extensive state manipulations and expediting the Merkelization process. It aims to rectify prevalent storage inefficiencies through a series of critical enhancements:

  1. Separation of State Commitment (SC) and State Storage (SS)

To achieve parallelizable storage, we have implemented a separation strategy between "State Commitment" (SC) and "State Storage" (SS). This approach allows Artela blockchain to distinctly categorize operations into parallelizable and non-parallelizable segments, enhancing system throughput and efficiency.

  1. K-Persist State Commitment Database

We have outlined a universal persistent database design that supports more efficient Merkelization and the capability for multi-version data and SPV queries without compromising hash compatibility. It not only enhances the flexibility of the database but also ensures scalability and efficiency in handling large-scale blockchain data.

Elastic Block Space

This proposal delineates a comprehensive strategy for implementing an Elastic Block Space (EBS) system within the Artela blockchain ecosystem. EBS refers to a dynamically scalable block space that provides independent and protocol-guaranteed block space for dApps with high transaction throughput needs, ensuring predictable performance. By introducing EBS, Artela endeavors to overcome the constraints of fixed block space capacity, enabling seamless scalability while maintaining predictable performance and efficient resource utilization.

Typically, a monolithic blockchain or an execution layer has only one shared block space available for all dApps, which may lead to the competition between different dApps causing unpredictable gas fee and performance. For dApps with high traffic and a high number of on-chain interactions, competition for block space greatly damages user experience. Opting for app chains or rollups to obtain independent block space introduces significant development burdens and a loss of composability. In Artela, EBS provide a solution to address this dilemma. When a dApps needs more performance predictability, it can apply for dedicated block space. This additional space is integrated into the block and is exclusively used for the dApp’s transactions. As block space increases, validators must scale "up" by adding elastic execution nodes to handle the enhanced processing load.

Elastic block space is a pivotal blockchain scaling mechanism, facilitating limitless scalability while ensuring interoperability. Unlike other scalable networks such as sharded blockchains, app chain networks, and Layer 2 solutions—which provide independent block spaces but suffer from isolation and unsynchronized block generation—elastic block space enables dApps with dedicated block spaces to conduct synchronous interactions through atomic transactions within the same block, circumventing the complexities of asynchronous cross-chain communications.

When a dApp in the Artela network demands high scalability, it can subscribe to elastic block space to manage the increase in transaction volume. This functionality, combined with native extensions, grants dApps on Artela enhanced scalability and customization potential.

Conclusion

Artela enables EVM++, an advanced iteration of the EVM. EVM++ is engineered to improve both the scalability and extensibility of the EVM blockchain while preserving compatibility with its execution model. At the heart of EVM++ lies Aspect Programming and the parallel execution stack, key solution to unleash blockchain extensibility and scalability.

Since we published Aspect Programming Whitepaper and launched Artela Testnet in January 2024, we’ve witnessed hundreds of innovators from Artela dev community leverage Aspect Programming to enable groundbreaking on-chain use cases that have never been possible before. Aspect Programming breaks the limits of EVM in extensibility and enables dApps with advanced functionality.

Today, with Artela Whitepaper: Full Stack Parallelization published, we outline the second “+” of “EVM++” - unlimited scalability and predictable performance.

On top of parallel EVM, Artela achieves further optimization of parallel transaction processing and I/O performance through predictive optimistic execution and asynchronous preloading. The fast persistent storage layer improves storage efficiency, while the elastic block space model allows dApps to request dedicated block space, further boosting network efficiency.

These innovations are the key technologies of Artela EVM++ and will also become a critical breakthrough in Artela's exploration of a new generation modular execution layer. It make Artela EVM++ well-suited for integrating advanced technologies and supporting a wide range of dApps.

With Aspect Programming and the Full Stack Parallelization, EVM++ is truly brought to life.

Build

Explore