Lightning Network Daemon

Olaoluwa Osuntokun 93cdb3c1ec contractcourt: update UTXO nursery to support taproot chans 1 anno fa
.github 0bbbd9b911 build: bump min Go version to 1.19 1 anno fa
.vscode d20140e393 .vscode: add editor settings for VS Code 1 anno fa
aezeed edba938996 multi: add new build tag `integration` 1 anno fa
aliasmgr feb8e7e64e aliasmgr: export StartingAlias so other packages can use it 1 anno fa
amp 0735522194 multi: fix `make fmt` 1 anno fa
autopilot 8d6befd797 autopilot: fix loop variables, use require 1 anno fa
batch 14c851c8fc kvdb: move channeldb/kvdb to top level 3 anni fa
blockcache 36e5db3fed multimutex: remove HashMutex, make Mutex type a type param 1 anno fa
brontide e15d3e898e brontide,lnwire,wtwire,zpay32: appease linter 1 anno fa
buffer 4b12f40a48 lnwire: remove unused MaxMessagePayload const 2 anni fa
build 840c939464 build: bump version to v0.16.0-rc3 1 anno fa
cert c3445e79d9 cert: removed unused args from cert.GenCertPair 1 anno fa
chainntnfs 7bf4eee685 chainntnfs: fix temp dir creation and rpcpolling switch 1 anno fa
chainreg c602ac07e7 chainntnfs: move cache implementation to channeldb 1 anno fa
chanacceptor 2204cbfd30 rpc: validate closing channel address in open channel requests 1 anno fa
chanbackup 5c5997935d chanbackup: replace defer cleanup with `t.Cleanup` 1 anno fa
chanfitness 3dc5ddc168 fix typos [skip ci] 2 anni fa
channeldb ad6bebc7b4 channeldb: update ChanSyncMsg to populate nonce info 10 mesi fa
channelnotifier ced8833895 channelnotifier: add `InactiveLinkEvent` 1 anno fa
clock 077ebe3868 clock: add missing package `require` and replace `assert` [skip ci] 1 anno fa
cluster 100839fcea cluster: replace defer cleanup with `t.Cleanup` 1 anno fa
cmd 1606f06ac3 cmd/lncli: add new taproot channel type for openchannel 10 mesi fa
contractcourt 93cdb3c1ec contractcourt: update UTXO nursery to support taproot chans 10 mesi fa
contrib 9ba341bd95 docs: remove PIDFile from example systemd service 2 anni fa
discovery a6248ecee6 funding+peer: add support for new musig2 channel funding flow 10 mesi fa
docker 0b1e881d18 scripted-diff: replace ⛰ emoji with $ [skip ci] 1 anno fa
docs c9b962e79f lnwire: TestLightningWireProtocol quick check tests for taproot fields 1 anno fa
feature 7598daec04 feature+lncfg: add new CLI flag to opt into taproot chans 10 mesi fa
funding ea2505489a funding: add unit tests for reg+zero conf taproot chans 10 mesi fa
healthcheck fccfefdb58 build(deps): bump golang.org/x/sys in /healthcheck 1 anno fa
htlcswitch b66d538cfd htlcswitch: add awareness of new partial sig fields and musig2 nonces 10 mesi fa
input 23b9206045 input: HtlcSucceedInput to support sweeping for taproot chans 10 mesi fa
internal 0154226233 internal/musig2: rename to musig2v040 to avoid confusion 1 anno fa
invoices 4a7d3bc9c2 invoices: fix flake in `TestInvoiceExpiryWithRegistry` 1 anno fa
itest 251802d796 Merge pull request #7444 from bitromortac/2302-capacity-config 1 anno fa
keychain e3536dd770 mod+keychain+lntest: bump btcd to version with tweak fix 1 anno fa
kvdb ded9fb87d2 build(deps): bump golang.org/x/net from 0.4.0 to 0.7.0 in /kvdb 1 anno fa
labels 0735522194 multi: fix `make fmt` 1 anno fa
lncfg 7598daec04 feature+lncfg: add new CLI flag to opt into taproot chans 10 mesi fa
lnencrypt e0fc5bb234 lnencrypt: Moves the crypto functions in the chanbackup package into its own package called lnencrypt 1 anno fa
lnmock 5e6f10c9b8 lnmock: add new package `lnmock` to host mocks 1 anno fa
lnpeer a6248ecee6 funding+peer: add support for new musig2 channel funding flow 10 mesi fa
lnrpc 9348aeb7b3 lnrpc: add new channel type for taproot channels 10 mesi fa
lntest 7f66b74dd7 input: update the mock signer for the musig2 API changes 10 mesi fa
lntypes 99273cc5e1 lntypes+routing: add generic Min/Max functions 1 anno fa
lnutils 93cdb3c1ec contractcourt: update UTXO nursery to support taproot chans 10 mesi fa
lnwallet 266d30d6e3 lnwallet: update NewBreachRetribution to handle taproot chans 10 mesi fa
lnwire c9b962e79f lnwire: TestLightningWireProtocol quick check tests for taproot fields 1 anno fa
macaroons edba938996 multi: add new build tag `integration` 1 anno fa
make 0bbbd9b911 build: bump min Go version to 1.19 1 anno fa
mobile 04a1160939 docs: remove $ from multiline commands or frequently copied [skip ci] 1 anno fa
monitoring 9a50cc95b7 Merge pull request #6224 from Roasbeef/prometheus-latency-histograms 2 anni fa
multimutex 36e5db3fed multimutex: remove HashMutex, make Mutex type a type param 1 anno fa
nat 530a2059e5 multi: Fix typos [skip ci] 2 anni fa
netann 5e7a97cf40 lnwire: update Sig to support both ECDSA and schnorr sigs 1 anno fa
peer a6248ecee6 funding+peer: add support for new musig2 channel funding flow 10 mesi fa
peernotifier 3204e2d74b multi: add shutdown logs in subservers 2 anni fa
pool 5e6690107e pool: replace defer cleanup with `t.Cleanup` 1 anno fa
queue 7070be52b7 queue: replace defer cleanup with `t.Cleanup` 1 anno fa
record 9195f29e61 routing+channeldb: send payment metadata from invoice 2 anni fa
routing 83fe896457 routing+funding: add new makeFundingScript to support reg and taproot channels 10 mesi fa
rpcperms 55b53555e9 multi: improve readability of goroutine defers 1 anno fa
scripts d730797880 itest: remove unused flag `goroutineDump` 1 anno fa
shachain 0735522194 multi: fix `make fmt` 1 anno fa
signal 62dc1b5323 multi: Update Licenses to 2022 [skip ci] 2 anni fa
subscribe 3aa008ab04 multi: add interface for subscribe client so it can be mocked 3 anni fa
sweep edba938996 multi: add new build tag `integration` 1 anno fa
ticker 55b53555e9 multi: improve readability of goroutine defers 1 anno fa
tlv d61e668f56 multi: update to latest version of btcd in submodules 1 anno fa
tools 22c1605687 ci: fix lint VSC permissions error 1 anno fa
tor 534535f8db build(deps): bump golang.org/x/net in /tor 1 anno fa
walletunlocker 2086f09489 walletunlocker: fix unit test flake by closing DB 1 anno fa
watchtower a2f7350237 input+wallet: extract musig2 session management into new module 1 anno fa
zpay32 5e7a97cf40 lnwire: update Sig to support both ECDSA and schnorr sigs 1 anno fa
.editorconfig 2681c02afd .editorconfig: add editor settings for most editors 1 anno fa
.gitignore 0bc86a3b4b multi: move `itest` out of `lntest` 1 anno fa
.golangci.yml 5bea444b6d golangci: remove linter exceptions for itest 1 anno fa
.travis.yml 0bbbd9b911 build: bump min Go version to 1.19 1 anno fa
Dockerfile 0bbbd9b911 build: bump min Go version to 1.19 1 anno fa
LICENSE 62dc1b5323 multi: Update Licenses to 2022 [skip ci] 2 anni fa
Makefile edba938996 multi: add new build tag `integration` 1 anno fa
README.md 368fa02543 trivial: link from readme to builder's guide 2 anni fa
SECURITY.md 609cc8b883 lnd: add SECURITY.MD to bolster security entry in README 1 anno fa
channel_notifier.go 7dfe4018ce multi: use btcd's btcec/v2 and btcutil modules 2 anni fa
chanrestore.go c9f5912601 channeldb: BigSize migration, store zero-conf, scid-alias bits 1 anno fa
config.go f4fdd82327 Merge pull request #7264 from yyforyongyu/gossip-resend-messages 1 anno fa
config_builder.go 4a0a15586b multi: make linter happy 1 anno fa
dev.Dockerfile 0bbbd9b911 build: bump min Go version to 1.19 1 anno fa
doc.go b53899c43c lnd: rename package main->lnd 5 anni fa
go.mod 0bbbd9b911 build: bump min Go version to 1.19 1 anno fa
go.sum 52facd3e5a mod: bump neutrino lru cache version 1 anno fa
intercepted_forward.go 721fb4ee88 contractcourt: add onchain interception 2 anni fa
lnd.go c0f44a17b7 lnd: Add ability to encrypt TLS key on disk 1 anno fa
log.go 635cffa871 multi: add sub-server dep 2 anni fa
logo.png fba856068e README: add logo to top portion of page 6 anni fa
pilot.go 7dfe4018ce multi: use btcd's btcec/v2 and btcutil modules 2 anni fa
rpcserver.go 22f602872c rpc: update open channel parsing to detect taproot chans 10 mesi fa
rpcserver_test.go 218fa1e43e Rpcserver: Add GetAllPermissions function for retrieving permissions for external macaroon baking 2 anni fa
sample-lnd.conf 7598daec04 feature+lncfg: add new CLI flag to opt into taproot chans 10 mesi fa
server.go 7598daec04 feature+lncfg: add new CLI flag to opt into taproot chans 10 mesi fa
server_test.go edba938996 multi: add new build tag `integration` 1 anno fa
subrpcserver_config.go 561bf82985 chainrpc: add chainkit RPC service 1 anno fa
tls_manager.go 91af62a031 lnd: bump lnd/cert version 1 anno fa
tls_manager_test.go c0f44a17b7 lnd: Add ability to encrypt TLS key on disk 1 anno fa
witness_beacon.go 383cb40f8d multi: create channeldb/models package 1 anno fa
witness_beacon_test.go 604a355db6 lnd: replace defer cleanup with `t.Cleanup` 1 anno fa

