2

I have a Private Ethereum Network. I cannot mine using Parity, if I have a CPU node. Issue: How to do Ethash CPU mine using ethminer?

As a solution, I want to switch to geth node whenever I want to mine and switch back to Parity node if I do not need to mine.

In that case, I need to store the same blockchain for Parity and Geth processes, which is memory efficient.

Instead:

[Q] Can Parity and Geth work on a shared-blockchain?

For example, I can start my blockchain with Parity node, whenever I want to my I can switch back to Geth client and that will use the Parity's already created block chain. And when the mining completed I can switch back to Parity node again.

Please note that: I know that we can run Parity node and attach geth to use it as @Kannan Ravindran points in his answer. But when we do geth attach into an already running Parity node, we cannot execute miner.start() command, Parity does not allow us to do mining through geth.

Thank you for your valuable time and help.

  • 1
    Parity uses rockdb, and Geth uses leveldb instead. I'd say it is not an easy task to make both share the same blockchain storage. One option is to run two separate instances one for parity and one for geth and connect them, doing the mining in geth, and parity would sync to geth. – Ismael Nov 25 '17 at 16:10
1

If I can understand it correctly. You are trying to use a shared memory of the ethereum blockchain with 2 different node tools.

What you can try and do is, run a parity instance on ipc and geth attach to the parity via a custom ipc socket. The docs is given here.

Legacy Geth Console

As of this writing, Parity's IPC socket can be readily attached to by Geth. To do this, run Parity with IPC enabled. You can then run Geth with the attach option, just like so:

$ geth attach ~/.local/share/io.parity.ethereum/jsonrpc.ipc

It's no longer required to run Parity in --geth compatibility mode to use the Geth console.

  • Yes and no. I also want to run geth instance on Blockchain that is already generated by Parity. When I do geth attach into already running Parity node, I can not execute miner.start(1) command, Parity does not allow it. @Kannan Ravindran – alper Nov 25 '17 at 10:48
  • oh, now that's a problem! – Kannan Ravindran Nov 26 '17 at 0:30

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.