Commit Graph

18997 Commits

Author SHA1 Message Date
Nicolas Dorier
34cf59f2b9
bump go 2026-02-04 09:00:00 +09:00
Olaoluwa Osuntokun
f6ac04309e
lnrpc: add ValidatePayReqAmt helper for invoice amount validation
In this commit, we introduce a new ValidatePayReqAmt helper function
in the lnrpc package that consolidates the logic for validating a
caller-specified payment amount against a BOLT11 invoice amount. The
helper handles three cases: zero-amount invoices (caller must specify
an amount), fixed-amount invoices with no caller override (use invoice
amount), and fixed-amount invoices with a caller override (allow
overpayment, reject underpayment).

This helper will be used in the next commit to fix a bug where
amt_msat was silently ignored when paying fixed-amount invoices.
2026-02-04 08:57:57 +09:00
Olaoluwa Osuntokun
f5c1443c97
rpcserver+routerrpc: allow overpayment of fixed-amount invoices
Previously, the SendPaymentSync path in rpcserver.go silently ignored
the amt_msat field when paying a BOLT11 invoice that already contained
a fixed amount, and the SendPaymentV2 path in router_backend.go
rejected the request outright with "amount must not be specified when
paying a non-zero amount invoice". Both behaviors prevented users from
intentionally overpaying an invoice, which is permitted by the BOLT
spec.

In this commit, we replace the duplicated amount validation logic in
both extractPaymentIntent (rpcserver.go) and
extractIntentFromSendRequest (router_backend.go) with calls to the new
ValidatePayReqAmt helper. When a caller specifies amt_msat alongside a
fixed-amount invoice, the payment now proceeds as long as the
specified amount is at least the invoice amount. Underpayment is still
rejected with a clear error message.

Fixes https://github.com/lightningnetwork/lnd/issues/10541
2026-02-04 08:57:45 +09:00
Olaoluwa Osuntokun
63eefaf5ed
itest: add send payment overpay integration test
In this commit, we add an integration test that verifies a payer can
overpay a fixed-amount BOLT11 invoice by specifying a larger amt_msat
in the SendPaymentV2 request. The test creates a 1000 sat invoice,
pays it with 1100 sat (1,100,000 msat), and asserts that both the
sender's payment record and the receiver's invoice reflect the
overpaid amount.
2026-02-04 08:51:49 +09:00
rockstardev
fb3853be8f
Adding BtcPayServer related files and resources 2025-09-18 22:57:53 -05:00
Olaoluwa Osuntokun
2fb725e0e2
Merge pull request #10171 from Roasbeef/0-19-3-branch-final
release: bump version to v0.19.3
2025-08-20 11:52:35 -07:00
Olaoluwa Osuntokun
efc1bfc317
build: bump version to v0.19.3 2025-08-20 10:55:54 -07:00
Oliver Gugger
1a5fda6470
Merge pull request #10152 from lightningnetwork/0-19-3-branch-rc2
release: create v0.19.3-rc2 branch
2025-08-15 04:09:49 -06:00
Oliver Gugger
c113aa4a14
build: bump version to v0.19.3-beta.rc2 2025-08-15 08:48:18 +02:00
Oliver Gugger
c3226e8c22
Merge branch '0-19-3-branch-rc2-10139' into 0-19-3-branch-rc2 2025-08-12 21:43:15 +02:00
ziggie
5cfc0ea936
docs: add release notes 2025-08-12 21:42:32 +02:00
ziggie
40b40f7ae4
multi: bump Golang version to v1.23.12 2025-08-12 21:42:29 +02:00
Oliver Gugger
4498921091
Merge branch '0-19-3-branch-rc2-9871' into 0-19-3-branch-rc2 2025-08-12 21:28:51 +02:00
George Tsagkarelis
38a719d528
docs: update release notes for NoOp HTLCs 2025-08-12 21:28:35 +02:00
George Tsagkarelis
2e90d5c2d4
lnwallet: add table-driven test for evaluateNoOpHtlc helper 2025-08-12 21:26:35 +02:00
George Tsagkarelis
814bcb64dd
lnwallet: add noop case to retransmit test
To make sure we don't cause force-closures because of commit sig
mismatches, we add a test case to verify that the retransmitted HTLC
matches the original HTLC.
2025-08-12 21:26:35 +02:00
George Tsagkarelis
a3f19d5cfe
lnwallet: add noop HTLC tests
Adds some simple tests to check the noop HTLC logic of the lightning
channel.
2025-08-12 21:26:35 +02:00
George Tsagkarelis
776df9159e
lnwallet: detect and handle noop HTLCs
We update the lightning channel state machine in some key areas. If the
noop TLV is set in the update_add_htlc custom records then we change the
entry type to noop. When settling the HTLC if the type is noop we credit
the satoshi amount back to the sender.
2025-08-12 21:26:35 +02:00
George Tsagkarelis
c9d8e41e34
lnwallet: add IsAdd helper to AuxHtlcDescriptor
We also add the IsAdd helper to the AuxHtlcDescriptor, as external
software using the aux framework might want to know which type of HTLC
this is.
2025-08-12 21:26:34 +02:00
George Tsagkarelis
53554cd438
lnwallet: add noop updateType to paymendDescriptor
We add a new update type to the payment descriptor to describe this new
type of htlc. This type of HTLC will only end up being set if explicitly
signalled by external software.
2025-08-12 21:26:34 +02:00
Oliver Gugger
7eeafc1de7
Merge branch '0-19-3-branch-rc2-10141' into 0-19-3-branch-rc2 2025-08-12 21:25:16 +02:00
ziggie
039629b4af
docs: add release-notes 2025-08-12 21:25:16 +02:00
ziggie
dd1d57d82d
routing: make sure attempts are always resolved after a timeout
We check the context of the payment lifecycle at the beginning of
the `resumepayment` loop. This will make sure we have always the
latest state of the payment before deciding on the next steps in
the function `decideNextStep`.
2025-08-12 21:25:15 +02:00
Olaoluwa Osuntokun
985d29fd4a
Merge pull request #10134 from lightningnetwork/0-19-3-branch-rc1
release: create v0.19.3-rc1 branch
2025-08-06 12:03:25 -07:00
Oliver Gugger
eccdd3c966
build: bump version to v0.19.2-beta.rc1 2025-08-06 14:53:23 +02:00
Oliver Gugger
d5f451ae00
Merge branch '0-19-3-branch-rc1-10125' into 0-19-3-branch-rc1 2025-08-06 14:48:27 +02:00
ziggie
3710bc19a4
docs: add release-notes 2025-08-06 14:48:11 +02:00
ziggie
4a38f8f112
itest: add payment test with max htlc restriction 2025-08-06 14:47:43 +02:00
ziggie
97c4012753
multi: skip range check in pathfinder and switch for custom htlc payments 2025-08-06 14:47:41 +02:00
Oliver Gugger
9aa70e41c8
Merge branch '0-19-3-branch-rc1-10119' into 0-19-3-branch-rc1 2025-08-06 14:45:25 +02:00
Oliver Gugger
100feb7416
docs: add release notes 2025-08-06 14:45:11 +02:00
Oliver Gugger
b5257546f7
mod: update btcwallet to version with fix 2025-08-06 14:44:48 +02:00
Oliver Gugger
f18ae884b7
itest: run FundPsbt test with imported account
This demonstrates that the "imported" account behaves differently for a
wallet that's watch-only vs. normal. The testTaprootImportTapscriptFullKeyFundPsbt
test case succeeds in a normal run but fails in a remote-signing setup.

