Warning: this worked for me on macOS as of August 2017. Over time you can expect some/most/all of the information here to have changed.
There are several testnets, a number of them old/deprecated. The latest seem to be Kovan and Rinkeby. Kovan seems to work only with Parity while Rinkeby seems to work only with geth.
You will need to install geth first.
I mostly followed this guide.
I tried first the experimental light mode but I got errors, so I tried with the full mode. Not a big deal at this moment because the size on disk is below 1GB and it took around one hour to download/build with a 2011 macbook Air.
I prefer to make the data directory explicit (where the blockchain files will be stored), so I first create one on a disk of my choice. Also I will work from that directory, so I will assume all commands are entered from it.
$ mkdir /path/to/rinkeby
$ cd /path/to/rinkeby
intitalise with genesis block
$ curl -O https://www.rinkeby.io/rinkeby.json
$ geth --datadir=. init rinkeby.json
load blockchain
$ geth --networkid=4 --datadir=. --ethstats='yournode:Respect my authoritah!@stats.rinkeby.io' --bootnodes=enode://a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf@52.169.42.101:30303?discport=30304 --cache=1024
Wait. You will see the INFO message "Block synchronisation started" then many INFO lines starting with "Imported...". Sync is in progress...
- Note the 1GB cache, you can use less or more depending on your available memory
- Network id 4 corresponds to the Rinkeby chain
- Blockchain data will be stored in geth/
Check blockchain sync progress
While the node is up & running (the above command) you can get info about the blockchain sync progress (among other data) through the JavaScript console. In another terminal window type:
$ cd /path/to/rinkeby
$ geth attach ipc:geth.ipc
At the ">" prompt you can type, e.g.
> eth
> eth.syncing
> adm
> adm.peers
You can double check you are seeing the right data progress by looking at the last block at www.rinkeby.io home page.
Note that the "NOTE...Importing..." messages include a number parameter which is the block being processed.
Getting free (worthless) ether for testing
Create a testing account
Create an account, enter password, get its address (account data will be saved to keystore/):
$ geth --datadir=. account new
...(enter password):..
Address: {559b0e5a899d9ef4c04ee35ccbefab2e6d7f06da}
That is the address I got. In order to use the faucet & get ether into this account, first create a github gist with just the hash in it (remember to prepend with "0x"). In my case:
Now use your gist URL in the faucet feature at www.rinkeby.io
I requested 3 ETH, then I searched etherscan with my address to verify I got them:
https://rinkeby.etherscan.io/address/0x559b0e5a899d9ef4c04ee35ccbefab2e6d7f06da
Next verification step would be to verify that locally we also get the correct balance.
We first verify it is taking the accounts we created (files in keystore/)
> eth.accounts
["0x559b0e5a899d9ef4c04ee35ccbefab2e6d7f06da", "0x62c8681441620cb0574fcee27d6085529067b8da"]
The first one (index 0) is the one I got my 3 ETH, let's see if they are on our local blockchain (balance for account 0):
> web3.fromWei(web3.eth.getBalance(web3.eth.accounts[0]));
3
great!
Now we may keep using geth, or a wallet for a nice UI.