btcsuite / btcd

An alternative full node bitcoin implementation written in Go (golang)
https://github.com/btcsuite/btcd/blob/master/README.md
ISC License
6.2k stars 2.35k forks source link

btcd version 0.12.0-beta very slow MAINNET initial download #1396

Open weaklysubjective opened 5 years ago

weaklysubjective commented 5 years ago

Due to testnet woes, i tried out downloading mainnet. Having installed btcd version 0.12.0-beta after the bug fix for filter calculation (announced feb 12 2019), i went about downloading bitcoin mainnet blockchain data. It started out at great speed, able to download approx 5 'fdb' (1/2 GB each) per hour. It moved at that rapid pace for 60 blocks or so. Even though btcd was on 'nohup' , and it was running, it stopped downloading when the terminal logged out. Next AM, i started it back up again, and ever since the download speed has gone down to barely 2 '.fdb' per hour. I'm up to 100 blocks and at this rate it'll take 6 more days.

It seems btcd download slows down as the number of 'fdb' increases (i have no log or proof , if necessary i can run it with logs). Because i observed this when downloading testnet (after the filter calc fix) and later on the members of the community attributed the slow testnet due to testnet specific issues, i wanted to try out the mainnet. Can't help wonder if the new fix has somehow caused it to slowdown as it calculates new filter values?

Happy to produce logs as needed.

molxyz commented 5 years ago

@weaklysubjective Try this: Bootstrap your btcd with 10 good nodes from this site: https://bitnodes.earn.com/nodes/leaderboard/ by choosing the nodes that have uptime 100%, then put their IP in your btcd.conf. Example:

connect=5.43.228.99
connect=192.249.121.27

For testnet, because I have another testnet bitcoind node running so I would find the peers from bitcoin-cli getpeerinfo and use the IPs of those peers to bootstrap my testnet btcd node. Here are some testnet nodes IPs you can try:

connect=195.95.225.17
connect=139.59.25.30
connect=45.76.111.197
jorgeelmundoso commented 5 years ago

anyone seen https://blog.keys.casa/bitcoin-full-validation-sync-performance/ btcd made by far the worst entry in the list of tested bitcoin node implementations when it comes to sync the complete blockchain from block 0

Performance Rankings
Bitcoin Core 0.17: 5 hours, 11 minutes
Bitcoin Knots 0.16.3: 5 hours, 27 minutes
Gocoin 1.9.5: 12 hours, 32 minutes
Libbitcoin Node 3.2.0: 20 hours, 24 minutes
Bcoin 1.0.2: 27 hours, 32 minutes
Parity Bitcoin 0.? (no release): 38 hours, 17 minutes
BTCD 0.12.0: 95 hours, 12 minutes