<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coinos-server.git/lib/lightning.ts, branch regtest-fulcrum</title>
<subtitle>coinos server — legacy coinos.io backend (Lightning, on-chain, Liquid)</subtitle>
<id>https://git.coinos.io/coinos-server.git/atom?h=regtest-fulcrum</id>
<link rel='self' href='https://git.coinos.io/coinos-server.git/atom?h=regtest-fulcrum'/>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/'/>
<updated>2026-06-07T04:12:17Z</updated>
<entry>
<title>lightning: watchdog only recycles on real backlog, not normal idle</title>
<updated>2026-06-07T04:12:17Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-06-07T04:12:17Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=7b71c96b5ed9728c63e8fcbb7b2a8bb7155ec7af'/>
<id>urn:sha1:7b71c96b5ed9728c63e8fcbb7b2a8bb7155ec7af</id>
<content type='text'>
The zombie-listener watchdog (bd1ece38) treated "waitanyinvoice blocked &gt; 5min
while cl is alive" as a stall — but that's NORMAL during quiet periods, so it
false-fired and needlessly recycled the cl listen socket every few minutes
(~26x in 6h on 2026-06-07). Receives still worked, but it was churn + noise and
would mask a genuine zombie.

Fix: a blocked long-poll is only a zombie if cl actually has a paid invoice the
listener isn't picking up. When blocked past the threshold, probe cl on the MAIN
socket with waitanyinvoice(pay_index, 2s server-side timeout): if it returns an
invoice there's a real backlog the wedged listener missed -&gt; recycle; if it
times out (CLN code 904 = nothing waiting) the listener is just idle and healthy
-&gt; leave it alone. Only recycle on a confirmed backlog.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>ln/lightning: watchdog recycles zombie receive-listener socket</title>
<updated>2026-06-05T01:17:47Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-06-05T01:17:47Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=bd1ece38e42751575ac2e03a5c795b5b109653ac'/>
<id>urn:sha1:bd1ece38e42751575ac2e03a5c795b5b109653ac</id>
<content type='text'>
On 2026-06-04 cl restarted (autoheal, after its 15s healthcheck timed out),
and the app's waitanyinvoice long-poll hung on the now-dead listen socket.
listenerActive stayed true forever, so ensureListenerAlive never restarted
it, and incoming lightning payments stopped crediting for ~2h until a manual
app restart. The per-call RPC timeout in ln.ts can't catch this: waitanyinvoice
is intentionally in NO_TIMEOUT (it's meant to block).

Fix: ensureListenerAlive (runs every 120s) now also detects a stalled listener
— active but blocked in waitanyinvoice for &gt;5min. It probes cl via the main
ln socket (getinfo); only if cl is actually alive does it treat the listen
socket as a zombie, call lnListen.reset() (new: drops the proxy's socket so the
next call reconnects), and re-arm. A listenerEpoch guard makes the wedged
invocation bow out when its waitanyinvoice finally rejects, so we never run two
listeners concurrently and never double-credit. Verified with a state-machine
test covering normal receive, quiet-but-healthy (left alone), stall+cl-alive
(recycled), stall+cl-down (left alone), and the no-double-listener race.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>lnurl proxy</title>
<updated>2026-03-28T06:41:08Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-03-28T06:41:08Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=ef06f2eb48581c201e62fc2cde27b106e898e54d'/>
<id>urn:sha1:ef06f2eb48581c201e62fc2cde27b106e898e54d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ensure lightning payments get processed</title>
<updated>2026-03-20T06:51:57Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-03-20T06:51:57Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=7f1be926fc1acc41776b7ba6f97b762b4586d8d1'/>
<id>urn:sha1:7f1be926fc1acc41776b7ba6f97b762b4586d8d1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>listener logs</title>
<updated>2026-03-18T18:37:33Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2026-03-18T18:37:33Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=42a90f201d03aa96d004e6c3cf3f37f5afd8d1ee'/>
<id>urn:sha1:42a90f201d03aa96d004e6c3cf3f37f5afd8d1ee</id>
<content type='text'>
</content>
</entry>
<entry>
<title>remove logs</title>
<updated>2026-03-17T06:53:13Z</updated>
<author>
<name>Adam Soltys</name>
<email>asoltys@gmail.com</email>
</author>
<published>2026-03-17T06:53:13Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=92e7d1564deb25f9e58e3b268c077018c4b2c4c4'/>
<id>urn:sha1:92e7d1564deb25f9e58e3b268c077018c4b2c4c4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>health check</title>
<updated>2026-02-06T16:55:45Z</updated>
<author>
<name>Adam Soltys</name>
<email>asoltys@gmail.com</email>
</author>
<published>2026-02-06T16:55:45Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=9089698e8df9d0c09c165c45eb6b05335a818699'/>
<id>urn:sha1:9089698e8df9d0c09c165c45eb6b05335a818699</id>
<content type='text'>
</content>
</entry>
<entry>
<title>sendinvoice support</title>
<updated>2025-09-18T21:42:13Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2025-09-18T21:42:13Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=8c7fa95d44aabd38fadc3ef955d835ad3379ec6c'/>
<id>urn:sha1:8c7fa95d44aabd38fadc3ef955d835ad3379ec6c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix invoice lookup</title>
<updated>2025-03-07T22:23:56Z</updated>
<author>
<name>Adam Soltys</name>
<email>asoltys@gmail.com</email>
</author>
<published>2025-03-07T22:23:54Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=b44b1096a58d07a5101126dcf0756493d940b12c'/>
<id>urn:sha1:b44b1096a58d07a5101126dcf0756493d940b12c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>use getInvoice helper</title>
<updated>2025-03-05T23:06:48Z</updated>
<author>
<name>Adam Soltys</name>
<email>adam@coinos.io</email>
</author>
<published>2025-03-05T21:35:31Z</published>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinos-server.git/commit/?id=bbdae13248476e9ff49fcefc64cf8c8e97b5f679'/>
<id>urn:sha1:bbdae13248476e9ff49fcefc64cf8c8e97b5f679</id>
<content type='text'>
</content>
</entry>
</feed>
