Skip to content

Instantly share code, notes, and snippets.

@noot
Created July 19, 2018 15:51
Show Gist options
  • Save noot/e4ab6ca97721c0cb689ec2be90c65943 to your computer and use it in GitHub Desktop.
Save noot/e4ab6ca97721c0cb689ec2be90c65943 to your computer and use it in GitHub Desktop.
{
"difficulty" : "0x200",
"extraData" : "",
"gasLimit" : "0x8000000",
"alloc": {
"0x87C03Cc1F1a0BfABa24c23e929fFc61b6BB0d580": { "balance": "20000000000000000000" },
"0x8f9b540b19520f8259115a90e4b4ffaeac642a30": { "balance": "20000000000000000000" }
},
"config": {
"chainId": 15,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
}
}
@noot
Copy link
Author

noot commented Jul 19, 2018

in genesis.json, change the "alloc" accounts to your accounts
copy current keystore directory to ./chaindata
you could also create new accounts, but these will have 0 balance

create genesis.json in your home directory

cd ~
mkdir chaindata
geth init ./genesis.json --datadir ./chaindata
geth --rpc --datadir ./chaindata --rpcport "8545" --nodiscover --rpcapi="eth,web3,personal,net,miner,txpool" 

in another terminal:

geth attach --datadir ./chaindata
> miner.start()
> personal.unlockAccount(eth.accounts[0], null, 600000000)
> eth.defaultAccount = eth.accounts[0]

@noot
Copy link
Author

noot commented Jul 19, 2018

/Users/danielbruce/Library/Ethereum/testnet

@dblockunity
Copy link

/Users/danielbruce/Library/Ethereum/testnet is where your existing keystore might be.

@dblockunity
Copy link

dblockunity commented Jul 19, 2018

create genesis.json in your home/Ethereum directory

cd ~/Ethereum
mkdir chaindata
geth init ./chaindata/genesis.json --datadir ./chaindata
geth --rpc --datadir ./chaindata --rpcport "8545" --nodiscover --rpcapi="eth,web3,personal,net,miner,txpool" 

In another terminal:

geth attach --datadir ~/Ethereum/chaindata
> miner.start()
> personal.unlockAccount(eth.accounts[0], null, 600000000)
> eth.defaultAccount = eth.accounts[0]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment