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

UTXO with long CSV locktime. #7990

Closed
sneachta4 opened this issue Jan 15, 2025 · 3 comments
Closed

UTXO with long CSV locktime. #7990

sneachta4 opened this issue Jan 15, 2025 · 3 comments

Comments

@sneachta4
Copy link

Issue and Steps to Reproduce

UTXO (407482c3c7ddf72dc5c76d71437ec2e55cb9925f205923f90d91883ec476afd1:5) confirmed in block 866023, remains csv locked.
I had been running my node with a nix-bitcoin deployment, with the clboss plugin running. My clightning service was down for multiple months. After restarting the service I had this UTXO that is CSV locked.

After passing this command:
lightning-cli withdraw -k "destination"="

" "satoshi"="all" "utxos"='["407482c3c7ddf72dc5c76d71437ec2e55cb9925f205923f90d91883ec476afd1:5"]'

It gives this error:

{
"code": -32602,
"message": "UTXO 407482c3c7ddf72dc5c76d71437ec2e55cb9925f205923f90d91883ec476afd1:5 is csv locked (1)"
}

getinfo output

"id": "037b4613ef226825a57f0741b4573e92c272e49325cb46ec64a18c3f6ac4d0fd12",
"alias": "CHILLYSET",
"color": "037b46",
"num_peers": 9,
"num_pending_channels": 0,
"num_active_channels": 0,
"num_inactive_channels": 7,
"address": [
{
"type": "torv3",
"address": "sgtkmqkclhc4zpat3ohi6hqu6e6xruonglhwfzbodxu5k7idguy4raqd.onion",
"port": 9735
}
],
"binding": [
{
"type": "ipv4",
"address": "127.0.0.1",
"port": 9735
}
],
"version": "v24.11",
"blockheight": 879403,
"network": "bitcoin",
"fees_collected_msat": 3485627,
"lightning-dir": "/var/lib/clightning/bitcoin",
"our_features": {
"init": "08a0880a8a59a1",
"node": "88a0880a8a59a1",
"channel": "",
"invoice": "02000002024100"
}
}

@rustyrussell
Copy link
Contributor

This is well past the CSV of 1, it's 14,000 blocks old!

I wonder if this could be caused by the old bug where we could miss a tx?

Try restarting your node with 'developer' (either --developer on the command line or "developer" in a config file). Then do "lightning-cli dev-rescan-outputs". Please report back if that works?

@sneachta4
Copy link
Author

Thanks for your reply!

I followed your instructions. Unfortunately my UTXO state remains the same:

  {
     "txid": "407482c3c7ddf72dc5c76d71437ec2e55cb9925f205923f90d91883ec476afd1",
     "output": 5,
     "oldstate": 0,
     "newstate": 0
  },

And I still have the same output on trying to withdraw the UTXO.

@sneachta4
Copy link
Author

Issue solved by completing a rescan of the blockchain from the height that the transaction was confirmed.
Thanks for your help!

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

No branches or pull requests

2 participants