Commit Graph

19035 Commits

Author SHA1 Message Date
Boris Nagaev
61b3670113 lntest: do not do IO under mutex in fee_service
If HTTP response is consumed slowly, this might block other HTTP requests to
the fee service, because the mutex is held.
2025-06-24 00:44:45 -03:00
Olaoluwa Osuntokun
45c15646c6 Merge pull request #9945 from ziggie1984/optional-migration
Decayed log optional migration
2025-06-23 16:17:31 -07:00
Yong
09df5894d0 Merge pull request #9947 from yyforyongyu/export-itest-db
lntest: add a flag to export data generated during the test
2025-06-23 21:33:31 +08:00
yyforyongyu
3b84088d4a multi: enable passing flag basedir to make itest 2025-06-23 17:29:26 +08:00
yyforyongyu
343ae963b0 lntest: add a new basedir flag to keep test data 2025-06-23 17:29:26 +08:00
yyforyongyu
0d20e96e96 lntest: create GenBaseDir to generate the base dir 2025-06-23 17:28:48 +08:00
Yong
5ebb29309e Merge pull request #9977 from starius/itest-bitcoind-neutrino
lntest: enable neutrino testing with bitcoind
2025-06-23 17:08:18 +08:00
Boris Nagaev
7b70ad7fd1 docs: update release notes 2025-06-22 11:06:54 -03:00
Boris Nagaev
9100be5ba5 lntest: add method P2PAddr to backend
It is useful if we want to keep bitcoind main itest mode, but connect one node
using neutrino.
2025-06-22 11:06:54 -03:00
Boris Nagaev
07217f2dd8 lntest: fix p2p port binding
Use an additional -bind flag instead of -port to specify the default p2p port.

Flag -port sets the default port number that will be used for any -bind or
-whitebind that does not explicitly specify a port. So if we have the p2p
port set in -port and the tor p2p port set in a single -bind, bitcoind binds
only one port - the tor p2p port. And the default p2p port remained not bound!
2025-06-22 11:06:54 -03:00
Boris Nagaev
3d0031435c lntest: serve compact filters for neutrino
Enable this in bitcoind mode as well to be able to let a subset of LND nodes
to use neutrino with bitcoind backend.
2025-06-22 11:06:49 -03:00
ziggie
8208eb6d82 docs: add release-notes 2025-06-21 09:20:19 +02:00
ziggie
d220b87b60 multi: Add decayedlog db migration code
This commit adds the migration code for the decayedlog db which
is optional and will default to true.
2025-06-21 09:20:19 +02:00
ziggie
c7e773132b channeldb: update optional migration code for multiple versions 2025-06-21 09:20:18 +02:00
ziggie
c19d89149f channeldb: add migration34
Migration34 garbage collects the decayed log database. This commit
only adds the migration code and does not use it.
2025-06-21 09:20:17 +02:00
Olaoluwa Osuntokun
faa68a220e Merge pull request #9880 from yyforyongyu/accessman
Improve access control in peer connections
2025-06-20 15:26:24 -07:00
Olaoluwa Osuntokun
1756f40b36 Merge pull request #9929 from yyforyongyu/fix-decalylog
htlcswitch: remove the bucket `batchReplayBucket`
2025-06-20 14:58:45 -07:00
Oliver Gugger
7857d2c6ae Merge pull request #9969 from ellemouton/fixLnwireTestDataRace
lnwire: fix test data race
2025-06-20 13:47:41 +02:00
Elle Mouton
667e0aadc3 lnwire: fix test data race
Ensure that tests can run in parallel without causing a data race by
adding a `makeTestChannelUpdate` constructor rather than sharing the
same `testChannelUpdate` type between tests. This is needed since some
tests write to the type.
2025-06-20 12:22:59 +02:00
Oliver Gugger
5e9e1826c6 Merge pull request #9965 from ellemouton/checkNilPolicy
graph/db: do nil check on ChannelEdgePolicy
2025-06-20 10:55:07 +02:00
Elle Mouton
5b0a9501ad graph/db: remove ChannelEdgePolicy nil warning logs
Since it is not a bug for us to not yet have the policy info for a
channel, we can remove these potentially spammy log lines.
2025-06-20 09:07:38 +02:00
Elle Mouton
b5bc9c8fbe graph/db: check for nil policies
In the graph/db code, we should always expect to deal with potentially
nil ChannelEdgePolicy pointers and so we should always do a nil check
before making use of the struct.
2025-06-20 09:07:37 +02:00
Yong
a3209a5bfa Merge pull request #9950 from starius/describegraph-authproofs2
lnrpc: add auth_proof to graph APIs
2025-06-20 14:54:03 +08:00
Boris Nagaev
409bf3c6cc docs: update release notes (include_auth_proof) 2025-06-19 18:19:33 -03:00
Boris Nagaev
7a70dcb36e lnrpc: add auth_proof to graph APIs
Added flag include_auth_proof to DescribeGraph, GetNodeInfo, GetChanInfo
and the corresponding lncli commands. With the flag, these APIs add AuthProof
(signatures from the channel announcement) to the returned ChannelEdge.

