1

I created a private chain with my friend with exactly the same genesis block and we wanted to connect through the admin.addPeer method. The problem is that for some reason they are able to connect to me, i.e. after adding me they showed up in my admin.peers, yet when I tried at another time to add them, the method admin.addPeer only returned true and my admin.peers showed empty []. We have tried a couple times and the same thing happened, namely that they were able to add me yet I could not add them. I am really confused about why this happened.

Here is my genesis.json file:

{

"config": {

"chainId": 16,

"homesteadBlock": 0,

"eip155Block": 0,

"eip158Block": 0

},

"nonce": "0x0000000000000042",

"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",

"difficulty": "0x200",

"alloc": {},

"coinbase": "0x0000000000000000000000000000000000000000",

"timestamp": "0x00",

"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",

"gasLimit": "0xffffffff",

"alloc": {

}

}

My friend had the same genesis file.

0

I faced this issue too, but I finally resolved it by following steps:

  • Make sure that you are using latest geth version

  • First of all, you both need to use same genesis file

  • While starting geth, you should use -ipcdisable flag

  • Use the network id which is same as chainID in genesis file

Hope this helps you :)

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.