Commit graph

20 commits

Author SHA1 Message Date
Slyghtning
e53bb67e73
notifications: persist static loop-in risk decisions
Persist static loop-in confirmation-risk decisions before fanout when a
persistence callback is configured. Keep unpersisted decisions cached
for replay so notification delivery is not lost if the swap row is not
available yet.
2026-07-12 09:14:33 +02:00
Slyghtning
da96842264
notifications: fan out static loop-in risk decisions
Add cached per-swap notification fanout for static loop-in
confirmation-risk acceptance and rejection notifications so loop-in
FSMs can subscribe by swap hash and receive decisions that arrived
before subscription.
2026-07-12 09:14:33 +02:00
Slyghtning
0bb06b0ba3
notifications: queue blocking fanout
Required notification fanout should not block the manager lock, but subscribers still need ordered delivery once brief backpressure clears. Sending must-deliver notifications directly can couple manager progress to subscriber receive timing, while queueing optional reservation notifications would contradict their best-effort delivery semantics.

Add bounded per-subscriber queues for must-deliver notifications, let those queues own channel shutdown instead of relying on recover for closed-channel sends, keep reservation fanout best-effort, and cover queued delivery, queue cleanup, and capacity drops in manager tests.
2026-06-22 10:58:37 +02:00
Slyghtning
d0c613e5c9 notifications: drop best-effort messages for slow subscribers
A slow optional notification subscriber must not stall the manager lock, while recovery and sweep work requests still need reliable local delivery to keep daemon progress deterministic. Treating all subscribers as blocking makes best-effort fanout a backpressure source for unrelated required work.

Make reservation fanout nonblocking for slow subscribers, keep recovery and sweep notifications on a required cancellation-aware delivery path, and cover both slow best-effort subscribers and required subscribers in manager tests.
2026-06-22 10:18:07 +02:00
Boris Nagaev
c7ee8f27e9
notifications: log unknown ntfns at debug
Log unknown server notification variants at Debug level instead of Warn
to avoid noisy logs during feature rollout mismatches.
2026-05-29 23:00:29 -05:00
Boris Nagaev
c56c6d3563
notifications: handle htlc confirmed ntfn
Add NotificationTypeHtlcConfirmed and SubscribeHtlcConfirmed so consumers
can subscribe to HTLC-confirmed notifications. Also add dispatch in
handleNotification to forward htlc_confirmed messages to subscribers.
2026-05-29 23:00:29 -05:00
Slyghtning
a10c741a26
lint: fix linter issues 2026-03-09 14:39:45 +01:00
Slyghtning
d2d8e71ea0
notifications: fix test race 2026-02-26 20:57:27 +01:00
Slyghtning
6e4569f916
notifications: fix test race 2026-02-26 09:37:26 +01:00
Andras Banki-Horvath
79af5b3703
loop: add notification versioning 2025-10-30 22:41:00 +01:00
Andras Banki-Horvath
460fc116d8
loop: add resume manager 2025-10-30 22:41:00 +01:00
Slyghtning
e98f733ef8
linter: fix lint issues after linter v2 update 2025-08-19 21:57:00 +02:00
Oliver Gugger
65251e8821
multi: update linter, fix issues 2025-03-10 22:59:50 +01:00
Oliver Gugger
722ad8839d
multi: update lnd compile-time dependency to v0.19.0 2025-03-10 22:59:49 +01:00
Andras Banki-Horvath
0591a941a7
notifications: do not hog the CPU if there's no L402 token yet 2025-02-06 20:03:55 +01:00
Andras Banki-Horvath
61e1528526
notifications: handle pending L402 payment 2025-01-29 20:48:30 +01:00
Andras Banki-Horvath
43aa5664fe
notifications: implement incremental backoff for invalid L402 tokens 2025-01-29 20:21:52 +01:00
sputn1ck
216aebbbbf
notifications: add support for new ntfn
This commit adds support for the new notification of type
NotificationTypeStaticLoopInSweepRequest. This notification is sent when
a sweep request is received from the server.
2024-12-12 18:31:09 +01:00
sputn1ck
e9f1a1aef3
ntfn: use l402 store for tokens
This commit changes the way we fetch the l402 tokens for the
notification stream. Instead of fetching them from the server and
paying an invoice, we now look into our local store for the token.
This means that a loop client will not autofetch a token.
2024-10-30 17:12:28 +01:00
sputn1ck
5df53cd81a
notifications: add notification manager
This commit adds a generic notification manager
that can be used to subscribe to different types
of notifications.
2024-10-08 14:58:41 +02:00