Difference between revisions of "Lnd"

From lightningwiki.net
Jump to navigation Jump to search
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Stub}}
= About =
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.


= About =
[[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.  
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.  


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.  
{{ALERT|Go version: There are very significant performance issues with LND on 1.12, so stay at 1.11.5 for the time being. }}


= Howto =
= Howto =
{{HELP|Add more pages with HOWTOs, or links to HOWTOs}}
* LND Node on Windows: https://medium.com/@martinschrer/installing-a-mainnet-lnd-node-on-windows-and-accessing-it-on-an-iphone-da1e63a613cb
* LND Node on Windows: https://medium.com/@martinschrer/installing-a-mainnet-lnd-node-on-windows-and-accessing-it-on-an-iphone-da1e63a613cb
* Lnd + Zap on bitcoind [https://medium.com/lightning-power-users/windows-macos-lightning-network-284bd5034340 medium post by Pierre Rochard]
* Lnd + Zap on bitcoind [https://medium.com/lightning-power-users/windows-macos-lightning-network-284bd5034340 medium post by Pierre Rochard]
Line 12: Line 13:
* [[Using Autopilot on LND]]
* [[Using Autopilot on LND]]
* [https://github.com/lightningnetwork/lnd/tree/master/docker Set up lnd on Docker]
* [https://github.com/lightningnetwork/lnd/tree/master/docker Set up lnd on Docker]
* [https://github.com/Stadicus/guides/blob/master/raspibolt/README.md Beginner’s Guide to Lightning on a Raspberry Pi by Stadicus]
= Configuring lnd =
Sample config: https://github.com/lightningnetwork/lnd/blob/master/sample-lnd.conf
== Sample bitcoind config ==
Working bitcoind config.
<pre>
listen=1
maxconnections=200
server=1
rpcuser=username
rpcpassword=secret
rpcport=8332
datadir=/hdd/bitcoin
daemon=1
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333
timeout=15000
</pre>
= Updating to a specific tag =
If you build from source, go to the src dir and do:
# stop lnd (lncli stop)
# cd $GOPATH/src/github.com/lightningnetwork/lnd
# git fetch --tags
# git checkout v0.7-beta
# make
# make install
= Sample startup script =
If you do not want, or cannot use a config file, you can use a startup script. The script below starts lnd and asks for your unlock password:
<pre>
#!/bin/bash
lncli stop
for i in {1..10}; do
  echo -n .
  sleep 0.4
done
killall lnd
sleep 1
nohup /root/gocode/bin/lnd \
  --maxpendingchannels=30 \
  --alias="Node.lightningnode.eu" \
  --color=#381793 \
  --bitcoin.active \
  --bitcoin.mainnet \
  --debuglevel=info \
  --minchansize=500000 \
  --restlisten=10.0.60.18:8080 \
  --bitcoin.node=bitcoind \
  --bitcoind.rpcuser=rpcXXX \
  --bitcoind.rpcpass=pass \
  --bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332 \
  --bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333 \
  --watchtower.active \
  --watchtower.externalip=1.2.3.4  \
  --externalip=1.2.3.4 \
>> /var/log/lnd.log &
#  --wtclient.private-tower-uris=xxx@1.1.1.1:9911 \
for i in {1..10}; do
  echo -n .
  sleep 0.2
done


= Links / resources =
lncli unlock
</pre>
 
= Resources =
{{HELP|Add more links}}
* [https://github.com/lightningnetwork/lnd LND github]
* [https://github.com/lightningnetwork/lnd LND github]
* [https://api.lightning.community/rest/index.html#v1-getinfo API Reference]
* [https://api.lightning.community/rest/index.html#v1-getinfo API Reference]
* [https://dev.lightning.community/ DEV site]
* [https://dev.lightning.community/ DEV site]
[[Category:Node implementations]]

Latest revision as of 09:53, 12 October 2019

About

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.

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.

Error creating thumbnail: File missing
Alert! Be careful!
Go version: There are very significant performance issues with LND on 1.12, so stay at 1.11.5 for the time being.

Howto

Error creating thumbnail: File missing
Please help by adding more information. Suggestion:
Add more pages with HOWTOs, or links to HOWTOs

Configuring lnd

Sample config: https://github.com/lightningnetwork/lnd/blob/master/sample-lnd.conf

Sample bitcoind config

Working bitcoind config.

listen=1
maxconnections=200
server=1
rpcuser=username
rpcpassword=secret
rpcport=8332
datadir=/hdd/bitcoin
daemon=1
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333
timeout=15000

Updating to a specific tag

If you build from source, go to the src dir and do:

  1. stop lnd (lncli stop)
  2. cd $GOPATH/src/github.com/lightningnetwork/lnd
  3. git fetch --tags
  4. git checkout v0.7-beta
  5. make
  6. make install

Sample startup script

If you do not want, or cannot use a config file, you can use a startup script. The script below starts lnd and asks for your unlock password:

#!/bin/bash
lncli stop

for i in {1..10}; do
  echo -n .
  sleep 0.4
done
killall lnd
sleep 1

nohup /root/gocode/bin/lnd \
  --maxpendingchannels=30 \
  --alias="Node.lightningnode.eu" \
  --color=#381793 \
  --bitcoin.active \
  --bitcoin.mainnet \
  --debuglevel=info \
  --minchansize=500000 \
  --restlisten=10.0.60.18:8080 \
  --bitcoin.node=bitcoind \
  --bitcoind.rpcuser=rpcXXX \
  --bitcoind.rpcpass=pass \
  --bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332 \
  --bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333 \
  --watchtower.active \
  --watchtower.externalip=1.2.3.4  \
  --externalip=1.2.3.4 \
>> /var/log/lnd.log &

#   --wtclient.private-tower-uris=xxx@1.1.1.1:9911 \

for i in {1..10}; do
  echo -n .
  sleep 0.2
done

lncli unlock

Resources

Error creating thumbnail: File missing
Please help by adding more information. Suggestion:
Add more links