COLE: A Column-based Learned Storage for Blockchain Systems

Ce Zhang, Cheng Xu, Haibo Hu, Jianliang Xu

TL;DR

Blockchain storage is overwhelmed by index bloat: Ethereum's Merkle Patricia Trie (MPT) duplicates index nodes at every block to enable historical audits, taking up over 97% of state storage. COLE replaces this with a column-based learned storage engine organized as an LSM-tree, storing historical versions of each address contiguously and indexing them with streaming piecewise-linear models alongside an independent Merkle tree. Compared to MPT, COLE shrinks storage size by up to 94%, boosts transaction throughput by 1.4×–5.4×, and slashes tail latency by 1–2 orders of magnitude via deterministic asynchronous compaction.

What Problem Does This Paper Address?

Full nodes in permissioned and permissionless blockchains must verify transactions and answer provenance queries (historical state lookups accompanied by cryptographic proofs of integrity). Ethereum achieves this using the Merkle Patricia Trie (MPT). However, to allow users to query any historical block height, MPT retains obsolete tree nodes whenever an address updates, duplicating nodes along the root-to-leaf path. In tests with 10 million transactions, the underlying ledger data constituted only 2.8% of total disk usage—the remaining 97.2% was index overhead.

While learned indexes typically offer orders-of-magnitude smaller index footprints and faster lookups, naively combining learned indexes with MPT-style node persistence is disastrous: because learned index nodes have massive fanouts and larger node footprints, persisting them per block produces 5× to 31× more storage overhead than MPT itself. Blockchain storage requires an index structure optimized for disk I/O, heavy writes, cryptographic verification, and provenance queries without persistent node explosion.

Methods

COLE addresses these challenges through four primary designs:

[ In-Memory L0 ] -> Leaf flush -> [ On-Disk Level Li ]
  MB-Tree                          Sorted Runs:
                                    ├── Value File (contiguously sorted <addr, blk>)
                                    ├── Index File (hierarchical piecewise linear models)
                                    └── Merkle File (m-ary complete MHT over data)
  1. Column-Based Storage Design: Rather than organizing data block-by-block, COLE borrows from columnar databases. Each state address is viewed as a column, contiguously storing all of its historical versions indexed under a 64-bit compound key: $\langle \text{addr}, \text{blk} \rangle$. Appending new versions eliminates the need to persist and duplicate internal index paths across blocks.
  2. LSM-Tree Storage Hierarchy: To avoid costly online model retraining during write-heavy workloads, COLE organizes data into exponentially sized levels. The in-memory buffer ($L_0$) uses an authenticated Merkle B+-tree (MB-tree). When full, it flushes sorted runs to disk levels.
  3. Decoupled Three-File Run Structure: Each on-disk run generates three distinct files in a single streaming pass:
  4. Value File ($F_V$): Sequentially ordered compound key-value pairs.
  5. Index File ($F_I$): An $\epsilon$-bounded piecewise linear model (adapted from PGM-index) built streaming via incremental convex hulls. The error bound $\epsilon$ is matched to disk page bounds, guaranteeing at most two page reads per lookup.
  6. Merkle File ($F_H$): A complete $m$-ary Merkle Hash Tree (MHT) built layer-by-layer over the data in $F_V$. Crucially, the learned index models are omitted from the Merkle tree—they serve only as untrusted lookups, while cryptographic integrity remains strictly rooted in the data.
  7. Checkpoint-Based Asynchronous Merge: Traditional asynchronous LSM-compaction causes nodes with varying hardware speeds to fall out of sync, leading to inconsistent state roots ($H_{\text{state}}$) and breaking consensus. COLE divides each level into two groups (a writing group and a merging group) synchronized via deterministic start and commit checkpoints. Merge intervals scale with run size, enabling background compaction without drifting out of consensus.

Datasets

The authors evaluated COLE using standard macro- and micro-benchmarks ported to the Rust Ethereum Virtual Machine (EVM):

  • SmallBank (from Blockbench): Simulates banking operations and account balance transfers across accounts.
  • KVStore / YCSB (from Blockbench): Simulates standard key-value operations across $10^5$ base records under three configurations: Read-Only (RO), Read-Write (RW, 50/50), and Write-Only (WO).
  • Provenance Query Benchmark: 100 base keys subjected to continuous update transactions, evaluated by querying historical states over variable block windows $q \in [2, 128]$.

Key Insights and Ideas

  • Learned models must not be authenticated: Authenticating learned index nodes forces persistence and destroys their space advantage. Decoupling routing (the learned index) from verification (the Merkle file over contiguous raw data) unlocks learned index efficiency without compromising blockchain security.
  • Columnar layout transforms provenance complexity: In MPT, provenance queries require independent traversals for every block in the queried range $[blk_l, blk_u]$. In COLE, different versions of an address sit adjacent on disk. A provenance query becomes an efficient range scan within each run, producing sublinear proof sizes because neighboring values share ancestral nodes in the Merkle file.
  • Consensus-safe asynchronous compaction: By structuring levels into paired writing/merging groups and tying the commitment of merged files to deterministic run-capacity thresholds, background compaction can run asynchronously without diverging the global state root.

Key Results

  • Storage Footprint: At $10^5$ blocks, COLE reduced total storage size by 94% on SmallBank and 93% on KVStore relative to MPT. Persistent-LIPP blew up storage by 5×–31× at just $10^2$ blocks.
  • Throughput: COLE achieved a 1.4× to 5.4× throughput improvement over MPT across both benchmarks.
  • Tail Latency: The asynchronous merge variant (COLE*) reduced 99th-percentile write stall / tail latency by 1–2 orders of magnitude compared to synchronous merge baselines.
  • Provenance Verification: Under provenance queries ranging across 2 to 128 blocks, MPT’s CPU execution time and proof sizes scaled linearly with the range ($O(q)$), whereas COLE scaled sublinearly thanks to shared Merkle proofs across contiguous entries.

Limitations and Future Work

  • Forking and Rollbacks: COLE relies on sequential LSM-tree flushes and immutable append-only runs, making arbitrary state rewinds (e.g., handling chain re-orgs) expensive. It currently assumes non-forking consensus protocols (such as PBFT, Algorand, or Tendermint/Fabric).
  • Columnar Compression: Because successive versions of a state address share significant data redundancy and identical address prefixes, integrating lightweight columnar compression (e.g., dictionary encoding or delta encoding) directly into the learned index runs remains an open direction.

Summary updated

BibTeX
@inproceedings{zhang2024cole,
  author = {Ce Zhang and Cheng Xu and Haibo Hu and Jianliang Xu},
  title = {{COLE: A Column-based Learned Storage for Blockchain Systems}},
  booktitle = {FAST},
  year = {2024},
  url = {https://openreview.net/forum?id=6mGxEH6SyO},
}
Figure