question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Zap onchain BTC address does not belong to lnd wallet to which I'm connected to

See original GitHub issue

Description

I’m using Zap with my own lnd node. I had a lnd node, closed all channels and emptied out the wallet. Formatted HD, created new lnd node, restored a different older wallet.

Connected Zap to it. At this point, I think the sync for lnd wasn’t finished. Then I was reckless, and sent a considerable sats amount in the address generated in Zap. The funds didn’t show up, I thought it was because the node didn’t sync yet. But, after syncing, funds not there yet.

Connecting to lnd, lncli newaddress generates different address than that found in Zap. I seems that the address generated by Zap does not belong to my wallet. I tried running dropwtxmgr on my lnd wallet. This resulted in some older tx for this wallet (a few months old, since this was a restored, but empty wallet) showing up, but not the one that I just did.

Confirmed with small amounts that new transactions to the address in Zap don’t show up, but the ones to the lncli newaddress do show up.

Edit: sorry for the description not being clear enough, see: https://github.com/LN-Zap/zap-desktop/issues/3478#issuecomment-619617989

Expected Behavior

Onchain address in Zap should be the same with the one in lncli neweaddress

Onchain address in Zap should belong to my lnd wallet

Actual Behavior

Different address

Address doesn’t belong to my wallet

Possible Fix

I hope there is one

Steps to Reproduce

I tried to reproduce it now on a Polar simnet network (just once tbh) using dev, but didn’t manage to. Still, my release Zap is in this inconsistent state.

Context

Your Environment

  • Zap version: 0.6.2-beta
  • Operating System and version: mac OS Catalina
  • lnd: 0.9.2-beta

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
stefan-mihailacommented, Apr 26, 2020

Yes, exactly, I think this is a serious bug if we confirm it and it’s better to get it fixed, that’s why I didn’t mess up too much with my node since this happened. Okay, I’ll take a look. I’m also on Slack if you prefer that.

0reactions
stefan-mihailacommented, Apr 27, 2020

This is definitely not a bug in Zap. Zap got the address by calling the node’s gRPC NextAddr while lnd was restoring from a backup. Looks like somehow that address returned by lnd was outside the default recovery window. Using a window larger than the default did the trick. Thank you @mrfelton for the support!

Read more comments on GitHub >

github_iconTop Results From Across the Web

I sent BTC to an address generated in ZAP but it is not ...
No, Zap doesn't have a wallet file. Zap doesn't have a wallet at all. You are connected to your own node - Zap...
Read more >
Get started with BTCPay Server, LND and Zap Wallet - YouTube
This video is a step by step tutorial on how to get your lightning node online via BTCPay and connect to it via...
Read more >
Zap Lightning Network Wallet Tutorial (Video 1) - YouTube
Zap video seriesIn this video we download Zap and start it for the first time. We get familiar with the initial sync process, ......
Read more >
Zap 101 - Bitcoiner.Guide
In this article I'm going to focus on how to connect Zap on your Android phone, to your myNode (which runs LND) but...
Read more >
What is a Bitcoin Wallet? A beginner's guide to storing BTC
Rather than keeping physical money, the wallet saves the cryptographic information needed to access Bitcoin addresses and send transactions. Other ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found