lightningnetwork / lnd

Lightning Network Daemon ⚡️
MIT License
7.69k stars 2.08k forks source link

The channel opening failed when using the ‘close_address’ parameter #7978

Closed originalix closed 1 year ago

originalix commented 1 year ago

Background

I consistently receive an error when attempting to open a channel using the close_address parameter.

Recently, I’ve been trying to open a channel but I keep receiving an error and I’m not sure what the problem is. I’ve tested it on the testnet and successfully created a channel using nested segwit Bitcoin addresses.

Your environment

Steps to reproduce

ubuntu@ubuntu:~# lncli openchannel --node_key 030a58b8653d32b99200a2334cfe913e51dc7d155aa0116c176657a4f1722677a3 \
--connect 165.227.246.10:9735 \
--base_fee_msat 1000 \
--fee_rate_ppm 1000 \
--close_address 3BqV8kBeA9UfnTvZoQ2LGP1JWYbgoCJXNm \
--local_amt 25000000
[lncli] rpc error: code = Unknown desc = received funding error from 030a58b8653d32b99200a2334cfe913e51dc7d155aa0116c176657a4f1722677a3: chan_id=6ad27cbe4df99c42a1109a306175a3346a500bfd51bb0d2573c87ba1067405e9, err=funding failed due to internal error
ubuntu@ubuntu:~# lncli openchannel --node_key 030a58b8653d32b99200a2334cfe913e51dc7d155aa0116c176657a4f1722677a3 --connect 165.227.246.10:9735 --base_fee_msat 1000 --fee_rate_ppm 100 --local_amt 25000000
{
    "funding_txid": "f6e6ae96e386f8f04f78fb0e4da1cf2c76f37d64833d54a368620bb422e47bf3"
}
33607-2023-09-12 09:53:02.115 [INF] FNDG: Initiating fundingRequest(local_amt=0.25 BTC (subtract_fees=false), push_amt=0 mSAT, chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, peer=030a58b8653d32b99200a2334cfe913e51dc7d155aa0116c176657a4f1722677a3, min_confs=1)
33608-2023-09-12 09:53:02.115 [INF] PEER: Peer(030a58b8653d32b99200a2334cfe913e51dc7d155aa0116c176657a4f1722677a3): Negotiated chan series queries
33609-2023-09-12 09:53:02.116 [INF] DISC: Creating new GossipSyncer for peer=030a58b8653d32b99200a2334cfe913e51dc7d155aa0116c176657a4f1722677a3
33610-2023-09-12 09:53:02.120 [INF] CHFD: Performing funding tx coin selection using 3953 sat/kw as fee rate
33611-2023-09-12 09:53:02.128 [WRN] CHFD: Unable to find funding output for shim intent: unable to create witness script, no funding keys
33612-2023-09-12 09:53:02.165 [INF] FNDG: Target commit tx sat/kw for pendingID(6ad27cbe4df99c42a1109a306175a3346a500bfd51bb0d2573c87ba1067405e9): 2500
33613-2023-09-12 09:53:02.165 [INF] FNDG: Dust limit for pendingID(6ad27cbe4df99c42a1109a306175a3346a500bfd51bb0d2573c87ba1067405e9): 0.00000354 BTC
33614-2023-09-12 09:53:02.165 [INF] FNDG: Starting funding workflow with 165.227.246.10:9735 for pending_id(6ad27cbe4df99c42a1109a306175a3346a500bfd51bb0d2573c87ba1067405e9), committype=anchors-zero-fee-second-level
33615-2023-09-12 09:53:02.501 [INF] FNDG: Cancelling funding reservation for node_key=030a58b8653d32b99200a2334cfe913e51dc7d155aa0116c176657a4f1722677a3, chan_id=6ad27cbe4df99c42a1109a306175a3346a500bfd51bb0d2573c87ba1067405e9
33616-2023-09-12 09:53:02.501 [ERR] FNDG: received funding error from 030a58b8653d32b99200a2334cfe913e51dc7d155aa0116c176657a4f1722677a3: chan_id=6ad27cbe4df99c42a1109a306175a3346a500bfd51bb0d2573c87ba1067405e9, err=funding failed due to internal error
33617-2023-09-12 09:53:02.501 [ERR] RPCS: unable to open channel to NodeKey(030a58b8653d32b99200a2334cfe913e51dc7d155aa0116c176657a4f1722677a3): received funding error from 030a58b8653d32b99200a2334cfe913e51dc7d155aa0116c176657a4f1722677a3: chan_id=6ad27cbe4df99c42a1109a306175a3346a500bfd51bb0d2573c87ba1067405e9, err=funding failed due to internal error
33618-2023-09-12 09:53:02.501 [ERR] RPCS: [/lnrpc.Lightning/OpenChannel]: received funding error from 030a58b8653d32b99200a2334cfe913e51dc7d155aa0116c176657a4f1722677a3: chan_id=6ad27cbe4df99c42a1109a306175a3346a500bfd51bb0d2573c87ba1067405e9, err=funding failed due to internal error
33619-2023-09-12 09:53:04.614 [INF] CRTR: Processed channels=0 updates=102 nodes=10 in last 1m0.000193508s
33620-2023-09-12 09:53:26.516 [ERR] RPCS: [connectpeer]: error connecting to peer: already connected to peer: 030a58b8653d32b99200a2334cfe913e51dc7d155aa0116c176657a4f1722677a3@165.227.246.10:9735
33621-2023-09-12 09:53:26.517 [ERR] RPCS: [/lnrpc.Lightning/ConnectPeer]: already connected to peer: 030a58b8653d32b99200a2334cfe913e51dc7d155aa0116c176657a4f1722677a3@165.227.246.10:9735
33622-2023-09-12 09:53:26.527 [INF] FNDG: Initiating fundingRequest(local_amt=0.25 BTC (subtract_fees=false), push_amt=0 mSAT, chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, peer=030a58b8653d32b99200a2334cfe913e51dc7d155aa0116c176657a4f1722677a3, min_confs=1)
33623-2023-09-12 09:53:26.530 [INF] CHFD: Performing funding tx coin selection using 3953 sat/kw as fee rate
33624-2023-09-12 09:53:26.537 [WRN] CHFD: Unable to find funding output for shim intent: unable to create witness script, no funding keys
33625-2023-09-12 09:53:26.563 [INF] FNDG: Target commit tx sat/kw for pendingID(ca2e675719343ddc5b7b5bd7e5a4900d6e8aed6f4a38f9b43343f236c2b43f4b): 2500
33626-2023-09-12 09:53:26.563 [INF] FNDG: Dust limit for pendingID(ca2e675719343ddc5b7b5bd7e5a4900d6e8aed6f4a38f9b43343f236c2b43f4b): 0.00000354 BTC
33627-2023-09-12 09:53:26.563 [INF] FNDG: Starting funding workflow with 165.227.246.10:9735 for pending_id(ca2e675719343ddc5b7b5bd7e5a4900d6e8aed6f4a38f9b43343f236c2b43f4b), committype=anchors-zero-fee-second-level
33628-2023-09-12 09:53:26.904 [INF] FNDG: Recv'd fundingResponse for pending_id(ca2e675719343ddc5b7b5bd7e5a4900d6e8aed6f4a38f9b43343f236c2b43f4b)
33629-2023-09-12 09:53:26.981 [INF] FNDG: pendingChan(ca2e675719343ddc5b7b5bd7e5a4900d6e8aed6f4a38f9b43343f236c2b43f4b): remote party proposes num_confs=6, csv_delay=2016
33630:2023-09-12 09:53:26.981 [INF] FNDG: Generated ChannelPoint(f6e6ae96e386f8f04f78fb0e4da1cf2c76f37d64833d54a368620bb422e47bf3:1) for pending_id(ca2e675719343ddc5b7b5bd7e5a4900d6e8aed6f4a38f9b43343f236c2b43f4b)
33631:2023-09-12 09:53:27.254 [INF] FNDG: Broadcasting funding tx for ChannelPoint(f6e6ae96e386f8f04f78fb0e4da1cf2c76f37d64833d54a368620bb422e47bf3:1):

Expected behaviour

A channel can be created successfully by using the close_address parameter.

Actual behaviour

The channel creation was unsuccessful.

alexbosworth commented 1 year ago

did you try a native segwit address

originalix commented 1 year ago

did you try a native segwit address

I also suspect this possibility. I will test it to confirm.

originalix commented 1 year ago

OK, using a native segwit address has worked for me. Thanks 👍