Setting up Ethereum Rinkeby Testnet

Rinkeby is the public testnet for Ethereum. This testnet can be used during development, testing and pre-production scenarios. I personally use private net during development and use Rinkeby for demos.

Refer to my other blog on setting up a development private chain: Ethereum Dev Network

Here are the steps for setting up and connecting to Rinkeby test chain:

Step 1: Download the latest Geth from the below URL

As I am using a windows machine, I downloaded the windows version. Install the Geth on your machine as per the installation guide.

Step 2: Create a folder called Rinkeby which keeps the chain data.

Step 3: Run the following command to connect to the Rinkeby testnet
geth.exe --rinkeby --syncmode "fast" --datadir=devchain --rpc --rpccorsdomain "*" --rpcapi "eth,web3,personal,net,miner,admin,debug" --verbosity 0 console

Step 4: Wait for the sync to complete. The sync will be completed based number of blocks. With the current block number 586,326 it took about 20 mins to sync. You can check the sync status with the following command:
eth.syncing

The above command returns either false (if syncing has not stated or completed) or current block number. Wait for the syncing to be completed.

Step 5: Create the user account using the javascript console. Run personal.newAccount() and provide password when prompted

The console shows the address of the new account created.

Step 6: Verify that your account is created in the Rinkeby by using the Rinkeby Etherscan


Step 7: Request Ether(ETH) for your newly created account. As you see above the current ETH balance is 0. Rinkeby uses Proof of Authority for mining. Hence you need to request Rinkeby to provide you ether. Rinkeby has a faucet which can provide you ether. You need to periodically request Ether using this faucet.

To prevent spam, Rinkeby faucet requires people requesting funds have a GitHub account and create a GitHub Gist. Let’s create a GitHub Gist with the account number as shown below:

Once the Gist is created go to the Rinkeby faucet (https://faucet.rinkeby.io/) and request funds

Once the account is funded with your requested ethers, go to the Etherscan and verify that the account is credited with the requested ethers.

With these above seven steps, our Rinkeby testnet is setup and ready to deploy smart contracts and send transactions.


No comments:

Post a Comment

Ethereum Solidity Compiler

Ethereum contracts are written in the high level language called Solidity and compiled into bytecode using the Solidity compiler. This ...