Difference between revisions of "LND Configuration Settings"

From PlebNet Wiki
Jump to navigation Jump to search
Line 27: Line 27:
== Routing Optimization ==
== Routing Optimization ==


* routerrpc.apriorihopprob=0.5
{| class="wikitable"
* routerrpc.aprioriweight=0.75
! Setting
* routerrpc.attemptcost=10
! Description
* routerrpc.attemptcostppm=10
|-
* routerrpc.maxmchistory=100000
|routerrpc.apriorihopprob=0.5
* routerrpc.minrtprob=0.005
| Probabilistic router hop bias
* routerrpc.penaltyhalflife=2h0m0s
|-
* routerrpc.attemptcost=10
|routerrpc.aprioriweight=0.75
* routerrpc.attemptcostppm=10
| Probabilistic router weighting bias
* max-cltv-expiry=5000
|-
* max-commit-fee-rate-anchors=100
|routerrpc.attemptcost=10
| Probabilistic router cost base
|-
|routerrpc.attemptcostppm=10
| Probabilistic router cost PPM
|-
|routerrpc.maxmchistory=100000
| Maximum channels you keep in memory, increasing this will require more memory
|-
|routerrpc.minrtprob=0.005
| Minimum probability to attempt a channel in a route path
|-
|routerrpc.penaltyhalflife=2h0m0s
| Probabilistic router penalty halflife period (how often it will 1/2 the penalty cost of associated with failed route attempt)
|-
|routerrpc.attemptcost=10
| Probabilistic router attempt cost
|-
|routerrpc.attemptcostppm=10
| Probabilistic router cost value
|-
|max-cltv-expiry=5000
| Max CLTV value for route path (this is the sum of all the CLTVs from each hop, so it limits max hops as a result)
|-
|max-commit-fee-rate-anchors=100
| Commit fee to use when opening a anchor style channel
|}


== Channel Size limits ==
== Channel Size limits ==

Revision as of 19:28, 16 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 sweep fee in sats/vbyte for the justice transaction

Routing Optimization

Setting Description
routerrpc.apriorihopprob=0.5 Probabilistic router hop bias
routerrpc.aprioriweight=0.75 Probabilistic router weighting bias
routerrpc.attemptcost=10 Probabilistic router cost base
routerrpc.attemptcostppm=10 Probabilistic router cost PPM
routerrpc.maxmchistory=100000 Maximum channels you keep in memory, increasing this will require more memory
routerrpc.minrtprob=0.005 Minimum probability to attempt a channel in a route path
routerrpc.penaltyhalflife=2h0m0s Probabilistic router penalty halflife period (how often it will 1/2 the penalty cost of associated with failed route attempt)
routerrpc.attemptcost=10 Probabilistic router attempt cost
routerrpc.attemptcostppm=10 Probabilistic router cost value
max-cltv-expiry=5000 Max CLTV value for route path (this is the sum of all the CLTVs from each hop, so it limits max hops as a result)
max-commit-fee-rate-anchors=100 Commit fee to use when opening a anchor style channel

Channel Size limits

  • minchansize=5000000

Database optimizations

  • db.bolt.auto-compact=true
  • gc-canceled-invoices-on-startup=1
  • gc-canceled-invoices-on-the-fly=1
  • caches.channel-cache-size=500000


Startup Optimizations

  • sync-freelist=1
  • stagger-initial-reconnect=1

Logging

  • debuglevel=CNCT=debug,CRTR=debug,HSWC=debug,NTFN=debug,RPCS=debug

Pre 0.13 LND settings

  • protocol.anchors=true