«Prev Epoch Next Epoch»

Ethereum: basics 1

0/18 pages

Download the Full BlockChain, epoch by epoch

Download Ethereum Blockchain - Epoch 14

Donate at  0x57f64f50ab0510650b551ec2cb7c7f5d6c7271a5
sha256 checksum: the file exists, checksum will arrive soon

Epoch 14: Geth: synchronize your block chain (fast)

Geth, our CLI friend

If you don't have installed geth yet, you should restart from Intro: Geth, our preferred client
If you don't remember if geth is installed, go to command prompt and type:

geth version

To make it work on every dir of command prompt, in Windows, it's possible that you need to configure environment variables.

Sync the block chain with geth

If you are here, you are downloading all epochs to import them with geth command.
But, as you know, this is not the standard way to sync the block chain. The simplest command you can type is just:


This will start a full synchronization, checking block by block, downloading it from the network.
This is due through a p2p network (instead of the import, that is offline), so you need to connect to other peers/nodes.
You can observe the output of geth and you will see if it's able to connect to other peers and download the block chain or not.
For example, if you are behind a firewall, maybe the p2p port of Ethereum is blocked and you cannot connect to other peers.

The fast way

If everything works and you are not interested in downloading and verifying all the block chain, you'll notice that standard geth is very slow, and also the import is very slow.

In this case, if you have a good connection, you can use the --fast option this way:

geth --fast
This actually is the fastest way to download the block chain!
But remember well this: if geth --fast is stopped / crashes, it will not be able to make a fast sync anymore.
Even if the command is accepted, you can read in the output that fast sync is disabled!
The other thing to remember is that fast doesn't work if you have already a portion of the blockchain. In this case you need to empty your blockchain:
geth removedb

This doesn't delete your keystore, but only the block chain. It means that if you imported or downloaded a huge part of the block chain, all this work will be lost and you will restart from a clean condition.

If you look inside geth directories, you'll notice that the directory chaindata is removed after removedb, and re-created after fast option.

To reset and restart the download of block chain in fast mode from the beginning:

geth removedb
geth --fast

The fast way, using the cache

Someone suggests to use the cache together with fast option, to improve performance, this way:

geth removedb
geth --fast --cache 2048
but you should be careful with the value you set for caching, because geth can crash due to Out of Memory errors.
This can happen even without cache option, if you don't have enough RAM and swap, but it's more rare.

«Prev Epoch Next Epoch»