Setup your own testnet in Ethereum
This post will cover the steps to create your own testnet in Ethereum using Geth. From creating your own genesis to start mining.
Install the latest version of Geth from Github
Create a new genesis file and save it next to geth as dev_genesis.json
The genesis has assigned b285c812311ecad1111bc859a3ccb538f5531766 1 Ethere
- Open geth using this command
> geth --rpc --networkid=39318 --maxpeers=0 --datadir=devChain --genesis dev_genesis.json console
Using this command geth will be opened with no peer connections, using a different chain and genesis.
- Create a new account
> personal.newAccount("passphrase")
- Allocate funds to your account by modifying the genesis
You can allocate the account some funds by modifying the genesis. Copy the account address from the previous step, exit (type exit) and modify the genesis allocation.
- Start mining.
To start mining, just type ```
miner.start() ``` this will generate the DAG and start mining.
Checking your balance
balance = web3.fromWei(eth.getBalance(eth.accounts[0]), "ether");
Getting latest releases (solc, eth, mix): https://github.com/ethereum/webthree-umbrella/releases