I'm currently setting up Local Private Ethereum Network using Puppeth. And followed the steps provided in tutorial: Provisioning a Local Private Ethereum Network with Puppeth .
As per the above documentation:
7. Connect the two nodes. console2> admin.nodeInfo.enode {ENODE-URL} console1> admin.addPeer({ENODE-URL}) If everything went well, net.peerCount should be 1 in both consoles.
But, below is what I'm getting:
Console 1:
myMac:console1 admin$ geth attach ipc:../node1/geth.ipc Welcome to the Geth JavaScript console! instance: Geth/v1.7.3-stable/darwin-amd64/go1.9.2 coinbase: 0xf8b09187db667abb9cb1494237e65b3e2c3373a0 at block: 0 (Wed, 10 Jan 2018 21:36:58 +04) datadir: /Users/admin/EtherNet/testnet/node1 modules: admin:1.0 clique:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0 > admin.addPeer("enode://f48fcf69ba27442ff3813912ec12ea1ad249f14739dabfcadb3985c3654540e047700030adba5800bf33d0adbdd9ca5f1c47aae2498a0d9dafb8c2fd730969b4@[::]:3002" ... ^C > admin.addPeer("enode://f48fcf69ba27442ff3813912ec12ea1ad249f14739dabfcadb3985c3654540e047700030adba5800bf33d0adbdd9ca5f1c47aae2498a0d9dafb8c2fd730969b4@[::]:3002") true > net.peerCount 3 > > admin.addPeer("enode://f48fcf69ba27442ff3813912ec12ea1ad249f14739dabfcadb3985c3654540e047700030adba5800bf33d0adbdd9ca5f1c47aae2498a0d9dafb8c2fd730969b4@[::]:3002") true > net.peerCount 5 > net.peerCount 1 > net.peerCount 1 >
Console 2:
myMac:console2 admin$ geth attach ipc:../node2/geth.ipc Welcome to the Geth JavaScript console! instance: Geth/v1.7.3-stable/darwin-amd64/go1.9.2 coinbase: 0x3fd97155061e47960b59b563a178fa248493017c at block: 0 (Wed, 10 Jan 2018 21:36:58 +04) datadir: /Users/admin/EtherNet/testnet/node2 modules: admin:1.0 clique:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0 > > admin. admin.addPeer admin.getNodeInfo admin.nodeInfo admin.sleepBlocks admin.toLocaleString admin.constructor admin.getPeers admin.peers admin.startRPC admin.toString admin.datadir admin.hasOwnProperty admin.propertyIsEnumerable admin.startWS admin.valueOf admin.exportChain admin.importChain admin.removePeer admin.stopRPC admin.getDatadir admin.isPrototypeOf admin.sleep admin.stopWS > admin.nodeInfo. (anonymous): Line 2:1 Unexpected end of input > admin.nodeInfo.enode "enode://f48fcf69ba27442ff3813912ec12ea1ad249f14739dabfcadb3985c3654540e047700030adba5800bf33d0adbdd9ca5f1c47aae2498a0d9dafb8c2fd730969b4@[::]:3002" > net.peerCount 1 > > net.peerCount 2 > net.peerCount 1 > net.peerCount 2 > > net.peerCount 3 > net.peerCount 5 >
I've ONLY 2 nodes and node2 is attached to node1. So, there is ONLY ONE PEER for each. But, why does the 'net.peerCount' keep changing, on subsequent execution of the same command?