Skip to main content
QUICK REVIEW

[论文解读] Blockchain Meets Database: Design and Implementation of a Blockchain Relational Database

Senthil Nathan, Chander Govindarajan|arXiv (Cornell University)|Mar 5, 2019
Distributed systems and fault toleranceComputer Science参考文献 36被引用 18
一句话总结

本文提出了首个结合区块链的去中心化信任与关系型数据库丰富事务处理及查询能力的区块链关系型数据库。它提出了两种新颖的方法——预排序与基于区块高度的可序列化快照隔离的并行执行,实现了在相互不信任的节点间一致、安全且高性能的复制,基于 PostgreSQL 实现,性能与可扩展性结果显著。

ABSTRACT

In this paper, we design and implement the first-ever decentralized replicated relational database with blockchain properties that we term blockchain relational database. We highlight several similarities between features provided by blockchain platforms and a replicated relational database, although they are conceptually different, primarily in their trust model. Motivated by this, we leverage the rich features, decades of research and optimization, and available tooling in relational databases to build a blockchain relational database. We consider a permissioned blockchain model of known, but mutually distrustful organizations each operating their own database instance that are replicas of one another. The replicas execute transactions independently and engage in decentralized consensus to determine the commit order for transactions. We design two approaches, the first where the commit order for transactions is agreed upon prior to executing them, and the second where transactions are executed without prior knowledge of the commit order while the ordering happens in parallel. We leverage serializable snapshot isolation (SSI) to guarantee that the replicas across nodes remain consistent and respect the ordering determined by consensus, and devise a new variant of SSI based on block height for the latter approach. We implement our system on PostgreSQL and present detailed performance experiments analyzing both approaches.

研究动机与目标

  • 解决在许可制区块链环境下,如何确保在相互不信任的去中心化数据库副本之间实现一致的事务排序问题。
  • 在保留区块链特性(如不可篡改性与可审计性)的同时,利用数十年来关系型数据库的优化与功能(例如复杂查询、约束、触发器)。
  • 设计一个支持丰富数据类型、数据溯源查询与企业级事务处理的去中心化、无信任环境系统。
  • 通过使用熟悉的数据库工具与 SQL,支持区块链应用开发,降低企业采用门槛。
  • 克服现有区块链平台重新实现基础数据库功能且缺乏对复杂查询与数据完整性约束支持的局限性。

提出的方法

  • 设计一种许可制区块链模型,其中已知的、相互不信任的组织运行独立的 PostgreSQL 实例作为副本。
  • 提出两种架构方案:一种是在执行前就达成事务提交顺序(预排序),另一种是事务并行执行,提交顺序在事后确定。
  • 提出一种基于区块高度的可序列化快照隔离(SSI)新变体,确保在异步执行环境下副本间仍能保证可序列化。
  • 利用现有关系型数据库功能(如 ACID 事务、约束、触发器与 SQL 查询支持),同时扩展其以满足区块链一致性要求。
  • 在 PostgreSQL 上实现该系统,并使用共识协议确定区块顺序,确保所有节点就最终提交序列达成一致。
  • 采用混合模型,其中事务日志被加密签名并复制,一致性通过具备区块高度感知能力的 SSI 强制执行,防止异常情况发生。

实验结果

研究问题

  • RQ1如何设计一个去中心化、复制的关系型数据库,以确保在相互不信任节点之间实现一致的事务排序?
  • RQ2现有关系型数据库功能(如复杂查询、约束与触发器)能否有效集成到类似区块链的系统中?
  • RQ3在缺乏对提交顺序先验知识的情况下,跨节点并行执行事务的性能影响是什么?
  • RQ4在所有节点独立执行事务的去中心化、异步环境中,如何保证可序列化?
  • RQ5在不牺牲全功能关系型数据库的性能与表达能力的前提下,能在多大程度上实现区块链特性?

主要发现

  • 所提出的系统成功实现了支持复杂查询、约束、触发器与溯源追踪的关系型区块链数据库,这些功能在大多数区块链平台中均缺失。
  • 基于区块高度的 SSI 变体即使在事务并行执行的情况下,也能确保副本间的可序列化,维持一致性且无需中心化协调。
  • 性能实验表明,两种设计方案均具备可行性,其中并行执行模型在高吞吐量工作负载下展现出更优的可扩展性。
  • 通过将事务执行与共识确定的区块顺序对齐,系统实现了副本间的强一致性,防止了分布式环境中的异常现象。
  • 诸如批量提交与后台冲突检测等优化手段可显著提升性能,尤其在异构网络条件下效果明显。
  • 与 PostgreSQL 的集成使得现有企业工具(如备份、分析与系统集成)可无缝使用,显著增强了实际部署可行性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。