TL;DR
This paper introduces Olive, a novel operation-level concurrent transaction execution system for blockchains like Ethereum. By resolving conflicts at the operation level rather than the entire transaction, Olive significantly boosts throughput, achieving up to a 4.28x speedup on real-world Ethereum workloads, and even more when combined with state prefetching.
What Problem Does This Paper Address?
Blockchains, particularly those compatible with the Ethereum Virtual Machine (EVM), are hampered by limited transaction throughput. While smart contracts have expanded blockchain capabilities, their serial execution model prevents them from fully utilizing modern hardware's parallel processing power. Existing concurrency control algorithms, adapted from traditional databases, struggle with the "hot spot" problem prevalent in blockchain workloads – where a small number of contracts or storage slots are accessed disproportionately often. This leads to frequent data contention, causing pessimistic algorithms to block and optimistic ones to abort transactions, severely limiting performance. The paper aims to overcome this bottleneck by enabling concurrent execution even in high-contention scenarios.
Methods
The core innovation of Olive is its operation-level conflict-handling strategy. Instead of treating entire transactions as atomic units, Olive breaks them down into individual operations. When a conflict is detected between operations from different transactions, Olive doesn't abort or block the whole transaction. Instead, it employs a redo phase to re-execute only the specific operations that are directly or indirectly affected by the conflict.
To achieve this, Olive introduces a novel SSA (Static Single Assignment) operation log. This log records not just the operations and their results, but crucially, the data dependencies between them. This allows Olive to precisely identify which operations are impacted by a conflict by traversing definition-use chains.
Olive builds upon the Optimistic Concurrency Control (OCC) model. Transactions are executed speculatively, their read/write sets are tracked, and then validated. If validation fails due to a conflict, instead of aborting, Olive enters the redo phase. Here, it uses the SSA operation log to reconstruct the necessary context and re-execute only the conflicting operations. To ensure correctness during re-execution, Olive also incorporates constraint guards to maintain control-flow and data-flow integrity.
Datasets
The paper evaluates Olive using real-world Ethereum blocks. Specifically, they processed the initial 11.5 million blocks and a sample of 500k blocks for performance evaluation. No new datasets were introduced.
Key Insights and Ideas
- Conflicts are often localized: Even in high-contention scenarios, the impact of a data conflict might only affect a small subset of operations within a transaction. Traditional methods that treat the entire transaction as indivisible are inefficient.
- Operation-level granularity is key: By focusing on resolving conflicts at the operation level, Olive can parallelize conflict-free operations, leading to significant speedups.
- SSA operation logs are powerful for dependency tracking: The SSA log's ability to capture explicit data dependencies is crucial for accurately identifying and re-executing only the necessary operations during conflict resolution.
- Blockchains can benefit from traditional concurrency control advancements: Olive demonstrates that by adapting and innovating on existing OCC principles, substantial performance gains are achievable in the blockchain context.
Key Results
- Average Speedup: Olive achieves an average speedup of 4.28x compared to the baseline Go Ethereum implementation on real-world Ethereum blocks.
- Speedup with Prefetching: When combined with state prefetching techniques, Olive's speedup increases to an impressive 7.11x.
- Comparison to OCC: Traditional OCC with optimizations achieves only a 2.49x speedup, highlighting Olive's superiority in handling high-contention workloads.
- Scalability: Olive scales well with an increasing number of worker threads, outperforming OCC beyond four threads.
- Overhead: The SSA operation log generation incurs an average of 4.5% runtime overhead per transaction, and the re-executed operations in the redo phase are minimal (average of 7 log entries, 0.3% of original EVM instructions).
- Correctness: Olive's output consistently matched the expected Merkle Patricia Trie root nodes for processed blocks, validating its correctness.
Limitations and Future Work
- Resource Utilization: While Olive significantly increases CPU utilization due to parallelization, it also incurs a slight memory overhead (around 4.41% more than baseline Geth) due to shadow stacks and memory.
- Single-threaded Components: Some parts of the blockchain system, like state committing, remain single-threaded, limiting overall parallelization.
- Future Work: The authors suggest that Olive can be further enhanced by combining it with other speculative execution techniques, such as Forerunner, and that its operation-level strategy is orthogonal to and can complement sharding and other block generation acceleration techniques. They also highlight the potential for further optimization of the SSA operation log generation and redo phase.
Summary updated