plugins icon indicating copy to clipboard operation
plugins copied to clipboard

A support plugin for lightningd's invoice and pay API call.

Open renepickhardt opened this issue 5 years ago • 3 comments
trafficstars

If lightningd users want to make AMP payments lightningd could use this plugin to compute the optimal split off the amount that helps to rebalance it's own channels in the best way.

you can test the code by running example.py before you need to do lightning-cli listfunds > listfunds.json as described in example.py

Looking forward for your review and thoughts.

edit (for easier reference some background info): More theory about imbalances and the algorithm to decrease the imblance of a node was suggested by this research by Rene Pickhardt and Mariusz Nowostawski: https://arxiv.org/abs/1912.09555

This software is an adopted version as discussed in this post on the lightning-dev mailing list: https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-January/002418.html and was suggested to be created by ZmnSCPxj.

renepickhardt avatar Jan 14 '20 16:01 renepickhardt

Very interesting idea, we briefly discussed this in person, but would you be open to adding functionality to perform a payment if I build a class that extracts the common pieces of a pay call? It'd be a class representing a payment, and it'd then manage calls to getroute, splitting the payment into partial payments, and reattempt failed payments, with the necessary entrypoints to add your getroute specialization.

cdecker avatar Jan 17 '20 16:01 cdecker

sure! Though i am not completely shure how the API for for the Pay class would look like. But I guess I will be able to read the code and hang this plugin in.

On a side note: It would also be interesting to find a tipping point between necessary fees and desired reduction in imbalance.

renepickhardt avatar Jan 20 '20 14:01 renepickhardt

Needs rebase and tests for CI

chrisguida avatar Feb 07 '24 16:02 chrisguida