Skip to content
You are reading Hyperledger Besu development version documentation and some displayed features may not be available in the stable release. You can switch to stable version using the version box at screen bottom.

Updated on August 18, 2020

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.

Hyperledger Besu Mined Blocks

Hyperledger Besu has successfully mined blocks on the Ropsten testnet, ETC mainnet (uncle block only) and Mordor ETC testnet. Blocks mined by the Hyperledger Besu team contain the version number used in the block’s extraData field. The following accounts have been used to mine on public networks with Hyperledger Besu:

Questions or feedback? You can discuss issues and obtain free support on Hyperledger Besu chat channel.
For Hyperledger Besu community support, contact the mailing list besu@lists.hyperledger.org