Gocoin‎ > ‎

Bootstrapping

Since Gocoin's client is a so-called full node, the initial block chain synchronization is quite a time consuming operation.
In the best case scenario it may take you about one hour, though you need to use a certain tricks in order to achieve such a short time.

If you just start the client and let it to download the blocks, it may take days, so using the tricks is certainly worth it.

Import from Satoshi

When you run the client node for the first time, it will look for the satoshi's client (otherwise known as: bitcoin-qt, bitcoind or bitcoin core) database in its default location (e.g. ~/.bitcoin/blocks or %appdata%\Bitcoin\blocks).

If found, it will ask you whether you want to import these blocks - you should say 'yes'.
Choosing to verify the scripts is not recommended, since then it will take much more time while the satoshi's database should only contain verified blocks anyway.

There is also a separate tool called importblocks that you can use to do the same thing
Start the tool without parameters and it will tell you how to use it.
While importing the blockchain using this tool, make sure that your node is not running.

In both cases, the operation might take like an hour, or even more, but it is one time only.

Use the downloader

In case if you don't have the satoshi's client, with up to date database.
There is a special tool called downloader that can download block chain at quite an impressive speed, directly from bitcoin peer-to-peer network.
Running the downloader make sure the client is not running at the same time, since both the apps are supposed to operate on the same database files.

Seed node
If you want, for additional security, you may specify IP of the node from which blocks' headers will be downloaded.
To do so, use "-s <IP>" command line switch 

Highest trusted block
One important thing that the downloader gets advantage of is assuming all the blocks up to a certain one as trusted, thus saving time on verifying scripts inside them.
You can specify the hash of the highest block you trust, using "-trust <block_hash>" command line switch.

Skip building UTXO db
If you have a limited system memory, you may want to use downloader with "-b" switch to skip updating of the unspent database.
The downloading process will go much faster then, but later you will need to wait for the unspent database to built itself up, anyway.

Excessive memory usage
Another thing that can help with excessive memory consumption is decreasing the garbage collector threshold - e.g. set it to 25% by using "-g 25" switch.
It sometimes also helps to quit the downloader ("q" text command) and start it again, just to free the memory
While the downloaded is running you may monitor its memory consumption using the text command "m".

Other command line options
To see more available command line switches, execute:
    downloader -h

Verify last trusted block
When run, after fetching all the blocks' headers, the downloader prints hash of the last block it is going to assume as trusted.
For security you can verify this hash against any blockchain reference you want (e.g. look it up in blockchain.info).

Comments