Updated 2020-02-26

Mining

Configure CPU mining

To enable CPU mining, start Hyperledger Besu with the following options:

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

Where <account> is the account you pay mining rewards to. For example, fe3b557e8fb62b89f4916b721be55ceb828dbd73.

Start and stop mining using the miner_start and miner_stop APIs.

Configure GPU mining

Besu supports GPU mining, tested using Ethminer with the stratum+tcp scheme.

To enable GPU mining, start Hyperledger Besu with the following options:

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

Where <account> is the account you pay mining rewards to. 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.

Start and stop mining using the miner_start and miner_stop APIs.

Mining APIs

The 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. Not supported for GPU mining.
  • eth_getWork to get the hash of the current block, the seed hash, and the target boundary condition. Only used when using the getwork scheme.
  • eth_submitWork to submit the PoW solution. Only used when using the getwork scheme.