ACINQ / eclair-mobile

An Android wallet for the Lightning Network
Apache License 2.0
258 stars 44 forks source link

Eclair wallet node problem when open channel #116

Open chuanliang opened 6 years ago

chuanliang commented 6 years ago

I have set up a lightning network node using LND on centos . LND version is 0.5.0-beta commit=16b5a67c3aa99907a4dff8d9b67175466557ffc0 . My node uris is 03783fe0ad682e695e1d132df84222066d483599b5b49b879a7c6aeb66f57adb56@54.169.18.25:9735

I use eclair wallet v0.3.8 to open channel with my node on five android mobile with different wallet. Three mobile can successfully open channel with my node. Two mobile have problem when open channel. After i scanned my node URI and inputted channel capacity not 0 for example 0.001 BTC, The channel capacity displays 0 BTC and status is WAIT_FOR_ACCEPT_CHANNEL ,after while the channel automic closed.

screenshot_20180920-101340

The eclair wallet network info is: screenshot_20180920-101255

The channel details is: screenshot_20180920-101231

The two mobile can open channel with ACINQ default channel 03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f@node.acinq.co:9735 . I importted the two wallet mnemonic on other mobile , one can set up channel with my node ,another still have problem.

The following is the releated LND logs: 2018-09-18 07:56:34.144 [INF] SRVR: New inbound connection from 114.247.246.66:33325 2018-09-18 07:56:34.144 [INF] SRVR: Finalizing connection to 0262a86f85fb1fd10f8d4eef038657f64b74739f4448b3d70a382cbb237613935f, inbound=true 2018-09-18 07:56:34.160 [INF] PEER: NodeKey(0262a86f85fb1fd10f8d4eef038657f64b74739f4448b3d70a382cbb237613935f) loading ChannelPoint(368e4dfc49632ec241fa59baa2a0403b98741a9fb8896c81ae07d1484eeb5d08:0) 2018-09-18 07:56:34.161 [WRN] PEER: Unable to find our forwarding policy for channel 368e4dfc49632ec241fa59baa2a0403b98741a9fb8896c81ae07d1484eeb5d08:0, using default values 2018-09-18 07:56:34.161 [INF] HSWC: Removing channel link with ChannelID(085deb4e48d107ae816c89b89f1a74983b40a0a2ba59fa41c22e6349fc4d8e36) 2018-09-18 07:56:34.161 [INF] HSWC: ChannelLink(368e4dfc49632ec241fa59baa2a0403b98741a9fb8896c81ae07d1484eeb5d08:0) is starting 2018-09-18 07:56:34.161 [INF] HSWC: Adding pending link chan_id=085deb4e48d107ae816c89b89f1a74983b40a0a2ba59fa41c22e6349fc4d8e36, short_chan_id=0:0:0 2018-09-18 07:56:34.161 [INF] SRVR: Negotiated chan series queries with 0262a86f85fb1fd10f8d4eef038657f64b74739f4448b3d70a382cbb237613935f 2018-09-18 07:56:34.161 [INF] DISC: Creating new gossipSyncer for peer=0262a86f85fb1fd10f8d4eef038657f64b74739f4448b3d70a382cbb237613935f 2018-09-18 07:56:34.162 [INF] DISC: gossipSyncer(0262a86f85fb1fd10f8d4eef038657f64b74739f4448b3d70a382cbb237613935f): requesting new chans from height=541758 and 4294425537 blocks after 2018-09-18 07:56:34.162 [INF] HSWC: HTLC manager for ChannelPoint(368e4dfc49632ec241fa59baa2a0403b98741a9fb8896c81ae07d1484eeb5d08:0) started, bandwidth=0 mSAT 2018-09-18 07:56:34.162 [INF] HSWC: Attempting to re-resynchronize ChannelPoint(368e4dfc49632ec241fa59baa2a0403b98741a9fb8896c81ae07d1484eeb5d08:0) 2018-09-18 07:56:34.317 [INF] DISC: gossipSyncer(0262a86f85fb1fd10f8d4eef038657f64b74739f4448b3d70a382cbb237613935f): filtering chan range: start_height=0, num_blocks=2147483647 2018-09-18 07:56:34.319 [INF] DISC: gossipSyncer(0262a86f85fb1fd10f8d4eef038657f64b74739f4448b3d70a382cbb237613935f): sending range chunk of size=8000 2018-09-18 07:56:34.319 [INF] DISC: gossipSyncer(0262a86f85fb1fd10f8d4eef038657f64b74739f4448b3d70a382cbb237613935f): sending final chan range chunk, size=1225 2018-09-18 07:56:34.418 [INF] FNDG: Cancelling funding reservation for node_key=0262a86f85fb1fd10f8d4eef038657f64b74739f4448b3d70a382cbb237613935f, chan_id=75ae3a7a742e84feaa04e95085475df56bc0891b98d280422ddc72994b648e19 2018-09-18 07:56:34.418 [ERR] FNDG: unable to cancel reservation: no active reservations for peer(0262a86f85fb1fd10f8d4eef038657f64b74739f4448b3d70a382cbb237613935f) 2018-09-18 07:56:34.465 [INF] DISC: gossipSyncer(0262a86f85fb1fd10f8d4eef038657f64b74739f4448b3d70a382cbb237613935f): applying new update horizon: start=1970-01-01 00:00:00 +0000 UTC, end=2038-01-19 03:14:07 +0000 UTC, backlog_size=29209

pm47 commented 6 years ago

When you select one of the closed channels, do you have anything in the field Cause of closing?

Note that this is not necessarily a problem with eclair, could be with lnd. As a matter of fact I have regularly seen that issue (endlessly waiting for an AcceptChannel or an Error in response to an OpenChannel). @halseth does that ring a bell? maybe you can make sense of the lnd log?

chuanliang commented 6 years ago

Sorry ,I have upload wrong image of channel details. The field of "Cause of closing" is "01".

When you select one of the closed channels, do you have anything in the field Cause of closing?

Note that this is not necessarily a problem with eclair, could be with lnd. As a matter of fact I have regularly seen that issue (endlessly waiting for an AcceptChannel or an Error in response to an OpenChannel). @halseth does that ring a bell? maybe you can make sense of the lnd log?

halseth commented 6 years ago

@chuanliang Can you try enabling debug logs on the lnd node and attempt to open a channel again?

This can be done either in the lnd.conf file: debuglevel=debug or while the node is running: lncli debuglevel --level=debug.

Debug logs should give us an idea why lnd is cancelling the channel request :)

chuanliang commented 6 years ago

@halseth Today I try to open channel with the node using the two eclair wallet having problem , the two wallet all successfully open channel with my node ,so I can't reproduce the problem , but i think there is something wrong with the eclair mobile node . I will enable debug logs on my lnd node and try to reproduce the problem.

pm47 commented 6 years ago

@halseth Today I try to open channel with the node using the two eclair wallet having problem , the two wallet all successfully open channel with my node ,so I can't reproduce the problem , but i think there is something wrong with the eclair mobile node.

I don't see anything pointing to a bug in eclair wallet: lnd seems to just be rejecting eclair's channel opening requests for no apparent reason. If anything, the main issue would be the cryptic 01 error message which doesn't help understanding what the problem is. IIRC I already ran into this with the regular eclair on server when opening multiple channels in a row to the same lnd node. Can't reproduce at will unfortunately.

halseth commented 6 years ago

Looks like it might correspond to the error ErrMaxPendingChannels https://github.com/lightningnetwork/lnd/blob/master/lnwire/error.go#L24:2

Did the protocol have error codes at some point? Since this is old code that might be outdated.

That makes sense since you are opening more than one channel to the same node.

chuanliang commented 6 years ago

Looks like it might correspond to the error ErrMaxPendingChannels https://github.com/lightningnetwork/lnd/blob/master/lnwire/error.go#L24:2

Did the protocol have error codes at some point? Since this is old code that might be outdated.

That makes sense since you are opening more than one channel to the same node.

@halseth Thank you. The value of MaxPendingChannels in my lnd.conf is 1, I will reproduce the problem and try the parameter.

pm47 commented 6 years ago

Thanks for the follow up @halseth 👍

Did the protocol have error codes at some point?

I don't think so, that must date back to pre-rfc lnd.