Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LND behaving weird - Says it synced up, but isn't really synced #2309

Closed
Falsen opened this issue Dec 10, 2018 · 13 comments
Closed

LND behaving weird - Says it synced up, but isn't really synced #2309

Falsen opened this issue Dec 10, 2018 · 13 comments

Comments

@Falsen
Copy link

Falsen commented Dec 10, 2018

Background

So I installed lnd on my Raspberry Pi, and ran it. After a while it said that the chain is up to date.
getinfo says that the node is synced to chain and the block height is the most recent.

pi@raspberrypi:~ $ lncli --network=testnet getinfo
{
"version": "0.5.1-beta commit=v0.5.1-beta-138-g5451211d1947de5b2376aff5eb39c6e9f969cbbb",
"identity_pubkey": "03e58f82f94b65d2a43601e04891d80d5ab5f3ffe0526a4356fb5340ffc39b1355",
"alias": "03e58f82f94b65d2a436",
"num_pending_channels": 1,
"num_active_channels": 0,
"num_inactive_channels": 0,
"num_peers": 5,
"block_height": 1447291,
"block_hash": "00000000000000503302bc5a3736d5880af1fc4b119e935d9b8f9f0472d8c9cb",
"best_header_timestamp": 1544460615,
"synced_to_chain": true,
"testnet": true,
"chains": [
"bitcoin"
],
"uris": null
}

However for some reason the lnd node is spamming information about it getting past blocks.

2018-12-10 17:03:26.960 [DBG] BTCN: Fetching filter for height=1400322, hash=000000000000783a20aa4dbd476f6137bc9e401b5874af5a5d93e21fec85c64c
2018-12-10 17:03:26.961 [DBG] BTCN: Sending getcfilters to 159.203.125.125:18333 (outbound)
2018-12-10 17:03:27.070 [DBG] BTCN: Received cfilter from 159.203.125.125:18333 (outbound)
2

Why does it do this? Fetching blocks that are waaay old.

pi@raspberrypi:~/lnd $ lncli --network=testnet walletbalance
{
"total_balance": "12992363",
"confirmed_balance": "0",
"unconfirmed_balance": "12992363"
}

My balance is not yet confirmed, but the payment has at the time of writing 130 confirmations.
https://testnet.smartbit.com.au/tx/14b4e0bc81d350f8085676e2a4ccebdf6f201d68370eda47b2116f53c8b94666

I am very confused, is it doing some prescan and later a more thorough scan?

When I try to create a channel from Zap Desktop client I get the following message:

Error: 2 UNKNOWN: not enough witness outputs to create funding transaction, need 0.01 BTC only have 0 BTC available

Maybe I am doing something wrong, please tell me!

Your environment

  • version of lnd
    0.5.1-beta commit=v0.5.1-beta-138-g5451211d1947de5b2376aff5eb39c6e9f969cbbb

  • which operating system (uname -a on *Nix)
    Linux raspberrypi 4.14.34-v7+ Commitment transaction fee calcualtion #1110 SMP Mon Apr 16 15:18:51 BST 2018 armv7l GNU/Linux

  • version of btcd, bitcoind, or other backend
    Running neutrino and connected to 'faucet.lightning.community'

  • any other relevant environment details

Running on testnet

Steps to reproduce

Not sure, I just ran it

Expected behaviour

As it says the chain is synced, the payment should be confirmed a long time ago

Actual behaviour

The chain is not synced.

@Falsen Falsen changed the title LND behaving weird - LND behaving weird - Says it synced up, but isn't really synced Dec 10, 2018
@alexbosworth
Copy link
Contributor

This is using the Neutrino backend correct?

@Falsen
Copy link
Author

Falsen commented Dec 10, 2018

@alexbosworth Yes, I ran it using the command
lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug --bitcoin.node=neutrino --neutrino.connect=faucet.lightning.community --rpclisten=0.0.0.0:10009

Just to add, I can see the payment in Zap Desktop which I connected to the node. But whenever I try to make a channel it fails.

@alexbosworth
Copy link
Contributor

If you start fresh and use Bitcoin Core as a backend do you see the same error?

@Falsen
Copy link
Author

Falsen commented Dec 10, 2018

@alexbosworth Unfortunately, I'm running it on a RPi with very limited resources so it isn't an option really. I could run a pruning node, but from what I've heard it doesn't work. Is it possible for me in any way else to run lnd without a full node?

@alexbosworth
Copy link
Contributor

Prune mode will work relatively OK if you're just doing it in testnet and you can set a large-ish prune value so that it won't be missing too much

@Falsen
Copy link
Author

Falsen commented Dec 10, 2018

@alexbosworth Okey, I will give it a go. Forgive me, I am really new to this, but how come lnd can't fetch blocks from normal bitcoin nodes? Since all it seems to be doing is downloading blocks and checking for transaction, isn't that exactly what normal bitcoin nodes do?

@alexbosworth
Copy link
Contributor

Neutrino mode is fetching blocks from normal nodes, however it also needs special index files that are only provided by Neutrino-capable nodes.

There's another useful function provided by Bitcoin Core though which is that it fully validates the Blockchain

@Roasbeef
Copy link
Member

Seems to be working as expected (testnet is massive 3x the size of mainnet, and has even older channels that mainnet).

@Falsen
Copy link
Author

Falsen commented Dec 11, 2018

@Roasbeef But how does this explain the behaviour? Does my node check that all other payment channels funding transactions are valid?

@halseth
Copy link
Contributor

halseth commented Dec 11, 2018

@Falsen Yes.

@TKone7
Copy link

TKone7 commented Jan 27, 2019

Hi
I still don't fully get it. I have the exactly same scenario as described by @Falsen.
The value of synced_to_chain is True but the log is full of:

2019-01-27 16:28:05.538 [DBG] BTCN: Received cfilter from 159.203.125.125:18333 (outbound)
2019-01-27 16:28:05.539 [DBG] BTCN: Fetching filter for height=1292627, hash=000000000003087d6174ccfe8ff7c1f4ce1412847cf9b34d66d42cafa1e8269e
2019-01-27 16:28:05.539 [DBG] BTCN: Sending getcfilters to 159.203.125.125:18333 (outbound)

It seems as this process hinders me to open new channels. From my point of view lnd is synced because it shows my balance which I got in Block 1,454,092 (and log says 1,292,627 so far). What is lnd doing exactly? Is it still downloading the block filters?
Thanks for a helping me understanding this issue.

@halseth
Copy link
Contributor

halseth commented Jan 28, 2019

LND is validating the channel graph, meaning it is checking whether channels are still open.

This is being actively worked on to speed up :)

@mandelmonkey
Copy link

I have this issue, the problem is my node keeps doing this and whilst it is doing it the node is somewhat unresponsive to channel openings etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants