Commit graph

16196 commits

Author SHA1 Message Date
yyforyongyu
a21e6610f2
gomod: update btcd and btcwallet versions 2024-03-07 06:45:30 +08:00
Keagan McClelland
59700892b7 lnwire: make LinkUpdater a subclass of Message
Conceptually, all messages that are capable of identifying the
channel_id on which they operate are themselves messages. Here we
codify this.
2024-03-06 11:59:19 -08:00
Keagan McClelland
f5f0286e34 peer+lnwire: move LinkUpdater to lnwire
The purpose of this interface is to distinguish messages that are
bound to a particular channel_id from those that are not. There is
no reason this ought to be a property of the peer package as it is
entirely determined by the contents of the message itself. Therefore
we move it to the lnwire package so it can be used without having
import cycles elsewhere in the codebase.
2024-03-06 11:59:19 -08:00
Keagan McClelland
3761912680 htlcswitch: avoid leaking peer interface from link
Here we notice that the only use of the Peer call on the link is
to find out what the peer's pubkey is. To avoid leaking handles to
IO actions outside the interface we reduce the surface area to
just return the peer's public key.
2024-03-06 11:59:09 -08:00
Oliver Gugger
5f89a8b832
Merge pull request #8523 from guggero/linter-use-cache
make: use Golang build and module cache for linter
2024-03-06 07:28:10 -06:00
Oliver Gugger
834371c995
make: use Golang build and module cache for linter
This commit gives the linter container access to the local machine's
build and module cache, drastically decreasing the run time of
subsequent linter runs (no difference on first run with this change).
2024-03-06 13:38:51 +01:00
Keagan McClelland
be69b022d9 htlcswitch: remove Switch reference from channelLink 2024-03-05 16:43:29 -08:00
Oliver Gugger
6cef367336
Merge pull request #8136 from hieblmi/fee-estimation-probe
Probing for more reliable route fee estimation
2024-03-05 11:35:57 -06:00
Slyghtning
fba6fdaf94
docs: update release notes 2024-03-05 09:24:27 +01:00
Slyghtning
814e1a79a6
lncli: add estimateroutefee command 2024-03-05 09:24:27 +01:00
Slyghtning
e79b8b2986
itest: estimate route fee tests 2024-03-05 09:24:27 +01:00
Slyghtning
ef069b658d
itest: preparatory fee estimation changes 2024-03-05 09:24:27 +01:00
Slyghtning
7d9589ecbf
routerrpc+zpay32: EstimateRouteFee overhaul
In this commit the mission control based fee estimation
is supplemented with a payment probe estimation which can
lead to more accurate estimation results. The probing
utilizes a hop-hint heurisic to detect routes through LSPs
in order to manually estimate fees to destinations behind
an LSP that would otherwise block the payment probe.
2024-03-05 09:24:27 +01:00
Slyghtning
24080c51f9
multi: fee estimation timeout parameters
conf: fee estimation timeout in sample config
2024-03-05 09:24:27 +01:00
Slyghtning
721038d1a4
routerrpc: overhaul RouteFeeRequest with probing parameters. 2024-03-05 09:24:25 +01:00
Keagan McClelland
2bd9911804 fn: add slice utilities
In the year of our lord 2024 we should not be writing for loops
for standard operations. Here we introduce named slice operations
not found in the golang slices package. Note all these functions
are pure.
2024-03-02 11:43:07 -08:00
Olaoluwa Osuntokun
f61761277f
Merge pull request #8513 from lightningnetwork/lnd-master-version-17-99
build: bump version to v0.17.99
2024-03-01 13:58:48 -06:00
Oliver Gugger
10a6861bc9
build: bump version to v0.17.99
In this commit, we bump the version of the master branch to v0.17.99.
This reflects the fact that master will be a super set of all the minor
releases until v0.18, and will also include changes towards v0.18.
2024-03-01 10:29:04 +01:00
Andras Banki-Horvath
6c09617568
docs: update release notes for v0.18.0-beta 2024-03-01 10:08:10 +01:00
Andras Banki-Horvath
29ae17ba71
github: add nativesql itests to the matrix 2024-03-01 10:08:10 +01:00
Andras Banki-Horvath
ba8e7550d5
itest: add the -nativesql flag to run SQL itests with native SQL tables 2024-03-01 10:08:10 +01:00
Andras Banki-Horvath
7a45bbbeab
lnd: call into the correct InvoiceStore from RPC calls 2024-03-01 10:08:10 +01:00
Andras Banki-Horvath
42508d44e5
lnd: update sample-lnd.conf 2024-03-01 10:08:10 +01:00
Andras Banki-Horvath
ce1b57da2d
sqldb: exclude sqlite from the JS and unsupported platform builds 2024-03-01 10:08:09 +01:00
Andras Banki-Horvath
88370de1ab
lnd: use native SQL invoice store if configured 2024-03-01 10:08:09 +01:00
Andras Banki-Horvath
e31879ea0a
lncfg: instantiate the native SQL backend if configured
This commit adds an optional separate "native" SQL backend that will
host all tables supporting native SQL. For now since we don't have many
such tables we'll keep it in one file for SQLite, but it may be split up
if desired.
2024-03-01 10:08:09 +01:00
Andras Banki-Horvath
debfaf41b9
lncfg: use the sqldb config types instead of the kvdb counterparts 2024-03-01 10:08:09 +01:00
Andras Banki-Horvath
aba45018a8
sqldb: merge SQLite and Postgres configs with the kvdb counterparts
This commit is part of a refactor that unifies configuration of the
sqldb and kvdb packages for SQL backends.
In order to unify the SQLite and Postgres configuration under sqldb we
first need to ensure that the final config types are compatible with
the alreay deployed versions.
2024-03-01 10:08:09 +01:00
Andras Banki-Horvath
aee1f7f563
invoices: run InvoiceStore and InvoiceRegistry tests on PostgreSQL too 2024-03-01 10:08:09 +01:00
Andras Banki-Horvath
06730824a2
sqldb: fixup PostgreSQL fixture to allow creating separate DBs per test
This change will enable us to use a single PostgreSQL container instead of
spawning new a one for each (parallel) unit test reducing overall test
runtime.
2024-03-01 10:08:08 +01:00
Andras Banki-Horvath
b10ce17cd4
invoices: run InvoiceStore and InvoiceRegistry tests on SQLite too 2024-03-01 10:08:08 +01:00
Andras Banki-Horvath
734d3a9d66
invoices: small test fixes 2024-03-01 10:08:08 +01:00
Andras Banki-Horvath
39211d25ed
invoices: make test HTLC circuit keys unique 2024-03-01 10:08:08 +01:00
Andras Banki-Horvath
3d56d2f1ee
sqldb: add full SQL InvoiceStore implementation 2024-03-01 10:08:08 +01:00
Andras Banki-Horvath
5cf67c4440
sqldb: add utility functions for SQL NULL types 2024-03-01 10:08:07 +01:00
Andras Banki-Horvath
74e7a50f4a
sqldb: convert primary key violation to ErrSQLUniqueConstraintViolation
Besides the usual unique constraint violation that we already support we
also want to return the same error if the primary key constraint is
violated.
2024-03-01 10:08:07 +01:00
Andras Banki-Horvath
6a360fb2e2
sqldb: simplify and fixup the existing invoice store schema and queries
This commit attempts to fix some issues with the invoice store's schema that we
couldn't foresee before the implementation was finished. This is safe as the
schema has not been instantiated yet outside of unit tests. Furthermore the
commit updates invoice store SQL queries according to fixes in the schema as
well as to prepare the higher level implementation in the upcoming commits.
2024-03-01 10:08:07 +01:00
Andras Banki-Horvath
3e0f98a75a
sqldb: introduce replace for the BIGINT type alias 2024-03-01 10:08:07 +01:00
positiveblue
e7d82fa530
tools: update sqlc version to v1.25.0 2024-03-01 10:08:07 +01:00
Olaoluwa Osuntokun
e623263b7f
Merge pull request #8499 from Roasbeef/taproot-nonce-tlv-t
multi: upgrade new taproot TLVs to use tlv.OptionalRecordT
2024-02-29 16:00:09 -06:00
Olaoluwa Osuntokun
cac779b69e
funding: send warning to remote peer if chan nonce missing on reest 2024-02-29 11:32:31 -06:00
Olaoluwa Osuntokun
7feb8b21e1
multi: upgrade new taproot TLVs to use tlv.OptionalRecordT
In this commit, we update new Taproot related TLVs (nonces, partial sig,
sig with nonce, etc). Along the way we were able to get rid of some
boiler plate, but most importantly, we're able to better protect against
API misuse (using a nonce that isn't initialized, etc) with the new
options API. In some areas this introduces a bit of extra boiler plate,
and where applicable I used some new helper functions to help cut down
on the noise.

Note to reviewers: this is done as a single commit, as changing the API
breaks all callers, so if we want things to compile it needs to be in a
wumbo commit.
2024-02-29 11:32:26 -06:00
Olaoluwa Osuntokun
6bd556d38c
build: bump tlv version to v1.2.3 2024-02-29 11:32:20 -06:00
Keagan McClelland
38db17b8cc htlcswitch: remove redundant field from channelLink 2024-02-27 17:06:35 -08:00
Olaoluwa Osuntokun
72764b1473
Merge pull request #8100 from bhandras/updateinvoice-refactor
channeldb: refactor `UpdateInvoice` to make it simpler to create SQL specific implementation
2024-02-27 16:50:02 -08:00
Oliver Gugger
48a3d56335
Merge pull request #8503 from ffranr/fix-err-wrap
Correct `fmt.Errorf` error wrapping instances
2024-02-27 12:20:16 -06:00
ffranr
e0358df39e
doc: update release notes 2024-02-27 17:08:02 +00:00
ffranr
b308895583
lncli: unit test makes use of error wrapping during comparison
This commit modifies a unit test such that it inspects a wrapped error
rather than comparing errors by string.
2024-02-27 17:08:01 +00:00
ffranr
cd566eb097
multi: fix fmt.Errorf error wrapping
Refactor fmt.Errorf usage to correctly wrap errors instead of using
non-wrapping format verbs.
2024-02-27 11:13:40 +00:00
ffranr
581c16d72f
lint: ensure the linter checks fmt.Errorf error wrapping 2024-02-27 11:12:28 +00:00