I'm trying to set up a private chain with geth using --dev
that has several accounts with lots of ether. It seems unclear if this is possible anymore according to this.
Here's what I tried on geth 1.4.x and 1.5:
geth --datadir data --dev --password <(echo -n foobar) account new
geth --datadir data --dev --password <(echo -n foobar) account new
geth --datadir data --dev --password <(echo -n foobar) account new
Then init like so:
geth --datadir data --dev --password <(echo -n foobar) init custom.json
Then running geth with mine:
geth --datadir data --dev --password <(echo -n foobar) \
--unlock 0,1,2 \
--verbosity 6 \
--rpc --rpcaddr "0.0.0.0" --rpccorsdomain '"*"' --nodiscover \
--rpcapi "admin,db,eth,debug,miner,net,shh,txpool,personal,web3" \
--mine --minerthreads 1 --gasprice 0
Then I use curl
to check the balance of the accounts. Result is 0x0
.
If I remove the --dev
option there is balance, but it takes forever as it then uses the real DAG. I don't want that as this if for testing.
How to best get multiple preallocated accounts with lots of ether for a private dev chain?
Thanks!
--dev
--dev
is just some additional configs - see github.com/ethereum/go-ethereum/blob/master/cmd/utils/… and github.com/ethereum/go-ethereum/blob/master/cmd/utils/… . maxpeers=0, listenaddr=:0,whisper is enabled, powtest is true and something to do with the olympic genesis block and the gas price. What you can do otherwise is use--dev
, mine and move the ETH to your other account. There does not seem to be a convenient way to set preallocated accounts using the--dev
setup.