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

Funding tx cannot be found; hanging in pending open #2531

Closed
wdey opened this issue Jul 2, 2019 · 21 comments

Comments

@wdey
Copy link

commented Jul 2, 2019

Autopilot enabled !
Opens a channel to ln1.satoshilabs.com which hangs in pending open
0279c22ed7a068d10dc1a38ae66d2d6461e269226c60258c021b1ddcdfe4b00bc4
The Funding tx cannot be found
https://blockstream.info/tx/db94d2ffd17c166686d291f56f64d665ff4d0f1a13462200483d3f0ae17de821
How can I cancel this request ?

@wdey

This comment has been minimized.

Copy link
Author

commented Jul 4, 2019

Would be nice to have a timeout ?

@mrfelton

This comment has been minimized.

Copy link
Member

commented Jul 4, 2019

If a channel is in pending open state then it means that lnd is in the process of opening it. Perhaps in your case it hasn't broadcast the transaction for some reason. What version of lnd are you using?

@wdey

This comment has been minimized.

Copy link
Author

commented Jul 4, 2019

@mrfelton

This comment has been minimized.

Copy link
Member

commented Jul 4, 2019

Could you try to locate the raw entry from lnd using lncli pendingchannels please?

You can run lncli against the Zap lnd by passing in the correct path. Something like:

lncli --lnddir=/Users/tom/Library/Application\ Support/Zap/lnd/bitcoin/mainnet/wallet-1/ pendingchannels
@wdey

This comment has been minimized.

Copy link
Author

commented Jul 23, 2019

Sorry, I have problems with your recommendation.

My stuff seems to be in this directories:
C:\Users\wdey\AppData\Roaming\Zap\lnd\bitcoin\mainnet\wallet-3\logs\bitcoin\mainnet

Could you please provide me the correct lndcli command ?

@mrfelton

This comment has been minimized.

Copy link
Member

commented Jul 23, 2019

I'm not sure on the exact details for windows, but based on your path above it would look something like this:

lncli --lnddir=C:\Users\wdey\AppData\Roaming\Zap\lnd\bitcoin\mainnet\wallet-3 pendingchannels
@wdey

This comment has been minimized.

Copy link
Author

commented Jul 23, 2019

C:\Users\wdey\AppData\Local\Lnd\bin>lncli --lnddir=C:\Users\wdey\AppData\Roaming\Zap\lnd\bitcoin\mainnet\wallet-3 pendingchannels

[lncli] rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:10009: connectex: No connection could be made because the target machine actively refused it."

@mrfelton

This comment has been minimized.

Copy link
Member

commented Jul 23, 2019

You need to have the wallet open and unlocked

@wdey

This comment has been minimized.

Copy link
Author

commented Jul 23, 2019

The wallet is open ! how must I unlock ?

Here the content of some directories:

Verzeichnis von C:\Users\wdey\AppData\Roaming\Zap\lnd\bitcoin\mainnet\wallet-3

10.05.2019 19:18

data
10.05.2019 19:18 logs
10.05.2019 19:18 944 tls.cert
10.05.2019 19:18 227 tls.key
2 Datei(en), 1'171 Bytes
4 Verzeichnis(se), 13'448'679'424 Bytes frei

Verzeichnis von C:\Users\wdey\AppData\Roaming\Zap\lnd\bitcoin\mainnet\wallet-3\data\chain\bitcoin\mainnet

10.05.2019 19:18 252 admin.macaroon
22.07.2019 16:02 46'924'320 block_headers.bin
02.07.2019 17:50 83 chainnotifier.macaroon
22.07.2019 16:29 801 channel.backup
10.05.2019 19:18 115 invoice.macaroon
02.07.2019 17:50 91 invoices.macaroon
22.07.2019 16:29 32'768 macaroons.db
23.07.2019 12:20 67'108'864 neutrino.db
23.07.2019 12:19 14'407 peers.json
10.05.2019 19:18 183 readonly.macaroon
22.07.2019 16:02 18'769'728 reg_filter_headers.bin
02.07.2019 17:50 91 router.macaroon
02.07.2019 17:50 86 signer.macaroon
23.07.2019 12:20 67'108'864 wallet.db
02.07.2019 17:50 114 walletkit.macaroon
15 Datei(en), 199'960'767 Bytes
2 Verzeichnis(se), 13'301'682'176 Bytes frei

@mrfelton

This comment has been minimized.

Copy link
Member

commented Jul 23, 2019

Ah yes, the problem is that we run lnd on port 11009 rather than the default 10009 so you will need to specify that in your command:

lncli --lnddir=C:\Users\wdey\AppData\Roaming\Zap\lnd\bitcoin\mainnet\wallet-3 --rpcserver=127.0.0.1:11009 pendingchannels
@wdey

This comment has been minimized.

Copy link
Author

commented Jul 23, 2019

Voila !

