Journal of Computer Applications ›› 2025, Vol. 45 ›› Issue (11): 3424-3431.DOI: 10.11772/j.issn.1001-9081.2024121839

• The 7th CCF China Conference on Blockchain Technology • Previous Articles    

Adaptive online blockchain sharding algorithm based on trusted execution environments

Fei WANG, Hengdi WANG, Konglin ZHU(), Lin ZHANG   

  1. School of Artificial Intelligence,Beijing University of Posts and Telecommunications,Beijing 100876,China
  • Received:2024-12-30 Revised:2025-02-06 Accepted:2025-02-25 Online:2025-03-13 Published:2025-11-10
  • Contact: Konglin ZHU
  • About author:WANG Fei, born in 1996, Ph. D. candidate. His research interests include distributed edge networks, online optimization, sustainable AI.
    WANG Hengdi, born in 2002, Ph. D. candidate. His research interests include blockchain, green electricity trading.
    ZHANG Lin, born in 1974, Ph. D., professor. His research interests include internet of vehicles and mobile internet, ultra-wideband bio-radar imaging, life signal detection.
  • Supported by:
    National Key Research and Development Program of China(2023YFB2704500);Project of Beijing Advanced Innovation Center for Future Blockchain and Privacy Computing

基于可信执行环境的自适应在线区块链分片算法

王飞, 王恒笛, 朱孔林(), 张琳   

  1. 北京邮电大学 人工智能学院,北京 100876
  • 通讯作者: 朱孔林
  • 作者简介:王飞(1996—),男,山东日照人,博士研究生,主要研究方向:分布式边缘网络、在线优化、可持续AI
    王恒笛(2002—),男,山东临沂人,博士研究生,主要研究方向:区块链、绿电交易
    张琳(1974—),男,山东济南人,教授,博士生导师,博士,主要研究方向:车联网与移动互联网、超宽带生物雷达成像、生命信号检测。
  • 基金资助:
    国家重点研发计划项目(2023YFB2704500);北京未来区块链与隐私计算高精尖创新中心资助项目

Abstract:

Aiming at the performance bottleneck caused by multi-round inter-shard communication in cross-shard transaction protocols, an adaptive online blockchain sharding algorithm based on Trusted Execution Environments (TEE) was proposed. The algorithm optimizes the execution process of cross-shard transactions, reducing communication overhead and improving system throughput. Firstly, an adaptive online sharding algorithm was designed, which delayed the allocation time of transactions to shards, allowing related transactions to be clustered together, thereby reducing the number of cross-shard transactions and minimizing communication overhead. Secondly, by combining TEE technology, off-chain cross-shard transactions were securely and efficiently executed, eliminating the need for multi-round inter-shard communication in traditional schemes. Finally, a one-sided feedback optimization algorithm was introduced to dynamically adapt to changes in transaction patterns based on current system status and transaction demands, optimizing the sharding strategy in real time. Experimental results showed that compared with the random sharding algorithm, the proposed algorithm increased throughput by 35%. By reducing unnecessary communication and computational overhead, the proposed algorithm significantly improves overall system performance, while ensuring the security of cross-shard transactions. It is suitable for blockchain systems requiring high throughput and low latency, and has considerable application value.

Key words: blockchain, sharding, Trusted Execution Environment (TEE), online optimization, cross-shard transaction

摘要:

针对跨分片交易协议中多轮分片到分片通信所带来的性能瓶颈问题,提出一种基于可信执行环境(TEE)的自适应在线区块链分片算法。该算法优化了跨分片交易的执行流程,可降低通信开销并提升系统吞吐量。首先,设计了自适应在线分片算法,通过延迟一定的时间,再将交易分配至分片,使相关交易聚合在一起,从而减少跨片交易并降低通信开销;其次,结合TEE技术,安全高效地执行链下的跨片交易,从而避免传统方案中多轮分片间通信的需求;最后,引入一种单侧反馈优化算法,依据当前的系统状态和交易需求,动态地适应交易模式的变化,实时优化分片策略。实验结果表明,与随机分片算法相比,所提算法在吞吐量上提升了35%。该算法通过减少不必要的通信和计算开销,在保证跨分片交易安全性的同时,显著提升了系统的整体性能,适用于高吞吐量和低延迟的区块链系统,具有较高的应用价值。

关键词: 区块链, 分片, 可信执行环境, 在线优化, 跨片交易

CLC Number: