LMQF: Hyperledger Fabric Concurrent Transaction Conflict Solution Based on Distributed Lock and Message Queue
Abstract
Hyperledger Fabric, which satisfies decentralization and security, is one of the most popular blockchain distributed ledger technologies, but in high-throughput, high-concurrency distributed scenarios, concurrency conflicts can cause transactions to fail, resulting in significant network bandwidth and resource waste. In this paper, we deeply analyze the operation flow of Fabric’s underlying transactions, and propose a solution to concurrent transaction conflicts in Fabric based on distributed locks and message queues. Redis is used to implement the locking mechanism of concurrent keys, and the ChaincodeEvent event listener is used to detect the transactions and realize the unlocking operation; on this basis, the message asynchronous retry mechanism, i.e., use the message queue RabbitMQ to re-consume the conflicting transactions to solve the concurrent transaction conflicts encountered against Fabric at present. Experiments show that the proposed approach can significantly improve the concurrency capability of the system, including transaction success rate and effective transaction throughput, under different levels of transaction conflicts; it does not affect the performance of the system in the absence of transaction conflicts.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.