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

Unknown UTXO in withdraw #6692

Closed
frbitten opened this issue Sep 19, 2023 · 6 comments · Fixed by #6734
Closed

Unknown UTXO in withdraw #6692

frbitten opened this issue Sep 19, 2023 · 6 comments · Fixed by #6734
Assignees
Labels
Milestone

Comments

@frbitten
Copy link

I want to bump a closing transaction from a channel that is stopped. To do this, I am using the withdraw command to make a transfer using the flow of the channel closing transaction.
But I always get the error:

lightning-cli withdraw bc1q872l2x6ydyqmnq5hslfeafx8wxsak39adxa30e all 20000perkb 0 ["03f08b5562f7d04c06cb3664ceeecd31e0dee22e208782a9798f5b51aefdb326:0"]

return:

{
"code": -32602,
"message": "Unknown UTXO 03f08b5562f7d04c06cb3664ceeecd31e0dee22e208782a9798f5b51aefdb326:0"
}

I've already checked the mempool and I have the utxo I want to use.

when executing the command:

lightning-cli getutxout 03f08b5562f7d04c06cb3664ceeecd31e0dee22e208782a9798f5b51aefdb326 0

I receive the utxo data I am looking for.

{
"amount": "1398931sat",
"script": "0014a1a8c22aa4d4e010d8375386b0f8093215078e88"
}

How do I find out what problem is causing the error?

@Ciugam
Copy link

Ciugam commented Sep 20, 2023

Hi, I have the same issue, same type of closing channel and same procedure.
I'm following your problem of bumping fee.

@ShahanaFarooqui
Copy link
Collaborator

@frbitten Can you post responses from lightning-cli listfunds and lightning-cli listpeerchannels after masking sensitive information.

@frbitten
Copy link
Author

The return of listfunds to the channel pending closure and:

{
"peer_id": "0298f6074a454a1f5345cb2a7c6f9fce206cd0bf675d177cdbf0ca7508dd28852f",
"connected": false,
"state": "CLOSINGD_COMPLETE",
"channel_id": "ec3f9d511389e5d3cb8ba6a7d96c7afba35052e3cf2953f953958ebbf43dd227",
"short_channel_id": "804988x378x0",
"our_amount_msat": 1400000000,
"amount_msat": 1400000000,
"funding_txid": "27d23df4bb8e9553f95329cfe35250a3fb7a6cd9a7a68bcbd3e58913519d3fec",
"funding_output": 0
}

The listpeerchannels return for the channel pending closure and:

{
"peer_id": "0298f6074a454a1f5345cb2a7c6f9fce206cd0bf675d177cdbf0ca7508dd28852f",
"peer_connected": true,
"channel_type": {
"bits": [
12
],
"names": [
"static_remotekey/even"
]
},
"state": "CLOSINGD_COMPLETE",
"scratch_txid": "03f08b5562f7d04c06cb3664ceeecd31e0dee22e208782a9798f5b51aefdb326",
"last_tx_fee_msat": 1069000,
"feerate": {
"perkw": 3762,
"perkb": 15048
},
"short_channel_id": "804988x378x0",
"direction": 1,
"channel_id": "ec3f9d511389e5d3cb8ba6a7d96c7afba35052e3cf2953f953958ebbf43dd227",
"funding_txid": "27d23df4bb8e9553f95329cfe35250a3fb7a6cd9a7a68bcbd3e58913519d3fec",
"funding_outnum": 0,
"close_to_addr": "bc1q5x5vy24y6nsppkph2wrtp7qfxg2s0r5gc2g0yv",
"close_to": "0014a1a8c22aa4d4e010d8375386b0f8093215078e88",
"private": false,
"opener": "local",
"closer": "local",
"alias": {
"local": "4950307x12751919x65373"
},
"features": [
"option_static_remotekey"
],
"funding": {
"local_funds_msat": 1400000000,
"remote_funds_msat": 0,
"pushed_msat": 0
},
"to_us_msat": 1400000000,
"min_to_us_msat": 1400000000,
"max_to_us_msat": 1400000000,
"total_msat": 1400000000,
"fee_base_msat": 0,
"fee_proportional_millionths": 500,
"dust_limit_msat": 546000,
"max_total_htlc_in_msat": 18446744073709551615,
"their_reserve_msat": 14000000,
"our_reserve_msat": 14000000,
"spendable_msat": 1377965000,
"receivable_msat": 0,
"minimum_htlc_in_msat": 0,
"minimum_htlc_out_msat": 0,
"maximum_htlc_out_msat": 1386000000,
"their_to_self_delay": 144,
"our_to_self_delay": 432,
"max_accepted_htlcs": 30,
"state_changes": [
{
"timestamp": "2023-08-27T01:40:45.369Z",
"old_state": "CHANNELD_AWAITING_LOCKIN",
"new_state": "CHANNELD_NORMAL",
"cause": "user",
"message": "Lockin complete"
},
{
"timestamp": "2023-09-10T14:01:24.299Z",
"old_state": "CHANNELD_NORMAL",
"new_state": "CHANNELD_SHUTTING_DOWN",
"cause": "user",
"message": "User or plugin invoked close command"
},
{
"timestamp": "2023-09-10T14:01:24.795Z",
"old_state": "CHANNELD_SHUTTING_DOWN",
"new_state": "CLOSINGD_SIGEXCHANGE",
"cause": "user",
"message": "Start closingd"
},
{
"timestamp": "2023-09-10T14:01:28.370Z",
"old_state": "CLOSINGD_SIGEXCHANGE",
"new_state": "CLOSINGD_COMPLETE",
"cause": "user",
"message": "Closing complete"
}
],
"status": [
"Loaded from database"
],
"in_payments_offered": 0,
"in_offered_msat": 0,
"in_payments_fulfilled": 0,
"in_fulfilled_msat": 0,
"out_payments_offered": 0,
"out_offered_msat": 0,
"out_payments_fulfilled": 0,
"out_fulfilled_msat": 0,
"htlcs": []
},

