Commit Graph

16738 Commits

Author SHA1 Message Date
Oliver Gugger
f2759dcb1a
Merge pull request #8759 from largemouth/master
chore: fix some function names
2024-07-10 12:16:49 -06:00
Oliver Gugger
a9655357ca
Merge pull request #8855 from bhandras/invoice-expiry-migration
sqldb+invoices: fix incorrectly stored invoice expiries when using native SQL
2024-07-09 02:06:28 -06:00
Andras Banki-Horvath
053faa6229
docs: update release notes for 0.18.3-beta 2024-07-09 08:39:58 +02:00
Andras Banki-Horvath
d0c1cec8c1
sqldb: switch away from pq to pgx for Postgres
Completely switch to the better maintained pgx driver.
2024-07-09 08:39:58 +02:00
Andras Banki-Horvath
95b99420fa
sqldb: add unit test for the invoice expiry migration 2024-07-09 08:39:57 +02:00
Andras Banki-Horvath
ed36598504
sqldb: add helpers to create test DBs migrated up to a select version 2024-07-09 08:39:57 +02:00
Andras Banki-Horvath
5292c76e10
sqldb: extract migration into method
Based on: https://github.com/lightninglabs/taproot-assets/pull/707
2024-07-09 08:39:57 +02:00
Andras Banki-Horvath
323af946e0
sqldb+invoices: add migration to fix incorrectly stored invoice expiries
Previously, when using the native schema, invoice expiries were incorrectly
stored as 64-bit values (expiry in nanoseconds instead of seconds), causing
overflow issues. Since we cannot determine the original values, we will set
the expiries for existing invoices to 1 hour with this migration.
2024-07-09 08:39:57 +02:00
Yong
3526f82b5d
Merge pull request #8887 from yyforyongyu/fix-err-match
multi: fix `lnwallet.ErrDoubleSpend`
2024-07-08 14:09:07 +08:00
yyforyongyu
e27a656c07
docs: add release notes for 0.18.3 2024-07-06 14:01:40 +08:00
yyforyongyu
26a365eb32
docs: update release notes 2024-07-06 13:59:28 +08:00
yyforyongyu
8f4bcd0b3a
lnwallet: fix ErrDoubleSpend 2024-07-06 13:59:28 +08:00
yyforyongyu
ddf46f435c
multi: update RPC error import path
These errors are now defined in `btcwallet/chain` instead of
`btcd/rpcclient`.
2024-07-06 13:59:28 +08:00
yyforyongyu
e0a506ab26
multi: use chain.MapRPCErr instead of rpcclient.MapRPCErr 2024-07-06 13:59:25 +08:00
yyforyongyu
1d40c55550
gomod: update btcwallet to include RPC errors 2024-07-06 13:55:12 +08:00
Elle
d7e0f69f34
Merge pull request #8854 from bhandras/invoices-limit-offset-fixup
invoices: fix SQL invoice query pagination
2024-07-04 21:26:56 +02:00
Andras Banki-Horvath
b35f0606ba
docs: update release notes for 0.18.2-beta 2024-07-04 17:32:12 +02:00
Andras Banki-Horvath
892561f8f0
sqldb: bump modernc.org/sqlite to 1.29.10 which fixes init data race
Tracking issue: https://gitlab.com/cznic/sqlite/-/issues/180
2024-07-04 17:32:12 +02:00
Andras Banki-Horvath
e45ed86263
invoices: fix and correctly cover paginated queries
Previously paginated queries offseted the add_index_get, add_index_let,
settle_index_get and settle_index_let parameters with the paginators
current page offset, however this was incorrect as we can just use
SQL's LIMIT/OFFSET to paginate. This commit fixes this issue and adds an
optional parameter to the constructor of the invoice SQL store to set
page size. This is useful when testing as we can now cover pagination
correctly with our existing unit tests.
2024-07-04 17:32:11 +02:00
Elle
71ba355d90
Merge pull request #8796 from ellemouton/acceptImplicitZeroConf
multi: allow min-depth of zero for non-zero conf channels
2024-06-28 07:19:46 -07:00
Elle Mouton
9d1320a2d0
docs: add release notes entry 2024-06-27 15:27:23 -07:00
Elle Mouton
1c65c3d072
funding: allow AcceptChannel with min depth of zero
Even if the channel type is not zero conf. We will still use a min depth
of at least 1. We just dont fail if our peer indicates trust.
2024-06-27 15:26:34 -07:00
Oliver Gugger
c34c0426fa
Merge pull request #8874 from ellemouton/assumeTLV2
routing: remove left over TLV feature bit checks
2024-06-27 01:34:54 -06:00
Oliver Gugger
3ceb7d5887
docs: update release notes 2024-06-26 14:30:28 -07:00
Oliver Gugger
b300da8446
routing: assume TLV payloads everywhere
This commit removes another check for TLV payload support of the
destination node. We assume TLV payloads as the default everywhere else,
so we just remove two checks that were previously forgotten.
2024-06-26 14:28:51 -07:00
Oliver Gugger
ce813276d5
Merge pull request #8862 from yyforyongyu/fix-publish-err
Fix an error string match between different `btcd` versions
2024-06-25 12:40:39 -06:00
yyforyongyu
7fd099b146
docs: update release notes and add notes for 0.18.2 2024-06-26 01:44:00 +08:00
yyforyongyu
3b4106ca00
mod: update btcd and btcwallet versions 2024-06-26 00:41:17 +08:00
Elle
6b64703db4
Merge pull request #8791 from ellemouton/assumeTLV
routing: assume TLV onion feature bit
2024-06-24 11:03:33 -07:00
Elle Mouton
738206fa96
docs: add release notes entry 2024-06-24 10:01:41 -07:00
Elle Mouton
99b3c57b7f
routing: assume TLV onion during route construction 2024-06-24 10:01:23 -07:00
Elle Mouton
738253f5e1
routing: assume TLV onion during path finding 2024-06-24 10:01:21 -07:00
Oliver Gugger
fb416c2fa2
Merge pull request #8856 from AbelLykens/patch-1
[docs] Update go instructions
2024-06-22 02:15:42 -06:00
AbelLykens
04f9a4faa4
[docs] Update go instructions
Building current lnd `0.18` fails with older go (`1.19.7`).

