Closed cdecker closed 4 months ago
I've seen this before on a vanilla 23.11 https://github.com/ElementsProject/lightning/issues/6951#issuecomment-1873554249
I've got one too on:
ab4ea82638b1d49e206e6637ae2211010534bf32 lightning (v24.02.1-18-gab4ea8263)
206a1f23c343b5f3e70f0091fad57f5bae998797 vls (v0.11.0-73-g206a1f23)
"state_changes": [
{
"timestamp": "2024-04-04T06:42:00.804Z",
"old_state": "CHANNELD_AWAITING_LOCKIN",
"new_state": "CHANNELD_NORMAL",
"cause": "user",
"message": "Lockin complete"
},
{
"timestamp": "2024-04-25T03:48:08.845Z",
"old_state": "CHANNELD_NORMAL",
"new_state": "AWAITING_UNILATERAL",
"cause": "protocol",
"message": "Offered HTLC 506 SENT_ADD_ACK_REVOCATION cltv 2673110 hit deadline"
},
{
"timestamp": "2024-04-25T03:48:43.696Z",
"old_state": "AWAITING_UNILATERAL",
"new_state": "FUNDING_SPEND_SEEN",
"cause": "onchain",
"message": "Onchain funding spend"
},
{
"timestamp": "2024-04-25T03:48:47.086Z",
"old_state": "FUNDING_SPEND_SEEN",
"new_state": "ONCHAIN",
"cause": "onchain",
"message": "Onchain init reply"
},
... lots of last repeated ...
{
"timestamp": "2024-05-12T23:11:33.667Z",
"old_state": "FUNDING_SPEND_SEEN",
"new_state": "ONCHAIN",
"cause": "onchain",
"message": "Onchain init reply"
}
],
"status": [
"ONCHAIN:Tracking our own unilateral close",
"ONCHAIN:3 outputs unresolved: in 4294825093 blocks will spend OUR_HTLC (26ede09939e5528593b6f4d57ebf93a3ab86b763094f1a5fcf3df0862e62a080:2) using OUR_HTLC_TIMEOUT_TX"
],
Logs believed to be available, anything you want me to look for?
This cosmetic only, and has been there for a long time. I keep meaning to fix it, but nobody complained before so I figured I'm the only one looking at the logs.
Issue and Steps to Reproduce
We (Greenlight) got a number of reports of missing sweeps of HTLC timeout transactions, due to a potential integer underflow issue. The symptoms are as follows:
The node correctly recognizes an HTLC it has added to the channel as requiring a sweep
The next time the HTLC timeout transaction is mentioned it is in this log here
Notice that the timeout in blocks all of the sudden is
(1 - 65) % UINT32_MAX
, which is very suspicious.My intuition is that this is an underflow in the
u32
used to plan the execution of the transaction.getinfo
outputYes, this has some small changes to the way UTXOs are tracked in the DB, but other than that it does not have any modification from the CLN in this repository.