Commit graph

18335 commits

Author SHA1 Message Date
MPins
ea918ebcb5 routing: add logging for routes discarded due to low success probability
Discarded routes with a success probability lower than the minimum
threshold are now logged accordingly when finding a blinded path.
2025-03-03 07:44:24 -03:00
MPins
746bdd6344 route: add ChanIDString func to return the route as a string
ChanIDString returns a string representation of the route's
channel IDs, formatting them in the order they appear in the
route (e.g., "chanID1 -> chanID2").
2025-03-03 07:44:24 -03:00
MPins
26c5ba2e16 routing: add the test for incoming chained channels on blinded path 2025-03-03 07:44:24 -03:00
MPins
798f10b344 itest: add the test for given incoming channel on blinded invoice 2025-03-03 07:44:24 -03:00
MPins
6155463f12 lndtest: Added function RPC call to asserts errors on AddInvoice 2025-03-03 07:44:24 -03:00
MPins
ebb428b789 lnd: add the option to set the incoming channel on blinded path
This commit makes sure that when an incoming channel list is
supplied for the blinded route, that it changes the other blinding
restrictions accordingly. Moreover it introduces a sanity check when
the number of paths for the blinded route is set to 0.
2025-03-03 07:44:24 -03:00
MPins
a2003850e7 multi: add the option to set the incoming channel on blinded path
Adding the incoming channel list parameter to FindBlindedPaths function
on router.go, adding the ability to restrict the blinded route to the
chained channel list for incoming channel. The first entry in the list
is the channel which points to the destination/target.
2025-03-03 07:44:24 -03:00
MPins
6fb1fc2275 routing: adding FetchChannelEdgesByID as a mock graph function 2025-03-03 07:42:17 -03:00
MPins
a2a67416d1 commands: add option to set the incoming channel on blinded path
Including the blinded path incoming channel list argument to the addinvoice command,
parsing and verifying that it has one or a comma separeted list of channels id.
2025-03-02 00:15:03 -03:00
MPins
7205418719 lnrpc: add the option to set the incoming channel on a blinded path
Add an option to the addinvoice rpc which allows to specify the blinded
path via a list of chained channels.
2025-03-02 00:14:55 -03:00
Oliver Gugger
dfd43c972c
Merge pull request #9519 from fuyangpengqi/master
refactor: use a more straightforward return value
2025-02-28 04:41:18 -06:00
fuyangpengqi
150f72414a refactor: use a more straightforward return value
Signed-off-by: fuyangpengqi <995764973@qq.com>
2025-02-28 17:09:56 +08:00
Oliver Gugger
8532955b35
Merge pull request #9540 from ellemouton/backwardsCompat
scripts+make+GH: Add simple backwards compatibility test to the CI
2025-02-27 05:05:03 -06:00
Elle Mouton
b3133b99d4
docs: add release note entry 2025-02-27 11:33:15 +02:00
Elle Mouton
343bdff26b
make+gh: add make helper and GH action
Add a makefile helper to run the neww backwards compatability test and
then add a new GH actions job to call it.
2025-02-27 11:33:15 +02:00
Elle Mouton
f0d4ea10a2
scripts/bw-compatibility-test: add backwards compat test
In this commit, a new backwards compatibility test is added. See the
added README.md file in this commit for all the info.
2025-02-27 11:33:15 +02:00
Oliver Gugger
e3d9fcb5ac
Merge pull request #9549 from yyforyongyu/fix-bitcond-test
Fix unit test flake `TestHistoricalConfDetailsTxIndex`
2025-02-26 07:23:30 -06:00
yyforyongyu
cfa4341740
routing: fix flake in TestFilteredChainView/bitcoind_polling 2025-02-26 19:51:53 +08:00
yyforyongyu
56fa3aae34
routing/chainview: refactor TestFilteredChainView
So each test has its own miner and chainView.
2025-02-26 19:51:53 +08:00
yyforyongyu
4bfcfea2ee
lntest+chainntnfs: make sure bitcoind node is synced
This commit makes sure the bitcoind node is synced to the miner when
initialized and returned from `NewBitcoindBackend`.
2025-02-26 19:51:52 +08:00
yyforyongyu
99d49dec6a
multi: change NewBitcoindBackend to take a miner as its param
Prepares for the following commit where we assert the chain backend is
synced to the miner.
2025-02-26 19:51:52 +08:00
yyforyongyu
c725ba9f25
docs: update release notes re flake fix 2025-02-26 19:51:52 +08:00
yyforyongyu
1618d2c789
chainntnfs+lntest: fix sync to miner block flake
In this commit we document an unexpected behavior found when connecting
a bitcoind node to a btcd node. We mitigate this in our test by
reconnecting the nodes when the connection is broken. We also limit the
connection made from `bitcoind` to be v1 only.
2025-02-26 19:51:52 +08:00
yyforyongyu
175301628f
lntest/unittest: make sure miner is connected to bitcoind
We change how the `bitcoind` node connects to the miner by creating a
temp RPC client and use it to connect to the miner. In addition we also
assert the connection is made.
2025-02-25 21:11:26 +08:00
yyforyongyu
245ea85894
lntest/unittest: assert bitcoind is shut down
Make sure the shutdown of `bitcoind` is finished without any errors.
2025-02-25 21:11:25 +08:00
yyforyongyu
7666d62a43
lntest/unittest: update config for miner and bitcoind
The config used for the miner is updated to skip banning and debug. For
bitcoind, the config is updated to use a unique port for P2P conn.
2025-02-25 21:10:40 +08:00
yyforyongyu
fa8527af09
Makefile+scripts: add unit test flake hunter
This commit adds a script to hunt flakes for a specific unit test with
trace logs. Also rename the make commands to make them more clear on
whether it's a unit test, itest, or paralleled itest.
2025-02-25 21:10:40 +08:00
Oliver Gugger
5d3680a6f6
Merge pull request #9484 from Abdulkbk/refactor-makedir
lnutils: add CreateDir util function
2025-02-25 01:00:45 -06:00
Oliver Gugger
b8c5e85821
Merge pull request #8900 from guggero/go-cc
Makefile: add GOCC variable
2025-02-25 00:59:14 -06:00
Yong
fca9fae2d8
Merge pull request #9433 from hieblmi/estimate-route-fee-fix
routerrpc: fix estimateroutefee for public route hints
2025-02-25 13:58:43 +08:00
Slyghtning
f867954a68
docs: update release notes 2025-02-24 09:56:24 +01:00
Slyghtning
6399d77c18
routerrpc: fix estimateroutefee for public route hints 2025-02-24 09:56:22 +01:00
Oliver Gugger
ad021a290d
Makefile: add GOCC variable 2025-02-23 09:48:54 +01:00
Oliver Gugger
5fe900d18d
Merge pull request #9534 from ellemouton/graph13
graph: refactor Builder network message handling
2025-02-21 08:38:35 -06:00
Elle Mouton
c89b616e7d
graph: refactor Builder network message handling
The exposed AddNode, AddEdge and UpdateEdge methods of the Builder are
currently synchronous since even though they pass messages to the
network handler which spins off the handling in a goroutine, the public
methods still wait for a response from the handling before returning.
The only part that is actually done asynchronously is the topology
notifications.

