Commit Graph

437 Commits

Author SHA1 Message Date
84f039db45 lnd+chanbackup: add lnd config flag
In this commit, we add the --no-backup-archive with a default
as false. When set to true then previous channel backup file will
not be archived but replaced. We also modify TestUpdateAndSwap
test to make sure the new behaviour works as expected.
2025-01-24 10:56:15 +01:00
27a05694cb multi: make ProofMatureDelta configurable
We add a new config option to set the `ProofMatureDelta` so the users
can tune their graphs based on their own preference over the num of
confs found in the announcement signatures.
2025-01-17 21:44:23 +08:00
ab7aae0708 multi: rename nolint:lll to nolint:ll
Find and replace all nolint instances refering to the `lll` linter and
replace with `ll` which is the name of our custom version of the `lll`
linter which can be used to ignore log lines during linting.

The next commit will do the configuration of the custom linter and
disable the default one.
2024-12-02 09:14:21 +02:00
3360d285fb config: improve error message
Previously, the error message had one missing space:
"... either --bitcoin.mainnet, or bitcoin.testnet,bitcoin.simnet, ..."

I added a space after "bitcoin.testnet,".
2024-11-19 12:44:57 -03:00
1bc25c1136 config: fix "lnd --debuglevel show" command
Previously, "lnd --debuglevel show" complained that bitcoin backend is not
configured:

$ lnd --debuglevel show
failed to load config: ValidateConfig: either --bitcoin.mainnet, or ...

To make it working, the user had to specify --bitcoin.mainnet and configure one
of the backends, e.g. "--bitcoin.node neutrino".

With this fix, the command works without any additional flags.
2024-11-19 12:44:55 -03:00
9f72ce7dd4 config: remove default values for deprecated fields
These values have been deprecated but since we still set the default
values, the "please remove it" error still shows up.
2024-11-19 05:49:30 +02:00
7b2da94750 multi: deprecate dust-treshold config value
Replace ambigious config value "dust-treshold" with a more clear
"channel-max-fee-exposure" exposure value. The old value is
deprecated and will be removed in the near future.
2024-11-06 18:16:06 +01:00
22c13790df build+config: move maxlogfiles and maxfilesize to logger config
Add deprecation notices but continue to read both.
2024-10-30 13:30:04 +02:00
3adbdbb39a multi: move logcompressor to logging.file.compressor
This is not a breaking change since the logcompressor config option has
not been released yet.
2024-10-30 13:30:04 +02:00
1e39e3758e build: apply log type flags in NewDefaultLogHandlers
So that the logging config "Disable" options and log type flags are all
handled in one place. Other repo's can then re-use this nicely.
2024-10-26 14:15:14 +02:00
cfa7fceb0b build+config: add default handler constructor
Since most of our projects will use the same handler duo and apply the
config options the same way, let's make our lives easier and add a
default handler constructor.
2024-10-22 17:03:55 +02:00
5ed7bf1b71 config: add logging config options
This commit adds config options so that users can for both the console
logger and the file logger set the following things:

- disable the logger
- omit timestamps from log lines.
2024-10-22 17:03:55 +02:00
cd697913ef build: switch to slog Handlers
Start using the new slog handlers. With this commit we also remove the
need for the LogWriter since we let our LogRotator implement io.Writer
and pass that in to our log file handler.
2024-10-22 17:03:51 +02:00
387a1a8831 build: separate sublogger and rotator pipe management
These are two separate concerns. So this commit splits them up and just
passes a LogWriter from the one to the other. This will become cleaner
in an upcoming commit where the Rotator will implement io.Writer and
there will no longer be a need for LogWriter.
2024-10-22 15:19:58 +02:00
8bb79d10e9 lnd: fix debuglevel bug.
We need to setup the loggers before we are able to show the
complete list of available subsystems.
2024-10-18 13:11:09 +02:00
448193b0fd multi: separate profiler config 2024-10-18 13:03:30 +02:00
b3c25166ed build+mod: add zstd compressor support 2024-09-12 12:31:03 -04:00
f360532eb1 lnd+build: add logcompressor flag 2024-09-12 12:31:02 -04:00
8e0534f756 multi: add leader check to the healthcheck monitor
This commit extends our healtcheck with an optional leader check. This
is to ensure that given network partition or other cluster wide failure
we act as soon as possible to avoid a split-brain situation where a new
leader is elected but we still hold onto our etcd client.
2024-08-01 19:04:10 +02:00
ac4ef28926 Merge pull request #8824 from Crypt-iQ/precise_dust_limit
multi: include commitment fees in dust calculation
2024-07-31 03:13:31 -06:00
d6001d033b htlcswitch+lnwallet: calculate fee exposure as commit fees + dust
This commit expands the definition of the dust limit to take into
account commitment fees as well as dust HTLCs. The dust limit is now
known as a fee exposure threshold. Dust HTLCs are fees anyways so it
makes sense to account for commitment fees as well. The link has
been modified slightly to calculate dust. In the future, the switch
dust calculations can be removed.
2024-07-29 14:13:21 -04:00
398623bde5 blindedpath: move blinded path logic to own pkg 2024-07-26 09:54:59 +02:00
de975334cd multi: add blinded paths to invoices
Expose the ability to add blinded paths to an invoice. Also expose
various configuration values.

