ElementsProject / lightning

Core Lightning — Lightning Network implementation focusing on spec compliance and performance
Other
2.82k stars 896 forks source link

CLN no longer opens Zero Conf Channels to LND #6208

Closed TonyGiorgio closed 1 year ago

TonyGiorgio commented 1 year ago

Issue and Steps to Reproduce

Sometime since commit 3a39c635b663cf9eb696ef6105de7b42bc903757, CLN no longer opens zero conf channels to LND.

I have a CLN pinned to that commit and I have one that's on the v23.05rc2.

Both can open up channels just fine to LDK and CLN nodes. However, I'm trying to understand what might have changed so I can figure out what I need to do. Odds are there's some issue on one side or another that I need to get to the bottom of. I cross posted this here: https://github.com/lightningnetwork/lnd/issues/7642


CLN 3a39c635b663cf9eb696ef6105de7b42bc903757 (working)

LND v0.16.1:

2023-04-26 22:37:04.139 [INF] FNDG: Recv'd fundingRequest(amt=0.0011 BTC, push=0 mSAT, delay=6, pendingId=e180e9cf786ad5d73a432eaecdc4fd6d56db2733e0b64c14f115023f01b80bcb) from peer(0366abc8eb4da61e31a8d2c4520d31cabdf58cc5250f855657397f3dd62493938a)
2023-04-26 22:37:04.139 [INF] CHFD: Performing funding tx coin selection using 0 sat/kw as fee rate
2023-04-26 22:37:04.193 [INF] FNDG: Requiring 0 confirmations for pendingChan(e180e9cf786ad5d73a432eaecdc4fd6d56db2733e0b64c14f115023f01b80bcb): amt=0.0011 BTC, push_amt=0 mSAT, committype=tweakless, upfrontShutdown=
2023-04-26 22:37:04.193 [INF] FNDG: Sending fundingResp for pending_id(e180e9cf786ad5d73a432eaecdc4fd6d56db2733e0b64c14f115023f01b80bcb)
2023-04-26 22:37:04.292 [INF] FNDG: completing pending_id(e180e9cf786ad5d73a432eaecdc4fd6d56db2733e0b64c14f115023f01b80bcb) with ChannelPoint(a6e75a97c374ffe8910d60bef5346240d618318dda6ca87b55ec8bf4ad01b7bc:1)
2023-04-26 22:37:04.297 [INF] FNDG: sending FundingSigned for pending_id(e180e9cf786ad5d73a432eaecdc4fd6d56db2733e0b64c14f115023f01b80bcb) over ChannelPoint(a6e75a97c374ffe8910d60bef5346240d618318dda6ca87b55ec8bf4ad01b7bc:1)
2023-04-26 22:37:04.299 [INF] CNCT: Creating new ChannelArbitrator for ChannelPoint(a6e75a97c374ffe8910d60bef5346240d618318dda6ca87b55ec8bf4ad01b7bc:1)
2023-04-26 22:37:04.299 [INF] CNCT: ChannelArbitrator(a6e75a97c374ffe8910d60bef5346240d618318dda6ca87b55ec8bf4ad01b7bc:1): starting state=StateDefault, trigger=chainTrigger, triggerHeight=35125
2023-04-26 22:37:04.299 [INF] NTFN: New spend subscription: spend_id=1, outpoint=a6e75a97c374ffe8910d60bef5346240d618318dda6ca87b55ec8bf4ad01b7bc:1, script=0 0632908820df2f2b9869dbeac80132a3bfbab9cc75eaa08fd5ae280ca345c0d2, height_hint=35125
2023-04-26 22:37:04.299 [INF] NTFN: Dispatching historical spend rescan for outpoint=a6e75a97c374ffe8910d60bef5346240d618318dda6ca87b55ec8bf4ad01b7bc:1, script=0 0632908820df2f2b9869dbeac80132a3bfbab9cc75eaa08fd5ae280ca345c0d2, start=35125, end=35125
2023-04-26 22:37:04.301 [INF] CNCT: Close observer for ChannelPoint(a6e75a97c374ffe8910d60bef5346240d618318dda6ca87b55ec8bf4ad01b7bc:1) active
2023-04-26 22:37:04.301 [INF] CHBU: Updating on-disk multi SCB backup: num_old_chans=0, num_new_chans=1
2023-04-26 22:37:04.301 [INF] NTFN: Historical spend dispatch finished for request outpoint=a6e75a97c374ffe8910d60bef5346240d618318dda6ca87b55ec8bf4ad01b7bc:1, script=0 0632908820df2f2b9869dbeac80132a3bfbab9cc75eaa08fd5ae280ca345c0d2 (start=35125 end=35125) with details: <nil>
2023-04-26 22:37:04.305 [INF] CHBU: Updating backup file at /data/Dev/Lightning/lnd-linux-amd64-v0.16.1-beta/data/data/chain/bitcoin/signet/channel.backup
2023-04-26 22:37:04.310 [INF] CHBU: Swapping old multi backup file from /data/Dev/Lightning/lnd-linux-amd64-v0.16.1-beta/data/data/chain/bitcoin/signet/temp-dont-use.backup to /data/Dev/Lightning/lnd-linux-amd64-v0.16.1-beta/data/data/chain/bitcoin/signet/channel.backup
2023-04-26 22:37:04.311 [INF] CHBU: Updating on-disk multi SCB backup: num_old_chans=1, num_new_chans=1
2023-04-26 22:37:04.312 [INF] FNDG: Peer(0366abc8eb4da61e31a8d2c4520d31cabdf58cc5250f855657397f3dd62493938a) is online, sending ChannelReady for ChannelID(bcb701adf48bec557ba86cda8d3118d6406234f5be600d91e8ff74c3975ae7a7)
2023-04-26 22:37:04.314 [WRN] CHBU: Replacing disk backup for ChannelPoint(a6e75a97c374ffe8910d60bef5346240d618318dda6ca87b55ec8bf4ad01b7bc:1) w/ newer version
2023-04-26 22:37:04.316 [INF] CHBU: Updating backup file at /data/Dev/Lightning/lnd-linux-amd64-v0.16.1-beta/data/data/chain/bitcoin/signet/channel.backup
2023-04-26 22:37:04.319 [INF] CHBU: Swapping old multi backup file from /data/Dev/Lightning/lnd-linux-amd64-v0.16.1-beta/data/data/chain/bitcoin/signet/temp-dont-use.backup to /data/Dev/Lightning/lnd-linux-amd64-v0.16.1-beta/data/data/chain/bitcoin/signet/channel.backup
2023-04-26 22:37:04.425 [INF] PEER: Peer(0366abc8eb4da61e31a8d2c4520d31cabdf58cc5250f855657397f3dd62493938a): New channel active ChannelPoint(a6e75a97c374ffe8910d60bef5346240d618318dda6ca87b55ec8bf4ad01b7bc:1) with peer
2023-04-26 22:37:04.425 [INF] HSWC: ChannelLink(a6e75a97c374ffe8910d60bef5346240d618318dda6ca87b55ec8bf4ad01b7bc:1): starting
2023-04-26 22:37:04.427 [INF] HSWC: Trimming open circuits for chan_id=16000000:0:0, start_htlc_id=0
2023-04-26 22:37:04.427 [INF] HSWC: Adding live link chan_id=bcb701adf48bec557ba86cda8d3118d6406234f5be600d91e8ff74c3975ae7a7, short_chan_id=16000000:0:0
2023-04-26 22:37:04.427 [INF] CNCT: Attempting to update ContractSignals for ChannelPoint(a6e75a97c374ffe8910d60bef5346240d618318dda6ca87b55ec8bf4ad01b7bc:1)
2023-04-26 22:37:04.427 [INF] HSWC: ChannelLink(a6e75a97c374ffe8910d60bef5346240d618318dda6ca87b55ec8bf4ad01b7bc:1): HTLC manager started, bandwidth=0 mSAT
2023-04-26 22:37:05.335 [INF] NTFN: New confirmation subscription: conf_id=1, txid=a6e75a97c374ffe8910d60bef5346240d618318dda6ca87b55ec8bf4ad01b7bc, num_confs=6 height_hint=35125
2023-04-26 22:37:05.335 [INF] FNDG: Waiting for funding tx (a6e75a97c374ffe8910d60bef5346240d618318dda6ca87b55ec8bf4ad01b7bc) to reach 6 confirmations

