ZeusLN / zeus

A mobile Bitcoin wallet fit for the gods. ⚡️ Est. 563345
https://ZeusLN.com
Other
1.03k stars 146 forks source link

Embedded node always responds "insufficient local balance" on sending #2355

Open clayt0nk opened 3 months ago

clayt0nk commented 3 months ago

Describe the bug

~$100 worth of sats on deposit, I have NEVER seen a successful send from this node. At first I thought this was just a bad network thing, but I now have a half-decent network, still doesn't work. Current behavior, for any size transaction, is "Error - insufficient local balance".

Reproduce

Actual Zeus version I am seeing in-app is v0.8.5-hotfix

ZEUS version

v0.8.5

Node interface

Embedded LND

Network

Clearnet

Device

OnePlus 6

Device operating system

/e/OS 2.2 Android 13 (up to date)

Log output

No response

Darth-Coin commented 3 months ago

Check in logs if you see

[ERR] LNWL: Failed to open database: timeout

It could be database corrupted (but not always) and the only way is to restore from seed + scb. You could try first (see in advanced settings):

clayt0nk commented 3 months ago

Thanks, the compact DB / delete neutrino files / resync routine did not yield progress. I just had a close scan of the logs, and the only ERR I can see (after the above resync) is a failed attempt to connect to an onion address, ie.

[ERR] SRVR: Unable to connect to 0285a9bdd8f6e510bdd48a5d680574abdfe2a3ca3124367d33cb13c1ed9872023b@h5cc3rudzefdwrmpusayfh7vsz7i6yamf2f7eklcjast3aiszckq3tyd.onion:9735: dial tcp: lookup h5cc3rudzefdwrmpusayfh7vsz7i6yamf2f7eklcjast3aiszckq3tyd.onion: no such host

Which is odd because there should be no Tor happening here. On the same Zeus instance I also have a LNDHub Alby custodial wallet configured (which works fine) and in that node config the "Use Tor" toggle is turned off. However when I look at the Embedded LND node config, there is no mention of Tor at all. Syncing the Embedded LND node also works fine, in fact it is satisfyingly fast here. Is the failed .onion connection a problem, or log clutter?

Darth-Coin commented 3 months ago

Embedded node it doesn't use Tor at all. Did you tried to open channels or add peer with a Tor node? From there could be that error. But is not affecting the rest. Can be ignored. Did you also kept the persistent mode ON ? Check carefully the logs.

clayt0nk commented 3 months ago

Embedded node it doesn't use Tor at all. Did you tried to open channels or add peer with a Tor node? From there could be that error.

Did nothing at all fancy, zero channel or peer operations, it should be an unaltered out-of-the-box Embedded Node

But is not affecting the rest. Can be ignored. Did you also kept the persistent mode ON ?

No, having never seen a successful outgoing transaction, I am not expecting any incoming transactions.

Check carefully the logs.

Seen today, right after startup: [INF] HSWC: Onion processor starting ..... [INF] DISC: Obtained 4 addrs to bootstrap network with (followed IMMEDIATELY by:) 4 x [ERR] SRVR: Unable to connect to 020a128145c54dec1c1d72e9bf0ec26759d1e16b9a7bba1453e1fc2b4cec6a6fbd@eycjbrtedzrbperlcvmfwu4gdi3dyme2pzllyjh7uw5opac64wbj5lqd.onion:9735: dial tcp: lookup eycjbrtedzrbperlcvmfwu4gdi3dyme2pzllyjh7uw5opac64wbj5lqd.onion: no such host

Seen after failed transaction:

