Thoughts on Improving MPP



Summary:

C-Lightning MPP implementation is facing a limit on the number of HTLCs a channel can have. The initial consideration was for every channel with outgoing capacity, 10 HTLCs would be allocated, but they neglected to consider the incoming number-of-HTLCs limit of the payee, which caused an issue. The use of the same failure code `temporary_channel_failure` for hitting both msat capacity and number of HTLCs limits exacerbated the problem. The payment subsystem kept on splitting payments into more smaller payments, leading to >100 payments outgoing, further preventing the receiver from being able to receive and further crashing themselves into the problem. To fix this issue, it would be reasonable to count the number of channels the payee has and use it as well as the basis of the number of HTLCs the receiver can get, and to get the lower of this and the outgoing channels of the payer. Overall, the issue is probably fixable if they consider the number of channels of the payer and also the number of channels of the payee.


Updated on: 2023-06-03T01:55:19.597969+00:00