pull down to refresh

LND is pretty crappy, we have been working with it and encountered insane bugs involving configuration and environment variables handling. Completely inexcusable ones. The workarounds so far appear to require setting configurations directly in the commandline. But the documentation is definitely better. I'm using LND in my work because it's written in Go, but I encountered also inexcusable glitches involving Go modules (just check out the version of the latest version recognised on the go.dev documentation site, v0.0.2).
Aside from these LND is probably a little easier to work with for a beginner, just, not if you were hoping to import things from it into your own Go code. I attempted to solve an issue relating to eliminating the masses of imports triggered by importing its gRPC/Protobuf generated code, and wound up just writing a small script that let me snapshot a version at a tag, eliminating all the documentation fluff and retargeting the internal imports to the new Git URL for it.
CLN seems to be a lot better written, but by the nature of the C language has more chance of having far less obvious and more damaging vulnerabilities involving buffer overflows, stack smashing attacks and memory leaks. I've not checked out their documentation, it might be good too. Certainly it very likely is more memory efficient but may not translate to lower latency for high load, since Go's runtime focuses on that performance metric.
Out of curiosity, do you know if anyone is working on a Rust implementation?
reply
There is a sample client written with LDK.
reply
Yes. Don't hear much about it though. https://github.com/lightningdevkit/rust-lightning
reply
Oh cool, thanks!
reply
isn't LDK written in rust? Or at least uses a Rust lightning implementation https://github.com/lightningdevkit/rust-lightning
reply
I thought LDK was a set of utilities to interact with a lightning node, rather than an implementation of a node 🤔
reply
It's a set of libraries in Rust for that purpose, but as another poster just above mentions, there is a project, and according to the readme, is fully functional and implements all the BOLTs.
It's funny, I am always seeing so much noise from the Rust dev community about how great their stuff is yet rust-lightning has less press than any other implementation.
I personally am dirty on Rust due to it being sponsored by Bitcoin DID-denying Mozilla Foundation (because boiling the oceans!). As well as the fact that the only thing about the language that is any better than C++ is the build system (cargo), which basically is a copy of the Go build system with inline generators. (and sadly too many Go devs use Make to trigger these things and then get carried away with themselves ignoring all the other things the Go tooling does). Actually, I'm pretty dirty on most Go based projects too, in the Bitcoin ecosystem, seems to me like none of them really love Go that much, building and writing like C++ programmers. Cosmos ecosystem pissed me off too, because they write Go like Java programmers.
Gah, doesn't anyone read the f...king vast repository of great advice on how to build Go stuff other than hardcore gophers like me???
edit: no, rust-lightning is not a server implementation, for that look for Sensei https://l2.technology/sensei
reply
I'm no Rust expert but I find it a joy to work with. That being said, I come from a mostly Javascript/Typescript background and not used to having a compiler be so helpful at preventing runtime exceptions.
I don't have much experience with Go, but I've heard mostly good things about it.
reply
AFAIU, LDK’s main target audience are wallet providers that want to add lightning functionality to their existing wallet software. In that situation, LDK handles all interactions with the Lightning Network, but the wallet developers need to bring-their-own-blockchain (e.g. Bitcoin Core) and need to handle their on-chain transactions themselves.
If you just want to run a Lightning Node, I don’t think that LDK by itself is what you are looking for.
reply
Alright, cool, that makes sense. Thanks!
reply
This is very helpful. Thanks for the response!
reply