Deferred Objects to Enhance Smart Contract Programming with Optimistic Parallel Execution

Read original: arXiv:2405.06117 - Published 5/13/2024 by George Mitenkov, Igor Kabiljo, Zekun Li, Alexander Spiegelman, Satyanarayana Vusirikala, Zhuolun Xiang, Aleksandar Zlateski, Nuno P. Lopes, Rati Gelashvili
Total Score

0

🌀

Sign in to get full access

or

If you already have an account, we'll log you in

Overview

  • Blockchains face challenges with smart contract execution, a key bottleneck to improving throughput
  • Modern blockchains try to execute transactions in parallel, but common use cases introduce read-write conflicts, forcing sequentiality
  • The authors propose RapidLane, an extension for parallel execution engines that can capture computations in conflicting parts of transactions and defer their execution

Plain English Explanation

Blockchains, the distributed digital ledgers that power many cryptocurrencies and other applications, often struggle with the speed at which they can process transactions. One major reason for this is the way they handle "smart contracts" - small programs that automatically execute when certain conditions are met.

To try to improve the throughput of blockchains, researchers have been exploring ways to run these smart contract computations in parallel, rather than one-by-one. However, a common challenge is that many real-world blockchain use cases involve multiple transactions that try to access or modify the same data at the same time, creating conflicts that force the transactions to be processed sequentially instead of in parallel.

The RapidLane system proposed in this paper aims to address this by allowing the parallel execution engine to identify the parts of transactions that conflict with each other, and temporarily delay the execution of those conflicting computations. In some cases, RapidLane can even "optimistically" predict what the result of those delayed computations will be, further improving parallelism.

This technique, combined with a new language construct for smart contracts, enables RapidLane to turn certain workloads that would normally be sequential into ones that can be parallelized. The authors integrated RapidLane into an existing parallel execution engine called Block-STM and tested it on the Aptos blockchain, finding that it can yield up to 12 times more throughput on commonly contended workloads like peer-to-peer transfers and NFT minting.

Technical Explanation

The core of the RapidLane system is its ability to capture computations in conflicting parts of transactions and defer their execution until a later time. This is achieved through a combination of techniques:

  1. Conflict Detection: RapidLane monitors transactions as they are processed and identifies read-write conflicts between them, where multiple transactions are trying to access or modify the same data.

  2. Deferred Execution: Rather than forcing these conflicting transactions to be processed sequentially, RapidLane "defers" the execution of the conflicting computations to a later time, allowing the rest of the transaction to proceed in parallel.

  3. Optimistic Prediction: In some cases, RapidLane can "optimistically" predict the results of the deferred computations, further improving parallelism by allowing dependent computations to start without waiting for the conflicting ones to complete.

  4. Language Support: RapidLane introduces a new construct for smart contract languages that allows developers to explicitly mark certain computations as deferrable, guiding the parallel execution engine on how to handle them.

The authors integrated RapidLane into Block-STM, a state-of-the-art parallel execution engine used by several blockchains in production, and deployed it on the Aptos blockchain. Their evaluation showed that on commonly contended workloads, such as peer-to-peer transfers with a single fee payer and NFT minting, RapidLane can yield up to 12 times more throughput compared to the baseline system.

Critical Analysis

The RapidLane paper presents a promising approach to addressing a key challenge in blockchain scalability, but it also raises some important considerations:

  • Accuracy of Optimistic Predictions: The ability of RapidLane to optimistically predict the results of deferred computations is a powerful feature, but the accuracy of these predictions could have a significant impact on overall system performance. The paper does not provide detailed information on the accuracy of these predictions or how they might be affected by different workloads or system conditions.

  • Complexity and Overhead: Implementing the RapidLane techniques, including the conflict detection, deferred execution, and language extensions, likely adds non-trivial complexity and overhead to the parallel execution engine. The paper does not provide a comprehensive analysis of the computational and storage costs of these mechanisms, which could be an important consideration for real-world deployment.

  • Generalizability: The paper focuses on the integration of RapidLane with the Block-STM engine and its deployment on the Aptos blockchain. It would be valuable to understand how well the RapidLane techniques might generalize to other parallel execution engines and blockchain platforms, and whether there are any significant limitations or trade-offs in doing so.

  • Interaction with Other Scaling Techniques: Blockchains often employ a range of scaling techniques, such as network bypassing, consensus mechanisms, and sharding. It would be interesting to explore how RapidLane might interact with or complement these other approaches to improving blockchain throughput and scalability.

Conclusion

The RapidLane system proposed in this paper represents an important step forward in addressing the challenge of smart contract execution, a key bottleneck for improving the throughput of blockchains. By capturing and deferring computations in conflicting parts of transactions, and in some cases optimistically predicting their results, RapidLane can turn certain sequential workloads into parallelizable ones, leading to significant performance improvements.

While the paper raises some critical considerations around the accuracy, complexity, and generalizability of the RapidLane techniques, the potential benefits of this approach make it a promising area for further research and development in the field of blockchain scalability.



This summary was produced with help from an AI and may contain inaccuracies - check out the links to read the original source documents!

Follow @aimodelsfyi on 𝕏 →

Related Papers

🌀

Total Score

0

Deferred Objects to Enhance Smart Contract Programming with Optimistic Parallel Execution

