Optimizing Validation Phase of Hyperledger Fabric

Haris Javaid, Chengchen Hu, Gordon J. Brebner

Introduction

Hyperledger Fabric (HLF) is a leading permissioned blockchain framework known for its "execute-order-validate" architecture. While this design allows for high concurrency during execution, it introduces a significant performance bottleneck during the validation phase. Before a block is committed to the ledger, every peer must verify transaction signatures, check endorsement policies (VSCC), and perform multi-version concurrency control (MVCC) to prevent double-spending.

Researchers from Xilinx identified that this phase is often slow due to sequential processing and frequent, redundant calls to the state database. This is particularly problematic when using CouchDB, which relies on a relatively high-latency REST/HTTP interface compared to the embedded LevelDB.

Proposed Architectural Optimizations

To address these bottlenecks, the researchers re-engineered the validation pipeline to "hide" latency and reduce redundant database operations through three primary strategies:

  1. Chaincode Caching: The VSCC process frequently fetches chaincode metadata (such as endorsement policies) from the state database. By implementing a cc cache to store this information in memory, the system drastically reduces database round-trips.
  2. Parallel Validation and Reads: In the standard HLF architecture, VSCC and state database reads for MVCC occur sequentially. The optimized architecture runs these in parallel, overlapping their latencies.
  3. Parallel Commits: Writing to the file-system-based ledger and the state database (LevelDB or CouchDB) was previously sequential. The new design executes these writes in parallel and bundles history database writes with the most efficient operation for the specific backend.
The proposed optimized validation architecture featuring chaincode caching and parallel processing paths.

Experimental Evaluation

The study utilized the Smallbank benchmark via the Hyperledger Caliper framework to simulate standard banking operations. The tests involved 30,000 transactions across a network with two organizations and multiple peer nodes.

Key Insights

  • VSCC as a Database Bottleneck: A critical finding was that VSCC is not merely CPU-bound by cryptography; it is heavily dependent on database performance. For CouchDB, VSCC was found to be 4x slower than for LevelDB due to metadata lookup overhead.
  • Dependency Decoupling: While MVCC logic depends on VSCC results, the database reads required for MVCC do not. Initiating these reads early effectively neutralizes their latency.

Results and Performance Gains

The optimizations yielded substantial improvements across different database backends:

  • CouchDB: Throughput increased from 575 to 1,196 transactions per second (tx/s)—a 2x improvement. VSCC latency was reduced by 4x thanks to the metadata cache.
  • LevelDB: Throughput rose from 2,178 to 2,835 tx/s, representing a 1.3x improvement.
  • Latency Reduction: Parallelizing the commit phase reduced the "others" latency (including history database writes) to nearly zero in LevelDB configurations.
Performance breakdown for CouchDB-based networks, illustrating the high latency costs of VSCC and state database operations across different block sizes.

Conclusion

By re-architecting the validation phase to support parallelism and intelligent caching, the researchers demonstrated that HLF's throughput can be significantly enhanced without compromising its core security model. Future work will focus on automating cache invalidation during chaincode upgrades and conducting deeper studies into crash fault tolerance within this parallelized write model.

Summary updated

BibTeX
@inproceedings{javaid2019optimizing,
  author = {Haris Javaid and Chengchen Hu and Gordon J. Brebner},
  title = {{Optimizing Validation Phase of Hyperledger Fabric}},
  booktitle = {MASCOTS},
  year = {2019},
  doi = {10.1109/mascots.2019.00038},
}
Figure