Difficulty syncing

Hi,

I’ve installed the linux zcashd client, its on a public IP address, with no filtering. I’ve been trying to sync, but it is going very slow. Its been more than 24hours and it has only managed to do 2% so far. The only thing I have in my config file is:

addnode=mainnet.z.cash

the system is not under load, it has plenty of CPUs and memory available. Is there some way to better bootstrap things?

3% in 24hrs is horribly slow, have a look at .zcash/debug.log to see if its complaining.

How much RAM do you have? I’ve found it struggles with less than 8.

Its actually 2%, not 3% and it has been 1 day 7 hours and 37 minutes, as of this writing.

The zcashd process is only using 14% of the available RAM, but it is consuming quite a lot of CPU. I can add RAM to see if it helps.

The debug.log has lines like this:
2019-01-24 22:09:49 UpdateTip: new best=0000000154868d67f275bfa44c8b659aa3b1c9226f783c91f93b791686d01116 height=10401 log2_work=43.45582 tx=84778 date=2016-11-14 20:42:31 progress=0.012405 cache=45.3MiB(22297tx)
2019-01-24 22:09:49 UpdateTip: new best=000000005d429ccf6b1e58641c60246e518d08c73087dab0821b9cd8e0fe578d height=10402 log2_work=43.456179 tx=84784 date=2016-11-14 20:47:03 progress=0.012406 cache=45.3MiB(22303tx)
2019-01-24 22:09:55 UpdateTip: new best=00000000c8f853bc5c0b2607ddbf58a4bfd09473fa97b90e5fbcd3163dd24ff9 height=10403 log2_work=43.45654 tx=84785 date=2016-11-14 20:47:22 progress=0.012406 cache=45.3MiB(22304tx)
2019-01-24 22:09:55 ERROR: ContextualCheckTransaction(): overwinter is not active yet
2019-01-24 22:09:55 ERROR: AcceptToMemoryPool: ContextualCheckTransaction failed

I also see this at the beginning:

2019-01-23 14:33:02 ERROR: AcceptToMemoryPool: joinsplit requirements not met
2019-01-23 14:33:02 ERROR: Read: Failed to open file /home/user/.zcash/peers.dat

I see 52 Connection refused messages for peers, like the following
2019-01-23 14:42:17 connect() to 185.230.125.40:8233 failed after select(): Connection refused (111)

I made the machine have 8gb, and I still see that message in the debug.log:

2019-01-24 22:20:58 ERROR: AcceptToMemoryPool: joinsplit requirements not met

It only appears once, on startup

sorry for stupid question: are you using latest version of zcashd?

If CPU usage is high, you’ve got mining enabled, you can disable from adding gen=0 to config file

Looks like zcashd cannot access nor create the peers.dat file. Check Ownership/permissions of home folder and files. Make sure they are owned by the user your starting as, and not say “root”.

Its version 2.0.2, from the apt.z.cash debian repository.

I’m not mining, it says on the splash screen, “You are currently not mining.
To enable mining, add ‘gen=1’ to your zcash.conf and restart.”

This was only the first run, because that file didn’t exist, a peer list was downloaded. Now when I start it does not give that error, and instead says:

2019-01-24 22:20:58 Loaded 28097 addresses from peers.dat 143ms

The splash screen says I’m running a Zcash node, maybe that is the problem? Maybe the validation of transactions is slowing things down?

Since starting this node 3 hours, 6 minutes, 7 seconds ago:

  • You have validated 17394 transactions!

How many connections do you have? It’s on the metrics screen or zcash-cli getinfo will show it.

Right now there are 8 connections.

8 connections means its working.

Internet connection speed ok? Go to https://fast.com & see what you’re getting.

Just from own experience. Is it a laptop you are using? maybe other POS wallets actice there or other processes running and using the CPU power?

On my laptop i have POS wallets running that take nearly 100% of the CPU, it took me ages to download and sync the last wallet than.

Next option i bet is low internet connection. You have 8 connections, but it’s still up on what the whole internet connection is.

Would be really good if you share a bit more information on what hardware you use, enough hdd space available, internet connection and whatever else might usefull as we are just guessing in the dark right now…

You need to find out the reason of why it is so slow. May be your general connection is not enough, or you are lack of good hardware. It is hard to say without having an additional info

1 Like

My internet speed is more than ok, I’m on a server that has three 1gb/s uplinks to two different tier1 providers, and the third is a connection to a global internet exchange.

It is not a laptop, its a server, doing nothing else. I created this machine specifically in this datacenter because syncing on my laptop for the last week did not work. I thought maybe if I put it on a server, directly connected to the internet, where it wasn’t having any competition with any other resources, and I could run it under a screen session would change things, but it has not.

I’m pretty sure it has nothing to do with hardware, memory, or network speed.

Has anyone here tried to sync the zcash blockchain from the beginning any time recently? I asked my friend who runs a datacenter in europe to do this, and he is having the same results.

Is there some bootstrap I can do, like download 90% of the existing blockchain from somewhere, so I can sync the rest? All I want to do is check my balance, but after 36 hours I’m only at 3%, this will take months.

no idea about servers and other issues related to a server and ZEC, but syncing the whole blockchain with windows and the qt zec wallet took me about 4 hours 2-3 weeks ago.

You running this on a Red Hat 6/7 Server or CentOS 6/7 by chance? Have you checked that selinux is not causing issues? Tried setting selinux to permissive (requires reboot) (just logs doesn’t interfere) to test? Ensured iptables is allowing 8233 TCP incoming and pinning 8232 to localhost traffic only (RPC)? I’ve seen firewall configs with and without connection tracking (conntrack) for established and related as well.

Reason I ask is I have stood up a zcashd node in virtual box on CentOS 6.10 and it syncs way faster than your physical and I’m just on FIOS. I would expect it to be as good if not better with what you are using. So I have to ask the “dumb” questions as they can easily be overlooked. Every time I have ever had an issues syncing on a machine, it’s been I’ve overlooked or forgotten about one or the other.

I’m running on Debian Stretch. There is no SELinux enabled. There is no firewall, no iptables rules at all.

Maybe the nodes I’m connecting to are slow to send me data? Looking at interface statistics, the network bandwidth that is being consumed is only around 26kbps, it bursts once and a while to more, but not much. No, there is no firewall, and no there is no issue with the network to this machine. I just downloaded a file at 80Mbit/sec, with no issues.

26kbps??? Your connection is being throttled somewhere, ask your datacentre people if they limit/shape traffic.