This just cost me most of my last two days.
As a Golang Supremacist, it offends me greatly that the premiere Lightning Network node,
lnd
literally cannot be imported, at least, it pulls in so many things if you want to use anything, that it really isn't worth it.I discovered this as I tried to simply import the MilliSatoshi type, which I am using in Indranet in the decode from the soon to be written invoice RPC interface that will listen for payments from Indranet clients and deliver the amount of mSats and the preimage hash that confirms with the key pairs used for sessions (client generated private keys, like all in Indra, client driven).
Go modules seems to grab a version of lnd that is completely wrong, and it took almost a full day for me to figure out why.
The Godoc page for the project tells you everything about how many people have actually referred to it in their own projects:
v0.0.2
Yes, current latest tag is
v0.15.5-beta
The standard way to build it is through a
Makefile
, and for whatever reason I don't understand, the gRPC/protobuf generated code is built via a Dockerfile
.It is pretty ridiculous because in 5 minutes I can strip the whole
lnrpc
folder down to just the .proto
files and make a short shell script that downloads the correct protobuf compiler and plugins and wham bam thank you mam, whole generated code set is refreshed and identical to the one in LND even if you deleted all the .pb.go
files.As a side note, I learned that Silvergate and several Musk companies are major sponsors of the project.
And they recently got $70M in funding.
And I can't even import
lnwire.MilliSatoshi
I want a refund!
100% certainty if Indranet gets enough funding, like, you know, a few hundred thou, we will be fixing the hell out of this thing and rescuing the Golang Bitcoiners from Dogefather Hell.
btcd
... strangely neutrino is beautiful, yetlnd
is a clown show.cln
really isn't an option. Plus I know it's gonna be simple to use the gRPC.btcd
.lnd
... that repository is a hellscape of non idiomatic code and build steps, and despite being the most used LN node, seems like the funds mostly go to marketing and the devs are both small in number, overworked, and probably underpaid.lnd
in the future, once Indra launches, because it's a travesty.btcd
andneutrino
are both well written apps, butlnd
is a total dogpile.btcd
used to have, the problem would be solved, and it will raise the spectre of a possible need to make another soft fork, this time to actually address possibly the first serious vulnerability in the protocol. Which is the legacy of the Blocksize Wars, btw.lnd
are some of the most shady "bitcoin" businesses out there - Silvergate, Tesla, amongst others.lnd
andcln
are less than desirable for many reasons, butlnd
is the most secure. Thus, I chooselnd
. And when I'm done building Indra I will forklnd
and we will finally have a fully open source, non-shady-funded dev team and I'm sure that it will come to be preferred once it is opened up and made more friendly to developers.lnd
, or use it in applications, is a minefield of bullcrap. I am so talkative about it right now because it cost me literally 2 days of work hitting up against idiotic things in it, and I was forewarned already in my efforts to try and contribute to it.lnd
to be cleaner and more dev friendly will most likely be a more effective use of my time.