2

I would like to run a local fork of Ropsten to interact with some of the smart contracts without having to fill up from the tap.

My plan was to start a light parity node as follows:

parity --chain ropsten --light --no-serve-light

This worked well, however, when I try to run a local ganache-cli fork:

ganache-cli --fork <here I copy-pasted my enode:// URL>

It crashes with the following error:

Error: CONNECTION ERROR: Couldn't connect to node <my enode://>
Peteris
  • 1,005
  • 7
  • 24
  • A duplicate of https://ethereum.stackexchange.com/questions/31947/how-to-fork-ethereum-from-the-current-state/ – Ismael Apr 27 '18 at 17:47
  • 2
    Hi Ismael, thanks for flagging this! I think this is a broader precise question on how to fork Ropsten via a light Parity node rather than how —fork works in ganache-cli which I have already described as prior knowledge in the formulation of the question. – Peteris Apr 28 '18 at 13:57

3 Answers3

6

Parity should be run in RPC mode as follows:

parity --chain ropsten --light --no-serve-light --jsonrpc-port=8545

And then the following command works to issue a fork:

ganache-cli --fork http://localhost:8545
Peteris
  • 1,005
  • 7
  • 24
2

Ganache expect a JSON-RPC node. Something like this should work

ganache-cli --fork http://localhost:8545
Ismael
  • 30,570
  • 21
  • 53
  • 96
  • Thanks Ismael, I can broadcast an RPC server from another ganache instance, but do you know if Parity nodes are able to broadcast an RPC server? – Peteris Apr 18 '18 at 06:46
  • My goal is to run a local fork of Ropsten where I'm able to transact with existing balances without affecting the testnet itself. – Peteris Apr 18 '18 at 06:46
  • Sorry, but I've not used parity for RPC, but I know that it has a geth compatible mode. Probably you should search for questions about how to enable RPC in parity. – Ismael Apr 18 '18 at 14:13
-2

For ropsten, you can easily mine ether, if you use a GPU. The difficulty is very low and you can mine 50-90% of the blocks. I used this approach multiple times and was able to mine 10-20k ether in a day multiple times.

gaiazov
  • 97
  • 2