Skip to content
Decred Lightning Network Daemon ⚡️
Go Other
  1. Go 99.6%
  2. Other 0.4%
Branch: master
Clone or download
Pull request Compare This branch is 190 commits ahead, 1709 commits behind lightningnetwork:master.
matheusd lnwallet: Switch interface test to custom miner
This switches the interface test to use the custom adjusted miner for
faster simnet mining.
Latest commit 9aabbc4 May 30, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github docs: Rename lnd to dcrlnd references Feb 18, 2019
aezeed travis: Enable linter Apr 26, 2019
autopilot multi: various cleanups (#22) May 10, 2019
brontide multi: remove unused code and update btc to dcr. May 8, 2019
build build: Switch to v0.1.0 Apr 25, 2019
chainntnfs multi: various cleanups (#22) May 10, 2019
channeldb multi: various cleanups (#22) May 10, 2019
cmd/dcrlncli dcrlncli: Switch references to decred and p2pkh Aug 12, 2019
contractcourt multi: various cleanups (#22) May 10, 2019
contrib contrib: Rename and fix dcrlncli bash completion Apr 1, 2019
discovery discovery: Disable DNS boostrapper May 22, 2019
docker multi: Switch references from weight to size Apr 12, 2019
docs docs: Update docs on macaroons and tor for dcrlnd Aug 12, 2019
htlcswitch multi: Change units from kw to kB. May 8, 2019
internal
invoices multi: update gprc proto fields. Mar 7, 2019
keychain travis: Enable linter Apr 26, 2019
lncfg multi: lint fix. Apr 13, 2019
lnpeer lnpeer: Add Inbound func to peer interface Apr 12, 2019
lnrpc multi: Change units from kw to kB. May 8, 2019
lntest lntest: Use faster simnet block generator Aug 12, 2019
lnwallet lnwallet: Switch interface test to custom miner Aug 12, 2019
lnwire multi: Change units from kw to kB. May 8, 2019
macaroons travis: Enable linter Apr 26, 2019
make make: Bump default timeout for tests Mar 6, 2019
multimutex multimutex: add new multimutex package Jan 24, 2018
nat nat: introduce new NAT traversal package with UPnP/NAT-PMP implementa… Jun 13, 2018
netann netann: Make package build Jan 31, 2019
queue Initial Decred port checkpoint. Jan 14, 2019
routing multi: various cleanups (#22) May 10, 2019
shachain Initial Decred port checkpoint. Jan 14, 2019
signal
sweep multi: various cleanups (#22) May 10, 2019
ticker Initial Decred port checkpoint. Jan 14, 2019
tor multi: various cleanups (#22) May 10, 2019
walletunlocker multi: various cleanups (#22) May 10, 2019
watchtower multi: various cleanups (#22) May 10, 2019
zpay32 multi: various cleanups (#22) May 10, 2019
.gitignore make: Update to build/build-itest dcrlnd/dcrlncli May 2, 2019
.travis.yml travis: pass the rpctest build tag to the linter May 8, 2019
Dockerfile fix dockerfile dependency bug Dec 2, 2018
LICENSE Initial Decred port checkpoint. Jan 14, 2019
Makefile make: Remove lint from travis-cover May 2, 2019
README.md docs: Add quickstart guide and point out sample conf Aug 12, 2019
breacharbiter.go multi: various cleanups (#22) May 10, 2019
breacharbiter_test.go multi: lint fix. Apr 13, 2019
chainparams.go multi: remove unused code and update btc to dcr. May 8, 2019
chainregistry.go discovery: Disable DNS boostrapper May 22, 2019
chancloser.go travis: Enable linter Apr 26, 2019
config.go config: fixed configfile flag Aug 7, 2019
doc.go
fundingmanager.go multi: various cleanups (#22) May 10, 2019
fundingmanager_test.go multi: remove unused code and update btc to dcr. May 8, 2019
go.mod dependencies: Update to latest dcrd Aug 12, 2019
go.sum dependencies: Update to latest dcrd Aug 12, 2019
lnd.go multi: lint fix. Apr 13, 2019
lnd_test.go itest: Add wait for pending htlcs in revoked test Aug 12, 2019
log.go multi: various cleanups (#22) May 10, 2019
logo.png README: add logo to top portion of page Sep 29, 2017
mock.go multi: various cleanups (#22) May 10, 2019
nursery_store.go multi: gofmt Jan 15, 2019
nursery_store_test.go main: Make tests build Feb 21, 2019
peer.go multi: lint fix. Apr 13, 2019
peer_test.go multi: update gprc proto fields. Mar 7, 2019
pilot.go multi: Switch references from weight to size Apr 12, 2019
release.sh release: Make windows build again May 2, 2019
rpcserver.go multi: various cleanups (#22) May 10, 2019
sample-dcrlnd.conf docs: Add quickstart guide and point out sample conf Aug 12, 2019
server.go discovery: Disable DNS boostrapper May 22, 2019
server_test.go multi: Replace sha256 for chainhash Feb 22, 2019
subrpcserver_config.go Initial Decred port checkpoint. Jan 14, 2019
test_utils.go multi: lint fix. Apr 13, 2019
utxonursery.go multi: various cleanups (#22) May 10, 2019
utxonursery_test.go main: Make tests pass Feb 22, 2019
witness_beacon.go multi: various cleanups (#22) May 10, 2019

README.md

Lightning Network Daemon

Build Status MIT licensed Godoc

The Decred Lightning Network Daemon (dcrlnd) - is a complete implementation of a Lightning Network node and currently deployed on testnet3 - the Decred Test Network.

dcrlnd currently requires a dcrd backing full node to perform the required chain services. The project's codebase uses the existing set of decred libraries, and also exports a large set of isolated re-usable Lightning Network related libraries within it. In the current state dcrlnd 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).

LND Porting Status

dcrlnd is currently developed as a port of the original lnd lightning network daemon with the changes required to make it work on the Decred network and with Decred software.

Some of the most important (though by no means exhaustive) diffrences between lnd and dcrlnd include:

  • Import Paths
  • Full node integration API
  • Transaction serialization layout
  • Transaction witness format and signature process
  • Wallet integration API

The current status of the port can be found on this issue.

Lightning Network Specification Compliance

dcrlnd aims to conform 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 dcrlnd. 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 dcrlnd's BOLT compliance is:

  • BOLT 1: Base Protocol
  • BOLT 2: Peer Protocol for Channel Management
  • BOLT 3: Bitcoin Transaction and Script Formats
  • BOLT 4: Onion Routing Protocol
  • BOLT 5: Recommendations for On-chain Transaction Handling
  • BOLT 7: P2P Node and Channel Discovery
  • BOLT 8: Encrypted and Authenticated Transport
  • BOLT 9: Assigned Feature Flags
  • BOLT 10: DNS Bootstrap and Assisted Node Location
  • 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 dcrlnd. 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.

Most of the automatically generated documentation for the LND RPC APIs is applicable to dcrlnd and can be found at api.lightning.community. The developer resources including talks, articles, and example applications are also relevant to dcrlnd and can be found at: dev.lightning.community.

For questions and discussions, all Decred communities can be found at:

https://decred.org/community

Installation

Knowledgeable users may use the quickstart guide.

For more detailed instructions, please see the installation instructions.

And a sample config file with annotated options is also available here.

Docker

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

Security

dcrlnd is now part of Decred's Bug Bounty Program on an experimental basis while we haven't yet deployed into mainnet.

Additionally, given the current nature of this work as a fork from the original lnd code, bugs that have been submitted to the upstream lnd project are not eligible for the bug bounty program unless the following points apply:

  • The bug affects a mainnet worthy release of dcrlnd;
  • The fix for the bug was not merged from the upstream repo while a substantial amount of upstream commits that are newer than the relevant one were merged;
  • The bug is not critical to lnd but it is to dcrlnd.

To submit dcrlnd bugs eligible for inclusion in the program, please visit the Bug Bounty Website and follow the instructions there.

Further reading

You can’t perform that action at this time.