高级检索

    AppendChain:一种面向区块链的高效键值存储系统

    AppendChain: An Efficient Key-Value Store for Blockchain Systems

    • 摘要: 现代区块链数据规模持续增长,节点存储压力不断上升。主流区块链系统通常采用基于LSM-Tree的键值存储引擎作为持久化层,其特性是通过合并操作维护键值在同一层级的有序性。然而,区块链数据具有显著的异构特征,包含大量结构不一与无序的键类型,使得存储引擎频繁触发合并操作,带来读写放大现象和I/O效率下降等问题。针对上述问题,提出了AppendChain,在不改变以太坊执行语义的前提下,重新组织数据在存储引擎中的写入路径与存储布局,实现3项优化:1)类型分离。将异构键类型划分至独立的列族,最小化键空间重叠;2)大值分离。将大值剥离到外部Blob文件存储,避免在合并过程中的重写;3)排序MPT。通过引入树结构感知、顺序对齐的键编码,增强状态键的局部性。AppendChain在Go-Ethereum的基础上实现,并集成了RocksDB,修改了存储栈而未改变以太坊的共识与溯源功能。在主网工作负载上的实验评估表明,与Geth相比,AppendChain将存储引擎吞吐(OPS)提升了28倍,将写放大率降低约为94.24%,将合并操作次数与耗时分别降低了98.75%与72.19%,在高吞吐量交易工作负载下显著提高了读写效率。该方案显著提升了区块链全节点的存储性能。

       

      Abstract: Modern blockchain systems face increasing storage pressure due to the continuous growth of on-chain data volume. Most systems adopt LSM-tree-based key-value storage engines as their persistence layer, which maintain intra-level key order through compaction. However, blockchain data is highly heterogeneous, characterized by structurally diverse and unordered keys. This results in frequent compaction operations that cause write amplification and degrade I/O efficiency. To address these issues, we propose AppendChain, a storage optimization framework that reorganizes the write path and key-value layout in the storage engine without altering Ethereum’s execution semantics. AppendChain introduces three techniques: 1) Type Separation: partitions heterogeneous key types into dedicated column families to minimize keyspace overlap; 2) Big Value Separation: redirects large values to external blob storage to avoid redundant rewrites during compaction; 3) Sorted Merkle Patricia Trie (MPT): applies structure-aware and order-aligned key encoding to enhance the locality of state keys. We implement AppendChain on top of Go-Ethereum and integrate it with RocksDB, modifying the storage stack without changing Ethereum’s consensus and provenance logic. Evaluations on mainnet workloads show that, compared with Geth, AppendChain improves storage engine throughput (OPS) by up to 28×, reduces write amplification rate nearly 94.24%, and reduces compaction frequency and time 98.75% and 72.19% respectively, significantly enhancing read/write efficiency under high-throughput transactional workloads. This framework effectively improves the storage performance of blockchain full nodes.

       

    /

    返回文章
    返回