chainpoint / chainpoint-gateway

Chainpoint Gateway
https://chainpoint.org
Apache License 2.0
27 stars 12 forks source link

testnet syncing taking days and days #55

Closed garyrob closed 3 years ago

garyrob commented 3 years ago

The main github page for chainpoint-gateway provides instructions on how to set up Gateway. In particular, they say that Lightning node sync takes "10-15 minutes".

So, I followed all listed steps. When I run "make init" and specify that I want testnet, and get to the Lightning syncing step, I see the "Syncing in progress... currently at block height xxxxxxxxxxx" generating new lines specifying the block height I'm currently synced to. That all makes sense.

Except that the instructions say that the lightning node sync takes "10 - 15 minutes" and mine's been running for something like a week. It's now up to block height 1104000 and appears to be stuck; it's shown that height for 17 hours now.

Any suggestions?

Also, is there an active chainpoint-related community somewhere, where one can ask questions like this, or is this github issues list the best place?

jacohend commented 3 years ago

Hi @garyrob, I recently resolved an issue that was affecting mainnet syncing. I've moved this hotfix to testnet, so if you pull the containers again, it should sync far better. You may need to delete ~/.chainpoint/gateway/.lnd/data/chain/bitcoin/testnet/peers.json to discover new peers. Let me know how this works for you.

jacohend commented 3 years ago

I've sent you a discord invite to the email listed in your github bio.

garyrob commented 3 years ago

I just tried again from the beginning, and got "An unexpected error has occurred : Could not initialize Lightning wallet : 2 UNKNOWN: wallet already exists. Please run 'make init' again." When a ran make init again, I got the same error again. SoI tried rm -rf ~/.chainpoint. Then I got the error: "An unexpected error has occurred : Unable to retrive status of Core at 18.216.19.124. Please run 'make init' again". I tried make init again. This time it made progress and is now syncing, telling me the block heights.

garyrob commented 3 years ago

thanks for the discord invite

garyrob commented 3 years ago

It's been running for 15 hours now and is up to block height 105000. Seems worth mentioning because my understanding is that it says it's doing Lightning syncing, and the main page says that that should take 10-15 minutes. (Again, this is on testnet.)

Can you give me any information about how long this should actually take at this point? For instance, what block height is the end?

jacohend commented 3 years ago

Hi @garyrob, apologies, but we're not able to replicate this issue. Lightning syncing consists of downloading the block headers instead of the entire chain. It's possible your mileage may vary depending on what peers your node discovers, but typically not by a margin of hours. My advice would be to kill the lnd container (using the docker kill command) and remove the old peers (~/.chainpoint/gateway/.lnd/data/chain/bitcoin/testnet/peers.json). This ought to help your lnd node find faster peers.

The current testnet block height is here: https://blockstream.info/testnet/.

garyrob commented 3 years ago

Interesting. Would it be possible to give me a (very rough is fine) estimate of how long you would estimate the whole make init for testnet should take if I run it on a pretty standard cloud box (in this case a DigitalOcean "droplet" with 8GB, and "high-CPU" which means it should have very good CPU performance). Minutes? Hours? Days?

jacohend commented 3 years ago

It typically takes 15-30 minutes for us. Only when the lightning node is connecting to bad peers does it have issues downloading the chain.

garyrob commented 3 years ago

OK. I tried it again after removing the old peers and got an error. So, I decided to destroy my Digital Ocean droplet, allocate a new one, and start from scratch, again trying to set up a testnet node.

When I did so, I still got an error. Here it is:

? Connecting with more Cores improves the reliability but is more expensive (2 is recommended).
How many Cores would you like to connect to? (max 4) 2
? Would you like to specify any Core IPs manually? No
An unexpected error has occurred : Unable to retrive status of Core at 18.216.19.124. Please run 'make init' again.
Shutting down Lightning node...
Shutdown complete

I'm not sure where the 18.216.19.124. I guess that's the address of a peer that isn't working?

Do you have any suggestions?

garyrob commented 3 years ago

The same error happened again when I retried it, but I waited a longer time and retried it again, and now it's getting farther along! It's back to syncing.

garyrob commented 3 years ago

Just to let you know, it got synced up and I can get a json response from "http:///config". So this can be closed. Thank you!