Lightning Network Daemon

Olaoluwa Osuntokun fb765fdb1d build: bump version to v0.16.1-beta 1 year ago
.github 39cc227d0d build: update build system to Go 1.20.3 1 year ago
.vscode d20140e393 .vscode: add editor settings for VS Code 1 year ago
aezeed edba938996 multi: add new build tag `integration` 1 year ago
aliasmgr f8a8326141 multi: replace `FundingLocked` and `funding_locked` strings 1 year ago
amp 0735522194 multi: fix `make fmt` 1 year ago
autopilot 8d6befd797 autopilot: fix loop variables, use require 1 year ago
batch 14c851c8fc kvdb: move channeldb/kvdb to top level 3 years ago
blockcache a15c45231e multi: bump neutrino+btcwallet versions, use new generic lru cache 1 year ago
brontide e15d3e898e brontide,lnwire,wtwire,zpay32: appease linter 1 year ago
buffer 4b12f40a48 lnwire: remove unused MaxMessagePayload const 2 years ago
build fb765fdb1d build: bump version to v0.16.1-beta 1 year ago
cert c3445e79d9 cert: removed unused args from cert.GenCertPair 1 year ago
chainntnfs f9b1250ecf chainntnfs: remove subscriptions when the relevant tx is confirmed 1 year ago
chainreg c96fe0ec58 chainreg: increase default CLTV value to 80 blocks (~13 hrs) 1 year ago
chanacceptor 2204cbfd30 rpc: validate closing channel address in open channel requests 1 year ago
chanbackup 5c5997935d chanbackup: replace defer cleanup with `t.Cleanup` 1 year ago
chanfitness 3dc5ddc168 fix typos [skip ci] 2 years ago
channeldb 2509000878 channeldb: use input.GenMultiSigScript 1 year ago
channelnotifier ced8833895 channelnotifier: add `InactiveLinkEvent` 1 year ago
clock 077ebe3868 clock: add missing package `require` and replace `assert` [skip ci] 1 year ago
cluster 100839fcea cluster: replace defer cleanup with `t.Cleanup` 1 year ago
cmd 508b0a4426 Merge tag 'v0.16.0-beta' into v0-16-1-branch-rc3 1 year ago
contractcourt c15a38407f lnd+contractcourt: add more debug logs 1 year ago
contrib 9ba341bd95 docs: remove PIDFile from example systemd service 2 years ago
discovery 2b8e9a0d36 multi: add more trace logs regarding link activate flow 1 year ago
docker c31698b59b docker+docs: bump btcd version 1 year ago
docs 508b0a4426 Merge tag 'v0.16.0-beta' into v0-16-1-branch-rc3 1 year ago
feature 89529fbb4f feature+lncfg: add config option to turn of anysegwit 1 year ago
funding 11f1735e85 funding: use default fwding policy if persisted values not found 1 year ago
healthcheck fccfefdb58 build(deps): bump golang.org/x/sys in /healthcheck 1 year ago
htlcswitch ec5b95c9a9 Merge pull request #7517 from yyforyongyu/fix-funding-locked 1 year ago
input 43660c2c31 input: note to update witness type protobuf 1 year ago
internal 0154226233 internal/musig2: rename to musig2v040 to avoid confusion 1 year ago
invoices 4a7d3bc9c2 invoices: fix flake in `TestInvoiceExpiryWithRegistry` 1 year ago
itest 7149b12cd9 itest+lntest: add itest for mempool preimage watch 1 year ago
keychain e3536dd770 mod+keychain+lntest: bump btcd to version with tweak fix 1 year ago
kvdb ded9fb87d2 build(deps): bump golang.org/x/net from 0.4.0 to 0.7.0 in /kvdb 1 year ago
labels 0735522194 multi: fix `make fmt` 1 year ago
lncfg b90b66ea80 chainreg: update bitcoind polling config 1 year ago
lnencrypt e0fc5bb234 lnencrypt: Moves the crypto functions in the chanbackup package into its own package called lnencrypt 1 year ago
lnmock 5e6f10c9b8 lnmock: add new package `lnmock` to host mocks 1 year ago
lnpeer 7dfe4018ce multi: use btcd's btcec/v2 and btcutil modules 2 years ago
lnrpc 508b0a4426 Merge tag 'v0.16.0-beta' into v0-16-1-branch-rc3 1 year ago
lntest 7149b12cd9 itest+lntest: add itest for mempool preimage watch 1 year ago
lntypes 99273cc5e1 lntypes+routing: add generic Min/Max functions 1 year ago
lnutils 0b8ac4870d lnutils: add unit test for `SyncMap` 1 year ago
lnwallet ac7a391732 chanfunding: allow to set a reserved amount not used for funding 1 year ago
lnwire dc3f83c670 funding+lnwire: rename and fix make lint 1 year ago
macaroons edba938996 multi: add new build tag `integration` 1 year ago
make 39cc227d0d build: update build system to Go 1.20.3 1 year ago
mobile bb5faf0f5a make+docs: pull in modules patch 1 year ago
monitoring 9a50cc95b7 Merge pull request #6224 from Roasbeef/prometheus-latency-histograms 2 years ago
multimutex 5bebda8c5d multimutex: add hash mutex 4 years ago
nat 530a2059e5 multi: Fix typos [skip ci] 2 years ago
netann 7ab6eb1140 netann: fix logging output 1 year ago
peer 24e1a0ec7d peer: add TODO about initial forwarding policy 1 year ago
peernotifier 3204e2d74b multi: add shutdown logs in subservers 2 years ago
pool 5e6690107e pool: replace defer cleanup with `t.Cleanup` 1 year ago
queue 7070be52b7 queue: replace defer cleanup with `t.Cleanup` 1 year ago
record 9195f29e61 routing+channeldb: send payment metadata from invoice 2 years ago
routing 508b0a4426 Merge tag 'v0.16.0-beta' into v0-16-1-branch-rc3 1 year ago
rpcperms 9bd0dcd121 rpcserver: add debug log for rpc calls 1 year ago
scripts d730797880 itest: remove unused flag `goroutineDump` 1 year ago
shachain 0735522194 multi: fix `make fmt` 1 year ago
signal 62dc1b5323 multi: Update Licenses to 2022 [skip ci] 2 years ago
subscribe 3aa008ab04 multi: add interface for subscribe client so it can be mocked 3 years ago
sweep fc3b8bff69 sweep: remove conflicted sweep txns from the rebroadcaster 1 year ago
ticker 55b53555e9 multi: improve readability of goroutine defers 1 year ago
tlv d61e668f56 multi: update to latest version of btcd in submodules 1 year ago
tools 22c1605687 ci: fix lint VSC permissions error 1 year ago
tor 534535f8db build(deps): bump golang.org/x/net in /tor 1 year ago
walletunlocker 2086f09489 walletunlocker: fix unit test flake by closing DB 1 year ago
watchtower ba33f6a697 wtclient: spin session key indices if required 1 year ago
zpay32 84fd911b47 multi: fix make lint 1 year ago
.editorconfig 2681c02afd .editorconfig: add editor settings for most editors 1 year ago
.gitignore 0bc86a3b4b multi: move `itest` out of `lntest` 1 year ago
.golangci.yml 5bea444b6d golangci: remove linter exceptions for itest 1 year ago
.travis.yml 39cc227d0d build: update build system to Go 1.20.3 1 year ago
Dockerfile 39cc227d0d build: update build system to Go 1.20.3 1 year ago
LICENSE 62dc1b5323 multi: Update Licenses to 2022 [skip ci] 2 years ago
Makefile bb5faf0f5a make+docs: pull in modules patch 1 year ago
README.md 368fa02543 trivial: link from readme to builder's guide 2 years ago
SECURITY.md 609cc8b883 lnd: add SECURITY.MD to bolster security entry in README 1 year ago
channel_notifier.go 7dfe4018ce multi: use btcd's btcec/v2 and btcutil modules 2 years ago
chanrestore.go c9f5912601 channeldb: BigSize migration, store zero-conf, scid-alias bits 1 year ago
config.go d5be710b95 config: fix bug in walletrpc interaction due to mismatched coin type 1 year ago
config_builder.go fc3b8bff69 sweep: remove conflicted sweep txns from the rebroadcaster 1 year ago
dev.Dockerfile 39cc227d0d build: update build system to Go 1.20.3 1 year ago
doc.go b53899c43c lnd: rename package main->lnd 5 years ago
go.mod e207424da8 docs: update release notes for mempool watch 1 year ago
go.sum e207424da8 docs: update release notes for mempool watch 1 year ago
intercepted_forward.go 721fb4ee88 contractcourt: add onchain interception 2 years ago
lnd.go c0f44a17b7 lnd: Add ability to encrypt TLS key on disk 1 year ago
log.go 635cffa871 multi: add sub-server dep 2 years ago
logo.png fba856068e README: add logo to top portion of page 6 years ago
pilot.go 7dfe4018ce multi: use btcd's btcec/v2 and btcutil modules 2 years ago
rpcserver.go 26b23e2af0 lnd: handles the `FundMax` field inside `parseOpenChannelReq` 1 year ago
rpcserver_test.go 218fa1e43e Rpcserver: Add GetAllPermissions function for retrieving permissions for external macaroon baking 2 years ago
sample-lnd.conf 508b0a4426 Merge tag 'v0.16.0-beta' into v0-16-1-branch-rc3 1 year ago
server.go fc3b8bff69 sweep: remove conflicted sweep txns from the rebroadcaster 1 year ago
server_test.go edba938996 multi: add new build tag `integration` 1 year ago
subrpcserver_config.go 561bf82985 chainrpc: add chainkit RPC service 1 year ago
sweeper_wallet.go fc3b8bff69 sweep: remove conflicted sweep txns from the rebroadcaster 1 year ago
tls_manager.go 91af62a031 lnd: bump lnd/cert version 1 year ago
tls_manager_test.go c0f44a17b7 lnd: Add ability to encrypt TLS key on disk 1 year ago
witness_beacon.go c15a38407f lnd+contractcourt: add more debug logs 1 year ago
witness_beacon_test.go 604a355db6 lnd: replace defer cleanup with `t.Cleanup` 1 year ago

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