@Ciugam
Copy link

Ciugam commented Sep 23, 2023

If I could add more info, this is the log for same commands on my private channel, I'll mask some info.
lightning-cli listfunds

{
   "outputs": [],
   "channels": [
      {
         "peer_id": "**************************************",
         "connected": false,
         "state": "CLOSINGD_COMPLETE",
         "short_channel_id": "807***x***x0",
         "channel_sat": 2376641,
         "our_amount_msat": "2376641000msat",
         "channel_total_sat": 2435062,
         "amount_msat": "2435062000msat",
         "funding_txid": "********************************************",
         "funding_output": 0
      }
   ]
}

lightning-cli listpeerchannels

{
   "channels": [
      {
         "peer_id": "********************************************************",
         "peer_connected": false,
         "state": "CLOSINGD_COMPLETE",
         "scratch_txid": "*****************************************************",
         "last_tx_fee_msat": "2240000msat",
         "feerate": {
            "perkw": 3512,
            "perkb": 14048
         },
         "short_channel_id": "807***x***x0",
         "direction": 0,
         "channel_id": "***************************************************",
         "funding_txid": "****************************************************************",
         "funding_outnum": 0,
         "close_to_addr": "bc1q**************************",
         "close_to": "************************************",
         "private": true,
         "opener": "local",
         "closer": "local",
         "alias": {
            "local": "16348874x15055005x31546",
            "remote": "8684915x5760677x46395"
         },
         "features": [
            "option_static_remotekey"
         ],
         "funding": {
            "local_funds_msat": "2435062000msat",
            "remote_funds_msat": "0msat",
            "pushed_msat": "0msat"
         },
         "msatoshi_to_us": 2376641719,
         "to_us_msat": "2376641719msat",
         "msatoshi_to_us_min": 2376641719,
         "min_to_us_msat": "2376641719msat",
         "msatoshi_to_us_max": 2435062000,
         "max_to_us_msat": "2435062000msat",
         "msatoshi_total": 2435062000,
         "total_msat": "2435062000msat",
         "fee_base_msat": "0msat",
         "fee_proportional_millionths": 1,
         "dust_limit_satoshis": 546,
         "dust_limit_msat": "546000msat",
         "max_htlc_value_in_flight_msat": 18446744073709551615,
         "max_total_htlc_in_msat": "18446744073709551615msat",
         "their_channel_reserve_satoshis": 24350,
         "their_reserve_msat": "24350000msat",
         "our_channel_reserve_satoshis": 24350,
         "our_reserve_msat": "24350000msat",
         "spendable_msatoshi": 2344790719,
         "spendable_msat": "2344790719msat",
         "receivable_msatoshi": 34070281,
         "receivable_msat": "34070281msat",
         "htlc_minimum_msat": 0,
         "minimum_htlc_in_msat": "0msat",
         "minimum_htlc_out_msat": "0msat",
         "maximum_htlc_out_msat": "2410712000msat",
         "their_to_self_delay": 144,
         "our_to_self_delay": 144,
         "max_accepted_htlcs": 30,
         "state_changes": [
            {
               "timestamp": "2023-09-16T11:28:11.027Z",
               "old_state": "CHANNELD_AWAITING_LOCKIN",
               "new_state": "CHANNELD_NORMAL",
               "cause": "user",
               "message": "Lockin complete"
            },
            {
               "timestamp": "2023-09-16T12:27:45.642Z",
               "old_state": "CHANNELD_NORMAL",
               "new_state": "CHANNELD_SHUTTING_DOWN",
               "cause": "user",
               "message": "User or plugin invoked close command"
            },
            {
               "timestamp": "2023-09-16T12:27:46.992Z",
               "old_state": "CHANNELD_SHUTTING_DOWN",
               "new_state": "CLOSINGD_SIGEXCHANGE",
               "cause": "user",
               "message": "Start closingd"
            },
            {
               "timestamp": "2023-09-16T12:27:47.625Z",
               "old_state": "CLOSINGD_SIGEXCHANGE",
               "new_state": "CLOSINGD_COMPLETE",
               "cause": "user",
               "message": "Closing complete"
            }
         ],
         "status": [
            "Loaded from database"
         ],
         "in_payments_offered": 0,
         "in_msatoshi_offered": 0,
         "in_offered_msat": "0msat",
         "in_payments_fulfilled": 0,
         "in_msatoshi_fulfilled": 0,
         "in_fulfilled_msat": "0msat",
         "out_payments_offered": 84,
         "out_msatoshi_offered": 13994505250,
         "out_offered_msat": "13994505250msat",
         "out_payments_fulfilled": 7,
         "out_msatoshi_fulfilled": 58420281,
         "out_fulfilled_msat": "58420281msat",
         "htlcs": []
      }
   ]
}

