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– murrekatt Aug 07 '16 at 07:17--devis just some additional configs - see https://github.com/ethereum/go-ethereum/blob/master/cmd/utils/flags.go#L125-L128 and https://github.com/ethereum/go-ethereum/blob/master/cmd/utils/flags.go#L724-L744 . 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--devsetup. – BokkyPooBah Aug 07 '16 at 07:33With the coming of Geth 1.4 we've deprecated the --genesis <json_file> flag and replaced with a geth init <json file> sub command. This means that you'll no longer be able to mix the destructive --genesis flag with other flags.– BokkyPooBah Aug 07 '16 at 07:44initwith a custom genesis that has accounts as I would like them inalloc. I.e. first I runnew accountand then I adjust the custom genesis and then runinit. No balance if I have the--devflag. – murrekatt Aug 07 '16 at 07:47