You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My old crashed node is running in recovery mode, and repeatedly tries to spend already spent outputs. It constructs a transaction with multiple inputs, some of which are spent, so the transaction is invalid. This happens because I used chantools to close and sweep some channels, so I guess lnd doesn't expect channels to be closed by external tool.
I think lnd should be more permissive especially in recovery mode. The fix seems almost trivial, just check whether the output is spent, or perhaps if you are worried about performance, check inputs only if the transaction is rejected. I'd also like to see which channels haven't been fully resolved (as output of lncli pendingchannels), taking into account such external actions as closing with chantools. Currently, I think pendingchannels returns all channels which were open at the moment of crash (I am not sure, I only checked the channel count and it is too high.)
Few examples of spent outputs which lnd tries to spend again:
bc37f08100db7a6cb40c1d0c0f3aab7becc93d5c2eb64adf41a9b11a56fc7542:3 CommitmentToRemoteConfirmed
d2d95e807b9065098b444f16329540b34bf599e132ffc956250c1dfb74ae30ae:1 CommitmentNoDelayTweakless
43a284419986060bdd71d88753cf2e5c39acf377df466fbd591b789797610e38:0 CommitmentAnchor
Your environment
version of lnd: 0.18.4 (but also happened with 0.17.something)
bitcoind: 0.28
The text was updated successfully, but these errors were encountered:
If I understand correctly, there's no funds at risk as you recovered manually. The issue is only about LND trying to spend something that it can't. Correct?
Well, probably no funds at risk. I think I have recovered all recoverable funds, but the problem is I am not sure. And I hoped lnd would manage all that.
I first started with chantools sweepremoteclosed , then it had problem sweeping funds (I think it was timelock which had not expired yet, so different from this lnd issue). So I switched to lnd, and ran into this issue.
After your comment, I tried chantools sweepremoteclosed again, and successfully recovered some funds, and it says it cannot recover more.
Background
My old crashed node is running in recovery mode, and repeatedly tries to spend already spent outputs. It constructs a transaction with multiple inputs, some of which are spent, so the transaction is invalid. This happens because I used chantools to close and sweep some channels, so I guess lnd doesn't expect channels to be closed by external tool.
I think lnd should be more permissive especially in recovery mode. The fix seems almost trivial, just check whether the output is spent, or perhaps if you are worried about performance, check inputs only if the transaction is rejected. I'd also like to see which channels haven't been fully resolved (as output of
lncli pendingchannels
), taking into account such external actions as closing with chantools. Currently, I think pendingchannels returns all channels which were open at the moment of crash (I am not sure, I only checked the channel count and it is too high.)Few examples of spent outputs which lnd tries to spend again:
bc37f08100db7a6cb40c1d0c0f3aab7becc93d5c2eb64adf41a9b11a56fc7542:3 CommitmentToRemoteConfirmed
d2d95e807b9065098b444f16329540b34bf599e132ffc956250c1dfb74ae30ae:1 CommitmentNoDelayTweakless
43a284419986060bdd71d88753cf2e5c39acf377df466fbd591b789797610e38:0 CommitmentAnchor
Your environment
lnd
: 0.18.4 (but also happened with 0.17.something)bitcoind
: 0.28The text was updated successfully, but these errors were encountered: