Commit Graph

18927 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
1c76c6198c build: bump Go version to v1.23.9 2025-05-06 15:50:16 -07:00
Oliver Gugger
67a40c90ad Merge pull request #9782 from Roasbeef/v19-rc4
build: bump to version v0.19 rc4
v0.19.0-beta.rc4
2025-05-06 18:36:20 +02:00
Oliver Gugger
221b7634a6 Merge pull request #9783 from bitromortac/2505-loadmc-fixes
lncli: establish connection after parsing of mc data for loadmc
2025-05-06 13:52:57 +02:00
bitromortac
306df7048f docs: update release notes 2025-05-06 11:16:36 +02:00
bitromortac
d33c92bd19 lncli: option to skip prompts for loadmc
This makes the command scriptable.
2025-05-06 11:13:30 +02:00
bitromortac
725a80a3b7 lncli: remove possibility to discard mission control from loadmc
This can already be done with resetmc and was only included here because
loadmc was used in a different context.
2025-05-06 10:59:41 +02:00
bitromortac
452022ee75 lncli: establish connection after mc parsing for loadmc
It can take some time to unmarshal large mission control data sets such
that the macaroon can expire during that phase. We postpone the
connection establishment to give the user more time to answer the
prompt.
2025-05-06 10:59:38 +02:00
bitromortac
56ccf60267 lncli: correct docs for loadmc 2025-05-06 10:53:37 +02:00
Olaoluwa Osuntokun
850f1edc5f build: bump to version v0.19 rc4 2025-05-05 12:58:35 -07:00
Olaoluwa Osuntokun
7b6c1cf840 Merge pull request #9781 from bitromortac/2505-loadmc
lncli: add loadmc command
2025-05-05 12:00:32 -07:00
bitromortac
aaccc2bcaa docs: update release notes 2025-05-05 15:02:55 +02:00
bitromortac
8351018f8b lncli: add loadmc command
This command lets one import data exported by `lncli querymc > mc.json`
via `lncli loadmc --mcdatapath mc.json`.
2025-05-05 15:02:55 +02:00
bitromortac
180f61b9eb lncli: change importmc category 2025-05-05 15:02:55 +02:00
Oliver Gugger
334a7d1123 Merge pull request #9770 from bitromortac/2504-mc-migration-fix
routing+migration: fix mission control migration with nil failure msg
2025-05-02 14:22:59 +02:00
bitromortac
07f863a2a5 routing: refine amount scaling
Mission control may have outdated success/failure amounts for node pairs
that have channels with differing capacities. In that case we assume to
still find the liquidity as before and rescale the amounts to the
according range.
2025-05-02 10:30:28 +02:00
bitromortac
5afb0de8a8 routing: forget info for contradictions
If we encounter invalid mission control data, we fall back to no
knowledge about the node pair.
2025-05-02 10:30:28 +02:00
bitromortac
5ba9619d22 routing: don't compute prob for success amounts
We skip the evaluation of probabilities when the amount is lower than
the last success amount, as the probability would be evaluated to 1 in
that case.
2025-05-02 10:30:28 +02:00
bitromortac
3819941c12 routing: regularize bimodal model
If the success and fail amounts indicate that a channel doesn't obey a
bimodal distribution, we fall back to a uniform/linear success
probability model. This also helps to avoid numerical normalization
issues with the bimodal model.

This is achieved by adding a very small summand to the balance
distribution P(x) ~ exp(-x/s) + exp((x-c)/s), 1/c that helps to
regularize the probability distribution. The distribution becomes finite
for intermediate balances where the exponentials would be evaluated to
an exact zero (float) otherwise. This regularization is effective in
edge cases and leads to falling back to a uniform model should the
bimodal model fail.

This affects the normalization to be s * (-2 * exp(-c/s) + 2 + 1/s) and
the primitive function to receive an extra term x/(cs).

The previously added fuzz seed is expected to be resolved with this.
2025-05-02 10:30:12 +02:00
bitromortac
fe32105b3e routing: add test for small scale
This test demonstrates that the current bimodal model leads to numerical
inaccuracies in a certain regime of successes and failures.
2025-05-02 10:26:13 +02:00
bitromortac
615b617cda routing: add test for fuzz test special case
This test demonstrates an error found in a fuzz test by adding a
previously found seed, which will be fixed in an upcoming commit.

The following fuzz test is expected to fail:
go test -v -fuzz=Prob ./routing/
2025-05-02 10:25:19 +02:00
bitromortac
04eec71d54 routing: use default tolerance for bimodal testing 2025-05-02 10:24:22 +02:00
bitromortac
55e7343b14 routing: update to realistic test values
The bimodal model doesn't depend on the unit, which is why updating to
more realistic values doesn't require changes in tests.

We pin the scale in the fuzz test to not invalidate the corpus.
2025-05-02 10:23:56 +02:00
bitromortac
5020e1f98b docs: update release notes 2025-05-02 08:43:04 +02:00
bitromortac
15f0888fa8 routing: fix mission control migration
This commit is temporary and demonstrates a panic. To be squashed with
the following commit.
2025-05-02 08:42:25 +02:00
bitromortac
aa9abb3d96 routing: make sure failure message is valid 2025-04-30 17:43:58 +02:00
bitromortac
a450d85309 routing: remove paymentFailure pointer
This introduces an option instead to signal whether there was a failure
for result interpretation.
2025-04-30 17:43:58 +02:00
bitromortac
4498a78cb0 routing: remove paymentFailureInfo
We can remove paymentFailureInfo since we can gate the result
interpretation on the source index, meaning that if we don't have a
source index, we deal with an unknown payment outcome because we
couldn't pinpoint the failing hop.
2025-04-30 17:43:57 +02:00
bitromortac
e5c541407f routing: make msg and index optional
This is later used to handle their nil values.
2025-04-30 17:42:53 +02:00
Oliver Gugger
b068d79dfb Merge pull request #9776 from saubyk/19.0-releasenotes-update
docs: update release notes with more detail on the RBF coop close section
2025-04-30 08:14:07 +02:00
saubyk
52e1764e0a docs: update release notes with more detail on the RBF coop close section 2025-04-29 21:07:51 -07:00
Yong
f21e3f3ee5 Merge pull request #9772 from yyforyongyu/show-all-inputs
sweep: return all inputs in `PendingSweeps`
2025-04-30 02:24:52 +08:00
yyforyongyu
b610678703 docs: update release notes 2025-04-29 14:15:36 +08:00
yyforyongyu
8f936aa9eb itest: update num of sweeps in AssertNumPendingSweeps
Since we now return all sweeps, we need to update the call to include
immature sweeps.
2025-04-29 14:15:31 +08:00
yyforyongyu
d991f5659a commands: add new field MaturityHeight 2025-04-29 13:49:22 +08:00
yyforyongyu
94463c6844 walletrpc: add new field MaturityHeight 2025-04-28 21:44:10 +08:00
yyforyongyu
0807ce61a1 sweep: return all inputs from PendingSweeps
Previously we'd skip returning immature inputs to stay backwards
compatible. This has the downside as the node operator cannot take
actions on this input, like some customized batching strategy via
`bumpfee` RPC.

After this change, it means when calling `bumpfee` RPC, it will now
update the params for the immature input instead of returning an error
saying `output does not belong to wallet`.

We also add a `MaturityHeight` field so the user knows when this input
will be swept.
2025-04-28 21:44:10 +08:00
Oliver Gugger
b34afa33f6 Merge pull request #9764 from ZZiigguurraatt/RBF-release-notes-cleanup
docs/release-notes: fix indentation in RBF close section
2025-04-28 12:38:23 +02:00
ZZiigguurraatt
cc3615c0a8 docs/release-notes: fix indentation in RBF close section 2025-04-25 15:06:57 -04:00
Oliver Gugger
7e50b8438e Merge pull request #9759 from guggero/fix-release
GitHub: fix order of operations for release build
2025-04-24 12:15:07 +02:00
Oliver Gugger
d9089b11ac GitHub: fix order of operations 2025-04-24 08:36:17 +02:00
Olaoluwa Osuntokun
bc4229b32e Merge pull request #9736 from Roasbeef/0-19-0-rc3
build: bump version to v0.19.0 rc3
v0.19.0-beta.rc3
2025-04-23 15:12:15 -07:00
Oliver Gugger
4862251833 Merge pull request #9750 from starius/fix-InternalKeyForAddr-for-imported-addresses
lnwallet: fix InternalKeyForAddr for imported addr
2025-04-23 17:53:13 +02:00
Boris Nagaev
dc2cad9b0f docs: update release-notes for 0.19.0 2025-04-23 11:53:30 -03:00
Boris Nagaev
c9b5974341 itest: test imported address in coop close
Make sure that an address imported to LND via ImportTapscript or ImportPublicKey
can be used as a delivery address in coop close.

New test cases:
 - P2TR address imported with ImportTapscript
 - P2TR address imported with ImportPublicKey
 - P2WPKH address imported with ImportPublicKey

Safeguard against https://github.com/lightninglabs/loop/issues/923
2025-04-23 11:53:29 -03:00
Boris Nagaev
6451ce495a itest: use prefixed sub-tests
More sub-tests are needed in "coop close with external delivery" itest, which
would break the limit for 50 blocks mined. Turning it into prefixed itest.

Also used new exclusion approach in test "remote signer" where all the prefixed
tests are excluded.
2025-04-23 11:52:39 -03:00
Boris Nagaev
429000e360 lnwallet: fix InternalKeyForAddr for imported addr
An address imported using ImportTapscript doesn't provide a private key
so it can't satisfy waddrmgr.ManagedPubKeyAddress interface. So we don't
return an error for imported addresses.
Fix https://github.com/lightninglabs/loop/issues/923
2025-04-23 11:17:00 -03:00
Boris Nagaev
b5c9df81f0 lnwallet: fix error message
Include the variable of interest (walletAddr), not the outcome of the check
(pubKeyAddr) which is always nil.
2025-04-23 11:17:00 -03:00
Oliver Gugger
a35ace7371 Merge pull request #9739 from ellemouton/rpcInterceptorMD
lnrpc+rpcperms: add ctx metadata pairs to RPCMiddlewareRequest
2025-04-23 11:21:32 +02:00
Oliver Gugger
1aad61c2b6 Merge pull request #9755 from guggero/payment-bandwidth-funding-blob
htlcswitch+routing: add funding blob to PaymentBandwidth
2025-04-22 22:23:45 +02:00
Oliver Gugger
56d2381f51 htlcswitch+routing: add funding blob to PaymentBandwidth
For certain auxiliary bandwidth checks we need to know the funding blob
that was present when the channel was created.
2025-04-22 21:21:11 +02:00