RainBlock: Faster Transaction Processing in Public Blockchains

Soujanya Ponnapalli, Aashaka Shah, Souvik Banerjee, Dahlia Malkhi, Amy Tai, Vijay Chidambaram, Michael WeiUSENIX ATC 2021 · OpenReview

TL;DR

This paper introduces RainBlock, a novel public blockchain architecture that significantly boosts transaction throughput by optimizing transaction processing, not by altering the consensus mechanism. It achieves this by decoupling I/O operations from the critical path and introducing a new in-memory data structure called DSM-TREE, leading to a 27x increase in transaction processing speed compared to Ethereum.

What Problem Does This Paper Address?

Public blockchains like Bitcoin and Ethereum currently suffer from low transaction throughput, processing only tens of transactions per second. This limitation hinders their adoption for a wider range of applications. While the Proof-of-Work (PoW) consensus mechanism dictates the block creation rate (e.g., every 10-12 seconds in Ethereum), the actual number of transactions that can be included in a block is bottlenecked by the speed at which miners can process these transactions. This processing involves executing transactions and updating the blockchain's state, which is heavily reliant on I/O operations, especially as the blockchain state grows. Existing solutions often focus on changing the consensus protocol, but this paper argues that addressing the I/O bottleneck in transaction processing is key to increasing throughput without compromising decentralization or security.

Methods

RainBlock tackles the I/O bottleneck through two primary innovations:

  • RAINBLOCK Architecture: This new architecture deconstructs traditional miners into three distinct entities:
  • Storage Nodes: These nodes store the system state in an in-memory, multi-versioned, sharded data structure called DSM-TREE.
  • Miners: These entities execute transactions and build new blocks. Crucially, they perform transaction execution without direct I/O operations.
  • I/O-Helpers: These act as intermediaries, prefetching necessary data and witnesses from storage nodes on behalf of the miners. This prefetching happens in parallel, removing I/O from the miner's critical path.
  • DSM-TREE Data Structure: This is a novel, two-layered, in-memory, multi-versioned, and sharded Merkle tree.
  • Bottom Layer: Sharded across storage nodes, it stores multiple versions of the state to handle concurrent updates from miners without conflicts.
  • Top Layer: Each miner maintains a private, writeable snapshot of the DSM-TREE's top levels. This layer acts as a cache for frequently accessed data and witnesses, allowing miners to execute transactions using local memory.
  • Witness Revision: A technique to handle potentially stale witnesses received from I/O-Helpers due to asynchronous updates, allowing miners to revise them to reflect the current state.

Datasets

The paper evaluates RainBlock using synthetic workloads generated to mirror transactions on the Ethereum mainnet. These workloads are based on an analysis of 100,000 recent and older Ethereum blocks to capture:

  1. The distribution of accounts involved in transactions (Zipfian distribution, with 90% of transactions involving the same 10% of accounts).
  2. The fraction of transactions invoking smart contracts (observed to be 10-15%).

The generator creates accounts with private keys that the researchers control, enabling them to submit signed transactions and accurately measure performance.

Key Insights and Ideas

  • I/O is the Real Bottleneck, Not PoW: The paper convincingly demonstrates that the primary limitation on transaction throughput in public blockchains isn't the block creation rate dictated by PoW, but rather the I/O cost of processing transactions, especially as the blockchain state grows.
  • Decoupling I/O is Key: By separating I/O operations from the core transaction execution by miners, RainBlock can achieve significant speedups. I/O-Helpers act as a dedicated, parallelized I/O subsystem.
  • In-Memory Sharded State is Scalable: The DSM-TREE's sharded, in-memory design allows it to scale with increasing state size without requiring massive amounts of DRAM on every miner, thus preserving decentralization.
  • Witness Revision is Crucial for Asynchronous Systems: Handling stale data in a system with asynchronous updates (like RainBlock's) is critical. Witness revision provides a practical mechanism to manage this without aborting transactions.
  • Architecture Over Consensus: The paper highlights that fundamental architectural changes, rather than just consensus protocol modifications, can unlock substantial performance gains in blockchains.

Key Results

  • Single Miner Throughput: A single RainBlock miner processes 27.4K transactions per second (tps), which is 27 times higher than a single Ethereum miner.
  • Geo-Distributed Performance: In a geo-distributed setting with four regions across three continents, RainBlock miners achieve 20K tps, retaining 80% of the single-region performance, demonstrating resilience to network latency.
  • DSM-TREE Performance: The DSM-TREE data structure itself shows significant improvements over an in-memory Ethereum Merkle Patricia Trie (MPT), with 150x faster gets and 160x faster puts due to pointer-based traversal, memoization, and lazy hash resolution.
  • Memory Efficiency: DSM-TREE consumes 34x less memory (775 MB vs. 25 GB) for the same system state compared to Ethereum MPT.
  • Block Size Increase: RainBlock can pack significantly more transactions into blocks (e.g., ~240K transactions, ~24MB blocks) without altering the PoW consensus or block creation time, leading to higher transaction finalization rates.

Limitations and Future Work

  • Network Traffic: RainBlock trades local storage I/O for increased network I/O. While optimizations like witness compaction and deduplication mitigate this, network bandwidth can still become a bottleneck. The paper notes that RainBlock can be configured to produce blocks of a specific size to manage this.
  • Incentives for Storage Nodes: The paper acknowledges that incentivizing storage nodes to reliably serve the latest system state is an open question. They propose a model where I/O-Helpers or users pay storage nodes, and suggest that an ecosystem of commercial entities could emerge to provide these services.
  • Complexity: The introduction of I/O-Helpers and separate storage nodes adds complexity to the system. However, the authors argue this is a worthwhile trade-off for the significant performance gains and that Ethereum was already considering similar concepts.
  • Future Work: The paper suggests further exploration into incentivizing the various components of RainBlock and refining the DSM-TREE configurations for optimal performance across different hardware and network conditions. They also welcome community collaboration on adoption.

Summary updated

BibTeX
@inproceedings{ponnapalli2021rainblock,
  author = {Soujanya Ponnapalli and Aashaka Shah and Souvik Banerjee and Dahlia Malkhi and Amy Tai and Vijay Chidambaram and Michael Wei},
  title = {{RainBlock: Faster Transaction Processing in Public Blockchains}},
  booktitle = {USENIX ATC},
  year = {2021},
  url = {https://openreview.net/forum?id=7D9DrWy8rm},
}
Figure