Skip to content

Commit

Permalink
GitBook: [lightninglabs#173] add videos!
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo Weese authored and gitbook-bot committed Dec 8, 2021
1 parent 8f8c646 commit dd88855
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 33 deletions.
17 changes: 12 additions & 5 deletions lapps/guides/polar-lapps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@ description: >-

# Use Polar to Build Your First LAPP

{% page-ref page="local-cluster-setup-with-polar.md" %}

{% page-ref page="run-the-completed-app.md" %}

{% page-ref page="run-the-app-without-lnd.md" %}
{% content-ref url="local-cluster-setup-with-polar.md" %}
[local-cluster-setup-with-polar.md](local-cluster-setup-with-polar.md)
{% endcontent-ref %}

{% content-ref url="run-the-completed-app.md" %}
[run-the-completed-app.md](run-the-completed-app.md)
{% endcontent-ref %}

{% content-ref url="run-the-app-without-lnd.md" %}
[run-the-app-without-lnd.md](run-the-app-without-lnd.md)
{% endcontent-ref %}

{% embed url="https://www.youtube.com/watch?v=6P0DZ74DmFA" %}
Video: Build Bitcoin into Your App: Getting Started with the Lightning Network
{% endembed %}
6 changes: 5 additions & 1 deletion lightning-network-tools/lnd/amp.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ For a shard of size two this can be simplified as follows, with k being the prei

The information necessary for the recipient node to generate the correct preimages and reveal them to claim their payments is passed on in encrypted form as part of the Onion TLV (Type Length Value). This removes the need for additional interaction between the payer and the payee beyond transmitting a node public key or an invoice.

## Get your node ready for AMPs <a href="docs-internal-guid-0aff8c2e-7fff-3644-f0f2-cf0efff90d43" id="docs-internal-guid-0aff8c2e-7fff-3644-f0f2-cf0efff90d43"></a>
{% embed url="https://www.youtube.com/watch?v=PNSPXRflCSc" %}
Video: Get AMPed: Making Atomic Multi-Path Payments
{% endembed %}

## Get your node ready for AMPs <a href="#docs-internal-guid-0aff8c2e-7fff-3644-f0f2-cf0efff90d43" id="docs-internal-guid-0aff8c2e-7fff-3644-f0f2-cf0efff90d43"></a>

To be able to make and send Atomic Multi-path Payments, you will need to upgrade your node to [LND 0.13 or above](https://github.com/lightningnetwork/lnd/releases).

Expand Down
38 changes: 21 additions & 17 deletions lightning-network-tools/lnd/run-lnd.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ description: >-

The Lightning Network Daemon (LND) is a complete implementation of a Lightning Network node. That means that LND is able to perform all actions necessary to participate and interact with all aspects of the Lightning Network and its nodes. It fully complies with all Lightning Network specifications (BOLTs) [as described here](https://github.com/lightningnetwork/lightning-rfc/blob/master/00-introduction.md). As these specifications are currently rapidly evolving, so is LND.

## Part 1: Installation <a href="docs-internal-guid-ff85e2ff-7fff-ef9c-0f05-8da12a86ea43" id="docs-internal-guid-ff85e2ff-7fff-ef9c-0f05-8da12a86ea43"></a>
## Part 1: Installation <a href="#docs-internal-guid-ff85e2ff-7fff-ef9c-0f05-8da12a86ea43" id="docs-internal-guid-ff85e2ff-7fff-ef9c-0f05-8da12a86ea43"></a>

There are multiple methods for getting LND running on your machine. Your choice will depend on your requirements, the purpose of the installation, your technical expertise, your hardware, security needs and comfort with various tools.

Your requirements and dependencies will vary between installation types, as will the effort to maintain them.

{% embed url="https://www.youtube.com/watch?v=rf-GvVYuWa8" %}
Video: RUN LND: Building a Node from Scratch
{% endembed %}

### System requirements

LND generally has low system requirements and performs well on small single-board devices with 2 GiB and a CPU with over 1 GHz quad core, such as a Raspberry Pi. Generally the system requirements for Bitcoind are higher than those for LND. A 64-bit architecture is strongly recommended, as a large (>2GB) `channel.db`on 32-bit systems can lead to a system halt. Due to the frequent read and write operations LND should **not** be run from an SD card, but ideally a high-performing SSD.
Expand Down Expand Up @@ -44,15 +48,15 @@ You can use the file manager or command line, but may have to create this direct

Congratulations, you have successfully installed LND using the binary release. [Jump to: Configuring LND](run-lnd.md#docs-internal-guid-f1be3c4d-7fff-b4f7-e6cd-ce2c32ba2d86)

### Installing Lightning via Docker <a href="docs-internal-guid-fe99d99a-7fff-2f7a-022e-4fab339d71f9" id="docs-internal-guid-fe99d99a-7fff-2f7a-022e-4fab339d71f9"></a>
### Installing Lightning via Docker <a href="#docs-internal-guid-fe99d99a-7fff-2f7a-022e-4fab339d71f9" id="docs-internal-guid-fe99d99a-7fff-2f7a-022e-4fab339d71f9"></a>

For those familiar with Docker, or those interested in easily running a variety of software alongside each other, the Docker installation is a convenient and quick way to get started with lightning.

To install LND via Docker you will need `docker`, `make` and `bash` on your system. You can install lnd with the following commands:

`git clone https://github.com/lightningnetwork/lnd `\
`cd lnd `\
`git checkout <latest-release> `\
`git clone https://github.com/lightningnetwork/lnd` \
`cd lnd` \
`git checkout <latest-release>` \
`make docker-release tag=<latest-release>`

You are now able to find the binaries in the directory lnd\<latest-release> for your use. Congratulations, [jump to: Configuring LND](run-lnd.md#docs-internal-guid-f1be3c4d-7fff-b4f7-e6cd-ce2c32ba2d86)
Expand All @@ -65,7 +69,7 @@ Installing LND from source is recommended when using it in development or on tes
You can find the latest version of Golang [on its official website](https://golang.org/dl/). Make sure to verify the checksum before you install Go.

You can now install go with the command:\
`tar -C /usr/local -xzf go[version].linux-[platform].tar.gz `\
`tar -C /usr/local -xzf go[version].linux-[platform].tar.gz` \
`export PATH=$PATH:/usr/local/go/bin`

**Installing Go on MacOS**\
Expand All @@ -74,19 +78,19 @@ To install, simply run the command:\

**Set your Go path**\
To ensure that the command go refers to the correct path, you will need to set your Go path:\
`export GOPATH=~/gocode `\
`export GOPATH=~/gocode` \
`export PATH=$PATH:$GOPATH/bin`

**Installing LND**\
We can now install LND. We can run the following command from our home directory:\
`git clone https://github.com/lightningnetwork/lnd `\
`cd lnd `\
`git checkout [version] `\
`git clone https://github.com/lightningnetwork/lnd` \
`cd lnd` \
`git checkout [version]` \
`make install tags="autopilotrpc chainrpc invoicesrpc routerrpc signrpc walletrpc watchtowerrpc wtclientrpc"`

LND is now installed from source.

## Part 2: Configuring LND <a href="docs-internal-guid-f1be3c4d-7fff-b4f7-e6cd-ce2c32ba2d86" id="docs-internal-guid-f1be3c4d-7fff-b4f7-e6cd-ce2c32ba2d86"></a>
## Part 2: Configuring LND <a href="#docs-internal-guid-f1be3c4d-7fff-b4f7-e6cd-ce2c32ba2d86" id="docs-internal-guid-f1be3c4d-7fff-b4f7-e6cd-ce2c32ba2d86"></a>

### Bitcoin

Expand Down Expand Up @@ -147,7 +151,7 @@ When starting lnd with neutrino, you will need to set the following flags:`--bit

To make your node available as a routing node, you will need to listen to incoming connections. In your [lnd.conf configuration file](https://github.com/lightningnetwork/lnd/blob/master/sample-lnd.conf), include the following lines:

`listen=0.0.0.0:9735 `\
`listen=0.0.0.0:9735` \
`listen=[::1]:9736`

This will allow your node to listen on all IPv4 (port 9735) and IPv6 (port 9736) interfaces.
Expand All @@ -162,15 +166,15 @@ Be aware of any firewall that might be enabled on your system, for example by us

Using a firewall is a great idea, although the ports defined above need to remain accessible:

`sudo ufw status `\
`sudo ufw allow OpenSSH `\
`sudo ufw status` \
`sudo ufw allow OpenSSH` \
`sudo ufw allow 9735`

#### Other available configurations

There are plenty of options to configure lnd. Have a look at the [sample lnd.conf file here](https://github.com/lightningnetwork/lnd/blob/master/sample-lnd.conf) and read our article on the optimal configuration for your node.

## Part 3: Running LND <a href="docs-internal-guid-9df27c7d-7fff-522a-838a-a42710fe3e75" id="docs-internal-guid-9df27c7d-7fff-522a-838a-a42710fe3e75"></a>
## Part 3: Running LND <a href="#docs-internal-guid-9df27c7d-7fff-522a-838a-a42710fe3e75" id="docs-internal-guid-9df27c7d-7fff-522a-838a-a42710fe3e75"></a>

Now that we have LND installed and configured with its Bitcoin backend we may start it for the first time.

Expand Down Expand Up @@ -245,8 +249,8 @@ If you are running LND in a docker container, you can upgrade this container as

First navigate to the local copy of the lnd github repository, for example with `cd lnd`. Then execute the following commands:

`git pull `\
`git checkout <latest-release> `\
`git pull` \
`git checkout <latest-release>` \
`make docker-release tag=<latest-release>`

You can now start lnd again, unlock the wallet and verify you are using the correct version with `lncli version`.
Expand Down
24 changes: 14 additions & 10 deletions the-lightning-network/liquidity/manage-liquidity.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: >-

# Managing Liquidity on the Lightning Network

## On-chain Bitcoin <a href="docs-internal-guid-f32642c8-7fff-bda4-5003-3937885e00bc" id="docs-internal-guid-f32642c8-7fff-bda4-5003-3937885e00bc"></a>
## On-chain Bitcoin <a href="#docs-internal-guid-f32642c8-7fff-bda4-5003-3937885e00bc" id="docs-internal-guid-f32642c8-7fff-bda4-5003-3937885e00bc"></a>

The liquidity of on-chain bitcoin is predictable. Bitcoin exists in the form of UTXOs, which are unspent outputs from a previous transaction. To spend bitcoin, you need to receive or mine them first, but generally, they can be moved by the owner at any time.

Expand All @@ -15,7 +15,7 @@ On-chain bitcoin require multiple confirmations by the Bitcoin network to be con
Your Lightning node is able to receive and send on-chain bitcoin.

* `lncli newaddress` Generate a new Bitcoin address
* `lncli walletbalance `Check your balance.
* `lncli walletbalance` Check your balance.
* `lncli sendcoins` Send Bitcoin from this wallet

This command follows the format `lncli sendcoins [command options] addr amt`
Expand Down Expand Up @@ -65,7 +65,7 @@ Useful tips:
Example usage:

* `lncli openchannel 021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d 1000000`
* `lncli openchannel --sat_per_byte 21 --local-amt 800000 --close_address bc1qsltz4tt23k0825q76ylj5mt0gwenlm8wr7umkl 021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d `
* `lncli openchannel --sat_per_byte 21 --local-amt 800000 --close_address bc1qsltz4tt23k0825q76ylj5mt0gwenlm8wr7umkl 021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d`&#x20;

To see if your channel is pending confirmation, you can use the command `lncli pendingchannels`.

Expand All @@ -91,13 +91,13 @@ You are able to charge fees for routing payments. You can use the command `lncli

By default, your fee policy may look something like this:

&#x20; ` {`\
` "chan_id": "739918549049147393",`\
` "channel_point": "3ebdb34f1fc1948b5b49d127b52b19d24549779661af03a691cf934aa3b86e3f:1",`\
` "base_fee_msat": "1000",`\
` "fee_per_mil": "1",`\
` "fee_rate": 0.000001`\
` }`
&#x20; `{`\
&#x20; `"chan_id": "739918549049147393",`\
&#x20; `"channel_point": "3ebdb34f1fc1948b5b49d127b52b19d24549779661af03a691cf934aa3b86e3f:1",`\
&#x20; `"base_fee_msat": "1000",`\
&#x20; `"fee_per_mil": "1",`\
&#x20; `"fee_rate": 0.000001`\
&#x20; `}`

This means to route payments through this channel, your node will charge 1,000 milli-satoshi (1 satoshi), plus 1 milli-satoshi per million milli-satoshi (`fee_rate` times one million equals fee\_per\_mil). So when routing a payment of 10,000 satoshi, you will earn 1.01 satoshi in fees. This fee policy is applied to all outgoing payments, meaning you will only earn the fee as it is passed on. The fee policy on the incoming channel is decided by that peer. As a rule of thumb, you decide on the fee policy of your capital.

Expand Down Expand Up @@ -206,3 +206,7 @@ Private channels may also bind your capital. Typically, they are created by paym
Example usage:

`lncli closechannel --funding_txid 83b5a55b21255915dbc0d005230b2c026a004c839edaa716247b96b66490c66a --output_index 1 --sat_per_byte 20 --delivery_addr bc1q6tcemsjadwgt938gkrmcqyvt79wxla42js8r4l`

{% embed url="https://www.youtube.com/watch?v=LRZy-VtCPe4" %}
`Video:` Lightning 101: Node Profitability feat PLEBNET
{% endembed %}

0 comments on commit dd88855

Please sign in to comment.