datadir
is any location we choose for the testnet to put its data in. Remember the password you enter, 'password' is easy enough. Do this command twice to make two accounts.
geth account new --datadir=/tmp/testnet
A generic template was taken from: https://github.com/ethereum/go-ethereum/wiki/Private-network
Make sure to fill in the ACCOUNT_ID
to initialize our first account with cash. I named the file HelloWorldGenesis.json
{
"config": {
"chainId": 15,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"difficulty": "0x400",
"gasLimit": "0x21000",
"alloc": {
"ACCOUNT_ID": { "balance": "0x1500000000000000000000" }
}
}
geth --identity "HelloWorldNode" --datadir /tmp/testnet --metrics —-networkid 1999 init HelloWorldGenesis.json
geth --identity "HelloWorldNode" --datadir /tmp/testnet --metrics console
In another terminal run:
geth monitor --attach /tmp/testnet/geth.ipc system/memory
These links were most helpful for me:
Hi, what will be the consensus to be used when creating the testnet like this? Since I do not see any flag specifying which consensus to use in your demo.
Best,
Jackson