I'm trying to mine using the commands geth --rpc
and ethminer
on an ubuntu 16.04 machine. Sometimes it works, but often after I restart my PC, I get the error "Network syncing, will start miner afterwards". This happens even after letting it run for days, and even when it had been working before on the same day. That means synchronization does not work, because the additional data it has to download for the meantime is so tiny, it can't normally take hours. It should take minutes at most.
As a work around, I then delete all the chain data and start syncing from scratch. That takes a complete day, but then it works again. Then after trying it out several times and restarting, the problem comes back and I need to download or recreate all the 30GB again. This is a very nasty problem.
What can I do about this?
Here is the last 10 lines of geth's output:
...
INFO [11-17|16:10:23] Imported new chain segment blocks=2 txs=118 mgas=8.346 elapsed=11.620s mgasps=0.718 number=4018787 hash=b33409…30e233
INFO [11-17|16:10:37] Imported new chain segment blocks=3 txs=137 mgas=13.701 elapsed=13.448s mgasps=1.019 number=4018790 hash=e652f8…f20c4e
INFO [11-17|16:10:45] Imported new chain segment blocks=2 txs=174 mgas=10.659 elapsed=8.115s mgasps=1.313 number=4018792 hash=5cedef…eaf7ed
INFO [11-17|16:10:53] Network syncing, will start miner afterwards
INFO [11-17|16:10:55] Imported new chain segment blocks=2 txs=135 mgas=8.080 elapsed=10.302s mgasps=0.784 number=4018794 hash=cc3e31…f5fff2
INFO [11-17|16:10:55] Network syncing, will start miner afterwards
INFO [11-17|16:10:57] Network syncing, will start miner afterwards
INFO [11-17|16:11:04] Imported new chain segment blocks=1 txs=105 mgas=6.709 elapsed=8.731s mgasps=0.768 number=4018795 hash=9053b0…379cf6
INFO [11-17|16:11:12] Imported new chain segment blocks=1 txs=171 mgas=6.669 elapsed=8.369s mgasps=0.797 number=4018796 hash=4af69b…9418a5
INFO [11-17|16:11:23] Imported new chain segment blocks=2 txs=155 mgas=10.575 elapsed=10.816s mgasps=0.978 number=4018798 hash=41a86c…fc801d
corresponding ethminer output:
$ ethminer
miner 16:10:53.876|ethminer Getting work package...
JSON-RPC problem. Probably couldn't connect. Retrying in 1...
miner 16:10:55.878|ethminer Getting work package...
JSON-RPC problem. Probably couldn't connect. Retrying in 1...
miner 16:10:57.879|ethminer Getting work package...
^CON-RPC problem. Probably couldn't connect. Retrying in 2...
Update:
The system has 16GB of RAM, a fast SSD and it's on a 100MBit/s connection. Speed test for the connection has good results.
Update:
I had it synced and mining today. Now I read that current block number should be 4570731, but my download is at 4018737, so more than half a million blocks are missing. I think my database is corrupted. Could that be the reason? If yes, why does it corrupt again and again?
Update:
I had it running since yesterday with --cache 8192
. It's now at block 4136031, meaning it progressed by about 120000 blocks in 24h. That means it will take more than 5 further days to complete sync.