Open Bitcoinite opened 1 year ago
Yes, this is misleading. If you only use lncli setmccfg --estimator=bimodal
, the default values as in sample-lnd.conf
are used. Perhaps we could set values in the cli flags to default values in order to have a better documentation.
Unfortunately the "default" values in the CLI are notoriously hard to understand. 0 just means "the user did not enter a value" and often means you don't want to change that specific options in the backend by not specifying any flag in the CLI. See https://github.com/lightningnetwork/lnd/issues/1523 and https://github.com/lightningnetwork/lnd/pull/6778 for more context.
Background
Running lncli setmccfg --help gives the following explanations for the command options:
OPTIONS: --pmtnr value the number of payments mission control should store (default: 0) --failrelax value the amount of time to wait after a failure before raising failure amount (default: 0s) --estimator value the probability estimator to use, choose between 'apriori' or 'bimodal' (bimodal is experimental) --apriorihalflife value the amount of time taken to restore a node or channel to 50% probability of success. (default: 0s) --apriorihopprob value the probability of success assigned to hops that we have no information about (default: 0) --aprioriweight value the degree to which mission control should rely on historical results, expressed as value in [0, 1] (default: 0) --aprioricapacityfraction value the fraction of channels' capacities that is considered liquid in pathfinding, a value between [0.75-1.0]. a value of 1.0 disables this feature. (default: 0) --bimodaldecaytime value the time span after which we phase out learnings from previous payment attempts (default: 0s) --bimodalscale value controls the assumed channel liquidity imbalance in the network, measured in msat. a low value (compared to typical channel capacity) anticipates unbalanced channels. (default: 0) --bimodalweight value controls the degree to which the probability estimator takes into account other channels of a router (default: 0)
These explations, and especially the given defaults, differ from what is written in the sample lnd.conf: https://github.com/lightningnetwork/lnd/blob/master/sample-lnd.conf
Also this doesn't make any sense: --aprioricapacityfraction value the fraction of channels' capacities that is considered liquid in pathfinding, a value between [0.75-1.0]. a value of 1.0 disables this feature. (default: 0)
How can the default be 0, when the value has to be between [0.75-1.0]?
Your environment
lnd v0.16.0-beta
Steps to reproduce
Compare the results from lncli setmccfg --help with what is written in the sample lnd.conf
Expected behaviour
Both should state the same default values.
Actual behaviour
The information given differs.