Synchronize Ethereum using geth –fast
I’ll show you a trick that at least seem it worked for me of how to synchronize the Ethereum Wallet faster and is to execute a geth command, I’ll do this using the UI wallet in Linux Mint and how to do it in windows as well.
Before we start lets take a look to some information so you understand the process better:
- Argument –fast: This flag enables fast syncing through state downloads rather than downloading the full block data. This will also reduce the size of your blockchain dramatically. This can only be run if you are syncing your blockchain from scratch.
- Argument –cache: Megabytes of memory allocated to internal caching (min 16MB / database forced). Default is 16MB, so increasing this to 256, 512, 1024 (1GB), or 2048 (2GB) depending on how much RAM your computer has should make a difference. I recommend to use 1024.
- If you already start to sync without using –fast I’ll show you how to start from scratch without doing any major change to the wallet (i.e. delete your wallet).
- You don’t need to install or get “geth”, if you already installed the wallet it uses geth in back-end you just need to know where it is located and I’ll show you later.
- You must have mist or eth-wallet installed and ran it at least once (doesn’t matter if never was fully sync).
Let’s start:
L I N U X
1.- Open the home folder then you must have shown the hidden folders, if you don’t know how to show the hidden folder take a look in here Show hidden folders in Linux Mint
Then we are going to work with these two hidden folders:
- .ethereum: this folder contains data related to the wallet we installed, here is where the blockchain data is located and we are going to clean them all, yes we are going to delete and burn it all.
- .config: this is a common folder among other application and also where the geth program resides (well not directly under config), so we will navigate through this folder to get to “geth” location and run it from there.
In order to proceed with this we have to sync from scratch which means we have to delete the existing blockchain data and that’s where we are going to start with.
Go to the .ethereum folder (full path .ethereum/geth/chaindata)
And navigate all the way through “geth” folder, here you will see the “chaindata” folder where the blockchain is located.
Why we need to open a terminal?
In case you already started or you fully sync once, you will have hundred and gigabytes of files, if you try to open the “chaindata” folder will be though. So I opted to just go through command line and clean it from there and by doing this way you don’t even bother to check/read the data is inside “chaindata” folder.
If you are already familiar with Linux or just want to do it faster please proceed to bottom of point 1.
Once we opened the terminal we execute the following commands:
- cd chaindata
Now we can delete everything by running “rm” command which “-rf *” means that its going to delete every file and every folder in there.
- rm -rf *
If you are already familiar with Linux just open a terminal and execute the following command:
- cd ~/.ethereum/geth/chaindata && rm -rf *
- ls -lh
2.- Now that we cleaned the chaindata let’s go where “geth” program its located, we go to the home folder again and look now for the “.config” hidden folder then locate “Ethereum Wallet” folder as shown. (full path .config/Ethereum Wallet/binnaries/geth/unpacked/)
Navigate through “binnaries” folder.
Navigate through “unpacked” folder.
Finally we have found “geth” program.
From here we open a terminal by doing right click under the folder and execute the following command:
- ./geth –fast –cache=1024
Leave it there from some time, it will start to sync.
If you see this, everything went OK.
From here you can also open the wallet at the same without any problem so you will see the progress or your wallet also.
Now for windows users:
W I N D O W S
1.- Go to this location:
- Windows:
%APPDATA%/Ethereum/geth/chaindata
2.- Open MS-DOS, go to the geth location by excuting
- cd %APPDATA%/Ethereum/geth/chaindata
- del *
3.- Now we are ready to execute “geth” command, go to this location.
- Windows:
%APPDATA%/Ethereum Wallet/binaries/Geth/unpacked
then execute:
- geth.exe –fast –cache=1024
Also you can open the wallet at the same time.
Please comment.
Leave a Reply
Be the First to Comment!