Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

track: Waiting forever to sweep HTLC timeout transactions #439

Open
cdecker opened this issue May 13, 2024 · 1 comment
Open

track: Waiting forever to sweep HTLC timeout transactions #439

cdecker opened this issue May 13, 2024 · 1 comment

Comments

@cdecker
Copy link
Collaborator

cdecker commented May 13, 2024

This is tracking an upstream issue in CLN. It appears that we have an integer underrun when computing the time until an HTLC timeout should be swept.

Quoting from the original report #438

The cause appears to be the outgoing HTLC hitting its deadline, thus causing the channel to close:

2024-04-08T21:13:56+02:00 {} stdout: DEBUG   0264a62a4307d701c04a46994ce5f5323b1ca28c80c66b73c631dbcb0990d6e835-onchaind-chan#1: billboard perm: Tracking our own unilateral close
....`
2024-04-08T21:13:56+02:00 {} stdout: DEBUG   0264a62a4307d701c04a46994ce5f5323b1ca28c80c66b73c631dbcb0990d6e835-onchaind-chan#1: Resolved FUNDING_TRANSACTION/FUNDING_OUTPUT by OUR_UNILATERAL (463972904772472b38fa1cc907e5143a5af1a008cb373179c22f4d824d72e11f)
...
2024-04-08T21:13:56+02:00 {} stdout: DEBUG   0264a62a4307d701c04a46994ce5f5323b1ca28c80c66b73c631dbcb0990d6e835-onchaind-chan#1: Telling lightningd about OUR_HTLC_TIMEOUT_TX to resolve OUR_UNILATERAL/OUR_HTLC after block 835914 (-65 more blocks)
...
2024-04-08T21:13:56+02:00 {} stdout: UNUSUAL 0264a62a4307d701c04a46994ce5f5323b1ca28c80c66b73c631dbcb0990d6e835-chan#1: We want to bump HTLC fee, but no funds!

Output 4 is the delayed return to us by the way:

2024-04-08T21:13:57+02:00 {} stdout: DEBUG   0264a62a4307d701c04a46994ce5f5323b1ca28c80c66b73c631dbcb0990d6e835-onchaind-chan#1: Tracking output 463972904772472b38fa1cc907e5143a5af1a008cb373179c22f4d824d72e11f:4: OUR_UNILATERAL/DELAYED_OUTPUT_TO_US

And it looks like we have some sort of integer underrun:

2024-04-08T21:13:57+02:00 {} stdout: DEBUG   0264a62a4307d701c04a46994ce5f5323b1ca28c80c66b73c631dbcb0990d6e835-onchaind-chan#1: billboard: 6 outputs unresolved: in 4294967232 blocks will spend OUR_HTLC (463972904772472b38fa1cc907e5143a5af1a008cb373179c22f4d824d72e11f:2) using OUR_HTLC_TIMEOUT_TX

Interesting how that 65 blocks became UINT32_MAX - 2^6, that might be the real reason for this issue here.

Tracks:

Tracking in the CLN repo: ElementsProject/lightning#7305

@cdecker
Copy link
Collaborator Author

cdecker commented May 27, 2024

We have a prospective fix with ElementsProject/lightning#7343. We will review the patch, merge it, and verify it's working. That will take a bit of time, but its good to have a fix on its way :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant