ethereum-mining / ethminer

Ethereum miner with OpenCL, CUDA and stratum support
GNU General Public License v3.0
5.96k stars 2.28k forks source link

Need help to mine with a private Parity node #1552

Closed uluhonolulu closed 6 years ago

uluhonolulu commented 6 years ago

I have a private parity node running on localhost:8545. Parity doesn't want to mine transactions, so I need a miner. I'm trying to run ethminer -G as suggested in Parity Wiki (https://wiki.parity.io/Mining), but the response is, At least one pool URL must be specified. I don't want to connect to a pool, I just want solo mining.

How do I do it the right way?

To Reproduce Steps to reproduce the behavior:

  1. Run a private Parity node on 8545 using ethhash engine
  2. Run ethminer -G

Expected behavior Miner connects to the node and starts mining.

Desktop (please complete the following information):

AndreaLanfranchi commented 6 years ago

You have to provide ethminer with an endpoint to connect to ... we call it Pool definition as 99.9% ethminer is used to connect to a pool and anyway is a "pool" where to get jobs to mine from.

Without further ado ... a pool definition is defined with -P cli argument.

So for your instance you may either want to run

ethminer -G -P http://127.0.0.1:8545

or (if running on NVIDIA cards)

ethminer -U -P http://127.0.0.1:8545
AndreaLanfranchi commented 6 years ago

I also see parity 1.16 offers stratum support which is waaaayy more efficient than http.

So start your parity instance with --stratum switch and connect ethminer using either

ethminer -G -P stratum1+tcp://127.0.0.1:8008

or (if running on NVIDIA cards)

ethminer -U -P stratum1+tcp://127.0.0.1:8008
uluhonolulu commented 6 years ago

@AndreaLanfranchi Thanks for the info! I couldn't get it working with stratum1, but it did work with stratum:

C:\Tools\ethminer> .\ethminer -G -P stratum1+tcp://127.0.0.1:8008
 m 18:18:58 main     ethminer 0.16.0rc1
 m 18:18:58 main     Build: windows/release
 i 18:18:58 main     Found suitable OpenCL device [Intel(R) HD Graphics 4000] with 1,586 GB of GPU memory
 i 18:18:58 main     Configured pool 127.0.0.1:8008
 i 18:18:58 main     Selected pool 127.0.0.1:8008
 i 18:18:58 stratum  Stratum mode detected: ETHPROXY Compatible
 i 18:18:58 stratum  Could not login:code:-32601 message:Method not found
 i 18:18:58 main     Disconnected from  [127.0.0.1:8008]
 i 18:18:59 main     No more connections to try. Exiting...
 i 18:19:00 main     Terminated!
C:\Tools\ethminer> .\ethminer -G -P stratum+tcp://127.0.0.1:8008
 m 18:19:59 main     ethminer 0.16.0rc1
 m 18:19:59 main     Build: windows/release
 i 18:19:59 main     Found suitable OpenCL device [Intel(R) HD Graphics 4000] with 1,586 GB of GPU memory
 i 18:19:59 main     Configured pool 127.0.0.1:8008
 i 18:19:59 main     Selected pool 127.0.0.1:8008
 i 18:19:59 stratum  Stratum mode detected: STRATUM
 i 18:19:59 stratum  Subscribed!
 i 18:19:59 stratum  Authorized worker
 i 18:19:59 stratum  Established connection with 127.0.0.1:8008 at  [127.0.0.1:8008]
 i 18:19:59 stratum  Spinning up miners...