[Ethereum] Should I avoid CLI geth and Ethereum-Wallet both using the same data dir

go-ethereummac-osxwallets

I've been running Ethereum-Wallet as my wallet on OSX for a while, and it's fine. It's using /Users/myname/Library/Ethereum as it's data dir.

I've just installed geth via homebrew with a view to trying out some CPU mining (on the real network, not the testnet).

It, too, appears to be using /Users/myname/Library/Ethereum as its data dir, yet still needed to download the blockchain on first use.

I am planning to use a new account to mine to, rather than mine into my main etherbase account.

[Update: it appears that geth has found the same account as Ethereum-Wallet, which makes sense if it's the same data dir. So, if I make a new account for mining, that should work – I think.]

Is there a risk I'll kill my wallet? What am I not getting here?

Best Answer

Ethereum Wallet will use the running geth instance if it is already started. You can use the --etherbase {x} parameter to specify which eth.accounts[x] you want to use to mine on.

When you start geth with the --etherbase parameter, you will see a log message showing you which address it is mining to:

coinbase: 0x8d15cd39bdb00d5362775002c342c168ee707400

I have just tested Nikhil's answer of using the actual address instead of the index to eth.accounts[] and both solutions work.

BTW, you should check out the reward stats for CPU (vs GPU) mining in Is CPU mining even worth the Ether? . It's good to check out the mining process, but sorry, you won't get many (any?) ethers using the CPU for mining. Solo mining with your CPU is almost impossible, but if you want to test it out you may have to mine with a pool for minimal earnings.

My 125 megahashes per second 4 GPU rig is struggling to solo mine - I had a gap of 7.5 days when my expected time to mine a block is meant to be 2.5 days.

Related Topic