Efficient Ledger Database System
PDF·August 20, 2025·39 min read Saved
Efficient Ledger Database System
by Yue Cong
(B.S., National University of Singapore)
A Thesis Submitted for the Degree of Doctor of Philosophy in Computer Science in the Graduate Division of the National University of Singapore
Supervisor: Professor Beng Chin Ooi
Examiners: Professor Bingsheng He
Associate Professor Chee Yong Chan
Declaration
I hereby declare that this thesis is my original work and it has been written by me in its entirety. I have duly acknowledged all the sources of information which have been used in the thesis.
This thesis has also not been submitted for any degree in any university previously.
Yue Cong 15 December 2023
Acknowledgments
First and foremost, I would like to express my sincerest gratitude to my supervisor Prof. Beng Chin Ooi. His unwavering support, guidance, and encouragement have been invaluable throughout my PhD journey. I can still remember when I was stuck on the research problem in the early days of my PhD, it was Prof. Ooi who taught me the way to tackle the challenges and the attitude towards research. His keen and precise insight into cutting-edge academic issues has always been a beacon of inspiration, guiding me through the complexities of my research with a steady hand. His profound wisdom and rigorous spirit in academic research have deeply influenced me, shaping not only my academic path but also moulded my conduct and dealings in life. Over the six years of his mentorship, every paper I have written has been meticulously refined by Prof. Ooi. I am greatly honoured and privileged to be a student under his guidance.
I would like to thank my thesis advisory committee, Prof. Bingsheng He and Prof. Chee Yong Chan. Thank you for your insightful comments and constructive advice on improving this thesis.
I would like to offer my special thanks to all my collaborators for their contribution, suggestions, and assistance at every stage of my PhD work, including Prof. Tien Tuan Anh Dinh, Prof. Meihui Zhang, Prof. Gang Chen, Prof. Xiaokui Xiao, Prof. Zhongle Xie, Prof. Dumitrel Loghin. It would not be possible for me to accomplish the work without them. I would like to extend my thanks to all my lab mates who fought alongside me. Their company and support have been essential to me. It is my honour to study and work with them.
Last but not least, I would like to thank my parents for their unconditional love and endless support. I want to thank my beloved wife Yan Fangli, whose warm companionship and understanding have given me motivation and courage, and my son, Yue Yunting, who has brought laughter and joy in my days of wandering and frustration.
Abstract
Efficient Ledger Database System by Yue Cong Doctor of Philosophy in Computer Science National University of Singapore
Database users and system developers are focusing more on data security today. Recently, ledger databases have been introduced to protect the integrity of data, history, and query results. There are two main challenges faced by ledger databases. First, how to provide high performance while guaranteeing the security of data. Second, as an emerging database system, there is a lack of comprehensive study on its design space and techniques. In this dissertation, we focus on the ledger database system and take a step-by-step study from exploring its challenges and design choices, analyzing its core data structure, to building an efficient ledger database system.
To better understand the requirements and challenges of the systems supporting data security, we survey state-of-the-art verifiable systems such as transparency logs, ledger databases, and blockchains. We first identify the common requirements, which are immutability, verifiability, and high performance. We then explore the design space from the aspect of the threat model, authenticated data structure, query processing, verification, and auditing. Lastly, we summarize the inefficiencies and security issues of existing ledger databases, which lays the foundation for building an efficient ledger database system.
The authenticated data structure (ADS) is the core component of the ledger database. It maintains the full history of data and provides integrity proof. It is the key to the efficiency and security of the system. The ADS should have the following properties. First, It should be immutable. The data cannot be modified once committed. It is the premise of data integrity. Second, it should be tamperevident. Any malicious tampering of data can be detected by verifying the integrity proof. Lastly, it must be time- and space-efficient. We identify a new category of indexes, namely Structurally Invariant and Reusable Indexes (SIRI ), which fulfills all the requirements. Therefore, it can serve as a potential building block to build efficient ledger databases. Since there is no precedent study on SIRI , we conduct a comprehensive analysis on SIRI both theoretically and experimentally. We compare the three state-of-the-art SIRI structures, namely POS-tree, MPT, and MBT. Our results show that POS-tree excels in the efficiency of both data access and storage consumption in common workloads. In comparison, MBT is superior to the other two structures when the total number of data is less.
Inspired by the SIRI building block and to address the performance challenge, we design and implement a practical distributed ledger database system, GlassDB. GlassDB supports verifiability and transactions, as well as offers high performance. It extends POS-Tree as the authenticated data structure for efficient proof generation and adds a concurrency control mechanism for transactions. GlassDB batches independent operations from concurrent transactions when updating the core data structures. We evaluate GlassDB with the proposed verification benchmark extended from YCSB and TPC-C. Experimental results demonstrate that GlassDB is an efficient, transactional, and verifiable ledger database system.
Despite the fact that many verifiable systems have been designed and implemented in recent years, there is no uniform benchmarking tool to systematically and fairly evaluate existing systems. We propose VeriBench, a benchmarking framework for verifiability-enabled systems. Based on our study of the design choices, we include micro-benchmarks to evaluate performance impact on a single component and macro-benchmarks adapted from a key-value benchmark (YCSB) and two OLTP benchmarks (SmallBank and TPC-C) for system-level performance. We conduct extensive experiments on GlassDB and other state-of-the-art systems to illustrate the strengths and weaknesses of each design and system, which should be useful for the future development of verifiability-enabled systems.
Chapter 1
Introduction
The rise of information technology has transformed the way businesses operate, leading to a shift toward digitization and the adoption of cloud computing. This trend has been driven by the need to improve efficiency, enhance collaboration, and increase productivity. With digitization, businesses can leverage cutting-edge technologies to streamline their operations, optimize their business model, and create more value for customers. However, this shift towards digitization also brings new challenges, particularly in terms of data security. With an increasing amount of sensitive data being stored in modern database systems, the risk of threats such as data tampering, ill-intended content, or actions from malicious collaborators has become more prevalent than ever before. These threats can have severe consequences for organizations, including financial losses, damage to reputation, and legal liabilities. We list the security threats of modern applications below.
• Cloud Computing. Cloud computing technologies have advanced and changed our lives in the last two decades. It offloads computation-intensive tasks and data to powerful servers in the cloud to improve performance and reduce costs. Enormous cloud computing services are being provided today by major industry leaders, such as Amazon Web Service [6], Google Cloud [56], and Microsoft Azure Cloud [99]. Different service models, including infrastructure as a service (IaaS), platform as a service (Paas), software as a service (SaaS), and a recent model, function as a service (FaaS/serverless), are developed to fulfill different requirements. Cloud computing helps improve the speed of application development by allowing developers to only consider the business logic layer, ease resource management by offering virtual machines, achieve scalability and elasticity with flexible resource management, and improve hardware utilization. However, it also exposes the systems to various threats by offloading the computation and data to external machines. Attackers could alter the communication messages through the network or compromise the servers to conduct malicious behaviors on the data. Untrusted service providers could violate the user application logic to save costs. According to “Cost of a Data Breach Report” [32], cloud-based data breaches account for 45% of the total data breaches with an average cost per incident of 4.98 million USD in 2021. Therefore, it is important to guarantee that the data is updated accurately.
• Multi-party Collaboration. Collaborative analytics applications and systems involve multiple parties participating in the business logic. Such systems enable different groups of users to work collaboratively on complicated analytic tasks such as data cleansing, data curation, and machine learning. Other multi-party collaboration systems such as online editing, document sharing, and financial transaction systems also involve untrusted parties modifying the same set of data. In case of a malicious or compromised party exists, it could pollute the dataset and cause significant loss to other parties. In 2021, 19% of the data breaches were due to compromised business parties [32]. Therefore, it is important to guarantee that the data modified by a party is tractable and the modification is authentic. When the loss is incurred, the system can provide evidence of malicious behaviors and blame the parties accordingly.
• Internal Threats. Besides the outside attackers, the systems may also attract risks from internal attackers. Such attackers often have higher privileges, and therefore, can easily conduct attacks on the data, network, interfaces, and system operations. Since the internal attackers have better knowledge of the system’s vulnerability and critical data, such attacks often result in higher financial loss. For example, the average cost per incident was 4.8 million USD, 6.5 million USD, and 8.0 million USD due to negligent insiders, malicious insiders, and credential thefts, respectively in 2021 [1]. In such attacks, the integrity and authenticity of the data need to be guaranteed to prevent the loss of users.
![Figure 1.1: The average cost of a data breach [32]](https://cdn.sanity.io/images/xiedtuly/production/5d95e2bf2473e79706f3b07edc16f9bd22f32d54-955x615.webp)
Furthermore, the need for data security has become even more critical with the emergence of new technologies such as the Internet of Things (IoT) and artificial intelligence (AI), which are increasing the volume and complexity of data being generated and processed. With the integration of these technologies into business operations, it is vital that organizations remain vigilant and proactive in safeguarding their data. As a result, there is a growing demand for effective data security solutions to protect against these threats.
1.1 Existing Solutions
A wide range of approaches and systems have been developed to protect data security over the years, such as database auditing in conventional database systems, blockchains, and verifiable databases. We will discuss them in detail in the following sections.
Database auditing is often adopted by the conventional databases to validate the evolution of data. They store the whole data history with meta information such as timestamp, user ID, and transaction information as the audit trail. Auditors are involved periodically to detect malicious behaviors by checking through the data evolution history. Despite many database audit tools, the detection of database violations and analytics of audit trails are often manual, and it is time-consuming and error-prone to perform such auditing. Moreover, the database audit does not guarantee the integrity of data. It will fail if the data is tampered with by external or internal attackers.
A verifiable databases [153, 15, 164, 166, 113] is a database that ensures the integrity of both the latest data and query execution. It is useful in outsourced settings, in which the data is managed by an untrusted third party whose misbehavior can be reliably detected. Until recently, verifiable databases have focused on ensuring the integrity of query execution, particularly on the performance and expressiveness of analytical queries that can be verified [165, 86, 118]. The advantage of this approach is that the client will have a constant proof size and lightweight verification burden. However, the server runs expensive cryptographic computations which significantly reduce the performance. In addition, verifiable databases do not protect the authenticity and data history. Though users can store the history data and audit trails, they still suffer from the expensive database audit process.
Blockchain, or distributed ledger technology (DLT), was first introduced in Bitcoin [103] as a decentralized and secure system to make peer-to-peer transactions. A blockchain network is hosted by mutually untrusted parties publicly or privately. It stores the transactions in a sequence of hash-chained blocks, which are fully replicated among all nodes. All honest nodes need to agree on the data, history, and order of transactions to make progress on the transaction processing. Blockchain offers a strong security guarantee. The system works securely even with a certain ratio of compromised nodes. The portion of compromised nodes that can be tolerated depends on the protocol. For example, Bitcoin [103] and Ethereum [149] running proof-of-work and proof-of-stake respectively require more than half of the nodes to be honest. While Hyperledger Fabric [8] running byzantine fault tolerant protocol (BFT) requires more than two-thirds of the nodes to be honest. However, they suffer from low performance due to the expensive consensus protocols.
1.2 Objectives
Regarding the inefficiency of the aforementioned systems, the objectives of this thesis are to design and build a practical database system that protects the integrity and authenticity of data and history in emerging applications. In recent years, ledger databases [5, 9, 156] have gained traction due to features such as protecting the integrity of data, history, and query results. A ledger database maintains data or logs in the form of an append-only ledger, which can generate proofs for users to verify the integrity. Compared to conventional databases, a ledger database has three main advantages. First, it provides efficient verification. The users only need to maintain a cryptographic hash, called digest, of the ledger and the integrity check can be performed by comparing the digest against the reproduced hash computed from the proof. Second, it reduces the surface of misbehavior. Since the ledger is immutable, all historical data are protected by the digest. Adversaries cannot tamper with history without changing the hashes. Third, it can be publicly verified. Everyone can verify the integrity of the data or the log with the ledger. Compared to blockchains, ledger databases offer high performance without the performance bottleneck at the consensus layer. Ledger databases are therefore suitable for maintaining financial transactions, logistic orders, and healthcare data where the integrity of data evolution history and proof of data lineage are important.
Nonetheless, existing ledger databases either offer weak security guarantees or suffer from expensive verification costs, making them less practical in real-world situations. For example, QLDB [5] and SQL Ledger [9] provide forward integrity, which assumes there are no security violations between the submission of transactions and the generation of digests. In particular, any malicious behaviors that occur during the update will result in the client getting a wrong digest, and therefore, failing to detect the error. Further, the systems can always return data and proofs of previous versions without being detected. While LedgerDB [156] verifies its indexes against the ledger, however, the verification incurs significant costs due to inefficient data structures.
To this end, we conduct a detailed study of the ledger database, from the core data structure to the system design in this thesis. Our research fills the gap between existing ledger databases and an efficient and functional system.
1.3 Challenges
In this section, we lay out the challenges to be addressed to build an efficient ledger database system.
1.3.1 Lack of Survey
Since the idea of the ledger database was first introduced by Amazon QLDB in 2019, the major industry leaders have started creating their own ledger databases. However, there is a lack of comprehensive analysis and comparison of these ledger databases. The effectiveness and efficiency of the different design choices adopted by different systems are unknown. It is difficult for users to choose which systems are suitable for them and for system developers to design better systems. A thorough study of existing designs and exploration of future direction is urgently needed.
1.3.2 Efficient Data Structure
An efficient data structure must satisfy both efficient verification and efficient data access.
Efficient authenticated data structure. The authenticated data structure (ADS) is the core component of ledger databases. It maintains and protects the data and history leveraging cryptographic hashes. It is also used in blockchains and verifiable databases. Most ADS used in ledger databases and blockchains are Merkle tree variants. For example, QLDB and SQL Ledger use Merkle tree. LedgerDB uses an immutable Merkle tree with the copy-on-write update, called bAMT. It also adopts Merkle Patricia Trie to protect the indexes. Ethereum builds Merkle Patricia Trie on top of the global states. Hyperledger Fabric implements the bucket tree to store block data in version 0.6 and switches to the Merkle tree after version 1.0. Despite that the Merkle tree enables efficient proof of data, it is expensive when updating because of the enormous hash computations. Moreover, since every modification will update the root node, it incurs significant contention and is difficult to execute in parallel.
Immutable and secure indexes. On the one hand, we aim to protect the integrity of the entire history. The data stored in ledger databases must be immutable. That is, once the data is stored, it cannot be modified. This results in the rapid growth of data volume and lays a burden on both storage and data access. Therefore, the indexing structures must be time- and space-efficient. On the other hand, to ensure data integrity, the indexes of ledger databases shall not only provide efficient data access, but also verifiable query results. Though incorrect data can be detected by the ADS, the compromised indexes can always return stale data and still pass the verification. Therefore, how to efficiently protect the index structures is a question.
1.3.3 System Performance
The security functionalities are often supported at significant performance costs for all types of systems. For example, blockchains suffer from poor performance due to the consensus bottleneck. Bitcoin has a throughput of 7 transactions per second, while Ethereum has a throughput of around 20 transactions per second. Permissioned blockchains such as Hyperledger Fabric achieves thousands of transactions per second. Verifiable databases incur significant costs due to complex cryptographic primitives and expensive verifiable computation techniques, such as homomorphic encryption and SNARKs. ADS-based systems take a high cost to update and access the ADS. Recently, systems have been built with the trusted execution environment (TEE) to support data security. Such systems also suffer from the limited memory and computation power of the secure hardware.
It is non-trivial to improve the system performance of systems supporting data security. We must improve the performance from two perspectives, the base performance and the performance of security functions. In the context of ledger databases, it is the performance of transactions and the performance of verification. The performance of transactions includes performance optimization as in the conventional database, such as data partitioning and batching. The performance of verification includes improving the efficiency of ADS as mentioned in Section 1.3.2, using a more efficient verification scheme, etc.
1.3.4 Functionality
Besides improving the performance, how to make the database systems that guarantee data security more functional is also a challenge. Many existing systems compromise part of the functionality for data security or performance. For example, systems choose not to support transactions to achieve higher throughput for individual operations. Encryption-based verifiable database systems sacrifice part of the query capability for security. Databases support key-value abstraction, instead of a MBT a b c
be bd a b e d MPT POS-tree Chapter 4 Efficient Data Structure Chapter 5 Distributed Ledger Database … n … Clients

Chapter 3 Ledger Distributed System Chapter 6 Benchmarking Framework Workload • ADS • Query processing • Auditor • Verification Extensible Benchmarking Framework Threat Model Verification Challenges Design Choices
full-fledged relational database with SQL support, to achieve higher performance. Databases adopt a relaxed threat model to achieve higher performance. Though the system may achieve high performance, the lack of functionality will limit the usability of the system, therefore, making it less practical in real-world applications. Our goal is to build an efficient system that is as functional as possible. To achieve this, we need to analyze the trade-off of the design choices of ledger databases, and build the system with the optimal design.
As shown in Figure 1.2, to address the first challenge, we discuss the challenges and design choices in existing verifiable databases with preliminary (Chapter 3). To address the second challenge, we conduct a theoretical and experimental study on potential data structures (Chapter 4). Lastly, to address the third and fourth challenges, we design and implement a practical ledger database system with high performance and strong security guarantee (Chapter 5).
1.4 Background
In this thesis, we refer to systems of all types, including blockchains, databases, transparency logs, etc., that support verifiability to protect data integrity and execution as verifiable systems. We refer to verifiable systems that are databases as verifiable databases. We define ledger databases as verifiable databases that focus on protecting the integrity of both the data content and data history. Lastly, we define verifiability-enabled systems as systems that expose client-side verification APIs and allow users to perform the verification.
In ledger databases, a user issues a read or update operation (OLTP query) to the database server (or server), which then executes the operation and appends it to a history log H. The database returns integrity proofs showing that (1) the operation is executed correctly on the states derived from H, and (2) the operation is appended to H, and H is append-only. These proofs ensure that malicious tampering such as changing the data content, back-dating operations, and forking the history log, are detected. Existing works on authenticated data structure (ADS) [86], for example, only meet the first condition. We formally define ledger database as follows:
Definition 1. a ledger database D consists of four main operations.
• (digestS′,H′ , π, R, S ′ , H ′ ) ← Execute(S, H, op): this is run by the database server. It takes as input the current state S and history log H, and the user operation op. It executes op, updates the states S accordingly, and appends op to H. It returns the updated states S ′ , updated history H ′ , a digest value digestS′,H′ computed over the new state and history, an execution result R, and a proof π.
• π ← ProveAppend(digestS,H , digestS′,H′ ): this is run by the server. It takes as input two digest values corresponding to two different history logs. It returns a proof π.
• {0, 1} ← VerifyOp(op, R, π, digestS,H , digestS′,H′ ): this is run by the user. It takes as input the user’s operation op, the execution result R, the proof π, and digestS,H , digestS′,H′ that correspond to the history and state before and after op is executed. It returns 1 if the proof is valid, and 0 otherwise.
• {0, 1} ← VerifyAppend(digestS,H , digestS′,H′ , π): this is run by the user. It takes as input two digest values corresponding to two different history logs, and a proof π. It returns 1 if the proof is valid, and 0 otherwise.
A ledger database, which supports the four operations defined above, is secure if it satisfies the following properties,
• Integrity: the database server cannot tamper with the user operation without being detected. More precisely, given a proof π corresponding to R such that VerifyOp returns 1, the server cannot find π ′ , R ′ such that VerifyOp returns 1 and R ̸ = R ′ .
• Append-only: the database server cannot fork the history log without being detected. More precisely, given a proof π for an op that results in a log H, such that VerifyOp returns 1, the server cannot find π ′ , op ′ that results in another log H ′ such that VerifyOp returns 1, VerifyAppend for H, H ′ return 1, but H is not a prefix of H ′ .
1.5 Thesis Synopsis
The synopsis of this dissertation is organized as follows. Chapter 2 reviews the recent works on verifiable systems leveraging various techniques such as ADS, verifiable computing, secure hardware, and blockchain.
In Chapter 3, we identify the requirements and the design challenges of verifiable systems. We observe that the main challenges come from the need to balance data immutability, tamper evidence, and performance. We survey the state-of-the-art verifiable systems along five dimensions, namely threat models, authenticated data structure, query processing, verification, and auditing. We identified the inefficiencies and security loopholes of existing systems and set the design targets for building an efficient ledger database system.
In Chapter 4, we present a comprehensive analysis of the existing index structures for immutable data, and evaluate both their asymptotic and empirical performance. Specifically, we show that MPT, MBT, and POS-Tree are all instances of a recently proposed framework, dubbed Structurally Invariant and Reusable Indexes (SIRI). We
Reproduced with permission of copyright owner. Further reproduction prohibited without permission.