Running geth console with and without the --dev option seems to expose the same accounts.
Is it safe to use same accounts when developing? If not, what is the recommendation?
Running geth console with and without the --dev option seems to expose the same accounts.
Is it safe to use same accounts when developing? If not, what is the recommendation?
Q: Is it safe to use same accounts when developing?
No.
The amounts associated with the same account in Dev and Mainnet will be stored in their respective blockchains, so you won't lose any ethers.
However you will be using the same password in Dev as in Mainnet to unlock your accounts, and the use of your Mainnet password should be minimised.
Q: If not, what is the recommendation?
I would use the --dev with a different --datadir {devdatadir} to keep the Dev and Mainnet accounts separate, therefore reducing the risk of exposing my Mainnet account passwords.
Your Dev keystore will then be in {devdatadir}/keystore and this will be separate from your Mainnet accounts.
Here is my Dev startup script:
#!/bin/sh
geth --datadir ~/EtherDev/data --dev --nodiscover \
--mine --minerthreads 1 --maxpeers 0 --verbosity 3 \
--unlock 0 --password ~/EtherDev/etc/passwordfile \
--rpc console
And here is the Dev script I use to create my passwords:
#!/bin/sh
mkdir ~/EtherDev/data
geth --datadir ~/EtherDev/data \
--password ~/EtherDev/etc/passwordfile \
account new
And I just use a simple password in ~/EtherDev/etc/passwordfile.
--devoption. The advice is to use a custom genesis block and data directory. – randomguy May 25 '16 at 08:12