80

Every time I turn on the Bitcoin client it takes days to catch up with the block chain.

Are there alternatives to getting it trickling through the peer-to-peer network? Can I just download it somewhere? Wouldn't this be ideal for distribution via BitTorrent?

If so, how do I import it into the Bitcoin client?

My client would still be validating this data (can it?), and it is all signed and proof-of-worked, so there is no real security problem here, is there?

Murch
  • 75,206
  • 34
  • 186
  • 622
Thilo
  • 4,759
  • 5
  • 26
  • 37
  • Apparently this does not speed up the time it takes to import and validate the block chain much, because the cryptographic calculations are the bottle neck, not the network I/O. But still, downloading everything first and validating later reduces the time you need a working network connection. Validation can be done offline, too. – Thilo Nov 27 '11 at 23:16
  • Good question! I was going to ask "How long is it supposed to take to download all blocks from the transaction history?". Short answer is: the times it takes to download a 1.4GB file, plus a bit more to get the latest blocks from peers. – rds Feb 18 '12 at 15:49
  • Can I know the from where i can download a sample of blockchain for some basic analysis? – Ankita Jul 10 '15 at 14:54

7 Answers7

28

Note by Murch: This download link is broken and it seems unlikely to me that anyone still provides this service. Network and synchronization code have been immensely improved over the years so that the initial block download via the network is usually acceptably fast.

You can download the blockchain nightlies handled by tcatm (one of the Bitcoin core developers and the operator of bitcoincharts.com). Unpack and copy&replace blkindex.dat, blk0001.dat files into C:\Users\"username"\AppData\Roaming\Bitcoin for Windows 7, and run bitcoind with the -rescan option. Then it will take only a couple minutes to download up to latest block. Be aware that manually copied blocks won't get verified.

Murch
  • 75,206
  • 34
  • 186
  • 622
