Commit Graph

19180 Commits

Author SHA1 Message Date
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
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
Elle Mouton
339dd0c1a7 discovery: introduce hashAccumulator interface
Create an abstract hashAccumulator interface for the Channel graph
bootstrapper so that we can later introduce a deterministic accumulator
to be used during testing.
2025-07-01 11:26:14 +02:00
Elle Mouton
bca6c0d115 server: use IsLocalNetwork check for DNS bootstrapper decision
It should be ok to use IsLocalNetwork here since the
chainreg.ChainDNSSeeds map does not have an entry for either simnet or
regtest.
2025-07-01 11:24:39 +02:00
Elle Mouton
04564977d8 lncfg: add IsLocalNetwork helper
It returns true for Signet and Regtest networks.
2025-07-01 11:23:29 +02:00
Elle Mouton
c5b2e4e50a graph/db: update outdated comments 2025-07-01 10:12:54 +02:00
Elle Mouton
e4137a3f14 graph/db: fix ChanUpdate message/channel flag bug
Here we start using the newly added message_flags and channel_flags
columns of the channel_policies table. The test added previoulsy to
demonstrate the bug is now updated to show that the bug has been fixed.
2025-07-01 10:12:54 +02:00
Elle Mouton
4a05e5a226 sqldb/sqlc: add message and channe flags to channel_policies table
We need to explicitly store the entire bitfield types since we may have
channel_updates with bitfields containing bits we just dont need or
understand but we still need to store the entire bitfield so that the
reconstructed announcement remains valid.

This commit only adds the new columns but does not use them yet. NOTE:
this is ok since the migration adding this schema is not available in
the production build yet.
2025-07-01 10:12:54 +02:00
Elle Mouton
90aacaae2a sqldb: add SQLInt16 helper 2025-07-01 10:12:53 +02:00
Elle Mouton
fa32f97c05 graph/db: unit test to demonstrate SQL chan policies bug
This commit adds a new graph store unit test that demonstrates that
there is currently a bug in the SQL version of the graph store where
unknown message or channel flags in a channel_update are not persisted
correctly. This will be fixed in an upcoming commit.
2025-07-01 10:12:53 +02:00
Elle Mouton
64fc92abe7 graph/db: update nextUpdateTime in tests
Let it return time.Time instead. Also, make use of the helper in a few
more places.
2025-07-01 10:04:03 +02:00
Elle
c7aa17971b Merge pull request #10006 from ellemouton/fixSQLFetchChannelEdgesByID
graph/db: let FetchChannelEdgesByID behave as promised
2025-07-01 10:01:36 +02:00
Oliver Gugger
31814a1198 Merge pull request #10014 from GustavoStingelin/issue-9583-missing-wt-cli-usage
cmd/wtclient: add usage info for session and terminate commands
2025-07-01 09:04:29 +02:00
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