README.md

Lightning Network Daemon

Build Status MIT licensed Irc Godoc

The Lightning Network Daemon (lnd) - is a complete implementation of a Lightning Network node. lnd has several pluggable back-end chain services including btcd (a full-node), bitcoind, and neutrino (a new experimental light client). The project's codebase uses the btcsuite set of Bitcoin libraries, and also exports a large set of isolated re-usable Lightning Network related libraries within it. In the current state lnd is capable of:

  • Creating channels.
  • Closing channels.
  • Completely managing all channel states (including the exceptional ones!).
  • Maintaining a fully authenticated+validated channel graph.
  • Performing path finding within the network, passively forwarding incoming payments.
  • Sending outgoing onion-encrypted payments through the network.
  • Updating advertised fee schedules.
  • Automatic channel management (autopilot).

Lightning Network Specification Compliance

lnd fully conforms to the Lightning Network specification (BOLTs). BOLT stands for: Basis of Lightning Technology. The specifications are currently being drafted by several groups of implementers based around the world including the developers of lnd. The set of specification documents as well as our implementation of the specification are still a work-in-progress. With that said, the current status of lnd's BOLT compliance is:

  • [X] BOLT 1: Base Protocol
  • [X] BOLT 2: Peer Protocol for Channel Management
  • [X] BOLT 3: Bitcoin Transaction and Script Formats
  • [X] BOLT 4: Onion Routing Protocol
  • [X] BOLT 5: Recommendations for On-chain Transaction Handling
  • [X] BOLT 7: P2P Node and Channel Discovery
  • [X] BOLT 8: Encrypted and Authenticated Transport
  • [X] BOLT 9: Assigned Feature Flags
  • [X] BOLT 10: DNS Bootstrap and Assisted Node Location
  • [X] BOLT 11: Invoice Protocol for Lightning Payments

