4

I'm running an ethereum (with geth) and a parity instance on 2 nodes, using similar genesis files for both. I've also specified the geth node's enode ID as bootnode for parity. Yet the 2 nodes are unable to detect each other.

geth.genesis:

{
"nonce": "0x0000000000000042",
"difficulty": "0x4",
"alloc": {
    "6a5b342ec71def8aac337b82969d9ddd811023c9": {
        "balance": "5000000000000000000000000"
    }
},
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x1100000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0xFFFF0000"
}

parity.genesis:

{
"name": "node",
"engine": {
      "Ethash": {
              "params": {
                      "gasLimitBoundDivisor": "0x0400",
                      "minimumDifficulty": "0x4",
                      "difficultyBoundDivisor": "0x0800",
                      "durationLimit": "0x0a",
                      "blockReward": "0x4563918244F40000",
                      "registrar": "",
                      "frontierCompatibilityModeLimit": "0x0"
              }
      }
},
"params": {
      "accountStartNonce": "0x0000000000000042",
      "maximumExtraDataSize": "0x20",
      "minGasLimit": "0xFFFF0000",
      "networkID" : "0x16"
},
"genesis": {
      "seal": {
              "ethereum": {
                      "nonce": "0x0000000000000042",
                      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
              }
      },
      "difficulty": "0x4",
      "author": "0x0000000000000000000000000000000000000000",
      "timestamp": "0x00",
      "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "extraData": "0x1100000000000000000000000000000000000000000000000000000000000000",
      "gasLimit": "0xFFFF0000"
},
"nodes": [
],
"accounts": {
      "6a5b342ec71def8aac337b82969d9ddd811023c9": { "balance": "5000000000000000000000000" }

Does anyone have an idea about what might be going wrong? I even tried the route of copying parity.genesis to geth.genesis but to no avail. I'm successfully able to connect 2 geth nodes or 2 parity nodes to each-other however.

  • If you add the nodes to each other client, what's the log output? – Waqar Lim Jan 9 '17 at 13:20
  • Surprisingly, manually adding the parity node with admin.addPeer() in geth cli works! What can be the reason for this behaviour? – Vishesh Jan 9 '17 at 15:51
  • The parity peer however disconnected once I started mining for blocks in geth, with the following log 2017-01-09 21:17:45 Stage 1 block verification failed for 6fd5…b968: Block(InvalidGasLimit(OutOfBounds { min: Some(4294901760), max: None, found: 4290707521 })). In fact, the block gas limit declined from 4294901760 in block 0 to 4290707521 in block 1. What can be the reason for this behavior? – Vishesh Jan 9 '17 at 16:07
  • Are you defining the target gas limit when running geth? – Waqar Lim Jan 9 '17 at 23:17
  • No, I'm defining no others parameters apart from those in the genesis files shown above. – Vishesh Jan 10 '17 at 5:22
3

The connection will drop if they are on different chains, you can run Parity with -lsync=trace to see what is going on.

It probably has to do with hard fork transitions, Geth does not include them by default. Have a look here and try using the linked generator.

  • Thanks a lot! I had manually converted the file to parity format, being unaware of this tool. If possible, it would be helpful to have an online version of it, just like Parity Config Generator, as it requires quite a lot of things to be installed for one time use. – Vishesh Jan 10 '17 at 10:38

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.