7

I have a private network consisting of two Parity nodes that know about each other from the chainspec file and seem to connect to each other just fine.

I have a third computer. From here, I can run a Parity node and it will connect to the private network just fine. But when I run geth on this same computer, it does not connect to the other two parity nodes.

I have initialized this geth with a genesis file that I think is appropriate, based on the Parity chain spec file that is working on the Parity nodes. I say "think" because I see no documentation about this and another question on SE didn't get an answer so I'm just making guesses.

And of course we know the machine and its firewalls aren't the problem because when I run a Parity node from the machine, as I said it connects fine.

The frustrating part is that the geth node doesn't realize that it's not connecting becuase it doesn't know there's anything to connect to. So I have no errors to start debugging from. I have tried manually adding peers at the json console. I get "true" but then listing peers shows nothing.

Can anyone tell me how to start debugging?

  • Are you using the same genesis file that the first node was built with? Can you please try that? – Ashish Sinha Jun 19 '17 at 12:41
  • @AshishSinha I think you're mis-reading. The first node is a Parity node, meaning that it has a chian spec but not a genesis file. The node that doesn't connect is a geth node. – stone.212 Jun 20 '17 at 2:06
2

It's difficult to answer your question without seeing the chain spec, but for reference I can provide you with a working chainspec for both clients:

git clone https://github.com/5chdn/crossclient-chainspec
cd crossclient-chainspec

Geth:

$ geth init --datadir ~/.ethereum/crossclient geth.json
$ geth --datadir ~/.ethereum/crossclient --networkid 1337 --port 31333 --rpcport 8538

Parity:

$ parity --chain parity.json --port 31337 --jsonrpc-port 8539

Or use keorn's chain spec converter.

  • I"m not sure how the chain spec converter can help, since that seems to convert to chain spec file from genesis, and I'm going the other way around. Also I have looked at your files and they appear to carryover the same information that I have carried over in mine. And I am invoking geth and parity the same way as you are. What I really need is a way to start debugging, which is what my question is asking for (plus I edited the title to make that even more clear.) – stone.212 Jun 21 '17 at 22:08
  • I went through this debugging process multiple times. It's generally easier to just use working specs. If you wont share your specs, I have no idea how we can help here. – soc1c Jun 22 '17 at 8:35
  • (A) I don't see anywhere that you went through debugging steps. Maybe I missed something? (B) if you don't know how you can help, please stop replying. – stone.212 Jun 23 '17 at 0:36
  • did you mean to specify port 31337 for parity and 31333 for geth? I'm guessing it's just a simple typo but want to make sure. – stone.212 Jun 23 '17 at 0:56
  • The ports were chosen randomly to avoid conflicts on local machines. If you really want to go through the hassle and debug this issue (instead of using working configurations), increase the verbosity of both clients to the maximum and read through the logs. – soc1c Jun 23 '17 at 8:48

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.