CLN v23.05rc2 (not working)

LND:

2023-04-26 22:37:03.734 [WRN] CHAC: Unhandled commitment type in channel acceptor request: &{map[12:{} 46:{}]}
2023-04-26 22:37:03.735 [INF] FNDG: Recv'd fundingRequest(amt=0.0011 BTC, push=0 mSAT, delay=6, pendingId=9a6f95eef2f308acf1a8e28402c019b0be14ed76890d6b57dffdca73f0eafcd7) from peer(03315285ceb85cc1d90ee69d30da05953850b05f06cc140e66986cc210e75d90bf)
2023-04-26 22:37:03.735 [ERR] FNDG: channel type negotiation failed: requested channel type not supported
2023-04-26 22:37:03.735 [INF] FNDG: Cancelling funding reservation for node_key=03315285ceb85cc1d90ee69d30da05953850b05f06cc140e66986cc210e75d90bf, chan_id=9a6f95eef2f308acf1a8e28402c019b0be14ed76890d6b57dffdca73f0eafcd7
2023-04-26 22:37:03.735 [ERR] FNDG: unable to cancel reservation: no active reservations for peer(03315285ceb85cc1d90ee69d30da05953850b05f06cc140e66986cc210e75d90bf)

CLN logs:

2023-04-27T03:50:02.552Z DEBUG   lightningd: fundchannel_start: allocating uncommitted_channel
2023-04-27T03:50:02.553Z INFO    lightningd: Will open private channel with node 02a5a83747e3308dacd3769f014b5c504e0dfc73930b2278c63c8f1b1ce76cf095
2023-04-27T03:50:02.555Z DEBUG   02a5a83747e3308dacd3769f014b5c504e0dfc73930b2278c63c8f1b1ce76cf095-openingd-chan#595: pid 382458, msgfd 66
2023-04-27T03:50:02.555Z DEBUG   plugin-spenderp: mfc 34, dest 0: fundchannel_start 02a5a83747e3308dacd3769f014b5c504e0dfc73930b2278c63c8f1b1ce76cf095.
2023-04-27T03:50:02.555Z DEBUG   hsmd: Client: Received message 30 from client
2023-04-27T03:50:02.555Z DEBUG   hsmd: Client: Received message 10 from client
2023-04-27T03:50:02.555Z DEBUG   hsmd: new_client: 595
2023-04-27T03:50:02.556Z DEBUG   02a5a83747e3308dacd3769f014b5c504e0dfc73930b2278c63c8f1b1ce76cf095-hsmd: Got WIRE_HSMD_GET_PER_COMMITMENT_POINT
2023-04-27T03:50:02.556Z DEBUG   hsmd: Client: Received message 18 from client
2023-04-27T03:50:02.556Z DEBUG   02a5a83747e3308dacd3769f014b5c504e0dfc73930b2278c63c8f1b1ce76cf095-openingd-chan#595: funder_channel_start
2023-04-27T03:50:02.556Z DEBUG   02a5a83747e3308dacd3769f014b5c504e0dfc73930b2278c63c8f1b1ce76cf095-openingd-chan#595: Setting their reserve to 1100sat
2023-04-27T03:50:02.556Z DEBUG   02a5a83747e3308dacd3769f014b5c504e0dfc73930b2278c63c8f1b1ce76cf095-openingd-chan#595: peer_out WIRE_OPEN_CHANNEL
2023-04-27T03:50:02.556Z DEBUG   02a5a83747e3308dacd3769f014b5c504e0dfc73930b2278c63c8f1b1ce76cf095-openingd-chan#595: billboard: Funding channel start: offered, now waiting for accept_channel
2023-04-27T03:50:02.672Z DEBUG   02a5a83747e3308dacd3769f014b5c504e0dfc73930b2278c63c8f1b1ce76cf095-openingd-chan#595: peer_in WIRE_ERROR
2023-04-27T03:50:02.672Z DEBUG   02a5a83747e3308dacd3769f014b5c504e0dfc73930b2278c63c8f1b1ce76cf095-openingd-chan#595: aborted opening negotiation: They sent error channel 6ca0f3f86dc554d48e22ed902860fb3baf8d209692c24e2f7a4a897d558bbbf1: funding failed due to internal error
2023-04-27T03:50:02.672Z DEBUG   02a5a83747e3308dacd3769f014b5c504e0dfc73930b2278c63c8f1b1ce76cf095-openingd-chan#595: billboard perm: They sent error channel 6ca0f3f86dc554d48e22ed902860fb3baf8d209692c24e2f7a4a897d558bbbf1: funding failed due to internal error
2023-04-27T03:50:02.673Z DEBUG   plugin-spenderp: mfc 34, dest 0: failed! fundchannel_start 02a5a83747e3308dacd3769f014b5c504e0dfc73930b2278c63c8f1b1ce76cf095: {\"code\":-1,\"message\":\"They sent error channel 6ca0f3f86dc554d48e22ed902860fb3baf8d209692c24e2f7a4a897d558bbbf1: funding failed due to internal error\"}.
2023-04-27T03:50:02.694Z DEBUG   plugin-spenderp: mfc 34: parallel channel starts done.
2023-04-27T03:50:02.694Z DEBUG   plugin-spenderp: mfc 34: trying redo despite 'fundchannel_start' failure (They sent error channel 6ca0f3f86dc554d48e22ed902860fb3baf8d209692c24e2f7a4a897d558bbbf1: funding failed due to internal error); will cleanup for now.
2023-04-27T03:50:02.694Z DEBUG   plugin-spenderp: mfc 34: cleanup!
2023-04-27T03:50:02.694Z DEBUG   plugin-spenderp: mfc 34: unreserveinputs task.
2023-04-27T03:50:02.694Z DEBUG   plugin-spenderp: mfc 34: Filtering destinations.
2023-04-27T03:50:02.694Z DEBUG   plugin-spenderp: mfc 34, dest 0: failed.
2023-04-27T03:50:02.694Z DEBUG   plugin-spenderp: mfc 34: 1 destinations failed, failing.
2023-04-27T03:50:02.694Z DEBUG   plugin-spenderp: mfc 34: cleanup!
2023-04-27T03:50:02.694Z DEBUG   plugin-spenderp: mfc 34: cleanup done, finishing command.

The thing that stands out is:

2023-04-26 22:37:03.734 [WRN] CHAC: Unhandled commitment type in channel acceptor request: &{map[12:{} 46:{}]}

When I look at the LND switch case that handles that, I do not see one that just handles those two channel type features: https://github.com/lightningnetwork/lnd/blob/fdc1ae9d57326cc82899e4c76d5069b14a764b96/chanacceptor/rpcacceptor.go#L274-L346

Being just StaticRemoteKeyRequired & ScidAliasRequired.


Question for CLN:

morehouse commented 1 year ago

Looks related to https://github.com/ElementsProject/lightning/commit/7e5146ab0cd05428688632fcb602a4edc59d3020.

TonyGiorgio commented 1 year ago

It looks like the release was cut anyways despite the interoperability regression between LND, if that's something you guys care about @rustyrussell @cdecker?

I was going to recommend reverting that commit but this has gone unanswered. I guess we'll have to stay at the december release and ignore all the updates we had to do in order to use the deprecated list peers function in this release.

vincenzopalazzo commented 1 year ago

Sorry to be late here, I do not know why I did not receive the email regarding it.

In any case I will try to look inside it :)

rustyrussell commented 1 year ago

Obviously LND didn't expect this combination, which is perfectly valid :(

We used to not set scidalias, which was wrong (how else would we support zeroconf?) but that code explicitly allows :(

Hard to fix (well, until zero fee anchors is merged), but I'll take a look...

TonyGiorgio commented 1 year ago

Is zero fee anchors close to finishing? Perhaps it's fine to wait on that if they'll both be in the next release anyways.

TonyGiorgio commented 1 year ago

Just wanted to come back and say that I've tested v23.05.1 and zero conf channels now work again with LND. Thank you so much @rustyrussell and for pushing it as a patch too. Looking forward to not needed a fork of CLN and for being back up to date.