Alternative Core Lightning
I run a CLN node that I mainly want to use for my private payments. Unfortunately CLN's routing algorithm is not as intelligent/optimal in practice as it could be imo.
In my opinion the problems are:
- Excessive splitting: Payments that could be done in one go are split from the beginning, leading to
- Frequent temporarily stuck payments: They aren't really stuck, but take a few seconds, blocking further route finding attempts. My theory is that excessive splitting increases the probability to have a slow node in one of the paths and we need to way for it to undo the HTLC.
- No memory of learned balances from previous payments
I could try to fix these in CLN, but I'm not too eager to brush up on my C and it might just get me stuck in a slightly better local optimum.
Towards a solution
To fix these problems I'd like to have an easily hackable, alternative pay plugin. It should be written in Rust and based on LDK, which seems to be the most versatile lightning library right now and will allow rapid iteration on routing algorithms. It's recommended to work together with the CLN project to improve the new Rust plugin crate along the way. The core feature set of the pay plugin should be:
- Pickhardt payments or similarly optimized split payments, but with configurable cost for splitting, i.e. using 2 instead of 1 channel has a higher cost
- Local ranking of nodes: I want to be able to express preference for certain nodes which I know are professionally maintained. Probing of ping times should also be used to build the overall rating to prefer low-latency network connections and fix stuck payments.
- Local channel ranking/balance estimation: Channel balance bounds learned from previous routing attempts and possibly some light probing in the background should be used to improve route finding. This information needs to decay/learned bounds needs to be relaxed over time, reflecting the possibility that other ayments have changed the channel balances.
I imagine this to only be the starting point for more experimentation with better routing algorithms and hope that some of the work will be upstreamed to the rust-bitcoin and LDK open source ecosystem.
So far 6 million satoshi have been pledged by:
The bounty can be redeemed by the first person or group that builds an open source CLN pay plugin with the features described above. The bounty expires 2023-12-31.
If anyone else wants to see this happen, please reach out and I will add your pledge here. For now this is a honour-bound system, but I'm willing to set up a multi sig with reputable community members (especially if more people want to contribute).
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 I, elsirion, will pay 5,000,000sat to the first person or group that builds an open source CLN pay plugin with the features described above. The bounty expires 2023-12-31. -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEs83/b21LK+nqiwAgswBeVxqjFNoFAmOsWyQACgkQswBeVxqj FNrw/A//QL5vGBU8xTMvgRgAQD4cuGV1aqSL1YnOncobFWoEKr7mEz7O5T/CGrmP bNVh82TDgaJBVfEsivRo9sOZZqCnQNI9lVQoyYKdsBlTu7ezEwAOp7sw7Aqq8Qmu vkWjR9uK/x9qfNpDn3dEDog/nd/P8Ifo/cScwHlYCeDNJu+bNsPJS5GORpr3yTp2 YZRx6Tfmd35nhlM7wHS0kDENBsrbQDe+5aLF/2irHXZwAOQG+/Iz9MdyJAqklGk3 utIy+JF47fGmqNHHzoLStmLhBhvPU52jo/F29KUdXab4lfQ1xie5f7KyMvF9WR6+ D6WwHoEfsXajAxk6XV37GpmEnu4iXh1ScIYJNuY78CELcOyxjlAMHTZMzT48H7/7 XgwfkgyVGMK6DWCFT64Wd+QOtVo5huWJ5f43mAQjzKuJNbX+WrcGNahV2jvbXgga croLv9qke6MFQTv010wt+037EbcL32a06XlSDYXcruDo7XF4V7z/fGu9TcBi/ThL 1Oo9FrHfIeSgxdRDakOJUSKISH6P2g8P7KPFVdOwOkGMYwAl4nQYzODLsW/oTSnI +L92A4edK4vCNntVZoV3jg0r8pXbT4j+dFLEMPAYOVGTDTfQbA6PU9K7UTI9km/t BxZgH8wsYJnXAo8hjyJ4ws3RI1lKxEQonJRxTPHroc+sgCnnXyc= =tau8 -----END PGP SIGNATURE-----