You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The obligations of a good routing node fall into two broad categories. First and in this article, we will need to install and configure LND. Later we will need to open channels, get inbound liquidity and manage the liquidity of our node in a smart way. Have a look at the [liquidity](../../the-lightning-network/liquidity/) and [routing](../../the-lightning-network/routing/) sections of the Builder’s Guide.
14
14
@@ -20,26 +20,26 @@ Your node should be available as much as possible with little latency. This allo
20
20
21
21
There are many reasons why a channel might be marked as ‘disabled’ by one peer or another. Keeping your channel available is an important metric to assess the quality of a node. Keep your node up to date and regularly observe the quality of your channels. Configurations such as tor stream isolation can also affect the quality of channels.
22
22
23
-
## Configuring a routing node <ahref="docs-internal-guid-265f4120-7fff-139c-a0f4-e8dd72f3defd"id="docs-internal-guid-265f4120-7fff-139c-a0f4-e8dd72f3defd"></a>
23
+
## Configuring a routing node <ahref="#docs-internal-guid-265f4120-7fff-139c-a0f4-e8dd72f3defd"id="docs-internal-guid-265f4120-7fff-139c-a0f4-e8dd72f3defd"></a>
24
24
25
25
For a high-performance routing node you will need btcd or bitcoind running without pruning. Ideally both the Bitcoin backend and LND will run on the same machine, but it is also possible to connect them via ssh on separate servers, as long as latency is low enough.
26
26
27
27
For performance reasons you may also specifically configure your Bitcoin node. For instance, when building bitcoind from source you can use the command 
The parameters in this command are explained below:
34
34
35
-
`CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768"`This allows us to conserve memory.
35
+
`CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768"`This allows us to conserve memory.
36
36
37
37
`--enable-cxx`\
38
38
`--with-zmq` ZMQ is used to stream data from bitcoind to LND.
39
39
40
40
`--without-gui` We will not need the graphical interface for our setup.
41
41
42
-
`--disable-shared`\
42
+
`--disable-shared`\
43
43
`--with-pic`\
44
44
`--disable-tests`\
45
45
`--disable-bench`\
@@ -60,7 +60,7 @@ You may also use the lnd.conf sample file and activate the relevant lines by rem
60
60
61
61
[See the full lnd.conf sample file.](https://github.com/lightningnetwork/lnd/blob/master/sample-lnd.conf)
62
62
63
-
### Your node <ahref="docs-internal-guid-4f9fc838-7fff-b39a-9b5d-26e767ad9da0"id="docs-internal-guid-4f9fc838-7fff-b39a-9b5d-26e767ad9da0"></a>
63
+
### Your node <ahref="#docs-internal-guid-4f9fc838-7fff-b39a-9b5d-26e767ad9da0"id="docs-internal-guid-4f9fc838-7fff-b39a-9b5d-26e767ad9da0"></a>
64
64
65
65
`alias=YOUR_ALIAS`\
66
66
`color=#000000`
@@ -119,6 +119,10 @@ Our routing node will not need historical gossip data, so we can ignore it with
119
119
120
120
This is our base fee in milli-satoshi. Meaning for each payment we forward we expect to be paid at least 1 satoshi. The feerate is the fee we charge per 1 million forwarded satoshi.
121
121
122
+
`db.bolt.auto-compact=1`
123
+
124
+
This setting will compact our `channel.db` database at every startup, which will improve performance of your node.
125
+
122
126
`max-channel-fee-allocation=1.0`
123
127
124
128
We can set the maximum amount of fees in a channel here as a percentage of individual channel capacity. The setting allows for one decimal place and defaults to 0.5.
@@ -180,7 +184,7 @@ This setting allows you to define after how long LND should forget about past ro
180
184
181
185
You may want to manage and monitor your node with remote tools requiring RPC. These configurations help you do that.
Defending your node against (distributed) denial of service attacks is not an easy feat. Depending on your node setup, you may opt for one of multiple tools to keep satoshis flowing under all circumstances.
186
190
@@ -201,7 +205,7 @@ We suggest the following iptable rules for network flood protection:
201
205
`sudo iptables -A INPUT -p icmp -j DROP`\
202
206
`sudo iptables -A OUTPUT -p icmp -j ACCEPT`
203
207
204
-
### Tor <ahref="docs-internal-guid-8c746b37-7fff-d870-17cd-addca00be636"id="docs-internal-guid-8c746b37-7fff-d870-17cd-addca00be636"></a>
208
+
### Tor <ahref="#docs-internal-guid-8c746b37-7fff-d870-17cd-addca00be636"id="docs-internal-guid-8c746b37-7fff-d870-17cd-addca00be636"></a>
205
209
206
210
While the Tor network is not immune to DDoS attacks, it may be able to help you stay available to your peers in ways a clearnet IP address may not.Botnets and other tools deployed in DDoS attacks may not work over Tor, and although the network has its own bandwidth constraints, it also has its own ways to mitigate attacks.
0 commit comments