Commit Graph

419 Commits

Author SHA1 Message Date
Andras Banki-Horvath
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
Oliver Gugger
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
Eugene Siegel
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
Elle Mouton
398623bde5
blindedpath: move blinded path logic to own pkg 2024-07-26 09:54:59 +02:00
Elle Mouton
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
michael1011
01f5af0a28
cfg: fail startup on flags.Error parsing error 2024-06-17 16:48:34 +02:00
Orbital
e8196c6feb
cfg: move experimental options to main protocol cfg 2024-05-16 17:16:50 -05:00
Tom Kirkpatrick
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
Carla Kirk-Cohen
7867cb3a70
multi: turn on route blinding by default 2024-04-26 11:35:18 -04:00
erik
ab83343c87 multi: repleace ioutil.ReadFile 2024-04-25 11:22:43 +02:00
erik
619c8f4eb8 multi: repleace ioutil.ReadAll 2024-04-25 11:21:18 +02:00
Olaoluwa Osuntokun
7af195768a
Merge pull request #8667 from lightningnetwork/elle-new-sweeper
Merge new sweeper branch to master
2024-04-22 11:20:49 -07:00
feelancer21
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
yyforyongyu
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
yyforyongyu
465332f409
multi: deprecate batchwindowduration config option 2024-04-19 21:33:26 +08:00
Carla Kirk-Cohen
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
Mohamed Awnallah
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
Mohamed Awnallah
043834c698
config.go: mention that --lnddir option overwrites all other directory options [skip ci] 2024-02-05 11:30:09 +02:00
yyforyongyu
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
yyforyongyu
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
Oliver Gugger
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
Amin Bashiri
0c64a183cf
lntest: add http header timeout to config 2023-10-17 11:25:06 -06:00
Amin Bashiri
039e9effe7
lnd: add http header timeout to config 2023-10-11 22:05:50 -06:00
yyforyongyu
063fb9dd43 multi: make max fee rate configurable 2023-10-06 16:34:47 -07:00
Elle Mouton
53b33c75c4 config: edit error strings to account for signet option 2023-10-06 16:34:47 -07:00
Elle Mouton
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
Elle Mouton
23a63ef328 config: update to satisfy linter 2023-10-06 16:34:47 -07:00
Elle Mouton
031dbd7760 multi: remove ChainRegistry 2023-10-06 16:34:47 -07:00
Elle Mouton
94c4642db6 lncfg+config: only allow btcd or bitcoind backends 2023-10-06 16:34:47 -07:00
Elle Mouton
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
Olaoluwa Osuntokun
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
yyforyongyu
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
ziggie
39f9673bc7
lnd: update defaultMaxLocalCSVDelay
Make sure our default local csv delay maximum is symetric
compared  to the remote default csv maximum.
2023-06-26 23:39:45 +02:00
Elle Mouton
f3525e8b7c
multi: add default watchtower config to main LND config
In this commit, a `DefaultWatchtowerCfg` function is added which is used
to construct a default `lncfg.Watchtower` struct. This is then used to
populate the default watchtower config in the main LND config struct.
2023-06-15 11:36:44 +02:00
Elle Mouton
d9c4ada991
multi: add wtclient config defaults to lnd config
In this commit, a `DefaultWtClientCfg` function is added which
populates some default values for the `WtClient` struct. This is then
used to populate the wtclient defaults in the main LND config struct.
2023-06-15 11:15:32 +02:00
Oliver Gugger
f9f8f6406b
config+lnd: allow configuring gRPC keepalive settings
This change allows users to customize the gRPC keepalive settings. The
server ping values configure when the server sends out a ping by itself
and how quickly the client is expected to respond.
The client ping min wait configures the minimum time a client has to
wait before sending another ping. A connection might be closed by the
server if a client pings more frequently than the allowed min wait time.

We choose lower default values than the gRPC library used before:
 - ServerPingTime: 1 minute instead of 2 hours
 - ClientPingMinWait: 5 seconds instead of 5 minutes

This should by itself already make long-standing gRPC streams more
stable but also allow clients to set a custom client ping time of 5
seconds or more (a value of slightly more than 5000 milliseconds should
be chosen to avoid the server disconnecting due to slight timing skews).
2023-06-09 10:57:36 +02:00
Olaoluwa Osuntokun
ed0095fbba
config: fix bug in walletrpc interaction due to mismatched coin type
In this commit, we fix a bug that would cause the walletrpc on the
simnet chain to not be able to respond to all RPC calls. The issue is
that for the SimNet backend, within chainparams.go:
6e0a67d05b/chainreg/chainparams.go (L45-L51),
we set a new CoinType for Simnet in order to match the RegTest value.

Later on, when we go to verify the on disk accounts against the
in-memory cointype, we fall through to an error case as the in-memory
cointype is 115, while the on disk cointype is 1.

To fix this, when we know we're doing simnet mode, we'll override the
cointype similar to the way we did/do for LTC.

Fixes https://github.com/lightningnetwork/lnd/issues/6807.
2023-04-10 11:43:21 -07:00
Eval EXEC
cbcbddfe29
rpcserver: add time_lock_delta overflow check 2023-03-23 21:34:12 +08:00
Olaoluwa Osuntokun
f4fdd82327
Merge pull request #7264 from yyforyongyu/gossip-resend-messages
discovery: fix message order in batch sending
2023-02-21 17:10:13 -08:00
yyforyongyu
c3d1d3c4f1
multi: make SubBatchDelay configurable
This commit adds a new config option `--gossip.sub-batch-delay` so we
can speed up our itest.
2023-02-17 14:10:09 +08:00
Elle Mouton
0730337cc7
multi: add new NoRevLogAmtData config option
In this commit, a new `--db.no-rev-log-amt-data` flag is added. The
config option is passed though to everywhere that it will be used. Note
that it is still a no-op in this commit. An upcoming commit will make
use of the flag.
2023-02-16 20:47:29 +02:00
bitromortac
16986ee5c7
lnd+routing+rpc: switch mc to (external) estimator
We use a more general `Estimator` interface for probability estimation
in missioncontrol.

The estimator is created outside of `NewMissionControl`, passed in as a
`MissionControlConfig` field, to facilitate usage of externally supplied
estimators.
2023-02-14 13:34:25 +01:00
Oliver Gugger
0cf0a7dd3b
Merge pull request #7341 from bottlepay/final-settle-opt-in
channeldb: final htlc resolution storage opt-in
2023-02-06 13:21:40 +01:00
Olaoluwa Osuntokun
5d22d5eb6c
Merge pull request #7252 from ellemouton/sqlite-pt2
multi: add sqlite backend option
2023-01-31 10:14:46 -08:00
Orbital
21816d9118
lnd+config: Move to FileExists function in lnrpc package 2023-01-26 13:32:12 -06:00
Orbital
c0f44a17b7
lnd: Add ability to encrypt TLS key on disk 2023-01-26 13:32:11 -06:00
Joost Jager
7a785c74c4
channeldb: final htlc resolution storage opt-in 2023-01-26 07:02:17 +01:00
Elle Mouton
8363c4075c
multi: add sqlite backend option
In this diff, we expose the option to use sqlite as a db backend.
2023-01-25 14:16:55 +02:00
Carla Kirk-Cohen
c2ce8635e7
multi: add custom message overrides to protocol config options 2023-01-05 12:05:05 -05:00
yyforyongyu
84fd911b47
multi: fix make lint
Fixes new lint errors caught by the latest version.
2022-11-18 20:48:23 +08:00