Ethereum Tutorials - Herong's Tutorial Notes - Version 1.01, by Dr. Herong Yang
Start "geth" Miner
This section describes how to start the 'geth' miner on a private Ethereum Blockchain.
miner.start() - Starts the miner miner.stop() - Stops the miner miner.setEtherbase() - Specifies the Etherbase to the miner miner.setExtra() - Sets a text string to represent the miner miner.setGasPrice - ? miner.getHashrate() - Check to see how fast the miner is running
Let's start the miner with 1 thread now:
> miner.start(1) Error: etherbase missing: Etherbase must be explicitly specified
Note that the Etherbase, also called coinbase, is the public key of an Ether account, which is needed by the miner to receive mining reward Ether money.
Ok. Let's provide my account address, the public key, to the miner as the "etherbase":
> base = eth.accounts "0x05d4e1a499775ce9d681abd50bda655c7b5ccb90" > miner.setEtherbase(base) true > miner.start(1) null
Ok. I think the "miner" is running now. We should see new blocks generated soon.
Last update: 2017.
Table of Contents