We previously tried to simplify things in [this
commit](d757b3bcfc)
but we soon realised that there was a reason for sending the messages to
the central/synchronous network handler first: it was to ensure
consistency for topology clients: ie, the ordering between when there is
a new topology client or if it is cancelled needs to be consistent and
handled synchronously with new network updates. So for example, if a new
update comes in right after a topology client cancels its subscription,
then it should _not_ be notified. Similariy for new subscriptions. So
this commit was reverted soon after.

We can, however, still simplify things as is done in this commit by
noting that _only topology subscriptions and notifications_ need to be
handled separately. The actual network updates do not need to. So that
is what is done here.

This refactor will make moving the topology subscription logic to a new
subsystem later on much easier.
2025-02-21 10:39:00 -03:00
Oliver Gugger
1227eb1cce
Merge pull request #9491 from ziggie1984/closechannel-rpc
Allow coop closing a channel with HTLCs on it via lncli
2025-02-21 05:05:53 -06:00
Olaoluwa Osuntokun
27440e8957
Merge pull request #9535 from guggero/remove-caching
GitHub: remove duplicate caching
2025-02-20 16:57:55 -08:00
Olaoluwa Osuntokun
553899bffb
Merge pull request #9447 from yyforyongyu/yy-sweeper-fix
sweep: start tracking input spending status in the fee bumper
2025-02-20 16:56:45 -08:00
Oliver Gugger
dc64ea97a2
GitHub: remove duplicate caching
Turns out that actions/setup-go starting with @v4 also adds caching.
With that, our cache size on disk has almost doubled, leading to the
GitHub runner running out of space in certain situation.
We fix that by disabling the automated caching since we already have our
own, custom-tailored version.
2025-02-20 18:14:29 +01:00
ziggie
8017139df5
docs: add release-notes 2025-02-20 17:43:18 +01:00
ziggie
f994c2cb9f
htlcswitch: fix log output 2025-02-20 17:43:18 +01:00
ziggie
f458844412
lnd: add max fee rate check to closechannel rpc 2025-02-20 17:43:18 +01:00
ziggie
59443faa36
multi: coop close with active HTLCs on the channel
For the lncli cmd we now always initiate the coop close even if
there are active HTLCs on the channel. In case HTLCs are on the
channel and the coop close is initiated LND handles the closing
flow in the background and the lncli cmd will block until the
transaction is broadcasted to the mempool. In the background LND
disallows any new HTLCs and waits until all HTLCs are resolved
before kicking of the negotiation process.
Moreover if active HTLCs are present and the no_wait param is not
set the error msg is now highlightning it so the user can react
accordingly.
2025-02-20 17:43:18 +01:00
Abdullahi Yunus
45a913ee91
lnutils: add createdir util function
This utility function replaces repetitive logic patterns
throughout LND.
2025-02-20 17:08:21 +01:00
Oliver Gugger
09a4d7e224
Merge pull request #9530 from ziggie1984/fix-debug-log
multi: fix debug log
2025-02-20 09:28:14 -06:00
yyforyongyu
9f7e2bfd96
contractcourt: fix errorlint 2025-02-20 23:14:12 +08:00
ziggie
9382fcb801
multi: fix debug log 2025-02-20 10:44:19 +01:00
yyforyongyu
7ab0e15937
sweep: fix error logging 2025-02-20 14:41:52 +08:00
yyforyongyu
353f208031
sweep: refactor IsOurTx to not return an error
Before this commit, the only error returned from `IsOurTx` is when the
root bucket was not created. In that case, we should consider the tx to
be not found in our db, since technically our db is empty.

A future PR may consider treating our wallet as the single source of
truth and query the wallet instead to check for past sweeping txns.
2025-02-20 14:41:52 +08:00
yyforyongyu
8d49246a54
docs: add release notes 2025-02-20 14:41:50 +08:00