Running Geth on Rinkeby

Geth is the most popular Ethereum client, and can be used with any of the public test networks. We will be using the Rinkeby Proof-of-Authority test network for our deployment.

First, ensure you have Geth installed on your system. If Geth isn't already installed, official download instructions can be found at https://geth.ethereum.org/downloads/.

Once Geth is installed, it's important to initialize and run it with the correct parameters. The easiest way to do this is to follow the instructions at https://www.rinkeby.io/#geth, specifically those for running a full node.

After running the appropriate Geth init command found in the instructions, to sync the chain data, the following command should be run:

geth --networkid=4 --datadir=$HOME/.rinkeby --rpc --cache=1024 --bootnodes=enode://a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf@52.169.42.101:30303

This will start a new Geth process, which will begin syncing the Rinkeby blockchain data. It's advised to attach a second console to the running process to allow further commands to be run while syncing is ongoing. This can be achieved in a new terminal by running the following command:

geth attach ~/.rinkeby/geth.ipc

The syncing process may take several hours, but the progress can be checked periodically by running the following command in the attached console:

> eth.syncing

Once this returns false, syncing is complete, and we can proceed with creating a new account:

> personal.newAccount("<password>")

Running this command, with an appropriate password substituted in, will create a new account, and return the new account address. At any point, your accounts can be viewed by running the following:

> personal.listAccounts

Having created an account to work with, we now have to give it some testnet ether, and the best way to do this is from the Rinkeby faucet. Navigating to https://www.rinkeby.io/#faucet will display a series of instructions that should be followed, which include inputting your new address, and selecting the amount of testnet ether you would like. It's recommended to pick the highest available amount, 18.75. While you're waiting for your ether to arrive, we can continue on the configure Truffle.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset