Commit Graph

19612 Commits

Author SHA1 Message Date
ziggie
9ac93e75ac paymentsdb: fix linter 2025-08-20 09:08:18 +02:00
ziggie
f87841d638 paymentsdb: declare helper functions and add comments 2025-08-20 09:07:53 +02:00
ziggie
82242f5342 multi: rename KVPaymentDB to KVStore
This matches the same naming as used in the graph package.
2025-08-20 09:07:53 +02:00
ziggie
6abd539a2d paymentsdb: add missing function comments 2025-08-20 09:07:53 +02:00
ziggie
8245e356e5 paymentsdb: move serialization methods to kv_store file 2025-08-20 09:07:53 +02:00
ziggie
7423bfece9 paymentsdb: rename assertPaymentstatus 2025-08-20 09:07:53 +02:00
ziggie
a1fc8a3eee paymentsdb: rename db agnostic tests to highlight their behaviour 2025-08-20 09:07:52 +02:00
ziggie
68a8cf199d paymentsdb: rename assertPayments 2025-08-20 09:07:52 +02:00
ziggie
8726ba3d7c paymentsdb: move more tests
we make the index assertion db independant so it is a noop for
a future native sql backend. This allows us to reuse even more
tests for the different db architectures.
2025-08-20 09:07:52 +02:00
ziggie
e22b898c1e paymentsdb: move db interface dependant tests to different file
This commit starts reusing test cases which are not dependant on
the kv db backend. So they can be later used with the native db
implementation as well.
2025-08-20 09:07:52 +02:00
ziggie
39b7417797 paymentsdb: use querypayments method to make test db agnostic 2025-08-20 09:07:52 +02:00
ziggie
46500f94e0 multi: fix comment of InitPayment method 2025-08-20 09:07:51 +02:00
ziggie
9f824fe1ee multi: introduce interface for payment database 2025-08-20 09:07:48 +02:00
Yong
9a4968656a Merge pull request #8825 from Abdulkbk/restore-node-announcement
lnd: use persisted node announcement settings across restarts
2025-08-18 18:21:00 +08:00
Abdullahi Yunus
fbac73011f docs: add release note 2025-08-16 16:39:53 +01:00
Abdullahi Yunus
2dc9ca43f3 itest: test for node ann persistence
This commit adds an itest that verify the behaviour of correctly
reusing persisted node ann configs across restarts. It also ensures
that the node ann configs are applied using the correct hierarchy.
2025-08-16 16:39:53 +01:00
Abdullahi Yunus
75895dbe3a lnd: use saved node ann config from previous run
This commit ensures that we start with the alias, node color,
addresses, and features as advertised in the node's previous
runtime. This approach maintains consistency in the node's
advertised information across restarts.
2025-08-16 16:39:52 +01:00
Oliver Gugger
fb1adfc218 Merge pull request #10160 from mohamedawnallah/increase-wait-wallet-sync-timeout
lnwallet/test: increase wait for wallet to sync to `30s` to match with the returned error in case of timeout
2025-08-15 06:54:11 -06:00
Oliver Gugger
365f1788e5 Merge pull request #10157 from ziggie1984/remove-pgp-key
remove expired key
2025-08-15 01:10:05 -06:00
Oliver Gugger
c428b7f430 Merge pull request #10158 from ellemouton/graphTest
graph/db: expand TestPopulateViaMigration for easy testing
2025-08-15 00:52:51 -06:00
Mohamed Awnallah
e8283e958c lnwallet/test: make the timeout err msg and actual timeout consistent 2025-08-15 06:05:21 +00:00
Yong
3841d55549 Merge pull request #10112 from GustavoStingelin/check-pgp-keys-expiry
CI: add pgp keys expiry check
2025-08-15 12:12:33 +08:00
Yong
dfc29b3f71 Merge pull request #9847 from ziggie1984/refactor-payments-code-04
Refactor Payment PR 4
2025-08-15 12:03:33 +08:00
Gustavo Stingelin Cardoso Filho
7ba28c4961 CI: add pgp keys expire check 2025-08-14 15:36:10 -03:00
Gustavo Stingelin Cardoso Filho
29bfeb2084 scripts: add pgp keys expire check 2025-08-14 15:35:55 -03:00
ziggie
2b856f036e multi: fix linter 2025-08-14 19:53:18 +02:00
ziggie
e24ae0d7f3 paymentsdb: add missing comments for variables 2025-08-14 19:53:18 +02:00
ziggie
df9bac2ecf multi: move PaymentCreationInfo to payment pkg 2025-08-14 19:53:18 +02:00
ziggie
d138e23919 multi: move FailureReason to payment package 2025-08-14 19:53:18 +02:00
ziggie
d77b2f9c26 mulit: move payment query code to separate file
We also rename the struct since it is now in its own package
there is no need to prefix it.
2025-08-14 19:53:18 +02:00
ziggie
03af9858d2 multi: move payment related code into own package
This commit moves most of the code into its own package. It is
the smallest code move possible without moving import cycles and
keeping the changes to the code base as small as possible during
refactor.
2025-08-14 19:53:15 +02:00
Oliver Gugger
31fc556507 Merge pull request #10155 from ziggie1984/add-missing-invoice-settle-index
Add missing invoice index for native sql
2025-08-14 09:23:37 -06:00
Elle Mouton
ec17f8bc4e graph/db: expand TestPopulateViaMigration for easy testing
Expand the test and make it easily configurable for the purposes of
locally testing the graph SQL migration.
2025-08-14 16:31:04 +02:00
Oliver Gugger
4b3ede5cb0 Merge pull request #10154 from ellemouton/graphPerf11
graph/db: use batch validation to improve SQL migration performance
2025-08-14 05:54:21 -06:00
ziggie
35e9979d67 docs: add schema update doc 2025-08-14 12:00:40 +02:00
ziggie
b98cc24cfe docs: add release-notes 2025-08-14 12:00:40 +02:00
ziggie
ea9fb80eff sqldb: use the new schema
We put this new schema update into the main line and change the
versions of the schema updates which are currently only available
in dev builds. The schemas need to be chronological therefore we
also need to rename the file numbers.
2025-08-14 11:59:09 +02:00
ziggie
dccb669ad1 scripts: remove expired key 2025-08-14 09:37:53 +02:00
ziggie
506d226eb3 sqldb: add missing index for settled invoices 2025-08-14 08:17:15 +02:00
ziggie
22fbbee837 sqldb: delete wrong index names and add missing one 2025-08-14 08:17:15 +02:00
ziggie
77a6b577eb channeldb: move helper function to codec.go
This method is not only used by the payment logic so we need to
move it to a generalized place because in the following commits
we move payment related code into its own package.
2025-08-14 08:08:51 +02:00
ziggie
4bb21a7284 channeldb: export pagination method
We export some methods related to the pagination logic be the
kv store implemenation of the payment data will live in another
package.
2025-08-14 08:08:50 +02:00
Elle Mouton
f560c4d95b sqldb: use uint32 for config values 2025-08-14 08:03:28 +02:00
Elle Mouton
d5729845d0 graph/db: remove outdated TODO 2025-08-14 08:00:07 +02:00
Elle Mouton
b1c643f4f1 graph/db: add migration timing logs
Time the full duration of each graph migration step for the purposes of
logging.
2025-08-14 08:00:07 +02:00
Elle Mouton
5b06474744 graph/db+sqldb: batch validation for zombie index migration
Finally, we update the migrateZombieIndex function to use batch
validation just like was done in the previous commits. Here, we
additionally make sure to validate the entire zombie index entry and not
just the SCID.
2025-08-14 08:00:07 +02:00
Elle Mouton
a490e03479 graph/db+sqldb: use batch validation for closed SCID migration
As was done in the previous commits for nodes & channels, we update the
migrateClosedSCIDIndex function here so that it validates migrated
entries in batches rather than one-by-one.
2025-08-14 08:00:06 +02:00
Elle Mouton
8554f17b3f graph/db+sqldb: validate prune log migration using batching
As was done in the previous commits for nodes & channels, we update the
migratePruneLog function here so that it validates migrated entries in
batches rather than one-by-one.
2025-08-14 08:00:06 +02:00
Elle Mouton
81c54611c1 graph/db+sqldb: use batch fetching during channel&policy migration
Restructue the `migrateChannelsAndPolicies` function so that it does the
validation of migrated channels and policies in batches. So instead of
fetching channel and its policies individually after migrating it, we
wait for a minimum batch size to be reached and then validate a batch of
them together. This lets us make way fewer DB round trips.
2025-08-14 08:00:06 +02:00
Elle Mouton
03ef2740a6 graph/db+sqldb: use batch validation for node migration
Restructue the `migrateNodes` function so that it does the validation of
migrated nodes in batches. So instead of fetching each node individually
after migrating it, we wait for a minimum batch size to be reached and
then validate a batch of nodes together. This lets us make way fewer DB
round trips.
2025-08-14 08:00:06 +02:00