Serith
  • 5,400
  • 23
  • 24
  • 5
    The -rescan option doesn't verify blocks. It only checks for transactions that affect your wallet. It shouldn't take very long, not more than 10 minutes or so. (And you must do this if you use the nightlies. Otherwise you won't show or be able to spend any Bitcoins you received in blocks you didn't download from the Bitcoin network.) – David Schwartz Sep 09 '11 at 08:34
  • 4
    Are those .dat files portable? Or only work on Windows 7? – Thilo Sep 09 '11 at 08:58
  • 4
    it should be interchangeable, https://bitcointalk.org/index.php?topic=26044.0 – Serith Sep 09 '11 at 09:10
  • 2
    The only issue would be if you compiled the client yourself and used a different version of BerkeleyDB. Otherwise, it should work on all platforms. – David Schwartz Sep 09 '11 at 09:11
  • 1
    Just found some more about it from Matt Corallo, he says it will work, https://bitcointalk.org/index.php?topic=36847.msg453167#msg453167 – Serith Sep 09 '11 at 09:16
  • 19
    This is to report a rotten link :( – Be Brave Be Like Ukraine Feb 24 '13 at 09:53
  • 2
    @DavidSchwartz excuse my ignorance, but wouldn't a rescan w/o revalidation of the cryptographic work be trusting the entity providing the download? Thus wouldn't this be encouraging a centralizing single-point-of-failure node w.r.t. to trust and honesty? P2P systems must inherently not trust in order to remain decentralized. If I am correct, then the -rescan command line option should be removed? – Shelby Moore III Mar 24 '13 at 10:02
  • @ShelbyMooreIII: You still need the -rescan option to rescan trusted databases if the wallet is changed. – David Schwartz Mar 24 '13 at 14:32
  • 1
    Howdy @Serith - any chance you could find an alternate link to blockchain? The link is dead, and it's breaking most of the context of your answer -- – Tim Post Jan 23 '14 at 06:37
  • The link is broken, could you update the answer please? – Slava Fomin II Nov 11 '16 at 19:52
  • The link is broken, so downvoted. – remedcu Oct 19 '17 at 16:31
14

This was an issue with versions of the client prior to 0.3.24 -- once the vast majority of the network switches over, the block chain downloads should proceed as fast as your CPU and network connection can handle.

There are places you can download the block chain, but the client doesn't provide a way to accept the block chain in any form other than from the network. If you're starting from nothing, it will generally take about 10 hours to process the whole block chain. Most of it isn't transfer time, it's CPU time validating all the hashes and signatures.

David Schwartz
  • 51,554
  • 6
  • 106
  • 178
  • 1
    +1 If it really takes 10 hours to validate the chain when reading from a local file, then I guess I have to give up on the idea... Is there a way to know which versions everyone is on? – Thilo Sep 09 '11 at 07:58
  • Watch your CPU usage while you sync up. Unfortunately, the client can't really take advantage of multiple cores as it catches up. The right ultimate solution is for most people not to run the client but to instead run a lighter piece of software that only does what they actually need. – David Schwartz Sep 09 '11 at 08:02
  • @Thilo You could "divide" it. So 10 days, 1 hour each. – Pacerier Jun 17 '12 at 18:32
  • A lot of people want to use Armory as their bitcoin client, which really makes the idea of using a light bitcoin client impossible, unfortunately. I submitted a request to etotheipi to add in an option to Armory to load the blockchain from a server, and he said it's something he might do in the future, but it's pretty low on his list of priorities. – Evan Lynch Jun 03 '14 at 06:15
  • answer states there is no way to load the blockchain from disk, but it is well-known that you can move the blocks subfolder around to do this. – fuzzyTew Nov 06 '21 at 10:42
  • answer states there is no way to load the blockchain from disk, but it is well-known that you can move the blocks subfolder around to do this. – fuzzyTew Nov 06 '21 at 10:42
14

A good start of downloading block chain is here


http://sourceforge.net/projects/bitcoin/files/Bitcoin/blockchain/

update 22.02.2021: URL is not more Working

Codler
  • 960
  • 1
  • 9
  • 13
  • 2
    This is the correct answer. "Bitcoin-Qt/bitcoind version 0.7.1 and later supports a special import feature: If the file "bootstrap.dat" is found in the bitcoin data directory, it will validate and import all blockchain data found in that file." The torrents are in the link indicated by Codler. – Stephan Tual Mar 24 '13 at 02:54
  • 3
    Broken link.... – user541686 Jan 16 '16 at 11:11
  • As of 2015-06-05, this project may now be found at https://github.com/bitcoin/bitcoin – remedcu Oct 19 '17 at 16:33
9

"Bitcoin-Qt/bitcoind version 0.7.1 and later supports a special import feature: If the file "bootstrap.dat" is found in the bitcoin data directory, it will validate and import all blockchain data found in that file."

The official torrent can be found at: http://sourceforge.net/projects/bitcoin/files/Bitcoin/blockchain/

Magnetic link: magnet:?xt=urn:btih:6fe493ba606847eac163baf35aae9db319735482&dn=bootstrap.dat&tr=udp://tracker.openbittorrent.com:80&tr=udp://tracker.publicbt.com:80&tr=udp://tracker.ccc.de:80&tr=udp://tracker.istole.it:80

Thread: https://bitcointalk.org/index.php?topic=145386.0

Stephan Tual
  • 220
  • 2
  • 4
4

http://en.blockchaindownload.nl/ is a good way to download the full blockchains of bitcoin and litecoin. The site is new so i expect more improvements in the future. They offer free torrent downloads uploaded 24/7 by 3 servers so bandwith is pretty good and the last upload at the time of writing this was a nicely compressed rar file!

3

Bootstrapping will be deprecated as of the 0.10 release in a few weeks. The torrent file mentioned in other answers will never be updated again because it is faster to have Bitcoin Core sync over the network.

So no need to download the Blockchain seperately anymore!

You can find the release notes here https://github.com/bitcoin/bitcoin/blob/0.10/doc/release-notes.md

greg121
  • 181
  • 2
  • 4
  • 1
    True, but there will still be circumstances where it's useful, like when you have a slow connection, but the ability to load the bootstrap file through a usb drive. – Nick ODell Feb 09 '15 at 18:07
  • Good point but then I would not run a full node and rather Electrum for example – greg121 Feb 09 '15 at 18:12