应用科学学报 ›› 2022, Vol. 40 ›› Issue (4): 611-622.doi: 10.3969/j.issn.0255-8297.2022.04.006

• 区块链 • 上一篇    

用于联盟链的布隆过滤器优化

吴亦涵, 黄建华, 邵兴辉, 王诚   

  1. 华东理工大学 信息科学与工程学院, 上海 200237
  • 收稿日期:2021-11-14 发布日期:2022-08-03
  • 通信作者: 黄建华,副教授,研究方向为计算机网络、无线传感网、区块链、信息安全。E-mail:jhhuang@ecust.edu.cn E-mail:jhhuang@ecust.edu.cn

Bloom Filter Optimization for Consortium Blockchain

WU Yihan, HUANG Jianhua, SHAO Xinghui, WANG Cheng   

  1. College of Information Science and Engineering, East China University of Science and Technology, Shanghai 200237, China
  • Received:2021-11-14 Published:2022-08-03

摘要: 布隆过滤器常用于联盟链Hyperledger Fabric状态数据库LevelDB的读性能优化,但布隆过滤器本身存在误报现象,且LevelDB只能对布隆过滤器进行统一配置而无法自适应调整。为此,提出一种单元化的部分计数式布隆过滤器(partial counting Bloom filter,PCBF)构造方案,设计可并行计算的元素插入与查询机制并结合双重哈希及非加密哈希来实现快速插入与查询;基于开启过滤器单元与访问次数构建排序字符串表优先级,使用时间片轮询算法对过滤器单元进行自适应调整,实现了资源的合理分配。实验结果表明: PCBF具有较高的插入效率,并能减少20%左右的误报数量,适用于联盟链的高并发场景。

关键词: 区块链, Hyperledger Fabric, LevelDB, 布隆过滤器, 日志结构合并树

Abstract: Bloom filters are frequently used for read performance optimization of Hyperledger Fabric state database LevelDB, but they suffer from false positives, and LevelDB asks Bloom filters working in a uniform rather than adaptively adjusted configuration. In this paper, a unitized partial counting Bloom filter (PCBF) construction scheme is proposed by using a parallel element insertion and query computing mechanism, which combines double Hash and non-encrypted Hash to achieve fast insertion and query. Sorted string table (SSTable) priority is constructed based on open filter units and access times, while the filter units are adaptively adjusted by using a time-slice polling algorithm to achieve reasonable resource allocation. Experiments show that PCBF has a high insertion efficiency and can reduce the total number of false positives by about 20%, proving the feasibility of PCBF in high concurrency scenarios of permissioned blockchain.

Key words: blockchain, Hyperledger Fabric, LevelDB, Bloom filter, log structured merge tree (LSM tree)

中图分类号: