ACINQ / eclair-mobile

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

BalanceTooLow$ despite adequate funding #245

Closed no-zzz-un closed 4 years ago

no-zzz-un commented 4 years ago

My payments to 3 vendors (bitrefill, satoshis.place, yalls.org) fail immediately with:

1 of 1: BalanceTooLow$

Type: Local

I have two channels, both status normal, both with sufficient "Can send" balances.

update: I've closed those two channels and opened a new one. The problem persists.

eclair_channels eclair_payment_failure

AdamISZ commented 4 years ago

I have exactly the same problem. App is up to date (latest version), I tried resetting wallet cache and resetting network database, but made no difference. I have 2 channels, one has sending capacity about 5 times the size of the payment (as reported on the app, and in the log), but above failure is repeatable. Note that this happened today, but I have been using the channel successfully to make 5 or 6 payments over the last week. No idea what changed.

Edit: I should mention that both channels open are acinq nodes, as above. The fact that there are two doesn't seem so relevant (especially given the evidence in the OP).

t-bast commented 4 years ago

Sorry I missed this issue. This seems linked to some recent MPP changes. Could you send me eclair-mobile logs by email (bastien@acinq.fr)? We have a bunch of important changes coming to the MPP split algorithm (https://github.com/ACINQ/eclair/pull/1427) that should be available in the next eclair-mobile version, but if there are other bugs lurking it would be good to fix them asap.

AdamISZ commented 4 years ago

Log sent @t-bast

t-bast commented 4 years ago

We recently activated MPP on eclair-mobile, and there is an issue with how the splitting algorithm behaves when you have only a few channels with big(-ish) capacity and send non-negligible amounts to non-neighbour nodes. We're choosing to deactivate MPP for now (expect a new release of eclair-mobile very soon with that fix) and will re-activate in the next version, with the brand new splitting algorithm that should behave much better.

t-bast commented 4 years ago

This should be fixed with the latest eclair-mobile release that temporarily disables splitting multipart payments. The next release will provide the new splitting algorithm (available on eclair-core master).

AdamISZ commented 4 years ago

Yeah sorry deleted my comment when i realised there was an update. And it works :+1:

t-bast commented 4 years ago

Great, good to know!

AdamISZ commented 4 years ago

I think I may have spoken too soon in saying this is resolved. I just did a trivial test payment to a btcpayserver instance before my message above ("it works"), but I have since found that every attempt to pay bitrefill has failed (I guess 6 or so attempts over the last several days), interestingly each attempt (amounts are far below the channel balance) has as the first of its ten failures an "insufficient funds: missing = Satoshi(X) ...", and all the remaining failures say channel unavailable or disabled.

t-bast commented 4 years ago

Hey @AdamISZ, this indicates an issue either with the state of the channels, with the routing DB or with how we manage retries. Could you send me your eclair logs for some of those payment attempts?

t-bast commented 4 years ago

In the channels tab, everything looks right? All the channels indicate a NORMAL state?

AdamISZ commented 4 years ago

Yes channels are normal state, 2 channels one a bit smaller than the required amount (afair) the other very much larger.

t-bast commented 4 years ago

I'm suspecting an issue with how channel balances are propagated throughout the app, I'll check exactly what commit of eclair-core the latest eclair-mobile version uses. If you could send me some logs that would be helpful!

AdamISZ commented 4 years ago

Sent