| Blockchain-based cryptocurrency needs to consume a lot of calculation and communication costs to reach a consensus across the network,so it is severely restricted in transaction throughput and transaction delay.One of the ways to solve this problem is payment channel technology,which allows two peer nodes in the network to make an unlimited number of atomic trustless payments without consuming too much blockchain resources.All peer nodes and payment channels in the network can form a payment channel network,which can make payments between two peer nodes through a series of end-to-end intermediate channels,eliminating the need to establish a direct connection between every two nodes.In this process,intermediate nodes need to lock funds when forwarding transactions,so they need to charge the sender as a reward for forwarding funds.However,the current charging strategy of the intermediate node varies with the payment channel network,and the existing work does not have a complete routing scheme to provide the best path for the users in the payment channel network with multiple charges.In view of the shortcomings of the existing work,we implement a general framework of payment channel network routing that focuses on multiple charges.The main innovative research content includes the following points:(1)We design a routing framework for handling multiple charges in the payment channel network.The framework models the charging strategy into four different types,namely fixed fee,proportional fee,imbalance fee and time value fee.The framework allows the payment channel network to dynamically add or delete certain fees to meet compatibility or other requirements.(2)We design an improved multi-weight redirection Dijkstra algorithm-MYPBT to find the best path.The algorithm divides path weights into static weights and dynamic weights.Static weights deal with fixed fees,proportional fees,imbalance fees,while dynamic weights deal with time value fees,and we calculate the distance of the path in an incremental manner.(3)In actual applications,the redundant path is stored by using the front node stack,and the path is backtracked according to the capacity constraint to achieve the purpose of finding the path again when there is no available redundant path.These two strategies can be used in increase the success rate of payment in practical applications.The algorithm and framework in this article are applicable to different types of payment channel networks,and can be easily deployed to most payment channel networks that use HTLC,such as Lightning Network and Raiden Network.We did a lot of experiments on the simulated payment channel network topology and the real lightning network topology to evaluate the framework.We compareed the framework of this paper with the four existing pathfinding schemes of Lightning Network and the other three original pathfinding methods.The experiment proves that this framework has a high improvement in the overall performance of time and economic benefits. |