20399 Commits
Author SHA1 Message Date
Elle Mouton 3cb61bee95 server: make use of structured logging for peer connections 2025-07-01 08:03:19 +02:00
Elle Mouton a1006d8372 accessman: fix structured logging formatting 2025-07-01 07:43:26 +02:00
Elle 8147bb69c0 Merge pull request #10009 from ellemouton/fixLogLinePanic
discovery: fix log line panic
2025-07-01 06:58:46 +02:00
Gustavo Stingelin Cardoso Filho 0324902ea8 cmd/wtclient: add usage info for session and terminate commands 2025-06-30 23:06:51 -03:00
Olaoluwa Osuntokun 7af4a18e3a CI: add config.yaml for gemini code review
So far, most of the AI code review tools I've seen in the wild have been
pretty lackluster. I figure we should give the new Gemini Code Assist
variant a try: https://github.com/marketplace/gemini-code-assist/.

This PR adds an initial yaml config for it.

Relevant commands (as comments on the OP PR):
  *  `/gemini review` to perform a code review
  *  `/gemini summary` provides a code summary
  * comment like normal tagging `@gemini-code-assist`
  * `/gemini help`
2025-06-30 16:08:46 -07:00
Elle Mouton f1b7ccc6b2 sqldb+graph/db: prune graph nodes in a single query
Update the pruneGraphNodes routine to prune the graph nodes in a single
query instead of two.
2025-06-30 18:41:28 +02:00
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 e68b882f7b docs: update release notes 2025-06-25 13:15:25 +02:00
Elle Mouton b41a079901 multi: use relaxed feature bit Set method for peer features
The spec says: `The origin node MUST NOT set both the optional and
mandatory bits`. and so this is why we have the SafeSet method which
prevents us from accidentally setting both optional and required bits
for any of our own feature bits. But the spec then also says `if both
the optional and the mandatory feature bits in a pair are set, the
feature should be treated as mandatory.` which means that when we read
the feature vectors of our peers or from a payment request, we should be
a bit less strict and not error out. We should just set both bits which
will result in "IsRequired" returning true.

Update the `TestExtractIntentFromSendRequest` test to show the new
behaviour.
2025-06-25 13:14:31 +02:00
Elle Mouton 9ee3bebc6a lnrpc: add test case to TestExtractIntentFromSendRequest
Here we add a test case to TestExtractIntentFromSendRequest which shows
that an error is returned if the destination feature bit vector of a
payment request contains both the required and optional bits for a given
feature. This will be updated in an upcoming commit to be less strict.
2025-06-25 13:10:48 +02:00
Elle Mouton a4459cc5a5 docs: update release notes 2025-06-25 12:57:40 +02:00