
How to setup Geth Full Ethereum Test Node in Windows
What you will require to Install Geth on Window:
- - You will require a fairly good server
- - At least 32 Gb of RAM
- - 2 Tb SSD Hard Drive (hard drive will take very long to sync)
- - Good bandwidth which is co-located as close as possible to other nodes
- - Cloud-hosted dedicated machines on OVH, Hetzner Europe, Alibaba, AWS, etc.
Installing you private test Ethereum test node
Then navigate to this directory by typing cd Blockchain/EtherNode.
Now we need to create our Genesis block, this is the first block in our node that will define the initial behavior of our blockchain instance.
Creating this block from scratch can be quite difficult and using an existing one can be very problematic especially if the versions of your Geth software is different than the initial one the existing Genisis block was created in. To ensure we do not run into these problems and our genesis block is compliant with our version of Geth we will create a new genesis block using a tool called puppeth, this is an inline command-line tool that is installed with Geth that provides features to create and monitor your own Ethereum network.
To start make sure that you are in the directory that you created for your node eg: C:\Users\{Username}\Blockchain\EtherNode in my case.
Type puppeth
- You will be presented with a query for the network name - this is the name you want to give to your private Ethereum Node. In our case we chose "iqtechmain". Make sure the name does not contain any spaces, special characters or capital letters.
- Now you have to choose what you want to do. We want to create a new genesis file so we will opt for Option 2.
- We want to create a new genesis block from scratch, so we chose Option 1 unless you have created one already then you can import it.
- We want to use the Etash - proof of work algorithm so we chose Option 1, you would use Option 2 for your test platform as proof of authority is much faster and less resource hungry than proof of work.
- If you have an account that you will be prefunding for payouts, then you enter this address in the option, we will not be prefunding any accounts so we will just leave it as is and press enter, it is however advisable to have at least one
- Once again we will not be prefunding so we will press enter again.
- Next we must specify our explicit chain/network ID. If you leave this empty a random Id will be created. This id must be different from anyone that already exist if we do not want to join any of the already existing ones.
-- 1 is for the Main net
-- 2 is for Morden test net (this is obsolete)
-- 3 is for the Ropten test net
-- 4 is for the Rinkeby test net
-- 42 is for the Kovan test net
We will be using the Rinkeby test net so we will choose 4
Now you have configured your new genesis block but we still need to export it to a Json File
- Now we will choose Option 2 - Manage existing genesis and option 2 again for Exporting genesis configuration
- Now you can enter the path of the folder the genesis specs should be saved into. If you leave this empty the default location will be the current directory you are in. Press Enter
Now you have successfully created a new Genisis block and exported it to the current directory. If you now type ls you should see a list of the genesis configuration files you just exported
geth --datadir . account new
geth --datadir . account list
geth --networkid 4 --mine --miner.threads 6 --datadir "." --http --http.api personal,eth,web3,net --miner.etherbase 0x9e1B854B1dFecB5A6E5DB875bC8a6b1fc5511306 --http.port 8545 --miner.notify http://127.0.0.1:8545 --cache=21000 --maxpeers=250 --syncmode full --snapshot=false --txpool.globalslots=1000
After you have created this file you can navigate to this folder if you are not there already, now just type ./startnode.cmd. Your node should now be running, now you just have to wait for you node to finish synchronizing. If you setup a full node like we did here it can take quite a while for the blockchain to synchronize on the Main net due to its size. It all depends on your servers processing power and the memory made available to geth in the startnode.