Commit Graph

19206 Commits

Author SHA1 Message Date
Elle Mouton
6295211d1a server: use errors.Is for error comparison 2025-07-08 15:10:29 +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
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
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
ziggie
e6aff211df docs: add release-notes 2025-07-03 06:28:00 +02:00
ziggie
ed8ad3d110 brontide: remove async goroutine to process gossip process result
We cannot rely on a response currently so we avoid spawning
goroutines. This is just a temporary fix to avoid the goroutine
leak.
2025-07-03 06:27:59 +02:00
ziggie
dedb75aea4 discovery: add comments 2025-07-03 06:27:38 +02:00
Oliver Gugger
8a03414190 Merge pull request #10017 from ellemouton/strictTypeForChanFeatures
refactor+multi: use *lnwire.FeatureVector for ChannelEdgeInfo features
2025-07-02 19:59:47 +02:00
ffranr
5cea874709 chainntnfs: export NotifierOptions and internal field for interface use
Export NotifierOptions and its internal field to enable external
satisfaction of the protofsm.DaemonAdapters interface.
2025-07-02 16:32:46 +01:00
Oliver Gugger
b5c84eab18 Merge pull request #9980 from GeorgeTsagk/enhance-aux-modifier
AuxTrafficShaper methods use first hop pub key
2025-07-02 16:50:57 +02:00
George Tsagkarelis
9ef92d9ffd docs: add release note 2025-07-02 14:35:43 +02:00
George Tsagkarelis
4ad84627e1 htlcswitch+routing: PaymentBandwidth accepts channel peer pubkey argument 2025-07-02 12:09:24 +02:00
George Tsagkarelis
1793b1ab64 routing+htlcswitch: ProduceHtlcExtraData uses first hop pub key 2025-07-02 12:03:34 +02:00
Oliver Gugger
1d2e5472b3 Merge pull request #9572 from yyforyongyu/fix-custom-msg
rpcserver: remove duplicate info from `RoutingPolicy`
2025-07-02 09:16:17 +02:00
Olaoluwa Osuntokun
7be45c3c42 Merge pull request #10013 from Roasbeef/gemini-review
CI: add config.yaml for gemini code review
2025-07-01 16:52:51 -07:00
Oliver Gugger
538723e33b Merge pull request #10016 from ellemouton/fixAccessManLogging
accessman: Fix pub key formatting in logs
2025-07-01 19:49:26 +02:00
Elle Mouton
2f2845dfc0 refactor+multi: use *lnwire.FeatureVector for ChannelEdgeInfo features
In this commit, we move the serialisation details of a channel's
features to the DB layer and change the `models` field to instead use a
more useful `*lnwire.FeatureVector` type.

This makes the features easier to work with and moves the serialisation
to where it is actually used.
2025-07-01 17:02:07 +02:00
Oliver Gugger
d8a12a5e57 Merge pull request #10011 from ellemouton/graphRefactor
refactor+graph/db: refactor preparations required for incoming SQL migration code
2025-07-01 15:58:29 +02:00
yyforyongyu
43ea309f2c lnrpc: update description for RoutingPolicy.CustomRecords 2025-07-01 19:59:51 +08:00
yyforyongyu
9ed32bddf3 docs: update release notes for 0.20 2025-07-01 19:59:50 +08:00
yyforyongyu
650e72518c rpcserver: remove duplicate info from RoutingPolicy
We remove the inbound fee record from `RoutingPolicy.CustomRecords` as
we already have fields `InboundFeeBaseMsat` and `InboundFeeRateMilliMsat`.
2025-07-01 19:59:50 +08:00
yyforyongyu
624dc6c26a lntest: assert CustomRecords fields on channel policy
Make sure the `CustomRecords` field is asserted.
2025-07-01 19:59:50 +08:00
Elle Mouton
92849388b8 graph/db: return channel DB info from insertChannel
In preparation for the kvdb->migration code, this commit updates
`insertChannel` to return the ID of the newly inserted channel along
with the IDs of the nodes that the channel links to.
2025-07-01 13:37:09 +02:00
Elle Mouton
4bde8e2d04 graph/db: refactor and clean-up
Refactor channelIDToBytes to return a slice instead of an 8 byte array
so that we dont need to use `[:]` everywhere.

Also make sure we are using this helper everywhere.
2025-07-01 13:37:09 +02:00
Elle Mouton
2310756307 graph/db: refactor source node fetching logic
Small refactor to introduce a re-usable getSourceNode function that we
can then make use of in the upcoming kvdb->SQL migration logic.
2025-07-01 13:37:07 +02:00
Elle Mouton
016fd9bb4d graph/db: create a re-usable forEachChannel
Create a forEachChannel function that does not rely on a KVStore being
instantiated. We will use this in our upcoming kvdb->SQL migration.
2025-07-01 13:31:48 +02:00
Elle Mouton
9452c0b950 graph/db: detach getChannelMap from KVStore 2025-07-01 13:31:48 +02:00
Elle Mouton
8660f76b20 graph/db: detach forEachNode from KVStore
So that we can use it in a context that only has access to a
kvdb.Backend. We'll use this in our kvdb->SQL migration.
2025-07-01 13:31:48 +02:00
Elle
cd7fa63827 Merge pull request #10003 from ellemouton/fixPeerBootstrappingFlake
discovery: deterministic bootstrapping for local test networks
2025-07-01 13:01:22 +02:00
Oliver Gugger
500808fadd Merge pull request #10010 from ellemouton/sqlGraphUpdates
graph/db: various misc updates
2025-07-01 12:40:50 +02:00
Oliver Gugger
5a8606cf80 Merge pull request #10007 from ellemouton/chanUpdateBitFields
graph/db: explicitly store bitfields for channel_update message & channel flags
2025-07-01 12:19:34 +02:00
Oliver Gugger
0ca9123dbf Merge pull request #10000 from yyforyongyu/explore-dyn
watchtower: fix logging and add comments
2025-07-01 12:17:07 +02:00
Elle Mouton
37d6390642 discovery: use a no-op hash accumluator for local networks
If LND is running on a local network, then use deterministic sampling so
that we can have deterministic peer bootstrapping.
2025-07-01 11:27:18 +02:00