10

I have a Private Ethereum Network. I just want to do Ethash CPU mining using ethminer. I know that to have a smaller foot-print it is recommended to use GPU or openCL but for private networks, I only have few nodes on the network and all are CPU nodes. I just want my CPU node able to mine.

  • For small private networks, I believe mining with CPU nodes, where all nodes are also CPU nodes in the network, will be no problem.

With the current model, if we have a Parity node there is no way for us to mine using a CPU node. And I am not sure why Parity forces users to mine with only GPU node. Since I do not have any GPU machine on my small private network, I am unable to use Parity node to do mining, it forces me to switch to geth node to do mining.

I have followed https://github.com/ethereum/cpp-ethereum .

Install:

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

Build:

cmake -H. -Bbuild
cmake --build build

After the build; ethminer used to exist under build folder on older versions git-tag:(untagged-1d50efdb2f43825a1810).

After I build, ethminer does not exist under build. So I was not able to find ethminer binary.

[$]~/cpp-ethereum/build$ ls
_3rdParty            deps     libdevcore     libethereum     libwhisper
CMakeCache.txt       eth      libdevcrypto   libevm          Makefile
CMakeFiles           ethkey   libethash      libp2p          rlp
cmake_install.cmake  ethvm    libethashseal  libweb3jsonrpc  test
CTestTestfile.cmake  include  libethcore     libwebthree     utils

So I have followed https://github.com/ethereum-mining/ethminer to install ethminer.

This line to work for CPU mining: ./ethminer -F http://localhost:8545

The error I am facing with the current/latest ethminer:

./ethminer
  ✘  11:20:06|ethminer  No OpenCL platforms found

[Q] Is there any way to prevent this error and force ethminer to mine on CPU platform? I guess we have find an older ethminer client that accepts -C/CPU flag.

I have also tried: Genoil/cpp-ethereum and it says.

./ethminer
CPU mining is no longer supported in this miner. Use -G (opencl) or -U (cuda) flag to select GPU platform.

Thank you for your valuable time and help.


Note: Two bounties did not return any answer. I opened an issue under github's ethereum-mining/ethminer hoping it will reach someone. You can follow from https://github.com/ethereum-mining/ethminer/issues/382.

  • cpp ethereum does not include ethminer, ethminer does. ethminer does not include cpu miner, they removed it. what does this question have to do with parity? – Waqar Lim Oct 9 '17 at 13:52
  • I am not able to mine with a parity node on a cpu machine. What should I do? Should I switch back to geth in order to mine. @5chdn – alper Oct 9 '17 at 14:11
  • You get a +100 bounty if you rephrase your question to look for an Ethash CPU miner. I'm looking too. – Waqar Lim Oct 9 '17 at 14:13
  • Just did hope it is more clear, please feel free to fix my question if anything is missing or wrong. @5chdn – alper Oct 9 '17 at 14:32
6

Please note the the github code I am sharing is forked from https://github.com/ethereum/cpp-ethereum and Version 1.3.0 of etherminer that actually can do CPU mining, which is implemented around 1 year ago. I did some small changes to build the project.

First, since it will create new DAG do on the home directory: cd && rm -rf .ethash/

Dependencies:

Linux-based:

sudo apt-get install libleveldb-dev libcurl4-openssl-dev libmicrohttpd-dev libudev-dev cmake

macOS:

brew install leveldb libmicrohttpd

Install:

git clone --depth=1 https://github.com/avatar-lavventura/ethminer.git 
cd ethminer
./scripts/install_deps.sh

Build:

cmake -H. -Bbuild
cd build/ethminer
make -j $(nproc)

$ pwd   #binary of etherminer is located under /Users/user/ethminer/build/ethminer
/Users/user/ethminer/build/ethminer   
$./ethminer --version
ethminer version 1.3.0 | Build: ETH_BUILD_PLATFORM/ETH_BUILD_TYPE

To Mine with your private Ethereum-chain:

Please note that geth or Parity should work on the background as connected to your private ethereum network.

This line will use full horse power:

./ethminer -F http://localhost:8545

-t, --mining-threads Limit number of CPU/GPU miners to n (default: use everything available on selected platform)

[~/ethminer]$ cd build/ethminer
[~/ethminer/build/ethminer]$ ./ethminer -F http://localhost:8545 --mining-threads 2
  • Is there a version for Windows? – ulu Sep 7 '18 at 14:20
  • No unfortunately . @ulu – alper Sep 7 '18 at 14:23
  • is there a way to connect it to the pool instead? if so which pool should be set up for this purpose. Thanks in advance... – m1k3y3 Oct 2 '18 at 19:21
  • 2
    I am not sure, I think there is no pool on CPU mining – alper Oct 2 '18 at 19:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.