2 1. [What is bootstrap.dat?](#What)<br />
3 2. [What are the pros and cons of using bootstrap.dat?](#ProsCons)
4 3. [Where do I get bootstrap.dat?](#Obtaining)
5 4. [How do I know I can trust the bootstrap.dat I downloaded?](#Trust)
6 5. [How do I use bootstrap.dat with btcd?](#Importing)
10 ### 1. What is bootstrap.dat?
12 It is a flat, binary file containing bitcoin blockchain data starting from the
13 genesis block and continuing through a relatively recent block height depending
14 on the last time it was updated.
16 See [this](https://bitcointalk.org/index.php?topic=145386.0) thread on
17 bitcointalk for more details.
19 **NOTE:** Using bootstrap.dat is entirely optional. Btcd will download the
20 block chain from other peers through the Bitcoin protocol with no extra
25 ### 2. What are the pros and cons of using bootstrap.dat?
28 - Typically accelerates the initial process of bringing up a new node as it
29 downloads from public P2P nodes and generally is able to achieve faster
31 - It is particularly beneficial when bringing up multiple nodes as you only need
32 to download the data once
35 - Requires you to setup and configure a torrent client if you don't already have
37 - Requires roughly twice as much disk space since you'll need the flat file as
38 well as the imported database
40 <a name="Obtaining" />
42 ### 3. Where do I get bootstrap.dat?
44 The bootstrap.dat file is made available via a torrent. See
45 [this](https://bitcointalk.org/index.php?topic=145386.0) thread on bitcointalk
46 for the torrent download details.
50 ### 4. How do I know I can trust the bootstrap.dat I downloaded?
52 You don't need to trust the file as the `addblock` utility verifies every block
53 using the same rules that are used when downloading the block chain normally
54 through the Bitcoin protocol. Additionally, the chain rules contain hard-coded
55 checkpoints for the known-good block chain at periodic intervals. This ensures
56 that not only is it a valid chain, but it is the same chain that everyone else
59 <a name="Importing" />
61 ### 5. How do I use bootstrap.dat with btcd?
63 btcd comes with a separate utility named `addblock` which can be used to import
64 `bootstrap.dat`. This approach is used since the import is a one-time operation
65 and we prefer to keep the daemon itself as lightweight as possible.
67 1. Stop btcd if it is already running. This is required since addblock needs to
68 access the database used by btcd and it will be locked if btcd is using it.
69 2. Note the path to the downloaded bootstrap.dat file.
70 3. Run the addblock utility with the `-i` argument pointing to the location of
71 boostrap.dat:<br /><br />
74 C:\> "%PROGRAMFILES%\Btcd Suite\Btcd\addblock" -i C:\Path\To\bootstrap.dat
76 **Linux/Unix/BSD/POSIX:**
78 $ $GOPATH/bin/addblock -i /path/to/bootstrap.dat