Leveraging Blockchain for Immutable Logging and Querying Across Multiple Sites

Mustafa Safa Özdayi, Murat Kantarcioglu, Bradley A. MalinarXiv 2020

Introduction

Blockchains are fundamentally designed as immutable, write-only ledgers, making them ideal candidates for audit logs in sensitive domains such as healthcare and genomics. However, their underlying data structure—typically a linked list of blocks—is poorly suited for complex search operations. Retrieving specific access logs based on user IDs or time ranges often requires a full chain scan, which is computationally prohibitive at scale. This paper presents a methodology to transform a permissioned blockchain into a searchable audit log, supporting efficient conjunctive equality and range queries without compromising decentralization.

Methodology

The proposed system is built on the Multichain platform, utilizing its "streams" feature to implement a key-value store (LevelDB) atop the blockchain. To enable efficient querying, the authors introduced several optimizations:

  1. Conjunctive Equality Queries: The system maintains separate dictionaries for each log field. For queries involving multiple criteria (e.g., user AND resource), a getCount method identifies the most restrictive field first. By filtering the smallest data subset, the system minimizes computational overhead.
  2. Bucketization for Range Queries: To overcome the lack of native range query support in key-value stores, time is divided into fixed-size "buckets." Logs are indexed by bucket, allowing the system to retrieve full buckets within a range instantly and only scan "edge" buckets manually.
  3. Crash-Resistant Batch Loading: To mitigate transaction overhead, logs are loaded in batches. A dual-dictionary system (batch and regular) ensures data integrity and recovery in the event of a node failure during the loading process.

Experimental Results

The system was evaluated using genomic access logs from the iDASH 2018 competition, totaling 400,000 logs across four nodes.

Query Performance

While the blockchain-based solution is slower than a traditional relational database like SQLite, it maintains performance within a practical range for auditing. As shown in Figure 4, query response times varied between 0.2 and 6 seconds depending on complexity.

Comparison of elapsed query time between the proposed blockchain solution and a traditional SQLite database.

Range Query Scalability

Range queries were identified as a primary performance bottleneck due to the bucket-scanning process. However, as illustrated in Figure 5, the elapsed time scales linearly with the range size, demonstrating predictable performance even as the dataset grows.

Performance of range queries as a function of range size, comparing blockchain and SQLite implementations.

Storage and Load Overhead

The primary trade-off for immutability is storage efficiency. The blockchain implementation required approximately 3 GB per node compared to just 20 MB for SQLite—a 150x increase. This overhead is attributed to the extensive indexing required to support multiple query types. Additionally, while batching improved load speeds, the blockchain remains significantly slower than traditional databases for data ingestion.

Conclusion

This research demonstrates that blockchain-based auditing is computationally feasible for real-world genomic data. By leveraging specialized indexing and bucketization, the system achieves linear scalability for complex queries. Future work will focus on optimizing bucket sizes, implementing parallel processing, and reducing storage overhead through string-to-integer mapping.

Summary updated

BibTeX
@misc{ozdayi2020leveraging,
  author = {Mustafa Safa Özdayi and Murat Kantarcioglu and Bradley A. Malin},
  title = {{Leveraging Blockchain for Immutable Logging and Querying Across Multiple Sites}},
  year = {2020},
  eprint = {2001.08529},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2001.08529},
}
Figure