Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Zand_ on November 07, 2018, 01:40:35 AM



Title: Force closed channel balance in limbo (Lightning Network)
Post by: Zand_ on November 07, 2018, 01:40:35 AM
Any idea on how long it takes to retrieve funds after "force closing" a channel? One of the nodes I had a channel open with was offline so I had to force close, it's been about 1 week and the balance is still in limbo. When I enter "lncli pendingchannels" I get the following output. Any ideas?

Code:
    "total_limbo_balance": "16774760",
    "pending_open_channels": [
    ],
    "pending_closing_channels": [
    ],
    "pending_force_closing_channels": [
        {
            "channel": {
                "remote_node_pub": "03a503d8e30f2ff407096d235b5db63b4fcf3f89a653acb6f43d3fc492a7674019",
                "channel_point": "e176a4c2bbfa1009f28e53a284b49c34f937a86d8725e44ac4cb919943a6fb12:1",
                "capacity": "16777215",
                "local_balance": "16774760",
                "remote_balance": "0"
            },
            "closing_txid": "6a4d6b6a6765a412d706597a6f08c7191bc272b3f212c18dd0ffc99314143074",
            "limbo_balance": "16774760",
            "maturity_height": 549921,
            "blocks_til_maturity": 849,
            "recovered_balance": "0",
            "pending_htlcs": [
            ]
        }
    ],
    "waiting_close_channels": [


Closing TXID below, TX has over 300+ confirmations

https://blockexplorer.com/tx/6a4d6b6a6765a412d706597a6f08c7191bc272b3f212c18dd0ffc99314143074



Title: Re: Force closed channel balance in limbo (Lightning Network)
Post by: Rath_ on November 07, 2018, 07:46:16 AM
"maturity_height" and "blocks_til_maturity" are your answer. 144 blocks is about 1 day so you should get your funds back in approximately 5 days. Similar problem has been described here (https://github.com/lightningnetwork/lnd/issues/895). There must be something wrong with timelocks. Have you used that channel? Did the other party have zero balance?


Title: Re: Force closed channel balance in limbo (Lightning Network)
Post by: Zand_ on November 07, 2018, 04:56:57 PM
"maturity_height" and "blocks_til_maturity" are your answer. 144 blocks is about 1 day so you should get your funds back in approximately 5 days. Similar problem has been described here (https://github.com/lightningnetwork/lnd/issues/895). There must be something wrong with timelocks. Have you used that channel? Did the other party have zero balance?

Ah interesting. I did not use that channel, it was created via Autopilot and pretty sure the other party had a zero balance (in that channel at least). Weird thing is the other channel I force closed around the same time returned my funds after the normal 144 block period.


Title: Re: Force closed channel balance in limbo (Lightning Network)
Post by: Rath_ on November 11, 2018, 11:26:18 AM
I have done a little bit of research and I found this (https://github.com/lightningnetwork/lnd/blob/master/utxonursery.go) piece of code with good commentary.

// utxoNursery is a system dedicated to incubating time-locked outputs created
// by the broadcast of a commitment transaction either by us, or the remote
// peer. The nursery accepts outputs and "incubates" them until they've reached
// maturity, then sweep the outputs into the source wallet. An output is
// considered mature after the relative time-lock within the pkScript has
// passed. As outputs reach their maturity age, they're swept in batches into
// the source wallet, returning the outputs so they can be used within future
// channels, or regular Bitcoin transactions.

As you can see, since the CLTV time-lock didn't expire, you had to wait until it was "incubated". Here (https://github.com/lightningnetwork/lnd/blob/master/utxonursery.go) you can find a graph which will help you to understand it more easily.


Title: Re: Force closed channel balance in limbo (Lightning Network)
Post by: Choyna on May 24, 2019, 01:10:38 PM
I'm going to piggy back on this one. I have the same issue but the blocks have passed maturity. Anyone know why the channel would still be stuck force closing? Thanks!

Code:
            "limbo_balance": "2760",
            "maturity_height": 575560,
            "blocks_til_maturity": -1998,
            "recovered_balance": "0",
            "pending_htlcs": [


Title: Re: Force closed channel balance in limbo (Lightning Network)
Post by: Rath_ on May 24, 2019, 01:55:34 PM
I'm going to piggy back on this one. I have the same issue but the blocks have passed maturity. Anyone know why the channel would still be stuck force closing? Thanks!

What version of LND are you running? You can check that by running lncli -version. A similar issue was fixed about a year ago in one of the LND updates.


Title: Re: Force closed channel balance in limbo (Lightning Network)
Post by: Choyna on May 24, 2019, 02:40:03 PM
I'm going to piggy back on this one. I have the same issue but the blocks have passed maturity. Anyone know why the channel would still be stuck force closing? Thanks!

What version of LND are you running? You can check that by running lncli -version. A similar issue was fixed about a year ago in one of the LND updates.
Thanks for your reply. I'm running version 0.6.0.