If I'm building a desktop Bitcoin wallet with Lightning support, and I don't want the user to have to worry about channel management, what's the way to achieve that?

I've seen the autopilot solutions for lnd and c-lightning.

I'm currently experimenting with lnd because it's easy to compile for Windows, macOS, and Linux. But lnd's autopilot doesn't seem to be mature enough. And it's not well documented. So I don't know if I should try to use it?

As for c-lightning, how well does its autopilot work? Well, anyway, because c-lightning is in C and its autopilot is in Python, it'll be a heavy lift for me to include them in my app.

So I'm wondering if there might be a simple temporary workaround. Like, what if I hardcode a list of popular nodes and have the app connect to those? Would that work?


I strongly advice against a fixed list of nodes. This might eventually become outdated. A better solution might be that you run the autopilot on a server and deliver the results to the user via an api. This of course would be a trusted solution. But the lib_autopilot.py which empowers the clightning autopilot plugin is a standalone library that can easily be wrapped into a small webserver (or any server sided application) instead of being used as a clightning plugin on the client side. Also it allows much more configuration and fine tuning than the clightning plugin.

Running it as a server might actually make sense as the computations that are necessary to prepare the autopilot are quite heavy and memory intensive and might not be so great with a bigger lightning network on a client's machine. Also once those computations are done the results can be used to run the autopilot several times at rather low cost making it the perfect candidate for a server side application.

That being said the autopilots are experimental features. Being the author of lib_autopilot.py I am happy you agree that the c Lightning solution might be more mature than the lnd version. But I also want to stress with my increased knowledge about pathfinding and routing that I now have in comparison to one year ago I would create a much different autopilot these days.

Edit: sorry you asked how the c Lightning autopilot works. There is a presentation comparing it with lnd https://youtu.be/N7rlHCnaBf8 and explaining some of the challanges. Again it is one year old - so a bit has changed about what should be said about autopilots but it is a good start anyway

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.