Skip to content

Commit 8f35af0

Browse files
Leo Weesegitbook-bot
Leo Weese
authored andcommitted
GitBook: [#196] No subject
1 parent f4e3d89 commit 8f35af0

27 files changed

+39
-41
lines changed
Loading
Loading
Loading

.gitbook/assets/receiving (1) (1).png

158 KB
Loading

.gitbook/assets/routing (1) (1).png

158 KB
Loading

.gitbook/assets/sending (1) (1).png

158 KB
Loading
Loading
Loading
Loading

.gitbook/assets/swap1 (1) (1).png

28 KB
Loading

.gitbook/assets/swap2 (1) (1).png

105 KB
Loading

.gitbook/assets/swap3 (1) (1).png

144 KB
Loading

.gitbook/assets/swap4 (1) (1).png

126 KB
Loading

.gitbook/assets/swap5 (1) (1).png

49.1 KB
Loading

.gitbook/assets/swap6 (1) (1).png

120 KB
Loading

.gitbook/assets/swap7 (1) (1).png

58.4 KB
Loading

.gitbook/assets/swap8 (1) (1).png

56.7 KB
Loading

lapps/guides/polar-lapps/run-the-app-without-lnd.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,33 @@ Open your browser to [http://localhost:3000](http://localhost:3000) if it doesn
1515

1616
If all went well with your development environment setup, you should see the initial screen below:
1717

18-
![](<../../../.gitbook/assets/preLND01 (1) (1) (1) (1).png>)
18+
![](<../../../.gitbook/assets/preLND01 (1) (1) (1).png>)
1919

2020
Click on the **Create a Post** button to go to the Create screen.
2121

22-
![](<../../../.gitbook/assets/preLND02 (1) (1).png>)
22+
![](<../../../.gitbook/assets/preLND02 (1).png>)
2323

2424
Fill in some info for the _Username_, _Title_, and _Content_ fields, then click on the **Submit** button. You will be redirected back to the screen displaying the list of posts.
2525

26-
![](<../../../.gitbook/assets/preLND03 (1).png>)
26+
![](../../../.gitbook/assets/preLND03.png)
2727

2828
Add a couple more posts, just to have some data to play with.
2929

30-
![](<../../../.gitbook/assets/preLND04 (1).png>)
30+
![](../../../.gitbook/assets/preLND04.png)
3131

3232
Click on the **Upvote** button on a post to see the votes counter increment and the posts reorder based on which has the highest votes.
3333

34-
![](<../../../.gitbook/assets/preLND05 (1).png>)
34+
![](../../../.gitbook/assets/preLND05.png)
3535

3636
The app makes use of WebSockets to update the UI in real-time when posts are created and upvoted on the backend. To see this in action, open a second browser window side-by-side with the first window. Create a new post on the left to see it automatically appear on the right. Upvote a post on the right to see it increment and reorder on the left automatically.
3737

38-
![](<../../../.gitbook/assets/preLND06 (1).png>)
38+
![](../../../.gitbook/assets/preLND06.png)
3939

4040
## Architecture
4141

4242
This application is split into two parts, the backend API server and the frontend browser-based UI.
4343

44-
![](<../../../.gitbook/assets/appArchitecture (1).png>)
44+
![](../../../.gitbook/assets/appArchitecture.png)
4545

4646
### Backend API
4747

lightning-network-tools/faraday/get-started.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
description: Install and run faraday and frcli
33
---
44

5-
# Get Started
5+
# 🛠 Get Started
66

7-
## Installation <a href="docs-internal-guid-83e367ac-7fff-1ea9-0a8d-a1444b90286f" id="docs-internal-guid-83e367ac-7fff-1ea9-0a8d-a1444b90286f"></a>
7+
## Installation <a href="#docs-internal-guid-83e367ac-7fff-1ea9-0a8d-a1444b90286f" id="docs-internal-guid-83e367ac-7fff-1ea9-0a8d-a1444b90286f"></a>
88

99
Faraday comes bundled in Lightning Terminal. Meaning if you have Lightning Terminal installed, you can already access Faraday through the command line and you may skip the step below. If you want to install Lightning Terminal, [follow this guide](../lightning-terminal/).
1010

lightning-network-tools/lightning-terminal/command-line-interface.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ To make use of these tools as seen in the examples below:
2020

2121
## litcli <a href="#docs-internal-guid-50d3e658-7fff-9d98-fc94-56686082029b" id="docs-internal-guid-50d3e658-7fff-9d98-fc94-56686082029b"></a>
2222

23-
`litcli --lndtlscertpath ~/.lit/tls.cert sessions add --label="My LNC"` --expiry 7776000
23+
`litcli --lndtlscertpath ~/.lit/tls.cert sessions add --label="My LNC" --expiry 7776000 --type admin`
2424

25-
By default, a pairing phrase created with `litcli` is valid for only 1h. You may extend this with the `--expiry <seconds>` flag.
25+
By default, a pairing phrase created with `litcli` is valid for only 1h and is set to "readonly", meaning invoices cannot be paid or created and channels cannot be opened. You may extend this with the `--expiry <seconds>` and `--type` flags.
2626

2727
## pool
2828

lightning-network-tools/lightning-terminal/get-lit.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: >-
44
integrated or remote mode.
55
---
66

7-
# Get litd
7+
# 🛠 Get litd
88

99
You can install `litd` from source or via the provided binary. If you are running LND as part of a software bundle like Umbrel, `litd` might already be installed on your node.
1010

lightning-network-tools/lnd/run-lnd.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: >-
44
first steps in the Lightning Network.
55
---
66

7-
# Get Started
7+
# 🛠 Get Started
88

99
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.
1010

lightning-network-tools/loop/get-started.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
description: Install and run Loop
33
---
44

5-
# Get Started
5+
# 🛠 Get Started
66

77
## Install Loop <a href="#docs-internal-guid-a15d1019-7fff-cd65-8961-f4145a3bd0d5" id="docs-internal-guid-a15d1019-7fff-cd65-8961-f4145a3bd0d5"></a>
88

9-
Loop comes bundled with [Lightning Terminal](../lightning-terminal/). Meaning, if you have Lightning Terminal installed, you can already access Loop through the command line and you may skip the step below.&#x20;
9+
Loop comes bundled with [Lightning Terminal](../lightning-terminal/). Meaning, if you have Lightning Terminal installed, you can already access Loop through the command line and you may skip the step below.
1010

1111
\[[Follow this guide to install Lightning Terminal](../lightning-terminal/get-lit.md)]
1212

lightning-network-tools/pool/install.md

+13-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# Installation
1+
# 🛠 Installation
22

33
## Installation
44

5-
Lightning Pool is built very similarly to [Lightning Loop](https://github.com/lightninglabs/loop): There is a process that is constantly running in the background, called the trader daemon \(`poold`\) and a command line tool to interact with the daemon, called just `pool`.
5+
Lightning Pool is built very similarly to [Lightning Loop](https://github.com/lightninglabs/loop): There is a process that is constantly running in the background, called the trader daemon (`poold`) and a command line tool to interact with the daemon, called just `pool`.
66

7-
The `poold` trader daemon can be run either as a standalone binary connected to a compatible `lnd` node or integrated into [Lightning Terminal \(LiT\)](https://github.com/lightninglabs/lightning-terminal).
7+
The `poold` trader daemon can be run either as a standalone binary connected to a compatible `lnd` node or integrated into [Lightning Terminal (LiT)](https://github.com/lightninglabs/lightning-terminal).
88

99
### Downloading the standalone binaries
1010

1111
The latest official release binaries can be [downloaded from the GitHub releases page](https://github.com/lightninglabs/pool/releases).
1212

13-
### Downloading as part of Lightning Terminal \(LiT\)
13+
### Downloading as part of Lightning Terminal (LiT)
1414

1515
To run `poold` integrated into the Lightning Terminal, download [the latest release of LiT](https://github.com/lightninglabs/lightning-terminal/releases) and follow [the installation instructions of LiT](https://github.com/lightninglabs/lightning-terminal#execution)
1616

@@ -20,7 +20,7 @@ To build both the `poold` and `pool` binaries from the source code, at least the
2020

2121
To download the code, compile and install it, the following commands can then be run:
2222

23-
```text
23+
```
2424
$ git clone https://github.com/lightninglabs/pool
2525
$ cd pool
2626
$ make install
@@ -34,15 +34,15 @@ Lightning Pool needs to be connected to an `lnd` node version `v0.11.1-beta` or
3434

3535
[Installing `lnd` from source](https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md#installing-lnd) is also possible but needs to be done **with all sub-server build flags enabled**:
3636

37-
```text
37+
```
3838
$ make install tags="signrpc walletrpc chainrpc invoicesrpc"
3939
```
4040

4141
### Running `poold`
4242

4343
If `lnd` is configured with the default values and is running on the same machine, `poold` will be able to connect to it automatically and can be started by simply running:
4444

45-
```text
45+
```
4646
$ poold
4747
4848
# Or if you want to do everything in the same terminal and run poold in the
@@ -58,17 +58,17 @@ In the case that `lnd` is running on a remote node, the `tls.cert` and the `admi
5858

5959
The daemon can then be configured to connect to the remote `lnd` node by using the following command line flags:
6060

61-
```text
61+
```
6262
$ poold --lnd.host=<the_remote_host_IP_address>:10009 \
6363
--lnd.macaroonpath=/some/directory/with/lnd/data/macaroons/admin.macaroon \
6464
--lnd.tlspath=/some/directory/with/lnd/data/tls.cert
6565
```
6666

6767
To persist this configuration, these values can also be written to a configuration file, located in `~/.pool/<network>/poold.conf`, for example:
6868

69-
> ~/.pool/mainnet/poold.conf
69+
> \~/.pool/mainnet/poold.conf
7070
>
71-
> ```text
71+
> ```
7272
> lnd.host=<the_remote_host_IP_address>:10009
7373
> lnd.macaroonpath=/some/directory/with/lnd/data/macaroons/admin.macaroon
7474
> lnd.tlspath=/some/directory/with/lnd/data/tls.cert
@@ -80,9 +80,9 @@ There is a range of operational settings that can be set to change the default l
8080
8181
The following list only includes flags that have an impact on the match making or business related behavior of the Pool trader daemon:
8282
83-
| Flag | Required | Default Value | Description |
84-
| :--- | :--- | :--- | :--- |
85-
| `newnodesonly` | No | `false` | If set to `true` the daemon will only buy channels from nodes it does not yet have channels with |
83+
| Flag | Required | Default Value | Description |
84+
| -------------- | -------- | ------------- | ------------------------------------------------------------------------------------------------ |
85+
| `newnodesonly` | No | `false` | If set to `true` the daemon will only buy channels from nodes it does not yet have channels with |
8686
8787
## Authentication and transport security
8888
@@ -95,4 +95,3 @@ The `pool` command will pick up these file automatically on mainnet if no custom
9595
For more information on macaroons, [see the macaroon documentation of lnd.](https://github.com/lightningnetwork/lnd/blob/master/docs/macaroons.md)
9696
9797
**NOTE**: pool's macaroons are independent from `lnd`'s. The same macaroon cannot be used for both `poold` and `lnd`.
98-

the-lightning-network/liquidity/understanding-liquidity.md

+7-8
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ description: >-
44
and how you can optimize your node's liquidity.
55
---
66

7-
# Understanding Liquidity
7+
# Understanding Liquidity
88

99
In the context of the Lightning Network, liquidity refers to the ability to move funds between participants on the network. Correctly defining and [managing liquidity](manage-liquidity.md) can be complex on the Lightning Network, but this complexity is rewarded by the more fluid movement of value in comparison to other systems or networks.
1010

11-
The same satoshis held in our node may both provide liquidity to us while simultaneously consuming the liquidity of others \(or vice versa\). In general, we should expect to be compensated for providing liquidity while paying others to provide us with liquidity. Such arrangements should be mutually beneficial. But, one of the biggest challenges of the Lightning Network is appropriately pricing liquidity and building a reliable and efficient market around it.
11+
The same satoshis held in our node may both provide liquidity to us while simultaneously consuming the liquidity of others (or vice versa). In general, we should expect to be compensated for providing liquidity while paying others to provide us with liquidity. Such arrangements should be mutually beneficial. But, one of the biggest challenges of the Lightning Network is appropriately pricing liquidity and building a reliable and efficient market around it.
1212

1313
## On-chain liquidity
1414

15-
The liquidity of on-chain bitcoin is likely the easiest to understand. An on-chain bitcoin transaction can be moved at any time for a predictable, but varying fee. This proposed fee does not guarantee the inclusion in a block, but rather represents a bid in a perpetual auctioning process in which miners pick the highest fee paying ~2MB worth of transactions from the mempool. They are included in a block, which are created on average every 10 minutes.
15+
The liquidity of on-chain bitcoin is likely the easiest to understand. An on-chain bitcoin transaction can be moved at any time for a predictable, but varying fee. This proposed fee does not guarantee the inclusion in a block, but rather represents a bid in a perpetual auctioning process in which miners pick the highest fee paying \~2MB worth of transactions from the mempool. They are included in a block, which are created on average every 10 minutes.
1616

17-
Some on-chain transactions, such as unilateral channel closures \(also called force closes\), have their own unique liquidity properties. Typically, the party initiating the force close will have to wait to spend their bitcoin, while the other side can spend their funds immediately. The length of the waiting period is defined when the channel is opened. It can range from just a day to a few weeks.
17+
Some on-chain transactions, such as unilateral channel closures (also called force closes), have their own unique liquidity properties. Typically, the party initiating the force close will have to wait to spend their bitcoin, while the other side can spend their funds immediately. The length of the waiting period is defined when the channel is opened. It can range from just a day to a few weeks.
1818

19-
Such force closes may be the only way to retrieve funds from an “illiquid” channel if a peer hasn’t been online for a while. They could also be requested by the peer in case of data loss \([see static channel backup](understanding-liquidity.md)\) or they may be the result of a HTLC that has to be settled on-chain.
19+
Such force closes may be the only way to retrieve funds from an “illiquid” channel if a peer hasn’t been online for a while. They could also be requested by the peer in case of data loss ([see static channel backup](understanding-liquidity.md)) or they may be the result of a HTLC that has to be settled on-chain.
2020

2121
## Different nodes for different purposes
2222

@@ -34,7 +34,7 @@ For a node that is solely used for making payments, it may be appropriate to ope
3434

3535
At times, your channels will need to be replenished. It might be most cost effective to fill your channels directly via the Lightning Network, for example by earning satoshis or withdrawing BTC from exchanges using Lightning.
3636

37-
Alternatively, [Lightning Loop](https://lightning.engineering/loop/) is a service that allows you to send on-chain Bitcoin directly into a Lightning channel \(Loop In\). [Loop](../../lightning-network-tools/loop/) can help manage channel liquidity for those using Lightning for payments by allowing them to stay connected to the network, instead of requiring them to open new channels.
37+
Alternatively, [Lightning Loop](https://lightning.engineering/loop/) is a service that allows you to send on-chain Bitcoin directly into a Lightning channel (Loop In). [Loop](../../lightning-network-tools/loop/) can help manage channel liquidity for those using Lightning for payments by allowing them to stay connected to the network, instead of requiring them to open new channels.
3838

3939
### Receiving funds
4040

@@ -62,11 +62,10 @@ Such private channels however can be a great source of routing income, especiall
6262

6363
There are other cases where a routing node provides liquidity to others by locking up or committing its funds in channels with others.
6464

65-
A node set up primarily to receive payments might have to keep its balance low for operational reasons, and any funds forwarded into this channel might be quickly “pushed back” by the recipient \(i.e. to an exchange or to pay suppliers\).
65+
A node set up primarily to receive payments might have to keep its balance low for operational reasons, and any funds forwarded into this channel might be quickly “pushed back” by the recipient (i.e. to an exchange or to pay suppliers).
6666

6767
While such a channel might appear to be unbalanced and consume significant amounts of capital, it might function as intended by providing the routing node with stable income from routing fees. Depending on the traffic to such a merchant, it may be appropriate to replace the channel with a larger or smaller one to more efficiently deploy capital.
6868

6969
## Identify the needs of your own node and that of your peers
7070

7171
The concept of liquidity is highly contextual on the Lightning Network. To ensure your node functions properly with regard to your context, its channels and peers need to be carefully managed. In addition to understanding the liquidity needs of your own node, it is also important to understand the needs of your peers, such as whether they are primarily spending, receiving or routing funds.
72-

the-lightning-network/multihop-payments/hash-time-lock-contract-htlc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: >-
44
are formed to create secure multi-hop transactions.
55
---
66

7-
# Hash Time-lock Contract (HTLC)
7+
# Hash Time-lock Contract (HTLC)
88

99
Hash Time-lock Contracts (HTLCs) are the centerpiece of any Lightning transaction. While your Lightning Network channel is a 2-of-2 multisignature address with funds on the bitcoin blockchain, a HTLC is an output of an unconfirmed transaction to a separate “smart contract” address with the following properties:
1010

the-lightning-network/routing/what-makes-a-good-routing-node.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ description: >-
44
provide five basic functions.
55
---
66

7-
# What Makes a Good Routing Node
7+
# What Makes a Good Routing Node
88

99
Every channel in the network has a total capacity, limited by the amount of bitcoin committed at its creation. This balance can be held by either side of the channel, impacting its ability to pass on payments. The total capacity is the sum of the local capacity of each channel peer, or the local and remote capacity of your channel.
1010

1111
As a result, a route that worked for one payment might not work for the next, and the path a satoshi takes through the network might seem unpredictable. Additionally, the network is constantly changing, as balances shift, new channels are opened and old channels are closed.
1212

1313
Operating a good routing node does not require a highly specialized set of skills. You do not need to be a programmer, understand the details of cryptography or complex financial markets. Your Lightning routing node, however, will require plenty of close attention. While more and more software becomes available to help you gain insights into how capital is deployed and moves inside your node, a basic understanding of the command line is useful.
1414

15-
## Criteria of a good routing node <a href="docs-internal-guid-dd2a34c7-7fff-95b2-e67c-77c25612a06d" id="docs-internal-guid-dd2a34c7-7fff-95b2-e67c-77c25612a06d"></a>
15+
## Criteria of a good routing node <a href="#docs-internal-guid-dd2a34c7-7fff-95b2-e67c-77c25612a06d" id="docs-internal-guid-dd2a34c7-7fff-95b2-e67c-77c25612a06d"></a>
1616

1717
A good routing node needs to fulfill a wide range of requirements.
1818

@@ -22,7 +22,7 @@ A good routing node needs to fulfill a wide range of requirements.
2222
4. Capitalization: Channels need to be well capitalized in order to efficiently route payments. That means they need to have sufficient capacity, with enough incoming and outgoing liquidity.
2323
5. Buffer: Each channel needs to maintain some buffer capital, meaning a minimum balance of outgoing and incoming capacity. This is to ensure the channel is able to route at all times, as other nodes may no longer choose you as a hop if they experience routing failures due to low buffer capital.
2424

25-
## Allocating capital <a href="docs-internal-guid-7be79f26-7fff-950d-8c15-8319b41bb0d4" id="docs-internal-guid-7be79f26-7fff-950d-8c15-8319b41bb0d4"></a>
25+
## Allocating capital <a href="#docs-internal-guid-7be79f26-7fff-950d-8c15-8319b41bb0d4" id="docs-internal-guid-7be79f26-7fff-950d-8c15-8319b41bb0d4"></a>
2626

2727
Generally, large channels are better for routing, but concentrating all capital into two or three large channels might be less desirable than having a greater number of small channels with the broader network.
2828

0 commit comments

Comments
 (0)