[Ethereum] How to configure geth to use coinbase

go-ethereum

I'm a novice. I'm looking for instructions on how to configure geth so it sends my mined eth to coinbase.

In my head, I think the process is:

  1. Sync the blockchain

    geth --datadir /data/ethData --autodag --verbosity 1
  2. wait for it to finish. Get an ETH address from https://www.coinbase.com/addresses

    geth --etherbase '0xa4d8e9cae4d04b093aac82e6cd355b6b963fb7ff' --mine
  3. Profit!

Is that correct?

Best Answer

here's what I do on my private Ethereum Testnets (you don't need to create your own network though):

  1. Starting the geth node and entering the JS Console

    geth --networkid XXXX console
    
  2. Creating an account. You'll be asked to provide a passphrase.

    personal.newAccount()
    
  3. Defining your initial/primary account as coinbase:

    miner.setEtherbase(eth.accounts[0])
    
  4. Verify coinbase:

    eth.coinbase
    

After that's done you can either exit the JS Console or start the mining process by:

miner.start()

In case DAG wasn't created, it should automatically be created.

I hope this helps and answers your question!

Cheers