Commit Graph

18991 Commits

Author SHA1 Message Date
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
v0.19.3-beta.rc2
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
v0.19.3-beta.rc1
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
Olaoluwa Osuntokun
a2fcfb02c9 docs: add comprehensive gossip rate limiting guide
In this commit, we add detailed documentation to help node operators
understand and configure the gossip rate limiting system effectively.
The new guide addresses a critical knowledge gap that has led to
misconfigured nodes experiencing synchronization failures.

The documentation covers the token bucket algorithm used for rate
limiting, providing clear formulas and examples for calculating
appropriate values based on node size and network position. We include
specific recommendations ranging from 50 KB/s for small nodes to
1 MB/s for large routing nodes, with detailed calculations showing
how these values are derived.

The guide explains the relationship between rate limiting and other
configuration options like num-restricted-slots and the new
filter-concurrency setting. We provide troubleshooting steps for
common issues like slow initial sync and peer disconnections, along
with debug commands and log patterns to identify problems.

Configuration examples are provided for conservative, balanced, and
performance-oriented setups, giving operators concrete starting points
they can adapt to their specific needs. The documentation emphasizes
the importance of not setting rate limits too low, warning that values
below 50 KB/s can cause synchronization to fail entirely.
2025-08-06 11:34:42 +02:00
Olaoluwa Osuntokun
27778cbe06 multi: wire up gossip filter concurrency config
In this commit, we complete the integration of the configurable gossip
filter concurrency by wiring the new FilterConcurrency configuration
through all layers of the application.

The changes connect the gossip.filter-concurrency configuration option
from the command-line interface through the server initialization code
to the gossiper and sync manager. This ensures that operators can
actually use the new configuration option to tune their node's
concurrent gossip filter processing capacity based on their specific
requirements and available resources.
2025-08-06 11:34:42 +02:00
Olaoluwa Osuntokun
8eda486227 discovery: integrate async queue in ProcessRemoteAnnouncement
In this commit, we complete the integration of the asynchronous
timestamp range queue by modifying ProcessRemoteAnnouncement to use
the new queuing mechanism instead of calling ApplyGossipFilter
synchronously.

This change ensures that when a peer sends a GossipTimestampRange
message, it is queued for asynchronous processing rather than
blocking the gossiper's main message processing loop. The modification
prevents the peer's readHandler from blocking on potentially slow
gossip filter operations, maintaining connection stability during
periods of high synchronization activity.

If the queue is full when attempting to enqueue a message, we log
a warning but return success to prevent peer disconnection. This
design choice prioritizes connection stability over guaranteed
delivery of every gossip filter request, which is acceptable since
peers can always resend timestamp range messages if needed.
2025-08-06 11:34:42 +02:00
Olaoluwa Osuntokun
80e0ea0d40 discovery: add async timestamp range queue to prevent blocking
In this commit, we introduce an asynchronous processing queue for
GossipTimestampRange messages in the GossipSyncer. This change addresses
a critical issue where the gossiper could block indefinitely when
processing timestamp range messages during periods of high load.

Previously, when a peer sent a GossipTimestampRange message, the
gossiper would synchronously call ApplyGossipFilter, which could block
on semaphore acquisition, database queries, and rate limiting. This
synchronous processing created a bottleneck where the entire peer
message processing pipeline would stall, potentially causing timeouts
and disconnections.

The new design adds a timestampRangeQueue channel with a capacity of 1
message and a dedicated goroutine for processing these messages
asynchronously. This follows the established pattern used for other
message types in the syncer. When the queue is full, we drop messages
and log a warning rather than blocking indefinitely, providing graceful
degradation under extreme load conditions.
2025-08-06 11:34:42 +02:00
Olaoluwa Osuntokun
57872b9cff discovery: make gossip filter semaphore capacity configurable
In this commit, we make the gossip filter semaphore capacity configurable
through a new FilterConcurrency field. This change allows node operators
to tune the number of concurrent gossip filter applications based on
their node's resources and network position.

The previous hard-coded limit of 5 concurrent filter applications could
become a bottleneck when multiple peers attempt to synchronize
simultaneously. By making this value configurable via the new
gossip.filter-concurrency option, operators can increase this limit
for better performance on well-resourced nodes or maintain conservative
values on resource-constrained systems.

We keep the default value at 5 to maintain backward compatibility and
avoid unexpected resource usage increases for existing deployments. The
sample configuration file is updated to document this new option.
2025-08-06 11:34:42 +02:00
Oliver Gugger
f6c5cd7ffc Merge branch '0-19-3-branch-rc1-10096' into 0-19-3-branch-rc1 2025-08-06 11:33:25 +02:00