|
|
Line 37: |
Line 37: |
| |} | | |} |
| == Routing Optimization == | | == Routing Optimization == |
| | The section below should be in the [routerrpc] section of the lnd.conf file. |
|
| |
|
| {| class="wikitable" | | {| class="wikitable" |
Revision as of 21:05, 20 July 2021
Intro
Ever since the Lightning Network has started and when people began opening channels with others they have been trying to get the most out their Node. People have been doing this ever since computers have gotten into peoples hands. Trying out different settings and finding out what works best.
Anyone who would love to go over a long list of config parameters which can be used could check out this Lnd GitHub page
https://github.com/lightningnetwork/lnd/blob/master/sample-lnd.conf
There are more entries then I ever thought possible, but this Wiki page is how to make adjustments to the Lightning Node environment which helps ones node to perform better. Something which we'd all would like to happen.
The list which follows is the most common settings which Node Operators have come to agree which best suites a Node which wants to earn fees and route other Nodes Payments.
These settings apply to LND 0.12.1 releases. The latest release still has many issues which need to be resolved.
Watch Tower Settings
Pretty good name for what this does. Watch Towers are communications between agreeing Nodes to keep on eye on each others Node. Node Operators pass their Watch Tower address between each other so when one of them is down for some reason, the other one watches for channel situations like a forced close. If this closure tries to use a non-current Channel state, then the Watch Tower will step in and penalize the Node trying to cheat.
Currently, the fee for watching another Node is disabled, but at some point there will be a cost with this. Now if your Node does catch some foul play one will earn fees for being the good guy.
Setting
|
Description
|
wtclient.active=1
|
Turns on the Watch Tower Client
|
wtclient.sweep-fee-rate=10
|
Sets the watchtower client sweep fee in sats/vbyte for the justice transaction
|
watchtower.active=true
|
Enable integrated watchtower server listening on :9911 by default.
|
Alias
Setting
|
Description
|
alias=MyNodeAlias
|
Set the Alias of the node
|
Routing Optimization
The section below should be in the [routerrpc] section of the lnd.conf file.
Setting
|
Description
|
routerrpc.apriorihopprob=0.5
|
Assumed success probability of a hop in a route when no other information is available (default: 0.6)
|
routerrpc.aprioriweight=0.75
|
Weight of the a priori probability in success probability estimation. Valid values are in [0, 1]. (default: 0.5)
|
routerrpc.attemptcost=10
|
The (virtual) fixed cost in sats of a failed payment attempt (default: 100)
|
routerrpc.attemptcostppm=10
|
The (virtual) proportional cost in ppm of the total amount of a failed payment attempt (default: 1000)
|
routerrpc.maxmchistory=100000
|
The maximum number of payment results that are held on disk by mission control
|
routerrpc.minrtprob=0.005
|
Minimum required route success probability to attempt the payment (default: 0.01)
|
routerrpc.penaltyhalflife=2h0m0s
|
Defines the duration after which a penalized node or channel is back at 50% probability (default: 1h0m0s)
|
routerrpc.attemptcost=10
|
The (virtual) fixed cost in sats of a failed payment attempt (default: 100)
|
routerrpc.attemptcostppm=10
|
The (virtual) proportional cost in ppm of the total amount of a failed payment attempt (default: 1000)
|
max-cltv-expiry=5000
|
The maximum number of blocks funds could be locked up for when forwarding payments. (default: 2016)
|
max-commit-fee-rate-anchors=100
|
The maximum fee rate in sat/vbyte that will be used for commitments of channels of the anchors type. Must be large enough to ensure transaction propagation (default: 10)
|
Channel Size limits
Setting
|
Description
|
minchansize=5000000
|
Minimum Channel Size in Sats
|
maxchansize=50000000
|
Maximum Channel Size in Sats
|
maxpendingchannels=5
|
The maximum number of incoming pending channels permitted per peer
|
protocol.wumbo-channels=true
|
If set, then lnd will create and accept requests for channels larger than 0.167 BTC, up to max 5 BTC
|
Database optimizations
Setting
|
Description
|
db.bolt.auto-compact=true
|
Allow automatic compaction of your channel.db file on startup
|
gc-canceled-invoices-on-startup=1
|
Cleanup canceled invoices on startup
|
gc-canceled-invoices-on-the-fly=1
|
Cleanup chanceled invoices at run-time
|
caches.channel-cache-size=500000
|
Maximum number of entries contained in the channel cache, which is used to reduce memory allocations from gossip queries from peers. Each entry requires roughly 2Kb. (default: 20000)
|
Startup Optimizations
Setting
|
Description
|
sync-freelist=1
|
Enable free list syncing for the default bbolt database. This will decrease start up time, but can result in performance degradation for very large databases, and also result in higher memory usage
|
stagger-initial-reconnect=1
|
Stagger initial reconnection on startup, this will reduce load when you have a bunch of channels
|
Logging
Setting
|
Description
|
debuglevel=CNCT=debug,CRTR=debug,HSWC=debug,NTFN=debug,RPCS=debug
|
This allows you to change the default logging level, the example provides max amount of logging information at the expense of some more disk IO and space
|
Pre 0.13 LND settings
Logging
Setting
|
Description
|
protocol.anchors=true
|
Enabled anchor style channels (this lowers commit fees), this is now default in LND 0.13+ so the parameter is not required and will cause LND to not start up if included in the lnd.conf
|