George Mitenkov, Igor Kabiljo, Zekun Li, Alexander Spiegelman, Satyanarayana Vusirikala, Zhuolun Xiang, Aleksandar Zlateski, Nuno P. Lopes, Rati Gelashvili

One of the main bottlenecks of blockchains is smart contract execution. To increase throughput, modern blockchains try to execute transactions in parallel. Unfortunately, however, common blockchain use cases introduce read-write conflicts between transactions, forcing sequentiality. We propose RapidLane, an extension for parallel execution engines that allows the engine to capture computations in conflicting parts of transactions and defer their execution until a later time, sometimes optimistically predicting execution results. This technique, coupled with support for a new construct for smart contract languages, allows one to turn certain sequential workloads into parallelizable ones. We integrated RapidLane into Block-STM, a state-of-the-art parallel execution engine used by several blockchains in production, and deployed it on the Aptos blockchain. Our evaluation shows that on commonly contended workloads, such as peer-to-peer transfers with a single fee payer and NFT minting, RapidLane yields up to $12times$ more throughput.

Read more

5/13/2024

Maximizing Blockchain Performance: Mitigating Conflicting Transactions through Parallelism and Dependency Management
Total Score

0

Maximizing Blockchain Performance: Mitigating Conflicting Transactions through Parallelism and Dependency Management

Faisal Haque Bappy, Tarannum Shaila Zaman, Md Sajidul Islam Sajid, Mir Mehedi Ahsan Pritom, Tariqul Islam

While blockchains initially gained popularity in the realm of cryptocurrencies, their widespread adoption is expanding beyond conventional applications, driven by the imperative need for enhanced data security. Despite providing a secure network, blockchains come with certain tradeoffs, including high latency, lower throughput, and an increased number of transaction failures. A pivotal issue contributing to these challenges is the improper management of conflicting transactions, commonly referred to as contention. When a number of pending transactions within a blockchain collide with each other, this results in a state of contention. This situation worsens network latency, leads to the wastage of system resources, and ultimately contributes to reduced throughput and higher transaction failures. In response to this issue, in this work, we present a novel blockchain scheme that integrates transaction parallelism and an intelligent dependency manager aiming to reduce the occurrence of conflicting transactions within blockchain networks. In terms of effectiveness and efficiency, experimental results show that our scheme not only mitigates the challenges posed by conflicting transactions, but also outperforms both existing parallel and non-parallel Hyperledger Fabric blockchain networks achieving higher transaction success rate, throughput, and latency. The integration of our scheme with Hyperledger Fabric appears to be a promising solution for improving the overall performance and stability of blockchain networks in real-world applications.

Read more

7/4/2024

📊

Total Score

0

Batch-Schedule-Execute: On Optimizing Concurrent Deterministic Scheduling for Blockchains (Extended Version)

Yaron Hay, Roy Friedman

Executing smart contracts is a compute and storage-intensive task, which currently dominates modern blockchain's performance. Given that computers are becoming increasingly multicore, concurrency is an attractive approach to improve programs' execution runtime. A unique challenge of blockchains is that all replicas (miners or validators) must execute all smart contracts in the same logical order to maintain the semantics of State Machine Replication (SMR). In this work, we study the maximal level of parallelism attainable when focusing on the conflict graph between transactions packaged in the same block. This exposes a performance vulnerability that block creators may exploit against existing blockchain concurrency solutions, which rely on a total ordering phase for maintaining consistency amongst all replicas. To facilitate the formal aspects of our study, we develop a novel generic framework for Active State Machine Replication (ASMR) that is strictly serializable. We introduce the concept of graph scheduling and the definition of the minimal latency scheduling problem, which we prove to be NP-hard. We show that the restricted version of this problem for homogeneous transactions is equivalent to the classic Graph Vertex Coloring Problem, yet show that the heterogeneous case is more complex. We discuss the practical implications of these results.

Read more

8/21/2024

Fast and Secure Decentralized Optimistic Rollups Using Setchain
Total Score

0

Fast and Secure Decentralized Optimistic Rollups Using Setchain

Margarita Capretto, Mart'in Ceresa, Antonio Fern'andez Anta, Pedro Moreno-S'anchez, C'esar S'anchez

Modern blockchains face a scalability challenge due to the intrinsic throughput limitations of consensus protocols. Layer 2 optimistic rollups (L2) are a faster alternative that offer the same interface in terms of smart contract development and user interaction. Optimistic rollups perform most computations offchain and make light use of an underlying blockchain (L1) to guarantee correct behavior, implementing a cheaper blockchain on a blockchain solution. With optimistic rollups, a sequencer calculates offchain batches of L2 transactions and commits batches (compressed or hashed) to the L1 blockchain. The use of hashes requires a data service to translate hashes into their corresponding batches. Current L2 implementations consist of a centralized sequencer (central authority) and an optional data availability committee (DAC). In this paper, we propose a decentralized L2 optimistic rollup based on Setchain, a decentralized Byzantine-tolerant implementation of sets. The main contribution is a fully decentralized arranger where arrangers are a formal definition combining sequencers and DACs. We prove our implementation correct and show empirical evidence that our solution scales. A final contribution is a system of incentives (payments) for servers that implement the sequencer and data availability committee protocols correctly, and a fraud-proof mechanism to detect violations of the protocol.

Read more

6/5/2024