It turns out to be very easy to set up a miner node. There are a few ways to do this:
- From the javascript console:
- Start the javascript console
- geth –verbosity 5 console 2>> /tmp/eth.log
- This starts the console with a new geth process
- geth attach
- This attaches the console to an existing geth process
- geth –verbosity 5 console 2>> /tmp/eth.log
- run the following commands in the javascript console
- miner.start(4)
- opens 4 threads for mining
- miner.stop()
- stops mining
- miner.start(4)
- Start the javascript console
- From the linux shell
- geth –etherbase ‘0xD5c55DF2Ed5320553855aB4D9C9B20448870Fbf2’ –mine 2>>geth.log
- The etherbase does not need to be local! It can be any wallet’s hash (the reward from mining will go to this wallet)
- geth –etherbase ‘0xD5c55DF2Ed5320553855aB4D9C9B20448870Fbf2’ –mine 2>>geth.log
In order to mine, your computer’s clock needs to be synchronized to the ntp (Network Time Protocol)
If everything has gone right, in your geth logs you should see “Starting mining operation”