pyln-client implementation and Torq node management software
The Python package pyln-client
lets you write CLN plugins and also
implements a RPC client to lightningd
daemon. If you'd like to
understand how it is implemented you can watch:
Overview of pyln-client implementation - Plugin.run() - Part 1,
Overview of pyln-client implementation - @plugin.method() - Part 2 and
Overview of pyln-client implementation - LightningRpc - Part 3.
When I was working on LNROOM #13 video about LightningRpc
class in
the package pyln-client
, I learned that on linux OSs the socket path
must be shorter than the in-kernel buffer size.
For instance, we can create a unix socket /tmp/foo.sock
listening
for incomming connection like this:
$ nc -lU /tmp/foo.sock
but with a file name too long, trying to run the following (on my machine Ubuntu 22.04.02 LTS)
$ nc -lU /tmp/a-very-long-path-a-very-long-path-a-very-long-path-a-very-long-path-a-very-long-path-a-very-long-path-a-very-long-path
we get the following error:
nc: File name too long
The class LightningRpc
of pyln-client
takes care of that case in
an interesting way. If you are interested, here is the link to the
source code:
If you are running (or are planning to run) big lightning nodes with thousands of channels, maybe you'll need at some point a tool like Torq developed by https://torq.co.
Torq is an advanced node management software that helps lightning node operators analyze and automate their nodes. It is designed to handle large nodes with over 1000 channels.
If you want to know more about it, you can watch the interview of Henrik Skogstrøm, founder and CEO of Torq, in Stephan Livera's podcast: Challenges of Operating Lightning Nodes & Torq with Henrik Skogstrøm (SLP474).
Have an amazing day, Tony Aldon https://lnroom.live