Elle Mouton
61c1d258c3
graph/db: factor out helper code
...
Here we factor out some of the crud code in TestEdgePolicyMissingMaxHtcl
so that we can re-use it later on.
2025-07-08 14:30:14 +02:00
Elle Mouton
0162ee949c
graph/db: move TLV validation for KVStore
...
Here, we move TLV validation for the KVStore out of `updateEdgePolicy`
so that we can re-use `updateEdgePolicy` in our tests to write policies
with invalid TLV (since that was possible before the recently added TLV
sanity check) so that we can test that our SQL migration behaves
correctly for these cases.
2025-07-08 14:28:45 +02:00
Oliver Gugger
886ccd3f9b
Merge pull request #10042 from ziggie1984/debug-sending-payment-failure
...
routing: add logs to debug potential payment sending issue
2025-07-08 14:15:50 +02:00
Elle
11f6648527
Merge pull request #10036 from ellemouton/graphMig1-nodes
...
[graph mig 1]: graph/db: migrate graph nodes from kvdb to SQL
2025-07-08 14:15:18 +02:00
ziggie
eb4c87cdcb
routing: return error for getBandwidth and log it
2025-07-08 11:41:15 +02:00
Elle Mouton
cb959bddb0
docs: add release note
2025-07-08 11:37:44 +02:00
Elle Mouton
9657707175
graph/db: migrate source node to SQL store
2025-07-08 11:37:41 +02:00
Elle Mouton
8b2f4821d4
graph/db: migrate nodes to SQL store
...
This commit expands MigrateGraphToSQL so that it migrates all the graph
nodes from kvdb to SQL.
The TestMigrateGraphToSQL test is updated to cover the basic
LightningNode cases. A new test, `TestSQLMigrationEdgeCases`, is also
added and a case is added to tests the edge case where a node exists in
our kvdb store that has invalid TLV bytes.
2025-07-08 11:37:39 +02:00
ziggie
9a75400295
multi: add logs to debug potential payment sending issue
2025-07-08 10:54:59 +02:00
ziggie
923cafb989
multi: revert back changes from 9911
...
always process remote ADDs even when they are empty to trigger
the gc process when loading them back into memory.
2025-07-08 10:25:26 +02:00
Elle Mouton
084563c5c0
sqldb+invoices: create a re-usable comparion helper function
...
So that we can use it for comparisons in other migrations too.
2025-07-07 18:41:46 +02:00
Oliver Gugger
b815109b81
Merge pull request #10045 from yyforyongyu/fix-panic
...
contractcourt: only close quit in `Stop`
2025-07-07 16:30:58 +02:00
yyforyongyu
9fb0f77d8c
docs: update release docs
2025-07-07 16:01:04 +03:00
yyforyongyu
2b4c28204a
contractcourt: only close quit in Stop
...
Make sure we don't prematurely close the `quit` chans.
2025-07-07 15:46:47 +03:00
Elle Mouton
5c09652e1a
graph/db: add dev migration test helper
...
This commit was inspired by the invoices package
TestMigrationWithChannelDB test helper.
This test is purely for running locally to test the graph SQL migration.
It allows a dev to run the migration against a local `channel.sqlite` or
even `channel.db` file.
2025-07-07 13:35:30 +02:00
Elle Mouton
e3572e77c5
graph/db: add SQL migration function and test framework
...
In this commit, the basic framework for the graph SQL migration is
added. This sets us up for the commits to follow which will add
migration logic for each table in the graph commit by commit.
2025-07-07 13:34:19 +02:00
Elle Mouton
5d7abcdf03
graph/db: refactor SQL DB creation files
...
Factor out the transaction executor construction so that we can have
access to the raw BatchedSQLQueries type from within tests.
2025-07-07 08:36:12 +02:00
Elle Mouton
c9a775e7fb
graph/db: fix build flag directive
...
Fix a typo in the build directive.
2025-07-07 08:36:12 +02:00
Yong
ff32e90d1d
Merge pull request #10035 from ziggie1984/fix-switch-deadlock
...
fix switch deadlock
2025-07-04 16:35:20 +03:00
ziggie
edb7342daa
docs: add release-notes
2025-07-04 13:15:20 +02:00
ziggie
68b7aaa96f
switch: unlock mutex lock earlier
...
We now unlock the mutex lock of the switch as soon as possible to
avoid potetnial deadlock in the htlc switch.
2025-07-04 13:15:20 +02:00
Olaoluwa Osuntokun
b3eb9a3cb7
Merge pull request #10028 from ffranr/export-notifier-options
...
chainntnfs: export NotifierOptions and internal field for interface use
2025-07-03 13:28:08 -07:00
yyforyongyu
bac8c51076
docs: update release notes
2025-07-04 04:20:00 +08:00
yyforyongyu
c4c519a3ae
itest+lncfg: test the quiescence timeout behaivor
2025-07-04 04:20:00 +08:00
yyforyongyu
56fd8eeb43
lntest: add RPC SubscribePeerEvents
...
And a few assertion helpers.
2025-07-04 04:19:59 +08:00
yyforyongyu
d44b480977
lnd: fix notifying peer online event too early
...
We need to notify the peer is online only when it has been started
successfully.
2025-07-04 04:19:59 +08:00
yyforyongyu
2a45e8a0fa
itest: fix testQuiescence
...
The original test lets Bob send an HTLC to Alice, but Bob doesn't have
any balance to begin with. This commit now fixes it by explicitly
checking sending payment is allowed before quiescence, and forbidden
after.
2025-07-04 04:19:59 +08:00
yyforyongyu
463f51d371
lncfg: enable quiescence in non-dev environment
2025-07-04 04:19:59 +08:00
yyforyongyu
127b0e9f41
multi: add new config QuiescenceTimeout
...
This commit makes removes the `defaultQuiescenceTimeout` and makes it
configurable as different nodes have different network environment. In
addition the default timeout has been increased from 30s to 60s.
2025-07-04 04:19:59 +08:00
Yong
ffd944e8b7
Merge pull request #10012 from ziggie1984/fix-goroutine-leak
...
multi: prevent goroutine leak in brontide
2025-07-03 20:11:31 +08:00
yyforyongyu
240593a399
htlcswitch: log the error returned from SendMessage
2025-07-03 19:51:35 +08:00
yyforyongyu
d6c3400e4e
docs: update release notes
2025-07-03 19:51:35 +08:00
yyforyongyu
d9369ae1a8
htlcswitch: remove unnecessary prand.Seed
2025-07-03 19:51:35 +08:00
yyforyongyu
1b6ca8827e
htlcswitch: fix linters
...
Fix a few linter errors - these were not caught before as they were
configured to be ignored.
2025-07-03 19:51:33 +08:00
yyforyongyu
2bb8b90afd
htlcswitch: fix error not checked
...
As required by the linter.
2025-07-03 19:50:58 +08:00
yyforyongyu
31e166a6b3
htlcswitch: add processLocalUpdateFaillHTLC
2025-07-03 19:50:30 +08:00
yyforyongyu
765714e750
htlcswitch: add processLocalUpdateFulfillHTLC
2025-07-03 19:50:29 +08:00
yyforyongyu
c42bf9b545
htlcswitch: log err in the end in handleUpstreamMsg
2025-07-03 19:50:29 +08:00
yyforyongyu
87b490dfc4
htlcswitch: add processRemoteError
and processRemoteUpdateFee
2025-07-03 19:50:29 +08:00
yyforyongyu
4017104475
htlcswitch: add processRemoteRevokeAndAck
2025-07-03 19:50:29 +08:00
yyforyongyu
04abf96f60
htlcswitch: add processRemoteCommitSig
2025-07-03 19:50:29 +08:00
yyforyongyu
ad1566ee3f
htlcswitch: add processRemoteUpdateFailHTLC
2025-07-03 19:50:29 +08:00
yyforyongyu
e883a51a63
htlcswitch: add processRemoteUpdateFailMalformedHTLC
2025-07-03 19:50:28 +08:00
yyforyongyu
f9df5a9f51
htlcswitch: add processRemoteUpdateFulfillHTLC
2025-07-03 19:50:28 +08:00
yyforyongyu
212262bf88
htlcswitch: add processRemoteUpdateAddHTLC
2025-07-03 19:50:28 +08:00
yyforyongyu
83f658f714
htlcswitch: remove TODO and nolint
...
This old TODO is no longer relevant.
2025-07-03 19:50:28 +08:00
yyforyongyu
3af8281370
htlcswitch: add handler resumeLink
2025-07-03 19:50:25 +08:00
yyforyongyu
ca770bb4af
htlcswitch: notify channel active after reforwarding
...
The channel should only be considered active when its pending tasks are
finished, which includes,
1. sync channel state via reestablish.
2. send previous shutdown msg.
3. reset the mailbox's packets.
4. reforwarding logs loaded from restart.
When the above tasks are finished, the channel can be considered as
fully resumed from its previous disconnection.
2025-07-03 18:31:13 +08:00
yyforyongyu
09022b5f56
htlcswitch: add handler toggleBatchTicker
2025-07-03 18:31:12 +08:00
yyforyongyu
cccb447439
htlcswitch: add handler handleUpdateFee
2025-07-03 18:31:12 +08:00