We also let the lncfg.Invoices struct satisfy the Validator interface so
that we can verify all its config values in one place.
2024-07-26 09:54:17 +02:00
01f5af0a28 cfg: fail startup on flags.Error parsing error 2024-06-17 16:48:34 +02:00
e8196c6feb cfg: move experimental options to main protocol cfg 2024-05-16 17:16:50 -05:00
3837c3f12e lnwallet: add configurable cache for web fee estimator
Add fee.min-update-timeout and fee.max-update-timeout config options to
allow configuration of the web fee estimator cache.
2024-05-04 14:41:41 +08:00
7867cb3a70 multi: turn on route blinding by default 2024-04-26 11:35:18 -04:00
ab83343c87 multi: repleace ioutil.ReadFile 2024-04-25 11:22:43 +02:00
619c8f4eb8 multi: repleace ioutil.ReadAll 2024-04-25 11:21:18 +02:00
7af195768a Merge pull request #8667 from lightningnetwork/elle-new-sweeper
Merge new sweeper branch to master
2024-04-22 11:20:49 -07:00
a2319e4313 lnrpc: rejects positive inbound fees by default
Positive inbound are now rejected by default. The user can enable positive
inbound fees with the option 'accept-positive-inbound-fees'.
2024-04-20 00:11:36 +02:00
0a611aae00 multi: add new config option BudgetConfig and NoDeadlineConfTarget
This commit adds a new group config `BudgetConfig` to allow users
specifying their own preference when sweeping outputs. And a new config
option `NoDeadlineConfTarget` is added in case the user wants to use a
different "lazy" conf target.
2024-04-19 21:33:33 +08:00
465332f409 multi: deprecate batchwindowduration config option 2024-04-19 21:33:26 +08:00
6e5eead617 lncfg: disable allowing blinded routes in daemon but not itests
This commit turns off route blinding for the daemon while we're waiting
on full handling for blinded errors. The feature remains on for itests
so that tests covering blinding can run as usual.
2024-04-03 09:19:43 -04:00
ae1c470cb4 config.go: support utilizing env variables in lnd.conf file
In this commit, we support utilizing the usage of enviroment variables in `lnd.conf` file
for `rpcuser` and `rpcpass` fields by adding `supplyEnvValue` function in `config.go`
that returns the value of the specified environment variable, the fall-back value
if provided, or the original input string if no matching environment variables are found or set.
2024-03-14 17:53:43 +02:00
043834c698 config.go: mention that --lnddir option overwrites all other directory options [skip ci] 2024-02-05 11:30:09 +02:00
78d552de22 config+rpcserver: hide deprecated option unsafe-disconnect
Also fix a case where this deprecated flag is used. We will always
bypass the active channels check when `DisconnectPeer` because
`!r.cfg.UnsafeDisconnect` is always false.
2024-02-01 21:20:11 +08:00
157c84cc4d multi: log warnings if deprecated config options are used
This commit adds warning logs if the user uses deprecated config
options, paving the way for future removal.
2024-02-01 21:20:11 +08:00
becbe7085d config: create helper for dumping config
With this commit we add a new helper function that recursively turns the
runtime configuration into a flat key/value map that is human-readable,
using the dot notation for nested values that is also used in the config
file or command line flags.
2024-01-09 12:32:01 +01:00
0c64a183cf lntest: add http header timeout to config 2023-10-17 11:25:06 -06:00
039e9effe7 lnd: add http header timeout to config 2023-10-11 22:05:50 -06:00
063fb9dd43 multi: make max fee rate configurable 2023-10-06 16:34:47 -07:00
53b33c75c4 config: edit error strings to account for signet option 2023-10-06 16:34:47 -07:00
1211e7eb7b multi: use "bitcoin" chain name constant
Make use of the `bitcoinChainName` constant instead of re-writing the
"bitcoin" string.
2023-10-06 16:34:47 -07:00
23a63ef328 config: update to satisfy linter 2023-10-06 16:34:47 -07:00
031dbd7760 multi: remove ChainRegistry 2023-10-06 16:34:47 -07:00
94c4642db6 lncfg+config: only allow btcd or bitcoind backends 2023-10-06 16:34:47 -07:00
3912d5a0c6 multi: remove Litecoin config options
This commit removes the `Litecoin`, `LtcMode` and `LitecoindMode`
members from the main LND `Config` struct. Since only the bitcoin
blockchain is now supported, this commit also deprecates the
`cfg.Bitcoin.Active` config option.
2023-10-06 16:34:47 -07:00
23a153abae lnd+config: add ability to obtain blocking and mutex profiles
In this commit, we add the ability to obtain blocking and mutex
profiles. The blocking profile will show which goroutines are
consistently blocked on synchronization primitives like channels, or
I/O. The mutex profile will show which mutexes are very contested.

The blocking profile can be enabled with a new arg: `--blockingprofile`.
The mutex profile can be enabled with a new arg: `--mutexprofile`. These
are both ignored if the profile port isn't set.

Activating these profiles requires the caller to pass in a sampling
rate. For now I've set it just to `1` to test things out. Unfortunately
documentation is rather scarce, so there aren't any good guides re what
these values should be set to. AFAICT, these add more overhead than the
other prowling options, so they shouldn't necessarily be enabled
persistently in production.
2023-09-18 11:44:49 -07:00
0dd2aa0aef multi: add itest to check race between channel_ready and update_add_htlc
This commit adds a new itest case to check the race condition found in
issue #7401. In order to control the funding manager's state, a new dev
config for the funding manager is introduced to specify a duration we
should hold before processing remote node's channel_ready message.

A new development config, `DevConfig` is introduced in `lncfg` and will
only have effect if built with flag `integration`. This can also be
extended for future integration tests if more dev-only flags are needed.
2023-08-09 01:29:19 +08:00