Commit Graph

18956 Commits

Author SHA1 Message Date
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
yyforyongyu
f25bfb7866 docs: update release notes 2025-08-06 11:33:05 +02:00
yyforyongyu
173dbec389 lncfg: update docs about msg-rate-bytes and msg-burst-bytes 2025-08-06 11:30:38 +02:00
yyforyongyu
8746a6e204 discovery: increase default msg rates to 1MB 2025-08-06 11:30:37 +02:00
Oliver Gugger
a839456493 Merge pull request #10082 from lightningnetwork/0-19-2-final
release: create v0.19.2-beta final version
v0.19.2-beta
2025-07-16 02:44:11 -06:00
Oliver Gugger
9e052357dd build: bump version to v0.19.2-beta 2025-07-15 18:50:25 +02:00
Oliver Gugger
051d171dee Merge branch '0-19-2-final-10079' into 0-19-2-final 2025-07-15 18:48:00 +02:00
Oliver Gugger
2855288636 docs: add release notes 2025-07-15 18:47:45 +02:00
Oliver Gugger
3eced8a634 lnrpc+rpcserver: add missing channel update event type
Fixes the error "unexpected channel event update" in
SubscribeChannelEvents.
2025-07-15 18:47:25 +02:00
Oliver Gugger
61fd2ca425 channelnotifier: fix Godoc comment 2025-07-15 18:46:48 +02:00
Oliver Gugger
e4465daa60 build: bump version to v0.19.2-beta.rc2 v0.19.2-beta.rc2 2025-07-09 10:37:20 +02:00
Oliver Gugger
f16e795917 Merge pull request #10047 from lightningnetwork/0-19-2-branch-rc2
release: create v0.19.2-rc2 branch
2025-07-09 10:36:07 +02:00
Olaoluwa Osuntokun
0d64c3d379 Merge branch '0-19-2-branch-rc2-10044' into 0-19-2-branch-rc2 2025-07-08 18:41:26 -07:00
ziggie
bc4a12a346 docs: add release-notes 2025-07-08 18:41:00 -07:00
ziggie
370d254ba2 chanbackup: fix shutdown issue when backuper has not started yet 2025-07-08 18:40:21 -07:00
Olaoluwa Osuntokun
2d985c89d6 Merge branch '0-19-2-branch-rc2-10048' into 0-19-2-branch-rc2 2025-07-08 18:39:48 -07:00
ziggie
da1456f71b docs: add release notes 2025-07-08 18:34:39 -07:00
ziggie
151fabc945 contractcourt: fix encoding 2025-07-08 18:34:39 -07:00
Oliver Gugger
e4bdd7762e Merge branch '0-19-2-branch-rc2-10041' into 0-19-2-branch-rc2 2025-07-08 18:33:36 +02:00
ziggie
15cd86c0aa multi: revert back changes from 9911
always process remote ADDs even when they are empty to trigger
the gc process when loading them back into memory.
2025-07-08 18:33:35 +02:00
Oliver Gugger
7afaaffb3e Merge branch '0-19-2-branch-rc2-10042' into 0-19-2-branch-rc2 2025-07-08 16:25:39 +02:00
ziggie
e1f9e87e47 routing: return error for getBandwidth and log it 2025-07-08 16:25:39 +02:00
ziggie
7bcb65d9e6 multi: add logs to debug potential payment sending issue 2025-07-08 16:25:39 +02:00
Oliver Gugger
103b24e7ff Merge branch '0-19-2-branch-rc2-10045' into 0-19-2-branch-rc2 2025-07-07 15:29:40 +02:00
yyforyongyu
8fe0d0f7cd docs: update release docs 2025-07-07 15:29:40 +02:00
yyforyongyu
93bede938e contractcourt: only close quit in Stop
Make sure we don't prematurely close the `quit` chans.
2025-07-07 15:29:39 +02:00
Oliver Gugger
7b1ca7d273 Merge pull request #9986 from lightningnetwork/0-19-2-branch-rc1
release: create v0.19.2-rc1 branch
v0.19.2-beta.rc1
2025-07-04 20:36:07 +02:00
Oliver Gugger
1f336a07fa Merge branch '0-19-2-branch-rc1-10035' into 0-19-2-branch-rc1 2025-07-04 15:38:53 +02:00
ziggie
d59036b48a docs: add release-notes 2025-07-04 15:38:52 +02:00
ziggie
81e4160d67 switch: unlock mutex lock earlier
We now unlock the mutex lock of the switch as soon as possible to
avoid potetnial deadlock in the htlc switch.
2025-07-04 15:38:52 +02:00
Oliver Gugger
11bdccca47 docs: fix release notes, add contributors 2025-07-04 10:11:11 +02:00
Oliver Gugger
775a6dd8f8 build: bump version to v0.19.2-beta.rc1 2025-07-04 09:08:11 +02:00
Oliver Gugger
acac2a12d6 Merge branch '0-19-2-branch-rc1-10028' into 0-19-2-branch-rc1 2025-07-04 09:03:42 +02:00
ffranr
9345eb247d chainntnfs: export NotifierOptions and internal field for interface use
Export NotifierOptions and its internal field to enable external
satisfaction of the protofsm.DaemonAdapters interface.
2025-07-04 09:03:41 +02:00
Oliver Gugger
8a185a12d1 server: fix rebase issue 2025-07-03 17:54:17 +02:00
Oliver Gugger
1cd42b62bd Merge branch '0-19-2-branch-rc1-10012' into 0-19-2-branch-rc1 2025-07-03 16:18:04 +02:00