[ERR] BTCN: Unable to parse IP network for peer mxv3rijxa4g2mgafhwyax7lcfyrhhila5g4rnm46cwemileo7okfnpyd.onion:8333: unsupported IP type [INF] BTCN: Lost peer 144.6.168.235:8333 (outbound) [WRN] BTCN: No sync peer candidates available [INF] PEER: Peer(031b301307574bbe9b9ac7b79cbe1700e31e544513eae0b5d7497483083f99e581): unable to read message from peer: read next header: read tcp 192.168.1.12:49654->45.79.192.236:9735: read: software caused connection abort [INF] PEER: Peer(031b301307574bbe9b9ac7b79cbe1700e31e544513eae0b5d7497483083f99e581): disconnecting 031b301307574bbe9b9ac7b79cbe1700e31e544513eae0b5d7497483083f99e581@45.79.192.236:9735, reason: read handler closed .... [INF] BTCN: New valid peer 154.26.130.77:8333 (outbound) (/btcwire:0.5.0/btcd:0.24.0/) [INF] BTCN: Syncing to block height 857146 from peer 154.26.130.77:8333 [INF] BTCN: Fetching set of headers from tip (height=857145) from peer 154.26.130.77:8333 [INF] BTCN: New valid peer 46.250.236.40:8333 (outbound) (/btcwire:0.5.0/btcd:0.24.2/) [INF] BTCN: Processed 290 blocks in the last 11m22.83s (height 857146, 2024-08-17 06:29:22 +0000 UTC) .... [INF] BTCN: Max peers reached [8] - disconnecting peer 179.214.122.129:8333 (outbound) [INF] BTCN: Lost peer 179.214.122.129:8333 (outbound) [WRN] CRTR: Not enough outbound balance to send htlc of amount: 500000 mSAT, only have local balance: 0 mSAT [ERR] RPCS: [/lnrpc.Lightning/QueryRoutes]: insufficient local balance [WRN] CRTR: Not enough outbound balance to send htlc of amount: 500000 mSAT, only have local balance: 0 mSAT [ERR] RPCS: [/lnrpc.Lightning/QueryRoutes]: insufficient local balance [WRN] CRTR: Not enough outbound balance to send htlc of amount: 500000 mSAT, only have local balance: 0 mSAT [WRN] CRTR: Failed to find route for payment 53c540f45de21fb89c9435dcc97eb690851158668af36f836a631422624ee900: insufficient local balance

kaloudis commented 2 months ago

@clayt0nk how many channels do you have and what do they balances look like, roughly?

clayt0nk commented 2 months ago

@kaloudis I am seeing one channel: outbound = 190,497 sats inbound = 97,719 sats offline = 0 sats "OLYMPUS by ZEUS" = "Good"

kaloudis commented 2 months ago

@kaloudis I am seeing one channel: outbound = 190,497 sats inbound = 97,719 sats offline = 0 sats "OLYMPUS by ZEUS" = "Good"

here are the four steps you can try (if you've tried any of these, please try them again)

Hope this helps

clayt0nk commented 2 months ago

I tried exactly those steps, and got exactly the same error: "Insufficient local balance". This was for a 500 sat send from Zeus Embedded Node to my Alby wallet on another device running Zeus.

clayt0nk commented 2 months ago

So how do I close this channel and pry my sats out on-chain? If there is a "close channel" button in the UI somewhere, I cannot find it.....

kaloudis commented 2 months ago

So how do I close this channel and pry my sats out on-chain? If there is a "close channel" button in the UI somewhere, I cannot find it.....

The close channel button is at the bottom of the individual channel view. You get to it by pressing on the channel in the channels list

clayt0nk commented 2 months ago

Yeah, happy to say that works. The onchain transaction was a bit sloppy though, there was no "max" button and no indication of what the fee was going to be, so I had to guesstimate and am left with a about a dollar worth of onchain dust in the old wallet. So I imported the embedded node seed into another device, and I guess I am now incentivized ;-) to try the embedded node again some months down the road and try to recover that dust.

kaloudis commented 2 months ago

@clayt0nk if you input an onchain address in Zeus, a broom icon will appear in the header. if you press that, you'll be able to sweep the entire wallet in a single transaction