Commit Graph

68 Commits

Author SHA1 Message Date
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
Tom Kirkpatrick
fa616ee059
config: remove deprecated neutrino.feeurl config option 2024-05-04 14:41:40 +08:00
erik
619c8f4eb8 multi: repleace ioutil.ReadAll 2024-04-25 11:21:18 +02:00
Oliver Gugger
648fb22f63
multi: wrap all errors 2024-04-11 15:04:03 +02:00
Mohamed Awnallah
df9f1485a7
chainreg: add checkOutboundPeers function
In this commit we add `checkOutboundPeers` function
to the `cc.HealthCheck` function.
2024-04-09 19:08:36 +02:00
Keagan McClelland
fb8de14798 lnwallet+funding+lnd: trim unused parameters, from lnwallet.Config
chainreg: remove unused GenDefaultBtcConstraints

lnwallet+funding+lnd: remove DefaultDustLimit from lnwallet.Config
2024-02-19 17:06:21 -08:00
Keagan McClelland
c6ecb10865 chainreg+lnd: remove ChannelConstraints from PartialChainControl 2024-02-19 17:06:21 -08:00
yyforyongyu
e6f5d17548
chainreg: satisfy chain.Interface in NoChainSource 2024-01-23 17:46:06 +08:00
Keagan McClelland
7c403b439c chainreg: Add BestBlockTracker to ChainControl
This commit takes the best block tracker and adds it to the
ChainControl objects and appropriately initializes it on
ChainControl creation
2023-10-19 09:22:07 -07:00
Elle Mouton
031dbd7760 multi: remove ChainRegistry 2023-10-06 16:34:47 -07:00
Elle Mouton
913aa36fe9 chainreg: remove Litecoin support
This commit removes the Litecoin, LtcMode and LitcoinMode members from
the chainreg `Config` struct.
2023-10-06 16:34:47 -07:00
Elle Mouton
a76bdf606b chainreg: let IsTestnet consider bitcoin only 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
Oliver Gugger
d5c504c8de
multi: use fwding policy from models pkg 2023-08-22 06:22:33 +08:00
Olaoluwa Osuntokun
7e1628d89d
chainreg: increase default CLTV value to 80 blocks (~13 hrs)
In this commit, we increase the default CTLV value to 80 blocks.
Initially this was set to 144 blocks in the early days, but then was
lowered to 40 blocks as the lnd implementation matured. By setting this
to a higher value, we increase the safety window (MTTR) when it comes to
node downtime, and also add some buffer room around time locks which may
become more stressed in the future assuming the current mempool load
remains persistent.
2023-04-19 11:39:37 -07:00
yyforyongyu
66d1392f7f
chainreg: update bitcoind polling config 2023-04-19 01:24:04 +08:00
yyforyongyu
e81d62fc70
chainntnfs+chainreg: add interface MempoolWatcher
This commit adds the interface `MempoolWatcher` and uses it in the chain
registry.
2023-04-19 01:18:19 +08:00
positiveblue
c602ac07e7
chainntnfs: move cache implementation to channeldb
This commit moves the `HeightHintCache` implementation to the
`channeldb` package and inverts the dependency relation between
`chainntnfs` and `channeldb`.

Many packages depend on channeldb for type definitions,
interfaces, etc. `chainntnfs` is an example of that. `chainntnfs`
defines the  `SpendHintCache` and `ConfirmHintCache` interfaces but
it also implments them (`HeightHintCache` struct). The implementation
uses logic that should not leak from channeldb (ex: bucket paths).
This makes our code highly coupled + it would not allow us to use any
of these interfaces in a package that is imported by `channeldb`
(circular dependency).
2023-01-16 03:13:17 -08:00
yyforyongyu
0735522194
multi: fix make fmt 2022-08-23 22:10:24 +08:00
Olaoluwa Osuntokun
6b7abc3dbc
chainreg: update tapoort node awareness to account for bitcoind 19+
Bitcoind 23 will use the new `getdeploymentinfo` while versions after 19
(but below 23) will use the `UnifiedSoftForks` field instead of the
`SoftForks UnifiedSoftForks` field.

With this PR the taproot gating logic has been tested on bitcoind
versions: 21, 22, and 23. 21 is when the taproot logic was first added.
2022-08-12 15:35:32 -07:00
Oliver Gugger
17014b592e
Merge pull request #6730 from Roasbeef/notifier-optional-block
chainntfns: add new option for conf notifications to send block
2022-08-10 13:52:49 +02:00
Olaoluwa Osuntokun
492f8b6999
chainreg: shutdown if backend node doesn't support taproot
In this commit, we add a check during normal node construction to see if
the backend node supports Taproot. If it doesn't, then we want to
shutdown and force the user to take note.

To check if the node supports Taproot, we'll first try the normal
getblockchaininfo call. If this works, cool, then we can rely on the
value. If it doesn't, then we'll fall back to the getdeploymentinfo call
which was added in a recent version of bitcoind [1]. Newer versions of
bitcoind might also have this call, and the getblockchaininfo call, but
not actually populate the softforks field [2]. In this case, we'll fall
back, and we also account for the case when the getblockchaininfo RPC is
removed all together.

[1]: https://github.com/bitcoin/bitcoin/pull/23508
[2]: https://github.com/bitcoin/bitcoin/pull/25114

Fixes #6773
2022-08-05 17:23:31 -07:00
Olaoluwa Osuntokun
08f1c2e93a
chainntfns: add new option for conf notifications to send block
In this commit, we add a new option for the existing confirmation
notification system that optionally allows the caller to specify that a
block should be included as well.

