Lightning Network Daemon

Conner Fromknecht d233f61383 Merge pull request #5052 from cfromknecht/v0.12.1-beta.rc7-branch-commits 3 rokov pred
.github 923134e52c docs: update release verification scripts for v0.12.1-beta 3 rokov pred
aezeed 02267565fe multi: unify code blocks in READMEs 3 rokov pred
autopilot e3a6cd8412 autopilot: fix typo 3 rokov pred
batch 3a1e34b100 batch: add option for executing requests immediately 3 rokov pred
brontide 02267565fe multi: unify code blocks in READMEs 3 rokov pred
buffer 5d9514fbe4 buffer+pool: add buffer.Read and pool.ReadBuffer 5 rokov pred
build 51aaf2bb13 build/version: bump to v0.12.1-beta.rc7 3 rokov pred
cert 86a0609ecf config+lnd+cert: add --tlsdisableautofill to prevent information leaks. 3 rokov pred
chainntnfs 02267565fe multi: unify code blocks in READMEs 3 rokov pred
chainreg 50323dcd56 chainreg: require FeeUrl when running neutrino mainnet 3 rokov pred
chanacceptor 19440c1e39 ensure 64bit alignment of atomically accessed field in ChannelAcceptor 3 rokov pred
chanbackup 0b9bec7804 chanrestore: define ZeroHtlcTxFeeCommitVersion 3 rokov pred
chanfitness c1705a28da chanfitness/chaneventstore: stop ticker after goroutine 3 rokov pred
channeldb 6dde42eee6 channeldb: add SchedulerOp arg to graph update methods 3 rokov pred
channelnotifier 1519a1bdfe channelnotifier: remove dead logging code 4 rokov pred
clock fc87e8358e clock: add go.mod 4 rokov pred
cmd 64660a2574 Revert "lnrpc/routerrpc: use new default value of 16 for maxparts" 3 rokov pred
contractcourt ab6ad25a92 lntest/channels: introduce subpackage to deduplicate static structs 3 rokov pred
contrib a94c990f8e Remove unsupported newaddress type p2pkh 3 rokov pred
discovery b38d8d84d9 discovery: use token bucket based rate limiting to throttle gossip 3 rokov pred
docker 6c661b65b6 docker: add an extra listener for localhost 3 rokov pred
docs 923134e52c docs: update release verification scripts for v0.12.1-beta 3 rokov pred
feature abefa93065 lnwire+feature: define AnchorsZeroFeeHtlcTx feature 3 rokov pred
funding dcdf36f410 lnd+funding: move Manager to funding, change references 3 rokov pred
fuzz bbe85f3c16 fuzz/zpay32: add Decode/Encode fuzz tests. 3 rokov pred
healthcheck 35c1fad517 server+healthcheck: rename function, add absolute disk space function 3 rokov pred
htlcswitch 87a3aad001 htlcswitch: init mockFeeEstimator in other LinkChannelConfigs 3 rokov pred
input 4992e41439 contraccourt+input: create resolver for timeout second level 3 rokov pred
invoices 530059f18b invoices: force MPP payload inclusion for non-keysend payments 3 rokov pred
keychain 582b164c46 kvdb: add timeout options for bbolt (#4787) 3 rokov pred
labels 2a614cc596 multi: add labels to lnd native transactions 3 rokov pred
lncfg b57ea5c1cd lncfg: detect tor resolution error case and fallback to system resolver 3 rokov pred
lnpeer 50186ba834 lnpeer/peer.go: modifying interface comment 3 rokov pred
lnrpc 64660a2574 Revert "lnrpc/routerrpc: use new default value of 16 for maxparts" 3 rokov pred
lntest 64660a2574 Revert "lnrpc/routerrpc: use new default value of 16 for maxparts" 3 rokov pred
lntypes afd86763ac lntypes: add ZeroHash 5 rokov pred
lnwallet 1d3985d3af channeldb+lnwallet: lastWasRevokeKey to store last sent rev/sig 3 rokov pred
lnwire 02267565fe multi: unify code blocks in READMEs 3 rokov pred
macaroons 02267565fe multi: unify code blocks in READMEs 3 rokov pred
make 578b348a50 build: update Docker versions to Go 1.15.7 3 rokov pred
mobile 3ad5a90800 mobile: remove grpc-gateway import 3 rokov pred
monitoring b23dce1bc8 monitoring: run go fmt 3 rokov pred
multimutex 5bebda8c5d multimutex: add hash mutex 4 rokov pred
nat a27ac66eed server: add periodic renewal of port forwarding 5 rokov pred
netann 236c839ee7 netann: ignore unknown channel updat on startup 3 rokov pred
peer ab6ad25a92 lntest/channels: introduce subpackage to deduplicate static structs 3 rokov pred
peernotifier 4ceceda757 peernotifier: Add peer notifier package for peer online/offline events 4 rokov pred
pool eb1affd5da pool: fix typo 3 rokov pred
queue c7fa5ea863 queue: remove unsued waitgroup 4 rokov pred
record de88a4b174 record: add AMP record and encode/decode methods 4 rokov pred
routing 5fd74659bc routing: avoid modifying AssumeChannelValid in unit tests 3 rokov pred
scripts 3ae60cd63f scripts/verify-install.sh: pass expected version as argument 3 rokov pred
shachain 3d7de2ad39 multi: remove dead code 4 rokov pred
signal 38c74f6418 signal: do not trap SIGABRT 3 rokov pred
subscribe 3aa008ab04 multi: add interface for subscribe client so it can be mocked 3 rokov pred
sweep 185ba77f8e sweep: allow specified outputs to sweep tx 3 rokov pred
ticker 567c357c61 ticker+queue: run go mod tidy 4 rokov pred
tlv 890bcb2ade tlv: fix comments for numLeadingZeroBytes{32,64} funcs 4 rokov pred
tor 02267565fe multi: unify code blocks in READMEs 3 rokov pred
walletunlocker 03a21367d3 lnd+walletunlocker: move history drop to unlocker 3 rokov pred
watchtower e0e57642b6 wtclient/client: fix missed prefix log 3 rokov pred
zpay32 02267565fe multi: unify code blocks in READMEs 3 rokov pred
.gitignore b42c5e5fad make+scripts: use pre-compiled btcd in itest 3 rokov pred
.golangci.yml 1558edbc3c travis+lint: fix memory usage 3 rokov pred
.travis.yml 2cc8b16339 build: update CI builds to use go 1.15.7 3 rokov pred
Dockerfile 578b348a50 build: update Docker versions to Go 1.15.7 3 rokov pred
LICENSE 62778c61cc lnd: update copyright notice 5 rokov pred
Makefile 877fd96e8c make: use make for docker-release 3 rokov pred
README.md 9b28925da2 README: remove stray [ 3 rokov pred
breacharbiter.go 985b7838ab sweep+input: add RequiredTxOut to inputs 3 rokov pred
breacharbiter_test.go ab6ad25a92 lntest/channels: introduce subpackage to deduplicate static structs 3 rokov pred
channel_notifier.go d8c62c37a8 channel_notifier: update backup on pending chan 4 rokov pred
chanrestore.go 0b9bec7804 chanrestore: define ZeroHtlcTxFeeCommitVersion 3 rokov pred
config.go 547181d36f config: clean and expand backup file path 3 rokov pred
dev.Dockerfile 578b348a50 build: update Docker versions to Go 1.15.7 3 rokov pred
doc.go b53899c43c lnd: rename package main->lnd 5 rokov pred
go.mod 8d8b13a7d1 build: update to addrv2 aware neutrino version 3 rokov pred
go.sum d8978c6109 go.sum: cleanup unused entries 3 rokov pred
lnd.go 03a21367d3 lnd+walletunlocker: move history drop to unlocker 3 rokov pred
log.go dcdf36f410 lnd+funding: move Manager to funding, change references 3 rokov pred
logo.png fba856068e README: add logo to top portion of page 6 rokov pred
nursery_store.go d89f51d1d0 multi: add reset closure to kvdb.Update 3 rokov pred
nursery_store_test.go 2a358327f4 multi: add reset closure to kvdb.View 3 rokov pred
pilot.go dcdf36f410 lnd+funding: move Manager to funding, change references 3 rokov pred
rpcserver.go c8ce80a3f4 lnrpc: expose PINNED_SYNC for listpeers 3 rokov pred
sample-lnd.conf 275055d4a0 config: expose gossip.pinned-syncers for conf 3 rokov pred
server.go 083a62a3b2 Revert "discovery: add new option to toggle gossip rate limiting" 3 rokov pred
server_test.go 403d72b468 lnrpc: lets encrypt 3 rokov pred
subrpcserver_config.go 14653865b2 invoices+rpc: add missing channel graph to the AddInvoiceConfig 3 rokov pred
utxonursery.go 2a358327f4 multi: add reset closure to kvdb.View 3 rokov pred
utxonursery_test.go 2a358327f4 multi: add reset closure to kvdb.View 3 rokov pred
witness_beacon.go 1a80a1e540 witness_beacon: do not look up invoice preimages 5 rokov pred

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 talks, articles, and example applications can be found at: dev.lightning.community.

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.freenode.net
  • channel #lnd
  • webchat

Safety

When operating a mainnet lnd node, please refer to our operational safety guildelines. 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