[Ethereum] How to attach ethminer to parity node

ethminerparity

I have accomplish to add a parity node to the private network with the help of this valuable guide: https://ethereum.stackexchange.com/a/13035/4575

Now I would like to attach ethminer to my parity node, in order to do mining. Please note that my parity node successfully run on the background, as connected to my private chain. Also did rm -rf .ethash/.

[$] cpp-ethereum/build/ethminer/ethminer -F http://localhost:8545

Error:

miner  13:13:13.230|  Getting work package...
  ✘  13:13:13.231|  Failed to submit hashrate.
  ✘  13:13:13.231|  Dynamic exception type: jsonrpc::JsonRpcException
std::exception::what: Exception -32601 : METHOD_NOT_FOUND: The method being requested is not available on this server: Method not found

[Q] How could I fix the error I am facing?

=> Also when I attach geth to parity, it does not see miner.start() command.


Note:
The way I installed ethminer:

[$] git clone --recursive https://github.com/ethereum/cpp-ethereum.git
[$] cd cpp-ethereum

Build:

[$] cmake -H. -Bbuild
[$] cmake --build build

[$]ethminer --version
 ethminer version 1.3.0 | Build: ETH_BUILD_PLATFORM/ETH_BUILD_TYPE

Please note that similar question asked but has not been covered well. ethminer Failed to submit hashrate
Thank you for your valuable time and help.

Best Answer

Don't use cpp-ethereum, it's barely maintained. Use Genoil-ethereum for mining.

Enable stratum support with parity --stratum, also make sure you set an author with --author <your-address> and optionally change the --stratum-port to anything you like (default 8008). Long example:

parity --author 0037a6b811ffeb6e072da21179d11b1406371c63 --stratum --stratum-interface=0.0.0.0 --stratum-port=9009

Then point your ethminer (genoil) to your localhost at :8008, i.e.,

ethminer -S 127.0.0.1:8008

Update as per comments: If your ethminer does not support -S (stratum), you need to set the --rpccorsdomain localhost to allow getwork mining via jsonrpc with -F 127.0.0.1:8545.

Disclosure, I work for parity.

Related Topic