The only quirk w/ the implementation here is the neutrino backend:
usually we get filtered blocks, we so need to first fetch the block
again so we can deliver the full block to the notifier. On the notifier
end, it'll only be checking for the transactions we care about, to
sending a full block doesn't affect the correctness.

We also extend the `testBatchConfirmationNotification` test to assert
that a block is only included if the caller specifies it.
2022-08-01 19:59:21 -07:00
Elle Mouton
e789107e1f
multi: new bitcoind rpcpolling backend for itests 2022-05-11 09:02:13 +02:00
Orbital
7509af1a70
multi: add rpcpolling config options 2022-05-11 09:02:13 +02:00
Elle Mouton
c76d04ef91
multi: make ZmqReadDeadline configurable
Make the Bitcoind ZMQReadDeadline option configurable.
2022-05-11 08:45:07 +02:00
Elle Mouton
5a08788a05
multi: update btcwallet to v0.15.0
Update go.mod to point to latest btcwallet version.
2022-05-11 08:45:06 +02:00
ErikEk
30a857b982 zmq: remove port check error 2022-05-02 13:50:23 +02:00
Oliver Gugger
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
Oliver Gugger
895a2e497b
multi: formatting and comment fixes 2022-02-10 11:02:02 +01:00
Oliver Gugger
0bdac59a8c
multi: add nochainbackend option 2022-01-06 14:35:25 +01:00
ErikEk
94cb818dd9 healthcheck: misconfigured bitcoind zmq 2021-12-09 10:51:34 +01:00
Oliver Gugger
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
Oliver Gugger
9fa9dd8e43
multi: extract key ring creation from chain control
To make it possible to supply our own implementation of a secret key
ring, we extract that part from the chain control and split the whole
chain control creation into two parts.
2021-10-14 15:42:47 +02:00
Oliver Gugger
e1da1f8941
multi: extract wallet initialization
With this commit we extract the wallet creation/unlocking and
initialization completely out of the main function. This will allow us
to use custom implementations in the future.
2021-10-08 12:13:15 +02:00
Oliver Gugger
140d5a8086
chainreg+lnd: split chain control initialization
As a preparation for extracting the wallet related initialization code,
we first need to separate the purely configuration related chain control
initialization from the wallet related code. We do that by splitting the
chain control into a partial and full struct that is initialized in two
parts. This also allows us to create the wallet configuration itself
outside of the chain control package and we need to thread through fewer
parameters through the chain control config.
2021-10-08 12:06:54 +02:00
Oliver Gugger
cab800e1e7
chainreg: add chain source and channel constraints
As a preparation for separating the pure config related chain control
setup from the wallet related chain control, we store more information
in the chain control instance that is required for the wallet
initialization.
2021-10-08 12:06:53 +02:00
Oliver Gugger
d12154154a
chainreg+lnd: add block cache to chainreg config
The block cache size in the chainreg.Config previously wasn't used but
instead the block cache was passed in as a separate parameter. We
replace the cache size with the actual cache in the config to streamline
things somewhat.
2021-10-08 12:06:53 +02:00
Oliver Gugger
692ea25295
Merge pull request #5642 from guggero/in-memory-graph
In-memory graph cache for faster pathfinding
2021-10-04 11:20:23 +02:00
eugene
fdcd726f9a
multi: replace DefaultDustLimit with script-specific DustLimitForSize
This commit updates call-sites to use the proper dust limits for
various script types. This also updates the default dust limit used
in the funding flow to be 354 satoshis instead of 573 satoshis.
2021-09-29 13:33:10 -04:00
Andras Banki-Horvath
11cf4216e4
multi: move all channelstate operations to ChannelStateDB 2021-09-29 17:00:03 +02:00
Oliver Gugger
c4917ae7fc
multi: use kvdb.Backend for height hint DB
In order to separate our databases more clearly, we refactor the height
hint cache DB to use a kvdb backend instead of the channel DB instance
directly.
2021-08-04 14:55:51 +02:00
Oliver Gugger
9138c8abac
multi: rename local and remote chan DBs
As a preparation to not have a local and remote version of the database
around anymore, we rename the variables into what their actual function
is. In case of the RPC server we even directly use the channel graph
instead of the DB instance. This should allow us to extract the channel
graph into its own, separate database (perhaps with better access
characteristics) in the future.
2021-08-04 14:55:50 +02:00
Wilmer Paulino
0bd6f32867
chainreg: handle missing case for bitcoind signet rpc connectivity
This allows lnd to connect to bitcoind's expected signet RPC port.
2021-06-01 16:22:36 -07:00
Olaoluwa Osuntokun
0ed72b8c6a
Merge pull request #5025 from guggero/signet
Add basic bitcoin signet support
2021-05-26 18:19:57 -07:00
Joost Jager
42f4afef75
multi: add random coin selection 2021-05-24 20:09:56 +02:00
Oliver Gugger
4460903399
multi: add signet parameters
With this commit we make lnd compatible with the public signet test
network.
2021-05-18 13:06:03 +02:00
Andras Banki-Horvath
b6a620e6b2
misc: add ability to store the wallet in the remote DB 2021-05-04 17:33:11 +02:00
Elle Mouton
f8de10511e chainntnfs: add block cache to NeutrinoNotifier
This commit adds gives BtcdNotifier access to the block cache and wraps
its GetBlock method so that the block cache's mutex map for the specific
hash is used.
2021-04-28 09:59:50 +02:00
Elle Mouton
6ad5781bf1 routing: add block cache to CfFilteredChainView
This commit adds the block cache to the CfFilteredChainView struct
and wraps its GetBlock function so that block cache mutex map is used
when the call to neutrino's GetBlock function is called.
2021-04-28 09:46:11 +02:00