* Updated go download path to 1.22.4
* Updated hashes
* Added `rm -rf` instructions as per [go.dev instructions](https://go.dev/doc/install)
2024-06-21 19:27:52 +02:00
Olaoluwa Osuntokun
376b8cedc4
Merge pull request #8853 from Roasbeef/result-utils
fn: add additional utility methods for Result[T]
2024-06-20 16:11:26 -07:00
Olaoluwa Osuntokun
f1a38714d4
fn: add additional utility methods for Result[T]
`NewResult` makes it easy to wrap a normal function call in a result
value.

`Err` can be used to check the error case of the result without
unpacking the entire thing.

`AndThen2` allows a caller to compose a function on two results values,
with the closure only executing if both values are non-error.
2024-06-20 15:05:28 -07:00
Oliver Gugger
390f0723d3
Merge pull request #8838 from yyforyongyu/update-pendingsweeps
cli: update `pendingsweeps` response
2024-06-20 07:13:00 -06:00
Elle
2477bd756f
Merge pull request #8549 from matheusdtech/mc-store-perf-improv
Misson Control Store: Improve performance
2024-06-19 09:15:07 -07:00
Elle
2979afdc19
Merge pull request #8811 from hieblmi/fix-inbound-fee-typo
lncli: fix typo in inbound fee help text
2024-06-19 08:48:47 -07:00
Matheus Degiovani
f39edaa19a
docs: update release notes 2024-06-19 07:35:46 -03:00
Matheus Degiovani
0c7a173354
missioncontrolstore: remove duplication of in-memory data
This removes duplication of in-memory data during the periodic flushing
stage of the mission control store.

The existing code entirely duplicates the in-memory cache of the store,
which is very wasteful when only a few additional results are being
rotated into the store.

This has a significant performance penalty specially for wallets that
remain online for a long time with a low volume of payments. The worst
case scenario are wallets that see at most 1 new payment a second, where
the entire in-memory cache is recreated every second.

This commit improves the situation by determining what will be the
actual changes that need to be committed before initiating the db
transaction and only keeping track of these to update the in-memory
cache if the db tx is successful.
2024-06-19 07:34:35 -03:00
Matheus Degiovani
9059a655db
missioncontrolstore: avoid ticker when there is no work to be done.
This modifies the mission control store to avoid running the one second
ticker for flushing data when there is no work to be done.

This improves performance of a quiscent LN node by avoiding a one second
interval busy loop that does nothing when there are no payments flowing
through the node.
2024-06-19 07:34:35 -03:00
Matheus Degiovani
637ac85d1d
missioncontrolstore: skip work when there are no new entries
This modifies the mission control store to avoid doing any work when no
new payment result entries are in the queue to be processed.

The mission control store maintains keeps the latest N (in production:
1000) entries in its DB, evicting older entries when new ones are added.
Currently, its implementation is somewhat less performant than it could
be.

This commit adds an early return to the storeResults function to avoid
doing any DB or memory operations when its outstanding queue is empty,
improving the performance during quiescent periods of the LN node's
execution.
2024-06-19 07:34:34 -03:00
Matheus Degiovani
6a27bc29ba
missioncontrolstore: add additional tests and benchmarks
These will be useful in the next commits.
2024-06-19 07:33:14 -03:00
Slyghtning
b66e361afa
lncli: fix typo in inbound fee help text 2024-06-19 07:33:32 +02:00
Olaoluwa Osuntokun
c0f7c2849d
Merge pull request #8822 from michael1011/fix-config-error-handling
cfg: fail startup on flags.Error parsing error
2024-06-18 17:51:24 -07:00
michael1011
01f5af0a28
cfg: fail startup on flags.Error parsing error 2024-06-17 16:48:34 +02:00
Yong
e6f7a2d6a7
Merge pull request #8734 from hieblmi/cancel-estimateroutefee
routing: cancelable payment loop
2024-06-17 18:06:52 +08:00
Slyghtning
4568dfceee
docs: update release notes 2024-06-17 09:32:27 +02:00
Slyghtning
7bfa616371
lncli: cancelable flag for SendPaymentRequest 2024-06-17 09:32:26 +02:00