Commit Graph

19439 Commits

Author SHA1 Message Date
Elle Mouton
714e528a3a graph/db: fix address fetching error 2025-06-30 18:40:25 +02:00
Elle Mouton
272a2db16c graph/db: demonstrate SQL node addresses fetch bug
This commit demonstrates that currently the Addresses field of a
LightningNode is not populated correctly if the node has no addresses if
the SQL graph store is being used. This will be fixed in an upcoming
commit.
2025-06-30 18:40:21 +02:00
Elle Mouton
73eca1bf3d graph/db: update outdated comment 2025-06-30 18:40:13 +02:00
Elle Mouton
25daf253c0 discovery: fix log line panic
If a method returns an error, we should assume all other parameters to
be nil unless the documentation explicitly says otherwise. So here, we
fix a log line where a dereference is made to an object that will be nil
due to an error being returned.
2025-06-30 18:27:56 +02:00
Oliver Gugger
e54206f8c2 Merge pull request #9990 from ziggie1984/follow-up-payment-addr-spec-update
itest coverage increase following the spec update regarding MPP payments
2025-06-30 15:45:14 +02:00
Oliver Gugger
01dfee6f8d Merge pull request #10004 from ellemouton/ensureNewNodeAnnUpdateTime
multi: use "errors" pkg everywhere and ensure newer node announcement timestamp
2025-06-30 14:40:22 +02:00
Elle
e8213dbc44 Merge pull request #9752 from erickcestari/reject-payment-without-invoice
routerrpc: reject payment to invoice that don't have payment secret or blinded paths
2025-06-30 13:11:36 +02:00
Elle Mouton
64110cf459 graph/db: let FetchChannelEdgesByID behave as promised
The comment of FetchChannelEdgesByID says that if the ErrZombieEdge
error is returned, then the ChannelEdgeInfo return parameter will also
still be populated and returned (ie, wont be nil). This commit updates
the SQLStore implementation of FetchChannelEdgesByID to do this. This is
needed to prevent nil dereference panics at any call-sites that depend
on the method working as it describes.
2025-06-30 11:04:35 +02:00
Elle Mouton
0862ba3f41 server: ensure newer node announcement timestamp
On startup, we currently blindly overwrite our node announcement info
for our source node. This includes overwriting the existing LastUpdate
timestamp. This can cause an issue with our new SQL backends in the case
that the new timestamp is not greater than the previously written
timestamp. So here, we first fetch the source node and make sure to use
a timestamp that is greater than the previosly set one.
2025-06-30 09:46:55 +02:00
Elle Mouton
8cf567b948 multi: use the "errors" package everywhere
Replace all usages of the "github.com/go-errors/errors" and
"github.com/pkg/errors" packages with the standard lib's "errors"
package. This ensures that error wrapping and `errors.Is` checks will
work as expected.
2025-06-30 09:46:55 +02:00
yyforyongyu
bef90c6a84 watchtower: fix logging and add comments 2025-06-27 19:01:33 +08:00
Oliver Gugger
6290edf146 Merge pull request #9996 from calvinrzachman/lseed
chainreg: use new lseed service
2025-06-27 12:31:28 +02:00
Oliver Gugger
e75c82e25a Merge pull request #9988 from starius/remove-used-proto-message
lnrpc: remove unused type ConfirmationUpdate
2025-06-26 17:15:18 +02:00
Oliver Gugger
5f961e4349 Merge pull request #9972 from ellemouton/graphSQL17-complete-unit-tests
[17] multi: run all graph unit tests against SQL backends & run itest suite against SQL graph backend
2025-06-26 12:40:42 +02:00
Elle Mouton
cc0be0bca2 graph/db: let IsZombieEdge return an error 2025-06-26 10:19:51 +02:00
Elle Mouton
e38aa6d1e0 multi: itest jobs with SQL graph backend
In this commit, a new `test_native_sql` build flag is defined. If this
build flag is used along with the `--use-native-sql` config option, then
the SQLStore implementation of the graphdb.V1Store will be initialised.
This is then used to run our itest suite against the new SQLStore graph
implementation.

NOTE that this only works for new nodes currently - the migration from
kv-to-sql is yet to be implemeneted.
2025-06-26 10:12:54 +02:00
Elle Mouton
b4b1c4bd8d graph/db: remove KVStore fall-back
Now that SQLStore fully implements V1Store, we no longer need the
KVStore fall-back.
2025-06-26 10:12:46 +02:00
Elle Mouton
3ccaacd16f multi: rename MakeTestGraphNew to MakeTestGraph 2025-06-26 10:12:30 +02:00
Elle Mouton
c06036d2b4 multi: use MakeTestGraphNew for all remaining unit tests
And delete the old MakeTestGraph function.

