1
votes

I am trying to create a private network so that I can start testing my Solidity code. However, when starting the a geth private network with geth --rpc but I then run into an error for an invalid response. {"jsonrpc":"2.0","error":{"code":-32600,"message":"EOF"}} when checking localhost:8545.

I don't think it matters, but my genesis.json file is

 {
"nonce": "0x0000000000000042",     "timestamp": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x0",     "gasLimit": "0x8000000",     "difficulty": "0x400",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x3333333333333333333333333333333333333333",     "alloc": {     }}

I have also tried creating a test network with testrpc with just the command testrpc but here the localhost:8545 returns a parsing error {"jsonrpc": "2.0", "id": null, "error": {"message": "Parse error", "code": -32700}}.

What is the JSON that I am sending because it seems to be incorrectly written?

Thanks

1

1 Answers

0
votes

It's hard to tell what exactly you are trying, but the JSON RPC endpoint of geth requires a JSON command, for instance try to query the web3 version with the following request:

{
  "method": "web3_clientVersion",
  "params": []
}

It complains because you do not provide any request, i.e., running a plain testrpc command.

But inbetween the lines I read that you are testing your solidity code. Have you had a look at the wonderful browser solidity?