Updated 2019-11-26

Mining

Configure CPU Mining

Start Hyperledger Besu with the following options to enable CPU mining:

besu --rpc-http-api=ETH,MINER --miner-enabled --miner-coinbase=<account>

Where <account> is the account to which mining rewards are to be paid. For example, fe3b557e8fb62b89f4916b721be55ceb828dbd73.

Use the miner_start and miner_stop APIs to start and stop mining.

Configure GPU Mining

Besu supports GPU mining and has been tested using Ethminer with the stratum+tcp scheme. Start Hyperledger Besu with the following options to enable GPU mining:

besu --rpc-http-api=ETH,MINER --miner-enabled --miner-stratum-enabled --miner-coinbase=<account>

Where <account> is the account to which mining rewards are to be paid. For example, fe3b557e8fb62b89f4916b721be55ceb828dbd73.

Optional command line options are:

Note

Besu also supports the getwork scheme. Use the --miner-stratum-enabled option and enable the ETH RPCs.

The getwork scheme is supported as the http scheme in certain mining software.

Use the miner_start and miner_stop APIs to start and stop mining.

Mining APIs

JSON-RPC API methods for mining are:

  • miner_start to start mining.
  • miner_stop to stop mining.
  • eth_mining to determine whether the client is actively mining new blocks.
  • eth_hashrate to get the number of hashes per second with which the node is mining. Is not supported for GPU mining.
  • eth_getWork to get the hash of the current block, the seed hash, and the target boundary condition to be met. Only used when using the getwork scheme.
  • eth_submitWork to submit the PoW solution. Only used when using the getwork scheme.