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
TL;DR
The paper tackles the bottleneck of smart-contract throughput caused by read-write conflicts in parallel blockchain execution. It introduces deferred objects as a programming abstraction to defer computations on shared data, coupled with RapidLane, an extension to Block-STM that records and replays deferred operations via logs and deltas, aided by a rolling commit mechanism for fine-grained finality. The approach enables optimistic parallel execution on contended workloads, achieving significant throughput gains (up to $12\times$ in production cases) on Aptos with workloads including sponsored transactions, NFT minting, and P2P transfers. This work provides a practical path to higher blockchain throughput by enabling more parallelism without sacrificing determinism, and it ships a production-ready implementation and benchmark suite to evaluate contended workloads.
Abstract
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 $12\times$ more throughput.