Here we need to update some of our unit tests to ensure that any updates
to existing nodes or channel policies have newer timestamps. This is so
that we don't violate our SQL DB constraints that prevent updates to a
node or channel policy record if the new update is not newer (has a
newer LastUpdate time) than the currently presisted record).
2025-06-26 10:12:27 +02:00
Elle Mouton
e0801f5a5d discovery: use errors.Is for error check
Ensure that the check works for wrapped errors. Otherwise, this breaks
for a SQLStore graph backend which wraps the error it returns.
2025-06-26 10:11:02 +02:00
Olaoluwa Osuntokun
3493b08785 Merge pull request #9978 from ziggie1984/fix-peer-connection
multi: fix deadlock in p2p race condition
2025-06-25 17:36:40 -07:00
Olaoluwa Osuntokun
5f00be2b8c Merge pull request #9148 from ProofOfKeags/lnwire-dyncomms-update
DynComms [2/n]: lnwire: add authenticated wire messages for Dyn*
2025-06-25 17:16:36 -07:00
Calvin Zachman
d9f06226fb docs: update release notes 2025-06-25 11:59:25 -04:00
Oliver Gugger
fb1fef9e6c Merge pull request #9971 from ellemouton/graphSQL16-closed-scids
[16] graph/db: SQL closed SCIDs table and last few methods
2025-06-25 17:32:49 +02:00
Calvin Zachman
7c911ec954 chainreg: use new lseed service
This points lnd at the new deployment of the lseed
service used to provide candidate peers during initial
network bootstrap.
2025-06-25 10:58:20 -04:00
Elle
1fcf112107 Merge pull request #9925 from ellemouton/rbIncomingFollowup
routing: clean-up & fix blinded path incoming chained channel logic
2025-06-25 16:30:40 +02:00
Oliver Gugger
53b249efc0 Merge pull request #9991 from ziggie1984/add-probe-logging
routerrpc: add log line for probing the invoice request
2025-06-25 14:49:51 +02:00
ziggie
d6b89b9e9e docs: add release-notes 2025-06-25 14:24:36 +02:00
ziggie
24e3958a0b lnd: improve code comment 2025-06-25 13:50:18 +02:00
ziggie
409561ac62 lnd: rename removePeer to removePeerUnsafe
rename `removePeer` to highlight that the mutex has to be acquired
before calling it.
2025-06-25 13:50:17 +02:00
ziggie
0151993b88 docs: add release-notes 2025-06-25 13:50:17 +02:00
ziggie
3329308bce multi: fix deadlock in p2p race condition
In case we cannot guarantee that the peers has started up
completely we launch the disconnect method asynchronously.
2025-06-25 13:50:17 +02:00
Elle Mouton
daf6a08747 graph/db: fix log precision 2025-06-25 13:26:53 +02:00
Elle Mouton
81ce05fced graph/db: start lastID for pagination at -1
Just to be very sure that we don't miss a valid ID.
2025-06-25 13:26:53 +02:00
Elle Mouton
23c8f7099c graph/db: impl ForEachChannelCacheable 2025-06-25 13:26:52 +02:00
Elle Mouton
34cb6a9f27 graph/db: impl GraphSession 2025-06-25 13:26:52 +02:00
Elle Mouton
933ab3c6b7 graph/db+sqldb: impl PutClosedScid and IsClosedScid 2025-06-25 13:26:52 +02:00
Elle Mouton
5effa96766 sqldb: closed_scids table 2025-06-25 13:26:52 +02:00
Elle Mouton
d46552f5ad graph/db+sqldb: implement AddEdgeProof
And run `TestAddEdgeProof` against the SQL backends.
2025-06-25 13:26:51 +02:00
Elle
5d926b39a6 Merge pull request #9939 from ellemouton/graphSQL15-prune-log
[15] graph/db: SQL prune log
2025-06-25 13:24:24 +02:00
Elle Mouton
a4459cc5a5 docs: update release notes 2025-06-25 12:57:40 +02:00
Elle Mouton
6475787750 routing: fix log line formatting 2025-06-25 12:57:30 +02:00
Elle Mouton
4945bd42fa routing: expand routeblinding path finding tests
Cover more cases for the incoming chained channel feature.
2025-06-25 12:57:28 +02:00
Elle Mouton
34154802f3 routing+itest: fix route blinding path selection bug
Here we fix a bug which would not include the selected incoming blinded
path chain from being included in the selected path set if it meets the
minimum length requirement. The appropriate unit test and itest is
updated to demonstrate the fix.
2025-06-25 12:55:36 +02:00
Elle Mouton
51f1932d48 itest: clean-up partially specified blinded path test
Improve the readability of the existing test.
2025-06-25 12:50:11 +02:00
Elle Mouton
067e316df8 routing: clean-up the tests a bit
This is just in preparation for the next commit. The test will be
cleaned up more after a bug is fixed.
2025-06-25 12:49:51 +02:00
Elle Mouton
4bc0aee35b routing: improve TestFindBlindedPaths readability
Add a helper so that we can refer to channels by using the aliases of
the nodes that own the channel instead of needing to use the raw channel
ID.
2025-06-25 12:33:01 +02:00
Elle Mouton
da37fe20fc routing: add comments and clean-up to findBlindedPaths
Here we add some more comments and a bit of code clean up to the
`findBlindedPaths` function. No logic is changed here.
2025-06-25 12:33:00 +02:00
Oliver Gugger
fb720c174b Merge pull request #9989 from hieblmi/round-up
chainfee: method to round up the fee for a given transaction weight
2025-06-25 12:11:09 +02:00
Elle Mouton
e875183c4f sqldb+graph/db: impl DisconnectBlockAtHeight
Which lets us run `TestDisconnectBlockAtHeight` and
`TestStressTestChannelGraphAPI` against our SQL backends.
2025-06-25 11:22:03 +02:00