spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.55k stars 3.11k forks source link

Lightning payments fail all the time - channel gets force closed #9079

Open PanosChtz opened 6 months ago

PanosChtz commented 6 months ago

Over the last month I opened 2 trampoline channels. Initially, the channel seemed to be working fine, i.e. a payment was processed almost immediately. However, when I came back after a few days to make another payment using the same channel, the payment was not going through and I was getting some error I could not explain. After retrying many many times to get the payment through, the channel got force closed with very high fee (more than 0.002 BTC) and I had to wait 720 blocks to get a portion of that fee back (seeing a transaction with a "computer" icon like it is unbroadcasted, with the description "their_ctx_htlc_0 ....". Initially I thought this was some random thing but this was the second time in a row it happened. I am attacking logs from both cases. Can you please look into this, because it makes lightning network very unreliable and practically unusable.

electrum_log_20240516T135322Z_8444.log electrum_log_20240524T035315Z_4580.log

electrum_log_20240604T014138Z_18012.log electrum_log_20240604T014531Z_20744.log

ecdsa commented 6 months ago

Thank you for the logs.

I am trying to figure out why the trampoline has force closed. Do you have logs for 2024.05.13? This is when your Electrum client seems to have sent an incorrect commitment signature.

SomberNight commented 6 months ago

(related https://github.com/spesmilo/electrum/issues/9050)

ecdsa commented 6 months ago

This is the eclair log. I suspect an issue with the replay of messages after disconnect. (HTLC 273 is sent twice) 9079.log

PanosChtz commented 5 months ago

Thank you for the logs.

* The first log shows a channel force closed by the remote node.

* The second log shows a cooperative close, it seems that you closed the channel voluntarily.

I am trying to figure out why the trampoline has force closed. Do you have logs for 2024.05.13? This is when your Electrum client seems to have sent an incorrect commitment signature.

electrum_log_20240513T191554Z_5664.log

Here is another log I have

ecdsa commented 5 months ago

Here is another log I have

Thanks. unfortunately this log starts after the relevant time. Do you happen to have logs before that one?

PanosChtz commented 5 months ago

Unfortunately these are all the log files I see in the directory. I will re-open a new payment channel and will post here the logs when I make payments which fail.

khell commented 5 months ago

My channel was also force closed out of the blue. Electrum has been idling in background for months, I did not touch it and all of a sudden I got a transaction notification from OS, and saw my channel is being force closed. This cost me a significant amount of money for no reason. I don't think I'll be using Electrum for Lightning anymore - too many problems. It's not acceptable to suddenly have Bitcoin eaten by transaction fees caused by what appears to be a software bug.

And no, I do not have logs. Why on earth are logs not enabled by default???

PanosChtz commented 5 months ago

Ok this happened again. I opened a channel yesterday and today I tried to make a lightning payment. The payment was stuck after many attempts and nothing was happening. I eventually had to restart electrum and try a different invoice, as the one was stuck in limbo. I also disabled trampoline after restart. Then I got a popup message "access is denied" then another popup which I cannot recall. Then the channel was force-closed and 3 different "their_ctx_htlc_0 ...." transactions appeared.

Obviously as @khell said, this makes lightning wallet effectively unusable as this results in losing lots of money all the time. I also suggest logs to be enabled by default.

electrum_log_20240612T154524Z_7568.log electrum_log_20240604T015818Z_13828.log

PanosChtz commented 5 months ago

Another log file electrum_log_20240612T154900Z_14176.log