[Ethereum] Is “networkID” hex or decimal

command-linego-ethereumparityprivate-blockchain

In the parity chain spec file, there is a value for NetworkID. Is this in hex or decimal?

On the geth command line, you can specify the network with "–networkid X". Is that hex or decimal?

I am starting to wonder if the reason my geth and parity nodes cannot talk to each other is because I'm encoding the numbers differently.

Best Answer

Parity accepts both, hex and decimal. Just make sure hex numbers are prefixed with 0x (e.g., 0x539) and decimals are written normally (e.g., 1337).

The incompatibilities between Geth and Parity are painful if you try to setup cross-client networks. The reason is that Geth is not designed to run different network configurations other than a modified genesis block, while Parity allows you to fine-tune all variables of a full chain specification.

There are tools to easy you translating a Geth genesis.json to a Parity chainspec.json like keorn/parity-spec or the preconfigured network 5chdn/crossclient-chainspec.

Related Topic