For some reason, an imported tapscript address ends up in the "default"
account when remote-signing but in the "imported" account for a normal
wallet.
2025-08-06 14:44:47 +02:00
Oliver Gugger
ccaeeb964e
itest: run normal FundPsbt test case in remote-signer mode
This makes sure there is no general issue with running the pay-join
FundPsbt test case in a remote signer setup.
2025-08-06 14:44:47 +02:00
Oliver Gugger
f275fd66ce
Merge branch '0-19-3-branch-rc1-10117' into 0-19-3-branch-rc1 2025-08-06 14:43:32 +02:00
yyforyongyu
b814428cce
docs: add and update release notes for 0.19.3 2025-08-06 14:43:18 +02:00
yyforyongyu
5a22549bee
sweep: fix typos 2025-08-06 14:42:43 +02:00
yyforyongyu
83d33f4b30
itest: fix tests re the new anchor behavior 2025-08-06 14:42:43 +02:00
yyforyongyu
3796c99bd0
sweep: only remove the other input from the exclusive group
We now make sure when removing inputs identified by the exclusive group
ID, we only remove the other one, not the one that invoked the removal.
2025-08-06 14:42:43 +02:00
yyforyongyu
28af39cd03
contractcourt+sweep: make anchor inputs exclusive
We now make sure to sweep each anchor input in its own sweeping tx, if
economically feasible.
2025-08-06 14:42:43 +02:00
Oliver Gugger
558ea0f895
Merge branch '0-19-3-branch-rc1-10108' into 0-19-3-branch-rc1 2025-08-06 14:27:35 +02:00
yyforyongyu
f12692e3f3
docs: add release notes 2025-08-06 14:27:25 +02:00
yyforyongyu
b0dca5f4a9
contractcourt: replace MarkChannelClosed with NotifyChannelResolved 2025-08-06 14:26:41 +02:00
yyforyongyu
91000b9b98
contractcourt: add a new chan resolvedChan to handle resolved channels
Thus we can mark channels as resolved in an async way to avoid deadlock.
2025-08-06 14:26:40 +02:00
Oliver Gugger
d6523d7490
Merge branch '0-19-3-branch-rc1-10107' into 0-19-3-branch-rc1 2025-08-06 11:37:18 +02:00
Elle Mouton
1345b47961
go.mod: bump btclog v2 version 2025-08-06 11:37:06 +02:00
Oliver Gugger
94c0208bd4
Merge branch '0-19-3-branch-rc1-10097' into 0-19-3-branch-rc1 2025-08-06 11:35:27 +02:00
Olaoluwa Osuntokun
6f092979a0
docs/release-notes: add release notes entry 2025-08-06 11:35:17 +02:00
Olaoluwa Osuntokun
ce4fdd3117
discovery: only permit a single gossip backlog goroutine per peer
In this commit, we add a new atomic bool to only permit a single gossip
backlog goroutine per peer. If we get a new reuqest that needs a backlog
while we're still processing the other, then we'll drop that request.
2025-08-06 11:34:43 +02:00
Olaoluwa Osuntokun
bb5825387e
discovery: add tests for for async timestamp range queue 2025-08-06 11:34:42 +02:00