This is useful to extract this data from the DB.
2025-06-19 18:19:33 -03:00
Oliver Gugger
40efefeb6a Merge pull request #9959 from ellemouton/chanGraphContext2
multi: add context.Context param to more graphdb.V1Store methods
2025-06-19 16:42:55 +02:00
Elle Mouton
91513623b5 routing: remove a context.TODO() 2025-06-19 14:49:32 +02:00
Elle Mouton
9597f01ce3 graph/db: thread context through to HighestChanID 2025-06-19 14:49:32 +02:00
Elle Mouton
004440a86c graph/db: thread context through to LookupAlias 2025-06-19 14:49:32 +02:00
Elle Mouton
81c063eb96 graph/db: thread context through to UpdateEdgePolicy 2025-06-19 14:49:31 +02:00
Elle Mouton
3fdb9b84f4 graph/db: thread context to AddChannelEdge 2025-06-19 14:47:41 +02:00
Elle Mouton
7ba4051cfd graph/db: thread context through to SourceNode 2025-06-19 14:47:41 +02:00
Elle Mouton
65049ddd02 graph/db: thread context through to SetSourceNode 2025-06-19 14:47:40 +02:00
yyforyongyu
e47091063a config: update docs for num-restricted-slots 2025-06-19 20:29:38 +08:00
yyforyongyu
250a61af6d lnd: remove peer from peerChanInfo when necessary
We now remove the peer from `peerChanInfo` if this peer doesn't have
channels with us. Also patched a unit test for `removePeerAccess`.
2025-06-19 20:23:46 +08:00
yyforyongyu
32d8e2123d channeldb+lnd: rename peerCounts to peerChanInfo for clarity 2025-06-19 16:48:13 +08:00
Oliver Gugger
e0a9705d59 Merge pull request #9935 from ellemouton/graphSQL11-forEachMethods
[11] graph/db: Implement various "ForEach" methods on the graph SQLStore
2025-06-19 10:29:42 +02:00
yyforyongyu
03de0f9e4b funding+lnd: make sure accessman won't interrupt funding flow
If there's an error occured when updating the peer's status after the
channel status is changed, we now make sure we log the error instead of
letting it interrupt the channel open/close flow.
2025-06-19 16:05:59 +08:00
yyforyongyu
0dc10ba692 accessman+lnd: rename checkIncomingConnBanScore for clarity 2025-06-19 16:05:59 +08:00
yyforyongyu
869e541b7c docs: add release notes for improved accessman 2025-06-19 16:05:59 +08:00
yyforyongyu
9caa5f220d itest+lntest: add more itest for accessman 2025-06-19 16:05:59 +08:00
yyforyongyu
e003cb5d4a accessman: make sure to decrement PendingOpenCount 2025-06-19 16:05:56 +08:00
Olaoluwa Osuntokun
168d63ce37 Merge pull request #9528 from Roasbeef/res-opt
fn: implement ResultOpt type for operations with optional values
2025-06-18 18:22:11 -07:00
Olaoluwa Osuntokun (aider)
0c25bd3f19 fn: implement ResultOpt type for operations with optional values
This commit introduces the ResultOpt type, which represents an operation
that can either succeed with an optional final value or fail with an
error.

The .gitignore file is also updated to exclude specific files related to
the `aider` tool.
2025-06-18 18:16:24 -07:00
Elle Mouton
ece157b40b graph/db: implement ForEachNodeChannel
Which lets us then run `TestIncompleteChannelPolicies` and
`BenchmarkForEachChannel` against our SQL backends.
2025-06-18 16:55:00 +02:00
Elle Mouton
0607982886 graph/db: implement ForEachNodeDirectedChannel and ForEachNodeCacheable
Here we add the `ForEachNodeDirectedChannel` and `ForEachNodeCacheable`
SQLStore implementations which then lets us run
`TestGraphTraversalCacheable` and `TestGraphCacheForEachNodeChannel`
against SQL backends.
2025-06-18 16:55:00 +02:00
Elle Mouton
8af32951c7 graph/db+sqldb: implement ForEachNode
In this commit the `ForEachNode` method is added to the SQLStore. With
this, the `TestGraphCacheTraversal` unit test can be run against SQL
backends.
2025-06-18 16:54:59 +02:00
Elle Mouton
d60761f79c graph/db: fix error check in test
An error in TestChanUpdatesInHorizon was previously not checked
correctly.
2025-06-18 15:24:16 +02:00
Elle Mouton
973d211083 graph/db: fix DecodeHexColor
Ensure that it does a sanity check on the length of its input and also
only call it if the nullable SQL string is not null.

Expand an existing unit tests to cover the DecodeHexColor such that it
would have caught the bug.
2025-06-18 15:19:23 +02:00
Elle Mouton
23d4bfc1b0 graph/db: add comment and switch to length check
Use a length check to determine if a bitcoin signature has been set or
not. Also add a clarifying comment to explain why we only need to check
if one signature field is set to determine if we have the auth proof for
the channel or not.
2025-06-18 15:17:55 +02:00