lnpd
is a new Lightning Network node written in Rust. Actually, it's a suite of daemons able to run generalized Lightning Network protocol.
One may ask: another LN node? Why we need it? And what is "generalized Lightning Network"?
The problem with the existing Lightning node implementations is their very limited extensibility for such things as:
- future LN upgrades (channel factories, payment points, Taproot), since they do not separate network communication, channel operation and channel parameters from each other in a well manner, such that it will be possible, for instance, to replace HTLCs with payment points using some extension/module.
- protocols on top of LN (layer 3), like DLCs or proposed Lightspeed protocol, which require modification on the structure of the commitment transaction.
We name the extensions to Lightning network required to build this rich functionality a "Generalized Lightning Network". With this project LNP/BP Standards Association is trying to build an LN node with extensible and highly-modular architecture, utilizing state of the art Rust approaches like:
- Microservice architecture
- Dockerization for scalability at the level of separate processes (per-channel scalability etc)
- Tokio-based async/non-blocking IO and rumtime
- Fast and performant ZeroMQ for APIs and IPCs
- Avoiding non-efficient Bitcoin blockchain parsing and instead relying on new scalable blockchain indexing service and new format of universal bitcoin identifiers
- Mobile- & web-ready via C- and WASM-bindings & build targets for the core components
This new node will be used to implement:
- Bidirectional channels
- Channel factories/multipeer channels
- Payment points
- DLCs on LN
- RGB & Spectrum
- Future Storm (storage & messaging) edition for LN
- Future Prometheus (high-load computing) edition for LN
- Lightspeed payment protocol
The node must maintain simple/modular upgradability for:
- Schnorr's/Taproot
- Pay-to-elliptic curve point replacement for HTLCs
- eltoo
rust-lightning
architecture explanation: https://github.com/rust-bitcoin/rust-lightning/blob/master/ARCH.md- Antoine Riard's explanation on possible LN daemon architecture: https://github.com/ariard/hacking-rust-lightning
- PR in rust-lightning removing storage of private keys from the memory: https://github.com/rust-bitcoin/rust-lightning/pull/562/files
- Matt Corallo's sample implementation of rust-lightning based daemon, showcasing its API: https://github.com/TheBlueMatt/rust-lightning-bitcoinrpc
- Antoine Riard's set of separate lightning daemons based on standard Rust multithreading/async (no tokio): https://github.com/ariard/orage
- Forks of Matt Corallo's daemon developed much further towards full-flegged Lightning daemoin:
- by @YaaMe: https://github.com/YaaMe/rust-lightning-bitcoinrpc
- further development by @knarfytrebil: https://github.com/knarfytrebil/rust-lightning-bitcoinrpc
- Sample of Rust multithreaded server architecture: https://github.com/LNP-BP/txserv
- Lightning Hackdays Mattermost channel: https://mm.fulmo.org/fulmo/channels/x-rust-ln-node
- IRC channels on Freenode
- #rust-bitcoin: here you can get general support on rust-lightning
- #lightning-dev: here better to ask generic lightning-network questions
- #lnp-bp: discussions on this and other LNP/BP projects
- dr_orlovsky: my account on IRC
- Slack channel of SquareCrypto devoted to the development of Lightning Development Kit based on
rust-lightning
library: http://lightningdevkit.org/