Could be helpful?

@vincenzopalazzo vincenzopalazzo added the in diagnostic issue under diagnostic label Sep 23, 2023
@vincenzopalazzo vincenzopalazzo self-assigned this Sep 23, 2023
@vincenzopalazzo vincenzopalazzo added this to the v23.11 milestone Sep 23, 2023
rustyrussell added a commit to rustyrussell/lightning that referenced this issue Sep 29, 2023
We had a complaint that you can't CPFP a mutual close, which you
should be able to do.

Fixes: ElementsProject#6692
Changelog-Fixed: wallet: close change outputs show up immediately in `listfunds` so you can CPFP.
Signed-off-by: Rusty Russell <[email protected]>
@ShahanaFarooqui ShahanaFarooqui added bug and removed in diagnostic issue under diagnostic labels Sep 29, 2023
@ShahanaFarooqui ShahanaFarooqui linked a pull request Sep 29, 2023 that will close this issue
@ShahanaFarooqui
Copy link
Collaborator

@frbitten It was a bug where owned output was not added in the list. It will be fixed with PR #6734 and will be released in Nov.

@frbitten
Copy link
Author

@ShahanaFarooqui Thanks for the feedback. Luckily the BTC gods emptied the mempool and my transaction was confirmed without needing the bump.

But I'm on the lookout for the new version for future cases.

rustyrussell added a commit to rustyrussell/lightning that referenced this issue Oct 2, 2023
We had a complaint that you can't CPFP a mutual close, which you
should be able to do.

Fixes: ElementsProject#6692
Changelog-Fixed: wallet: close change outputs show up immediately in `listfunds` so you can CPFP.
Signed-off-by: Rusty Russell <[email protected]>
rustyrussell added a commit to rustyrussell/lightning that referenced this issue Oct 2, 2023
We had a complaint that you can't CPFP a mutual close, which you
should be able to do.

Fixes: ElementsProject#6692
Changelog-Fixed: wallet: close change outputs show up immediately in `listfunds` so you can CPFP.
Signed-off-by: Rusty Russell <[email protected]>
rustyrussell added a commit to rustyrussell/lightning that referenced this issue Oct 19, 2023
We had a complaint that you can't CPFP a mutual close, which you
should be able to do.

Fixes: ElementsProject#6692
Changelog-Fixed: wallet: close change outputs show up immediately in `listfunds` so you can CPFP.
Signed-off-by: Rusty Russell <[email protected]>
vincenzopalazzo pushed a commit to rustyrussell/lightning that referenced this issue Oct 25, 2023
We had a complaint that you can't CPFP a mutual close, which you
should be able to do.

Fixes: ElementsProject#6692
Changelog-Fixed: wallet: close change outputs show up immediately in `listfunds` so you can CPFP.
Signed-off-by: Rusty Russell <[email protected]>
rustyrussell added a commit that referenced this issue Oct 26, 2023
We had a complaint that you can't CPFP a mutual close, which you
should be able to do.

Fixes: #6692
Changelog-Fixed: wallet: close change outputs show up immediately in `listfunds` so you can CPFP.
Signed-off-by: Rusty Russell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants