No description, website, or topics provided.
Go Other
Switch branches/tags
Nothing to show
Clone or download
shesek Colored Coins support, rebased on top of lnd/master
 - lndcc: new package, provides ColorifyTx() & GetTxoData()

 - ln{wallet,channel}: disable miner fees for PoC simplification

 - btcwallet: load ColorData onto the Utxo set returned by ListUnspentWitness (via lndcc.GetTxoData)

 - lnwallet: modify coin selection to be color-aware (via ColorData), only use outputs of the globally-defined assetId (CC_ASSET_ID env var)

 - ln{wallet,channel}: colorify funding, commit and close txs
Latest commit 804e9ac Sep 18, 2016
Permalink
Failed to load latest commit information.
chainntnfs chainntnfs: remove unnecessary print statement in tests Sep 13, 2016
channeldb channeldb: add persistent invoice workflow Sep 17, 2016
cmd/lncli Add RPC to show current total available channel capacity #29 (#35) Sep 15, 2016
docker docker: revamp docker set up to allow for an LN test cluster Aug 29, 2016
elkrem elkrem: remove extra prints from serdes tests Jul 25, 2016
lndc lndc: remove extraneous prints from tests Jul 25, 2016
lndcc Colored Coins support, rebased on top of lnd/master Sep 18, 2016
lnrpc Add RPC to show current total available channel capacity #29 (#35) Sep 15, 2016
lnwallet Colored Coins support, rebased on top of lnd/master Sep 18, 2016
lnwire lncli: Add graphical output of routing table Sep 7, 2016
shachain multi: change all imports to roasbeef's forks May 15, 2016
uspv uspv: update to new upstream btcd api to fix compile errors May 23, 2016
.gitignore Add RPC to show current total available channel capacity #29 (#35) Sep 15, 2016
.travis.yml build: force 'go test' to build+test packages serially Sep 6, 2016
LICENSE add copyright, license and discouragement in readme Jan 16, 2016
README.md README: add travis svg badge showing build status Jul 28, 2016
config.go config: add an option to pass in a hex-encoded rpc cert (--rawrpccert) Aug 30, 2016
doc.go add some daemon related skeleton files Dec 26, 2015
fundingmanager.go Add RPC to show current total available channel capacity #29 (#35) Sep 15, 2016
glide.lock build: update glide files to pin against the master branch of roasbee… Sep 8, 2016
glide.yaml Colored Coins support, rebased on top of lnd/master Sep 18, 2016
htlcswitch.go lnd: properly execute force closures kicked off via RPC Sep 13, 2016
invoiceregistry.go lnd: introduce the InvoiceRegistry Jul 13, 2016
lnd.go lnwallet: add ability to trigger a force closure within channel state… Sep 13, 2016
lnd_test.go test: fix some minor typos, expand comments Sep 15, 2016
log.go lnd: introduce the utxoNursery which incubates outputs until maturity Sep 13, 2016
networktest.go Add RPC to show current total available channel capacity #29 (#35) Sep 15, 2016
networktest_test.go test: introduce a few networkHarness helper methods Aug 31, 2016
params.go lnd: properly switch RPC port with target net change Jul 14, 2016
peer.go lnd: avoid wiping a channel twice Sep 13, 2016
peer_test.go plasma: rough draft of peer struct Dec 20, 2015
rpcserver.go test: fix some minor typos, expand comments Sep 15, 2016
server.go rpcserver: allow targeting open channels via global lightning ID Sep 13, 2016
shell.go uspv: update to new upstream btcd api to fix compile errors May 23, 2016
signal.go create signal.go to handle SIGINT's Mar 23, 2016
utxonursery.go lnd: introduce the utxoNursery which incubates outputs until maturity Sep 13, 2016
version.go create version.go file Mar 23, 2016

README.md

lnd - Lightning Network Daemon

Build Status

This repo is preliminary work on a lightning network peer-to-peer node and wallet.

It's currently being tested on Segnet4, where malleability has been solved with segwit.

This version of Lnd is not yet fully-operational, but a proof of concept on Segnet4 will likely exist soon. The projection is it will be operational before the necessary malleability soft-forks are into bitcoin mainnet (may be significantly before if there are any delays in mainnet malleability fix).

Don't try to port it to mainnet or an altcoin and use it today! No really. Lightning transactions will be fast, but for now, please wait just a little bit.

Installation

  • In order to build form source, the following build dependancies are required:
    • Go 1.5 or 1.6

      Installation instructions can be found here: http://golang.org/doc/install. It is recommended to add $GOPATH/bin to your PATH at this point. Note: If you are building with Go 1.5, then you'll need to enable the vendor experiment by setting the GO15VENDOREXPERIMENT environment variable to 1. If you're using Go 1.5, then it is safe to skip this step.

    • Glide

      This project uses Glide to manage depdnancies as well as to provide reproducable builds. To install Glide, execute the following command (assumes you already have Go properly installed):

      $ go get -u github.com/Masterminds/glide

With the prelimnary steps completed, to install lnd, lncli, and all related depenancies run the following commands:

$ git clone https://github.com/lightningnetwork/lnd $GOPATH/src/github.com/lightningnetwork/lnd
$ cd $GOPATH/src/github.com/lightningnetwork/lnd
$ glide install
$ go install . ./cmd/...

Updating

To update your version of lnd to the latest version run the following commands:

$ cd $GOPATH/src/github.com/lightningnetwork/lnd
$ git pull && glide install
$ go install . ./cmd/...

Packages and Utilities

chainntfs

A package centered around a generic interface for receiving transaction/confirmation based notifications concerning the blockchain. Such notifications are required in order for pending payment channels to be notified once the funding transaction gains a specified number of confirmations, and in order to catch a counter-party attempting a non-cooperative close using a past commitment transaction to steal funds.

At the moment, it only has a single concrete implementation: using btcd's websockets notifications. However, more implementations of the interface are planned, such as electrum, polling via JSON-RPC, Bitcoin Core's ZeroMQ notifications, and more.

channeldb

lnd's primary datastore. It uses a generic interface defined in walletdb allowing for usage of any storage backend which adheres to the interface. The current concrete implementation used is driven by bolt. channeldb is responsible for storing state such as meta-data concerning the current open channels, closed channels, past routes we used, fee schedules within the network, and information about remote peers (ID, uptime, reputation, etc).

cmd / lncli

A command line to query and control a running lnd. Similar to bitcoin-cli

cmd / lnshell

Interactive shell for commands to direct the lnd node. Will probably be merged into lnd soon as a command line option.

elkrem

Library to send and receive a tree structure of hashes which can be sequentially revealed. If you want to send N secrets, you only need to send N secrets (no penalty there) but the receiver only needs to store log2(N) hashes, and can quickly compute any previous secret from those.

This is useful for the hashed secrets in LN payment channels.

lndc

Library for authenticated encrypted communication between LN nodes. It uses chacha20_poly1305 for the symmetric cipher, and the secp256k1 curve used in bitcoin for public keys. No signing is used, only two ECDH calculations: first with ephemeral key pairs and second with persistent identifying public keys.

lnrpc

lnd's RPC interface. Currently gRPC, a high-performance RPC framework is used. gRPC provides features such as a stub-based client interface in several languages, streaming RPCs, payload agnostic request/response handling, and more. In addition to gRPC, lnd will also offer a basic REST-based http RPC interface. For now, connections are not encrypted, or authenticated. For authentication, macaroons will likely be integrated due to their simplicity, flexibility, and expressiveness.

lnstate

In-progress update which improves current implementation of channel state machine to allow for higher throughput.

lnwallet

An application specific, yet general Bitcoin wallet which understands all the fancy script, and transaction formats needed to transact on the Lightning Network. The interface, and interaction with the core wallet logic has been designed independent of any peer-to-peer communication. The goal is to make lnwallet self-contained, and easily embeddable within future projects interacting with the Lightning Network. The current state machine for channel updates is blocking, only allowing one pending update at a time. This will soon be replaced in favor of the highly concurrent, non-blocking state machine within lnstate.

lnwire

Library of messages for Lightning Network node to node communications. Messages for opening and closing channels, as well as updating and revoking channel states are described here.

shachain

An implementation of Rusty Russell's 64-dimensional shachain.

uspv

Wallet library to connect to bitcoin nodes and build a local SPV and wallet transaction state.