Developer Resources

The daemon has been designed to be as developer friendly as possible in order to facilitate application development on top of lnd. Two primary RPC interfaces are exported: an HTTP REST API, and a gRPC service. The exported API's are not yet stable, so be warned: they may change drastically in the near future.

An automatically generated set of documentation for the RPC APIs can be found at api.lightning.community. A set of developer resources including guides, articles, example applications and community resources can be found at: docs.lightning.engineering.

Finally, we also have an active Slack where protocol developers, application developers, testers and users gather to discuss various aspects of lnd and also Lightning in general.

Installation

In order to build from source, please see the installation instructions.

Docker

To run lnd from Docker, please see the main Docker instructions

IRC

  • irc.libera.chat
  • channel #lnd
  • webchat

Safety

When operating a mainnet lnd node, please refer to our operational safety guidelines. It is important to note that lnd is still beta software and that ignoring these operational guidelines can lead to loss of funds.

Security

The developers of lnd take security very seriously. The disclosure of security vulnerabilities helps us secure the health of lnd, privacy of our users, and also the health of the Lightning Network as a whole. If you find any issues regarding security or privacy, please disclose the information responsibly by sending an email to security at lightning dot engineering, preferably encrypted using our designated PGP key (91FE464CD75101DA6B6BAB60555C6465E5BCB3AF) which can be found here.

Further reading