Commit Graph

388 Commits

Author SHA1 Message Date
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
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
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
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
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
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
cbcbddfe29 rpcserver: add time_lock_delta overflow check 2023-03-23 21:34:12 +08:00
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
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
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
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
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
5d22d5eb6c Merge pull request #7252 from ellemouton/sqlite-pt2
multi: add sqlite backend option
2023-01-31 10:14:46 -08:00
21816d9118 lnd+config: Move to FileExists function in lnrpc package 2023-01-26 13:32:12 -06:00
c0f44a17b7 lnd: Add ability to encrypt TLS key on disk 2023-01-26 13:32:11 -06:00
7a785c74c4 channeldb: final htlc resolution storage opt-in 2023-01-26 07:02:17 +01:00
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
c2ce8635e7 multi: add custom message overrides to protocol config options 2023-01-05 12:05:05 -05:00
84fd911b47 multi: fix make lint
Fixes new lint errors caught by the latest version.
2022-11-18 20:48:23 +08:00
e6bebc4fe7 lnd: make MailboxDeliveryTimeout configurable 2022-11-03 18:29:08 +08:00
4db6617d45 multi: skip checking long lines for config files 2022-10-20 23:59:09 +08:00
2f27a52f7f server+lncfg: make sweepr batch window duration configurable 2022-09-01 10:44:29 +08:00
0735522194 multi: fix make fmt 2022-08-23 22:10:24 +08:00
d27c622568 config: allow independent rpccookie config
The bitcoind .cookie contains an autogenerated user (__cookie__) and
password (random string), which can be used instead of the rpc user name
and password. This commit allows for running against bitcoind without
having to access bitcoin.conf like in the case for pure
user/password/zmq configuration.
2022-08-08 12:14:32 +02:00
8291e8a170 multi: add keep-failed-payment-attempts flag 2022-07-03 21:04:27 +00:00
b6f56d3398 config: fix path to bitcoind.rpccookie and bitcoind.config 2022-05-16 13:55:16 +02:00
fbf00f6e26 config: cookie missing error fix 2022-05-16 10:48:53 +02:00
e789107e1f multi: new bitcoind rpcpolling backend for itests 2022-05-11 09:02:13 +02:00
c76d04ef91 multi: make ZmqReadDeadline configurable
Make the Bitcoind ZMQReadDeadline option configurable.
2022-05-11 08:45:07 +02:00
89209ec596 config: Add bitcoind.{config,rpccookie} configuration options
Currently, the Bitcoind.Dir configuration option is used as the base
directory for locating both the bitcoind configuration file and the RPC
cookie file. However, it is quite common for Bitcoin Core to be packaged
in such a way that the configuration file and the RPC cookie file reside
in different directories: "/etc/bitcoin/bitcoin.conf" and
"/var/lib/bitcoind/.cookie".

This change makes it such that --bitcoind.config and
--bitcoind.rpccookie options can be specified to override the default
auto-detection logic, and if either is unspecified, the auto-detection
logic will still do its job.
2022-04-21 14:01:51 -04:00
747161a1f4 lnd: add config option for specifying particular peers to connect to 2022-04-19 12:37:44 -05:00
e4e0935816 lnrpc/peers: skeleton logic for updateNodeAnnouncement
Basic logic for the endpoint:

- Get the current nodeAnn information
- Calculate modifications
- Apply modifications
- Return changes
2022-04-01 18:36:21 -07:00
1c8c0b4fa0 multi: make PendingCommitInterval configurable 2022-03-24 10:01:42 +08:00
ae314ec794 htlcswitch: add an always on mode to interceptable switch
Co-authored-by: Juan Pablo Civile <elementohb@gmail.com>
2022-03-17 17:39:37 +01:00
7dfe4018ce multi: use btcd's btcec/v2 and btcutil modules
This commit was previously split into the following parts to ease
review:
 - 2d746f68: replace imports
 - 4008f0fd: use ecdsa.Signature
 - 849e33d1: remove btcec.S256()
 - b8f6ebbd: use v2 library correctly
 - fa80bca9: bump go modules
2022-03-09 19:02:37 +01:00
9d8ff1fae5 config: clamp channel-commit-interval to reasonable time 2022-02-24 13:41:31 -05:00
ffee7d1bcf multi: fix newly detected linter issues 2022-02-10 11:02:02 +01:00
62dc1b5323 multi: Update Licenses to 2022 [skip ci] 2022-02-09 00:25:20 +02:00
b77c1fb200 Merge pull request #6149 from bhandras/graph_import_rpc
lnd: add `devrpc` sub server and `devrpc.ImportGraph` to import graph dumps
2022-01-28 10:24:59 +01:00
825422a82a lncfg: move ParseHexColor to lncfg 2022-01-24 17:42:54 +01:00
530a2059e5 multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
2560e2c69f Merge pull request #6142 from sangaman/externalhosts-desc
docs: clarify --externalhosts usage
2022-01-12 11:57:16 +01:00
0f167fd03e config: better error message if config file doesn't exist 2022-01-11 14:08:17 +01:00
b5f50c2522 docs: clarify --externalhosts usage
This clarifies the usage of the `externalhosts` option and brings its
documentation in line with similar options such as `externalip`.

Related issue: #6141

[skip ci]
2022-01-06 10:41:07 -05:00
bab807a57d multi: add migrate-wallet-to-watch-only flag
To enable converting an existing wallet with private key material into a
watch-only wallet on first startup with remote signing enabled, we add a
new flag. Since the conversion is a destructive process, this shouldn't
happen automatically just because remote signing is enabled.
2022-01-06 14:35:26 +01:00
0bdac59a8c multi: add nochainbackend option 2022-01-06 14:35:25 +01:00
da59c1fa62 multi: add health check for remote signer 2022-01-06 14:35:25 +01:00
9601a9ab84 multi: make remote signer RPC timeout configurable 2022-01-06 14:35:25 +01:00
842221aab2 config: move directory creation to after path fixes
Fixes #5927.
This commit moves the code that attempts to create parent directories to
the correct place _after_ we've adjusted all path values to point to the
correct places. Before this commit the macaroon and tor paths would
point to their default locations, even if the --lnddir flag was
specified.
2021-11-08 22:39:41 +01:00
338afef862 lnd: standardize printing to stdout
With this commit we standardize the error messages in the config parsing
section of the main package. We only print to stdout/stderr in a single
place and also make sure the same error is printed to the log (which
might or might not yet be initialized at that point).
2021-11-08 15:12:56 +01:00