Skip to content

Conversation

@t-bast
Copy link
Member

@t-bast t-bast commented Nov 21, 2025

After a splice transaction confirms, we don't need to keep watching the previous funding output: it has been irrevocably spent and needlessly consumes resources in the Watcher actor.

Those watches are cleaned up when the Channel actor dies, which does not happen if the channel isn't closed and the Peer actor is kept alive while disconnected.

We also add some logs about the internal state of the ZmqWatcher in the second commit, which lets us detect whether we're not properly cleaning up old watches.

After a splice transaction confirms, we don't need to keep watching the
previous funding output: it has been irrevocably spent and needlessly
consumes resources in the `Watcher` actor.

Those watches are cleaned up when the `Channel` actor dies, which does
not happen if the channel isn't closed and the `Peer` actor is kept
alive while disconnected.
Whenever we receive a new block, we log the number of watches we have.
This lets us detect whether we're missing some clean-up of old watches
in edge cases.
@t-bast t-bast marked this pull request as ready for review November 21, 2025 10:45
@t-bast t-bast requested review from pm47 and sstone November 21, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants