Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
149 tokens/sec
GPT-4o
9 tokens/sec
Gemini 2.5 Pro Pro
47 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Block-STM: Scaling Blockchain Execution by Turning Ordering Curse to a Performance Blessing (2203.06871v3)

Published 14 Mar 2022 in cs.DC and cs.PF

Abstract: Block-STM is a parallel execution engine for smart contracts, built around the principles of Software Transactional Memory. Transactions are grouped in blocks, and every execution of the block must yield the same deterministic outcome. Block-STM further enforces that the outcome is consistent with executing transactions according to a preset order, leveraging this order to dynamically detect dependencies and avoid conflicts during speculative transaction execution. At the core of Block-STM is a novel, low-overhead collaborative scheduler of execution and validation tasks. Block-STM is implemented on the main branch of the Diem Blockchain code-base and runs in production at Aptos. Our evaluation demonstrates that Block-STM is adaptive to workloads with different conflict rates and utilizes the inherent parallelism therein. Block-STM achieves up to $110k$ tps in the Diem benchmarks and up to $170k$ tps in the Aptos Benchmarks, which is a $20$x and $17$x improvement over the sequential baseline with $32$ threads, respectively. The throughput on a contended workload is up to $50k$ tps and $80k$ tps in Diem and Aptos benchmarks, respectively.

Citations (31)

Summary

  • The paper introduces Block-STM, which leverages optimistic concurrency and preset serialization to enable efficient parallel execution of smart contract transactions.
  • It combines Software Transactional Memory with multi-version data structures to dynamically resolve transaction dependencies and ensure deterministic outcomes.
  • Benchmark evaluations reveal up to 110k and 170k transactions per second in Diem and Aptos, achieving up to 20x performance improvements over sequential execution.

Block-STM: An Efficient Parallel Execution Engine for Blockchain

The paper "Block-STM: Scaling Blockchain Execution by Turning Ordering Curse to a Performance Blessing" presents an innovative approach to the parallel execution of smart contract transactions in blockchain systems. The authors introduce Block-STM, a parallel execution engine built on Software Transactional Memory (STM) principles, that leverages optimistic concurrency control to enhance transaction throughput dramatically. This approach addresses the traditional bottleneck of transaction execution in blockchain systems while ensuring deterministic outcomes across multiple executions.

Overview of Block-STM

Block-STM is designed around the existing limitations of blockchain execution systems, particularly those concerning the ordered execution of transactions. In typical blockchain systems, state machine replication is employed, requiring each block's transactions to execute in a specific order to achieve consensus on the system state. However, as the system scales, the execution of transactions becomes a critical bottleneck due to potential conflicts among transactions.

At the core of Block-STM is the novel use of a collaborative scheduler for transaction execution and validation tasks, which aims to convert the 'curse' of transaction ordering into a 'blessing' for performance. The design leverages preset serialization of transactions within a block to detect dependencies and conflicts dynamically, employing multi-version data structures and optimistic concurrency control to manage concurrent executions effectively.

Key Components and Innovations

  1. Optimistic Concurrency Control (OCC): Block-STM uses OCC to manage the parallel execution of transactions. This approach allows transactions to be executed speculatively, detecting and resolving conflicts post-execution through validation. If conflicts are detected, transactions can be aborted and re-executed as needed.
  2. Preset Serialization and Multi-Version Data Structure: By enforcing a fixed order naturally imposed by transaction blocks, Block-STM resolves transaction dependencies dynamically without needing prior knowledge of transaction write-sets. This strategy is similar to the techniques used in deterministic databases like Bohm, but adapted to blockchain's needs.
  3. Collaborative Scheduling: The scheduler in Block-STM optimistically dispatches execution and validation tasks across multiple threads, prioritizing tasks for transactions lower in the preset order. It makes use of concurrent priority queues and simple atomic counters to implement an ordered set abstraction efficiently, scaling across threads.
  4. Implementation and Practical Deployment: Block-STM is implemented in Rust and integrated into the Diem and Aptos blockchain codebases. Its adaptive nature allows the system to scale with varying conflict rates in workloads, achieving impressive throughput improvements over sequential execution baselines in benchmark tests.

Performance and Evaluation

Block-STM exhibits remarkable performance improvements, achieving up to $110k$ transactions per second (tps) in Diem benchmarks and $170k$ tps in Aptos benchmarks, indicating a $20$x and $17$x improvement over baseline sequential execution with 32 threads. These results underscore the system’s capacity to utilize inherent parallelism effectively, even in highly contended workloads. The throughput remains robust, with performance overheads minimized for scenarios where workloads are inherently sequential, demonstrating the system's adaptability and efficiency.

Implications and Future Directions

The implications of Block-STM are significant for blockchain systems, providing a scalable solution for transaction execution that could be widely applied across various blockchain platforms. Theoretical gains from Block-STM suggest that blockchain systems can sustain higher throughputs while maintaining state consistency and determinism, thus broadening blockchain's applicability in high-demand transaction environments.

Future advancements could explore integrating static analysis for pre-execution estimation and refining the granularity of transaction management to support more complex contract logic. Furthermore, optimizing for NUMA architectures or hyperthreading could enhance system performance across a broader range of hardware configurations. Block-STM's incorporation into existing blockchain frameworks demonstrates the potential for immediate impact, setting a new standard for performance scalability in distributed ledger technologies.

Youtube Logo Streamline Icon: https://streamlinehq.com