lncli --lnddir=C:\Users\wdey\AppData\Roaming\Zap\lnd\bitcoin\mainnet\wallet-3 --rpcserver=127.0.0.1:11009 pendingchannels
{
    "total_limbo_balance": "0",
    "pending_open_channels": [
        {
            "channel": {
                "remote_node_pub": "0279c22ed7a068d10dc1a38ae66d2d6461e269226c60258c021b1ddcdfe4b00bc4",
                "channel_point": "db94d2ffd17c166686d291f56f64d665ff4d0f1a13462200483d3f0ae17de821:1",
                "capacity": "250052",
                "local_balance": "241002",
                "remote_balance": "0"
            },
            "confirmation_height": 0,
            "commit_fee": "9050",
            "commit_weight": "600",
            "fee_per_kw": "12500"
        }
    ],
    "pending_closing_channels": [
    ],
    "pending_force_closing_channels": [
    ],
    "waiting_close_channels": [
    ]
}
@mrfelton

This comment has been minimized.

Copy link
Member

commented Jul 23, 2019

Thanks @wdey . As suspected this confirms that for some reason the channel is stuck in pending open state in lnd itself.

Since the problem is in lnd and not Zap (zap is just a UI on top of lnd) I'd recommend that you take this raw lnd data and share with the guys in lnd slack or their github and see if they can diagnose why that might be.

@wdey

This comment has been minimized.

Copy link
Author

commented Jul 24, 2019

mrfelton added a commit to mrfelton/zap-desktop that referenced this issue Jul 24, 2019

fix(lnd): increase autopilot minconfs to 1
This prevents spending unconfirmed funds by default. Ref #3341

fix LN-Zap#2591
fix LN-Zap#2531

@mrfelton mrfelton referenced this issue Jul 24, 2019

Merged

fix(lnd): increase autopilot minconfs to 1 #2613

4 of 6 tasks complete

@mrfelton mrfelton added this to the v0.5.2-beta milestone Jul 24, 2019

@wdey

This comment has been minimized.

Copy link
Author

commented Jul 25, 2019

This is the solution, see
lightningnetwork/lnd#3340? and below

Q. I am using the embedded lnd of ZAP; could you make available a lnd-debug binary with the ZAP distribution, or is this already the case ?

Looks like this is just an invalid channel as a result of likely double spending an input. In the future we'll be able to detect this and remove it. For now, you should be able to remove it with the lncli abandonchannel command available in a debug build of lnd. You can obtain one by running make in lnd's source directory, which will create a lnd-debug binary. If the you believe the funds have actually been committed, you'll have to force a wallet rescan.

@wdey

This comment has been minimized.

Copy link
Author

commented Jul 25, 2019

I didn't get an answer to my above questions; to recover my sat's, I would Need to issue this command. Andy advice is appreciated !

@mrfelton

This comment has been minimized.

Copy link
Member

commented Jul 26, 2019

Hey, sorry about that. The issue was closed automatically when #2613 was merged.

Q. I am using the embedded lnd of ZAP; could you make available a lnd-debug binary with the ZAP distribution, or is this already the case ?

I'm going to say no to this. We don't include the lncli binary and I don't want to bloat our builds with another binary that isn't used anywhere in the app. You can build your own debug version of lnd for this: https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md

@wdey

This comment has been minimized.

Copy link
Author

commented Jul 26, 2019

Isn't it the debug build of lnd, not lncli ?
Anyway, would it work, just to replace your lnd with the debug-lnd ?

@mrfelton

This comment has been minimized.

Copy link
Member

commented Jul 26, 2019

Isn't it the debug build of lnd, not lncli ? Anyway, would it work, just to replace your lnd with the debug-lnd ?

No, lncli is different from lnd:

lnd - the daemon (we bundle this)
lncli - the cli

You need to use a debug build of lncli (which gets created when you build lnd). lncli is the command line interface to lnd.

@mrfelton

This comment has been minimized.

Copy link
Member

commented Jul 26, 2019

(you may also need to replace our binary - I'm not certain on this)

@wdey

This comment has been minimized.

Copy link
Author

commented Jul 26, 2019

It seems that lncli and lnd are to be replaced

lncli abandonchannel - Abandons an existing channel.

USAGE:
lncli abandonchannel [command options] funding_txid [output_index]

CATEGORY:
Channels

DESCRIPTION:

Removes all channel state from the database except for a close
summary. This method can be used to get rid of permanently unusable
channels due to bugs fixed in newer versions of lnd.

Only available when lnd is built in debug mode.

To view which funding_txids/output_indexes can be used for this command,
see the channel_point values within the listchannels command output.
The format for a channel_point is 'funding_txid:output_index'.

OPTIONS:
--funding_txid value the txid of the channel's funding transaction
--output_index value the output index for the funding output of the funding transaction (default: 0)

@wdey

This comment has been minimized.

Copy link
Author

commented Jul 26, 2019

I am frustrated; to solve my Problem, I would go and start digesting all the steps for building lnd from source.
I you could provide me 2 exe files lnd/lncli with debug flag, I could copy them to the proper location and try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.